@brickclay-org/ui 0.1.76 → 0.1.78
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/fesm2022/brickclay-org-ui.mjs +2073 -85
- package/fesm2022/brickclay-org-ui.mjs.map +1 -1
- package/index.d.ts +1106 -25
- package/package.json +1 -1
- package/src/assets/icons/no-data-found.jpg +0 -0
- package/src/lib/column-select/components/column-select/column-select.css +3 -2
- package/src/lib/hierarchical-select/hierarchical-select.css +11 -1
- package/src/lib/input/input.css +88 -0
- package/src/lib/menu/menu.css +140 -16
- package/src/lib/table/table.css +646 -0
- package/src/styles.css +1 -0
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
/* =====================================================================
|
|
2
|
+
bk-table
|
|
3
|
+
|
|
4
|
+
Visual language is carried over from bk-grid unchanged — same header
|
|
5
|
+
fill, same 13px medium body text, same #EBEDF3 rules, same sort icons —
|
|
6
|
+
so the two controls sit side by side without looking like different
|
|
7
|
+
products.
|
|
8
|
+
|
|
9
|
+
Styles are global (ViewEncapsulation.None). Cells are written by the
|
|
10
|
+
consumer and projected in, so they never carry this component's scope
|
|
11
|
+
attribute and emulated styles would miss them entirely. Everything is
|
|
12
|
+
namespaced `bk-` to keep that safe.
|
|
13
|
+
===================================================================== */
|
|
14
|
+
|
|
15
|
+
.bk-table-host {
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.bk-table-wrapper {
|
|
20
|
+
@apply w-full;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* ---------- Frame ----------
|
|
24
|
+
|
|
25
|
+
The single box that owns the outline and the corners. Nothing inside draws
|
|
26
|
+
an outline of its own; `overflow: hidden` clips every child to the curve, so
|
|
27
|
+
the header, the title bar and the border can't describe the same corner
|
|
28
|
+
differently. (They did: the radius used to sit on `th:first-child` while the
|
|
29
|
+
border sat on the table, which left a notch at the top corners — and a title
|
|
30
|
+
bar above the header produced a second, offset rounded box.)
|
|
31
|
+
|
|
32
|
+
Clipping here is safe for sticky: the scrolling ancestor is the container
|
|
33
|
+
below, so pinned cells still resolve against that. */
|
|
34
|
+
|
|
35
|
+
.bk-table-frame {
|
|
36
|
+
border: 1px solid #ebedf3;
|
|
37
|
+
border-radius: 0.75rem;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ---------- Title / footer bars ---------- */
|
|
42
|
+
|
|
43
|
+
.bk-table-title-bar,
|
|
44
|
+
.bk-table-footer-bar {
|
|
45
|
+
@apply text-[13px] font-semibold text-[#15191E] bg-[#F9FAFA] px-4 py-2.5;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.bk-table-title-bar {
|
|
49
|
+
border-bottom: 1px solid #ebedf3;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.bk-table-footer-bar {
|
|
53
|
+
border-top: 1px solid #ebedf3;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* ---------- Scroll container ---------- */
|
|
57
|
+
|
|
58
|
+
.bk-table-container {
|
|
59
|
+
@apply relative overflow-auto;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.bk-table {
|
|
63
|
+
/*
|
|
64
|
+
`separate`, not `collapse`. Collapsed borders belong to the table rather
|
|
65
|
+
than to individual cells, and a sticky cell carries only its own box —
|
|
66
|
+
so under `collapse` a pinned column scrolls out from under its own
|
|
67
|
+
borders. Every rule below is therefore drawn per cell.
|
|
68
|
+
*/
|
|
69
|
+
@apply min-w-full text-left;
|
|
70
|
+
border-collapse: separate;
|
|
71
|
+
border-spacing: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ---------- Header ---------- */
|
|
75
|
+
|
|
76
|
+
.bk-th {
|
|
77
|
+
@apply bg-[#F9FAFA] text-xs text-[#60646C] font-semibold capitalize px-[17px] py-2.5 whitespace-nowrap align-middle;
|
|
78
|
+
border-bottom: 1px solid #ebedf3;
|
|
79
|
+
position: sticky;
|
|
80
|
+
top: 0;
|
|
81
|
+
/*
|
|
82
|
+
Above body cells, below pinned columns.
|
|
83
|
+
|
|
84
|
+
Deliberately no `transform: translateZ(0)` here, though bk-grid has one: a
|
|
85
|
+
transform makes the cell the containing block for `position: fixed`
|
|
86
|
+
descendants, which strands any popover opened from a header — the filter
|
|
87
|
+
menu resolved its viewport coordinates against the `th` and was then
|
|
88
|
+
clipped by the scroll container. GPU promotion is not worth that.
|
|
89
|
+
*/
|
|
90
|
+
z-index: 2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/*
|
|
94
|
+
Grouped headers: the second row sticks below the first, at whatever height
|
|
95
|
+
the first actually rendered at (published by the component as a custom
|
|
96
|
+
property). The fallback only applies before the first measurement lands.
|
|
97
|
+
*/
|
|
98
|
+
.bk-table thead tr:nth-child(2) .bk-th {
|
|
99
|
+
top: var(--bk-thead-row-1, 38px);
|
|
100
|
+
z-index: 1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.bk-th-content {
|
|
104
|
+
@apply flex items-center justify-between gap-1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/*
|
|
108
|
+
The header's label + sort/filter icons are laid out with flexbox, so the
|
|
109
|
+
`align` input's `text-align` (set on the `th` itself) never reaches them —
|
|
110
|
+
text-align has no effect on a flex item's position, only justify-content
|
|
111
|
+
does. `space-between` above is what spreads the label from a trailing
|
|
112
|
+
filter icon on a left/default column; these overrides move both together
|
|
113
|
+
to the opposite edge instead of stretching them apart.
|
|
114
|
+
*/
|
|
115
|
+
.bk-th-align-right .bk-th-content {
|
|
116
|
+
@apply justify-end;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.bk-th-align-center .bk-th-content {
|
|
120
|
+
@apply justify-center;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.bk-th-label {
|
|
124
|
+
@apply inline-flex items-center gap-1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.bk-th-sortable .bk-th-label {
|
|
128
|
+
@apply cursor-pointer select-none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.bk-th-selection {
|
|
132
|
+
@apply flex items-center gap-1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/*
|
|
136
|
+
A checkbox column carries no text, so the 17px reading gutter is dead space —
|
|
137
|
+
it was inflating the column past whatever `width` asked for and leaving a gap
|
|
138
|
+
between the checkbox and the first real column.
|
|
139
|
+
*/
|
|
140
|
+
.bk-cell-selection {
|
|
141
|
+
@apply px-3;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.bk-th-selection-caret {
|
|
145
|
+
@apply inline-flex items-center justify-center size-4 rounded hover:bg-[#EFF1F4];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* ---------- Body ---------- */
|
|
149
|
+
|
|
150
|
+
.bk-td {
|
|
151
|
+
@apply text-[#15191E] text-[13px] font-medium leading-4 px-4 py-2 align-middle bg-white;
|
|
152
|
+
border-bottom: 1px solid #ebedf3;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.bk-td-content {
|
|
156
|
+
@apply inline-flex items-center gap-1 align-middle;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/*
|
|
160
|
+
`inline-flex` above is what makes plain cell content shrink-wrap to itself
|
|
161
|
+
and still obey the cell's `text-align` — it's an atomic inline box, same as
|
|
162
|
+
a `<span>` or `<img>` would be. Block-level content (a nested `bk-table`)
|
|
163
|
+
needs the opposite: a full-width box it can actually fill. `[block]` on
|
|
164
|
+
`td[bk-td]` swaps one for the other.
|
|
165
|
+
*/
|
|
166
|
+
.bk-td-content-block {
|
|
167
|
+
@apply block w-full;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.bk-table tbody tr:hover .bk-td {
|
|
171
|
+
@apply bg-[#FBFBFC];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* ---------- Density ----------
|
|
175
|
+
|
|
176
|
+
Four steps, roomiest first: lg, default, md, sm. `.bk-th` / `.bk-td` above
|
|
177
|
+
carry the `default` values, so only the other three appear here. The type
|
|
178
|
+
scale moves with the padding — padding alone makes a large table look like a
|
|
179
|
+
normal one that has been stretched. */
|
|
180
|
+
|
|
181
|
+
.bk-table-lg .bk-th {
|
|
182
|
+
@apply px-5 py-3.5 text-[13px];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.bk-table-lg .bk-td {
|
|
186
|
+
@apply px-5 py-3.5 text-sm leading-5;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.bk-table-md .bk-th {
|
|
190
|
+
@apply px-3 py-2;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.bk-table-md .bk-td {
|
|
194
|
+
@apply px-3 py-1.5;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.bk-table-sm .bk-th {
|
|
198
|
+
@apply px-2 py-1.5 text-[11px];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.bk-table-sm .bk-td {
|
|
202
|
+
@apply px-2 py-1 text-xs;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* The selection column's tighter gutter tracks the density too, or it stops
|
|
206
|
+
being tighter than the columns around it. */
|
|
207
|
+
.bk-table-lg .bk-cell-selection {
|
|
208
|
+
@apply px-4;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.bk-table-md .bk-cell-selection {
|
|
212
|
+
@apply px-2.5;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.bk-table-sm .bk-cell-selection {
|
|
216
|
+
@apply px-2;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* ---------- Bordered ----------
|
|
220
|
+
|
|
221
|
+
Internal rules only. The outer edges belong to the frame, so drawing them
|
|
222
|
+
here too would leave a 2px line down the sides. */
|
|
223
|
+
|
|
224
|
+
.bk-table-bordered .bk-th,
|
|
225
|
+
.bk-table-bordered .bk-td {
|
|
226
|
+
border-right: 1px solid #ebedf3;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.bk-table-bordered .bk-th:last-child,
|
|
230
|
+
.bk-table-bordered .bk-td:last-child {
|
|
231
|
+
border-right: 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* Same reasoning on the bottom edge: the last row's rule and the frame would
|
|
235
|
+
otherwise stack. A footer bar supplies its own top border in its place. */
|
|
236
|
+
.bk-table tbody tr:last-child > .bk-td {
|
|
237
|
+
border-bottom: 0;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/*
|
|
241
|
+
The rule above assumes the last row actually reaches the frame — true
|
|
242
|
+
whenever rows fill or overflow the container, false the moment `scroll.y`
|
|
243
|
+
reserves more height (`fill`, most commonly) than the rows need. Without
|
|
244
|
+
it, real data just trails into blank reserved space with nothing marking
|
|
245
|
+
where it stopped. `.bk-table-underfilled` is set by the component (only
|
|
246
|
+
when rows fall genuinely short of the reserved height, never when they
|
|
247
|
+
fill or overflow it) precisely so this and the rule above are never both
|
|
248
|
+
trying to close the same edge at once.
|
|
249
|
+
*/
|
|
250
|
+
.bk-table-underfilled .bk-table tbody tr:last-child > .bk-td {
|
|
251
|
+
border-bottom: 1px solid #ebedf3;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* ---------- Fixed columns ---------- */
|
|
255
|
+
|
|
256
|
+
.bk-cell-sticky {
|
|
257
|
+
position: sticky;
|
|
258
|
+
/* Above ordinary body cells; header cells stay above via their own z-index. */
|
|
259
|
+
z-index: 1;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.bk-th.bk-cell-sticky {
|
|
263
|
+
/* A pinned header cell is pinned twice over — it must beat both. */
|
|
264
|
+
z-index: 3;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/*
|
|
268
|
+
A shadow, not a border: it marks the boundary only while there is content
|
|
269
|
+
scrolled underneath, matching how bk-grid shaded its sticky action column.
|
|
270
|
+
*/
|
|
271
|
+
.bk-cell-sticky-left::after,
|
|
272
|
+
.bk-cell-sticky-right::before {
|
|
273
|
+
content: '';
|
|
274
|
+
@apply absolute top-0 bottom-0 w-2 pointer-events-none;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.bk-cell-sticky-left::after {
|
|
278
|
+
right: -8px;
|
|
279
|
+
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05), transparent);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.bk-cell-sticky-right::before {
|
|
283
|
+
left: -8px;
|
|
284
|
+
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.05), transparent);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* ---------- Overflow behaviour ---------- */
|
|
288
|
+
|
|
289
|
+
.bk-cell-ellipsis {
|
|
290
|
+
@apply overflow-hidden text-ellipsis whitespace-nowrap;
|
|
291
|
+
/* Ellipsis needs a bound to truncate against; without it the cell just grows. */
|
|
292
|
+
max-width: 0;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/*
|
|
296
|
+
The rule above alone clips the text but never shows the "…" — a browser
|
|
297
|
+
limitation, not a bug here: text-overflow only marks up overflowing plain
|
|
298
|
+
inline content, and `.bk-td-content` (the cell's own wrapper) is
|
|
299
|
+
`inline-flex`, which establishes its own formatting context. An atomic
|
|
300
|
+
flex box that overflows just gets cut off with nothing to show for it.
|
|
301
|
+
The fix is the standard one: give the *text itself* — not the flex row
|
|
302
|
+
around it — the overflow/ellipsis rule, on a plain span with nothing
|
|
303
|
+
flex about it, and let `.bk-td-content` stretch to the td's real
|
|
304
|
+
(table-layout: fixed) width instead of shrink-wrapping, so that span has
|
|
305
|
+
a concrete width to shrink against rather than its own content size.
|
|
306
|
+
*/
|
|
307
|
+
.bk-td-content-ellipsis {
|
|
308
|
+
@apply flex w-full;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.bk-td-ellipsis-text {
|
|
312
|
+
@apply overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.bk-cell-break-word {
|
|
316
|
+
@apply whitespace-normal;
|
|
317
|
+
word-break: break-all;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* ---------- Tree indent + expand toggle ---------- */
|
|
321
|
+
|
|
322
|
+
.bk-td-indent {
|
|
323
|
+
@apply inline-block;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.bk-td-expand,
|
|
327
|
+
.bk-td-expand-spacer {
|
|
328
|
+
@apply inline-flex items-center justify-center size-4 shrink-0;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.bk-td-expand {
|
|
332
|
+
@apply rounded text-[#78829D] hover:bg-[#EFF1F4] transition-transform duration-200;
|
|
333
|
+
transform: rotate(-90deg);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.bk-td-expand-open {
|
|
337
|
+
transform: rotate(0deg);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* ---------- Expanded detail row ---------- */
|
|
341
|
+
|
|
342
|
+
.bk-expanded-row > .bk-td,
|
|
343
|
+
.bk-expanded-row > td {
|
|
344
|
+
@apply bg-[#FBFBFC];
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* ---------- Nested table ----------
|
|
348
|
+
|
|
349
|
+
A table dropped into an expanded row via `[bkExpand]` is, by default, an
|
|
350
|
+
ordinary cell holding an ordinary table — padded like any other `td`, and
|
|
351
|
+
framed like any other `bk-table`. That reads as a small card floating
|
|
352
|
+
inside a cell. These two classes together make it read instead as a
|
|
353
|
+
continuation of the row it expanded from: the outer cell stops insetting
|
|
354
|
+
it, and the inner table drops the card border/radius that would otherwise
|
|
355
|
+
double up against the outer table's own frame. */
|
|
356
|
+
|
|
357
|
+
.bk-td-flush {
|
|
358
|
+
/* Horizontal stays 0 — that's what keeps the nested table edge-to-edge.
|
|
359
|
+
Vertical gets a little room so it doesn't touch the parent row's border
|
|
360
|
+
or the row right below it. */
|
|
361
|
+
@apply p-3;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.bk-table-flush .bk-table-frame {
|
|
365
|
+
border: 0;
|
|
366
|
+
border-radius: 0;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/* ---------- Summary / totals ---------- */
|
|
370
|
+
|
|
371
|
+
/* Carries the top rule itself, because the last body row drops its bottom
|
|
372
|
+
border to avoid doubling with the frame. */
|
|
373
|
+
.bk-table-summary .bk-td {
|
|
374
|
+
@apply bg-[#F9FAFA] font-semibold;
|
|
375
|
+
border-top: 1px solid #ebedf3;
|
|
376
|
+
border-bottom: 0;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.bk-table-summary-fixed .bk-td {
|
|
380
|
+
position: sticky;
|
|
381
|
+
bottom: 0;
|
|
382
|
+
z-index: 2;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/* ---------- Sort icons (carried over from grid.css) ---------- */
|
|
386
|
+
|
|
387
|
+
.bk-sort-icon {
|
|
388
|
+
display: inline-flex;
|
|
389
|
+
flex-direction: column;
|
|
390
|
+
justify-content: center;
|
|
391
|
+
align-items: center;
|
|
392
|
+
height: 0.875rem;
|
|
393
|
+
width: 0.875rem;
|
|
394
|
+
gap: 0.125rem;
|
|
395
|
+
line-height: 1;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.bk-sort-icon::before,
|
|
399
|
+
.bk-sort-icon::after {
|
|
400
|
+
display: inline-block;
|
|
401
|
+
content: '';
|
|
402
|
+
height: 0.3rem;
|
|
403
|
+
width: 0.54rem;
|
|
404
|
+
background-repeat: no-repeat;
|
|
405
|
+
background-position: center;
|
|
406
|
+
background-size: cover;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.bk-sort-icon::before {
|
|
410
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3e%3cpath d='M1.08333 4.83333C0.908333 4.83333 0.791667 4.775 0.675 4.65833C0.441667 4.425 0.441667 4.075 0.675 3.84167L3.59167 0.925C3.825 0.691667 4.175 0.691667 4.40833 0.925L7.325 3.84167C7.55833 4.075 7.55833 4.425 7.325 4.65833C7.09167 4.89167 6.74167 4.89167 6.50833 4.65833L4 2.15L1.49167 4.65833C1.375 4.775 1.25833 4.83333 1.08333 4.83333Z' fill='%2378829D'/%3e%3c/svg%3e");
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.bk-sort-icon::after {
|
|
414
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3e%3cpath d='M4 4.24984C3.825 4.24984 3.70833 4.1915 3.59167 4.07484L0.675 1.15817C0.441667 0.924838 0.441667 0.574837 0.675 0.341504C0.908333 0.108171 1.25833 0.108171 1.49167 0.341504L4 2.84984L6.50833 0.341504C6.74167 0.108171 7.09167 0.108171 7.325 0.341504C7.55833 0.574837 7.55833 0.924838 7.325 1.15817L4.40833 4.07484C4.29167 4.1915 4.175 4.24984 4 4.24984Z' fill='%2378829D'/%3e%3c/svg%3e");
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.bk-sort-asc::before {
|
|
418
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3e%3cpath d='M1.08333 4.83333C0.908333 4.83333 0.791667 4.775 0.675 4.65833C0.441667 4.425 0.441667 4.075 0.675 3.84167L3.59167 0.925C3.825 0.691667 4.175 0.691667 4.40833 0.925L7.325 3.84167C7.55833 4.075 7.55833 4.425 7.325 4.65833C7.09167 4.89167 6.74167 4.89167 6.50833 4.65833L4 2.15L1.49167 4.65833C1.375 4.775 1.25833 4.83333 1.08333 4.83333Z' fill='%234B5675'/%3e%3c/svg%3e");
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.bk-sort-asc::after {
|
|
422
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3e%3cpath d='M4 4.24984C3.825 4.24984 3.70833 4.1915 3.59167 4.07484L0.675 1.15817C0.441667 0.924838 0.441667 0.574837 0.675 0.341504C0.908333 0.108171 1.25833 0.108171 1.49167 0.341504L4 2.84984L6.50833 0.341504C6.74167 0.108171 7.09167 0.108171 7.325 0.341504C7.55833 0.574837 7.55833 0.924838 7.325 1.15817L4.40833 4.07484C4.29167 4.1915 4.175 4.24984 4 4.24984Z' fill='%23C4CADA'/%3e%3c/svg%3e");
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.bk-sort-desc::before {
|
|
426
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3e%3cpath d='M1.08333 4.83333C0.908333 4.83333 0.791667 4.775 0.675 4.65833C0.441667 4.425 0.441667 4.075 0.675 3.84167L3.59167 0.925C3.825 0.691667 4.175 0.691667 4.40833 0.925L7.325 3.84167C7.55833 4.075 7.55833 4.425 7.325 4.65833C7.09167 4.89167 6.74167 4.89167 6.50833 4.65833L4 2.15L1.49167 4.65833C1.375 4.775 1.25833 4.83333 1.08333 4.83333Z' fill='%23C4CADA'/%3e%3c/svg%3e");
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.bk-sort-desc::after {
|
|
430
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3e%3cpath d='M4 4.24984C3.825 4.24984 3.70833 4.1915 3.59167 4.07484L0.675 1.15817C0.441667 0.924838 0.441667 0.574837 0.675 0.341504C0.908333 0.108171 1.25833 0.108171 1.49167 0.341504L4 2.84984L6.50833 0.341504C6.74167 0.108171 7.09167 0.108171 7.325 0.341504C7.55833 0.574837 7.55833 0.924838 7.325 1.15817L4.40833 4.07484C4.29167 4.1915 4.175 4.24984 4 4.24984Z' fill='%234B5675'/%3e%3c/svg%3e");
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.bk-sort-priority {
|
|
434
|
+
@apply inline-flex items-center justify-center min-w-4 h-4 px-1 rounded bg-[#EFF1F4] text-[10px] font-semibold text-[#4B5675];
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* ---------- Filter menu ---------- */
|
|
438
|
+
|
|
439
|
+
.bk-filter-trigger {
|
|
440
|
+
@apply inline-flex items-center justify-center size-5 rounded text-[#78829D] hover:bg-[#EFF1F4];
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.bk-filter-active {
|
|
444
|
+
@apply text-black;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.bk-filter-menu {
|
|
448
|
+
@apply min-w-[180px];
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.bk-filter-list {
|
|
452
|
+
@apply flex flex-col gap-2 max-h-60 overflow-y-auto py-1;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.bk-filter-option {
|
|
456
|
+
@apply text-[13px] text-[#15191E];
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.bk-filter-actions {
|
|
460
|
+
@apply flex items-center justify-between gap-2 pt-2 mt-2;
|
|
461
|
+
border-top: 1px solid #ebedf3;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.bk-filter-btn {
|
|
465
|
+
@apply text-xs font-semibold px-2.5 py-1 rounded;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.bk-filter-btn-link {
|
|
469
|
+
@apply text-[#60646C] hover:bg-[#F1F2F4];
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.bk-filter-btn-primary {
|
|
473
|
+
@apply bg-black text-white hover:bg-[#2A2E36];
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/* ---------- Selection menu ---------- */
|
|
477
|
+
|
|
478
|
+
.bk-table-menu {
|
|
479
|
+
@apply min-w-[160px] flex flex-col;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.bk-table-menu-item {
|
|
483
|
+
@apply w-full text-left text-[13px] text-[#15191E] px-2 py-1.5 rounded hover:bg-[#F1F2F4];
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/* ---------- Loading / empty ---------- */
|
|
487
|
+
|
|
488
|
+
.bk-table-loading {
|
|
489
|
+
@apply absolute inset-0 flex items-center justify-center bg-white/60 z-10;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.bk-table-spinner {
|
|
493
|
+
@apply block size-8 rounded-full border-2 border-[#EBEDF3] border-t-black;
|
|
494
|
+
animation: bk-table-spin 0.8s linear infinite;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
@keyframes bk-table-spin {
|
|
498
|
+
to {
|
|
499
|
+
transform: rotate(360deg);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/*
|
|
504
|
+
Absolutely positioned against `.bk-table-container` (already `relative`),
|
|
505
|
+
spanning from just below the sticky header down to the container's own
|
|
506
|
+
bottom — not `inset: 0`, which would sit under the header rather than
|
|
507
|
+
below it. In normal flow this block only ever centers within its own
|
|
508
|
+
shrink-wrapped height, which barely shows with the table's default
|
|
509
|
+
content-sized body; it becomes visibly wrong the moment `scroll.y` (with
|
|
510
|
+
`fill`) or a tall `min-height` reserves real empty space below the header,
|
|
511
|
+
since centering-within-your-own-box then centers within a box far shorter
|
|
512
|
+
than the space actually available.
|
|
513
|
+
*/
|
|
514
|
+
.bk-table-empty {
|
|
515
|
+
@apply absolute inset-x-0 bottom-0 flex flex-col justify-center items-center py-10;
|
|
516
|
+
top: var(--bk-thead-row-1, 38px);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.bk-table-empty-img {
|
|
520
|
+
@apply mb-3 w-96 max-w-full;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.bk-table-empty-text {
|
|
524
|
+
@apply block text-sm leading-3 text-center font-semibold text-[#60646C] mt-2;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* ---------- Pagination ---------- */
|
|
528
|
+
|
|
529
|
+
/*
|
|
530
|
+
A bare slot. bk-pagination already draws its own top rule and padding, so
|
|
531
|
+
anything added here lands on top of them: the wrapper's border and the
|
|
532
|
+
pager's border showed as two lines, the inner one inset by the doubled
|
|
533
|
+
padding. The pager owns the row.
|
|
534
|
+
*/
|
|
535
|
+
.bk-table-pagination {
|
|
536
|
+
@apply contents;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/* ---------- Virtual scroll ---------- */
|
|
540
|
+
|
|
541
|
+
.bk-table-viewport {
|
|
542
|
+
@apply w-full;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/*
|
|
546
|
+
Scrolled programmatically to match the body, never by the user — its own
|
|
547
|
+
scrollbar would be a second, conflicting control over the same axis.
|
|
548
|
+
*/
|
|
549
|
+
.bk-table-virtual-head {
|
|
550
|
+
@apply w-full overflow-hidden;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/* The lifted header is already at the top; sticky would be redundant here. */
|
|
554
|
+
.bk-table-virtual-head .bk-th {
|
|
555
|
+
position: static;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/* ---------- Indeterminate checkbox ---------- */
|
|
559
|
+
|
|
560
|
+
/*
|
|
561
|
+
bk-checkbox has checked and unchecked states only. A select-all that is
|
|
562
|
+
partly on is neither, and showing it as either one is a lie about the
|
|
563
|
+
selection — so the dash is drawn over the box from here.
|
|
564
|
+
*/
|
|
565
|
+
.bk-checkbox-indeterminate .checkbox {
|
|
566
|
+
@apply bg-black border-black;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.bk-checkbox-indeterminate .checkbox::after {
|
|
570
|
+
content: '';
|
|
571
|
+
@apply absolute w-2 h-0.5 bg-white rounded-sm;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/* ---------- Drag sorting (carried over from grid.css) ---------- */
|
|
575
|
+
|
|
576
|
+
.cdk-drag-preview {
|
|
577
|
+
display: table;
|
|
578
|
+
/*
|
|
579
|
+
`bk-table` itself switches to `fixed` once its columns are measured (see
|
|
580
|
+
`BkTable.freezeColumnWidths()`), specifically so a column's width comes
|
|
581
|
+
only from its own declared width, never from a cell's content pulling it
|
|
582
|
+
wider or a `max-width` pulling it narrower (that's the whole trick behind
|
|
583
|
+
`.bk-cell-ellipsis`'s `max-width: 0` — see table-cell-base.ts). The preview
|
|
584
|
+
is a lone `<tr>` cloned out of that table, and `table-layout` isn't
|
|
585
|
+
inherited, so left on the default `auto` it re-opens exactly the sizing
|
|
586
|
+
problem `fixed` exists to close: an ellipsis column's `max-width: 0`
|
|
587
|
+
collapses the column instead of just clipping its text, since `auto`
|
|
588
|
+
layout (unlike `fixed`) actually consults it when sizing. `BkTableDrag`
|
|
589
|
+
still copies each cell's real width across in `onStart` — that only lands
|
|
590
|
+
correctly if the preview resolves widths the same way the source table
|
|
591
|
+
does.
|
|
592
|
+
*/
|
|
593
|
+
table-layout: fixed;
|
|
594
|
+
width: 100%;
|
|
595
|
+
background: #fff;
|
|
596
|
+
box-shadow:
|
|
597
|
+
0 5px 5px -3px rgba(0, 0, 0, 0.2),
|
|
598
|
+
0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
599
|
+
0 3px 14px 2px rgba(0, 0, 0, 0.12);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.cdk-drag-placeholder {
|
|
603
|
+
opacity: 0.4;
|
|
604
|
+
background-color: #f3f4f6;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.cdk-drag-animating,
|
|
608
|
+
.cdk-drop-list-dragging .cdk-drag {
|
|
609
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/*
|
|
613
|
+
inline-flex + items-center: the default icon is an SVG, not a text glyph, so
|
|
614
|
+
it needs to be centered against whatever sits beside it — including its own
|
|
615
|
+
row height when it is the only thing in a dedicated column.
|
|
616
|
+
*/
|
|
617
|
+
.bk-drag-handle {
|
|
618
|
+
@apply cursor-move inline-flex items-center justify-center text-[#C4CADA] hover:text-[#78829D] mr-2 align-middle;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/* ---------- Tree drag indicator ----------
|
|
622
|
+
|
|
623
|
+
The three drop zones drawn live: a line above the row (before), a line
|
|
624
|
+
below it (after), a tinted row (inside). The line is positioned by
|
|
625
|
+
BkTreeDrag inside .bk-table-container, which is already relative. */
|
|
626
|
+
|
|
627
|
+
.bk-tree-drop-line {
|
|
628
|
+
@apply absolute pointer-events-none rounded-full;
|
|
629
|
+
height: 2px;
|
|
630
|
+
background: #15191e;
|
|
631
|
+
z-index: 5;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/*
|
|
635
|
+
A neutral wash, not a color-coded one: the theme has no accent hue to reach
|
|
636
|
+
for, so "inside" is read off shape rather than color — the same fill the row
|
|
637
|
+
hover already uses, plus an inset ring per cell (borders are per-cell here
|
|
638
|
+
under border-collapse: separate) that a plain hover never draws.
|
|
639
|
+
|
|
640
|
+
Same specificity as the hover rule and later in the file, so the drop tint
|
|
641
|
+
wins over hover while the pointer is on the row.
|
|
642
|
+
*/
|
|
643
|
+
.bk-table tbody tr.bk-tree-drop-inside .bk-td {
|
|
644
|
+
background: #f1f2f4;
|
|
645
|
+
box-shadow: inset 0 0 0 1px rgba(21, 25, 30, 0.35);
|
|
646
|
+
}
|
package/src/styles.css
CHANGED