@bluepic/embed 0.4.0-next.164 → 0.4.0-next.166

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.
@@ -0,0 +1,62 @@
1
+ import { VNode } from 'vue';
2
+ export interface BxTableColumn {
3
+ /** Identity only; the caller writes the cells. */
4
+ key: string;
5
+ label: string;
6
+ align?: 'left' | 'center' | 'right';
7
+ width?: string;
8
+ /** Header text for assistive tech only, e.g. an actions column. */
9
+ srOnlyLabel?: boolean;
10
+ }
11
+ /**
12
+ * A table's chrome: the scroll container, the border, the header, row hover and
13
+ * per-column alignment.
14
+ *
15
+ * The BODY is a slot rather than a `rows` prop on purpose. Real tables wrap
16
+ * their rows — the studio's org list puts every `<tr>` inside a
17
+ * visibility-observer for infinite scroll — and a data-driven table cannot
18
+ * express that without growing a render-prop for the wrapper. So the caller
19
+ * keeps its `<tr>`s and this owns everything around them, which is the part
20
+ * that was being re-written per app.
21
+ *
22
+ * Alignment reaches app-authored cells through custom properties rather than
23
+ * classes the caller would have to remember: each column publishes
24
+ * `--col-N-align`, and the static rules below read it. Eight columns is the
25
+ * supported width; past that, a table is a different problem.
26
+ */
27
+ type __VLS_Props = {
28
+ columns?: BxTableColumn[];
29
+ /** Outer border, so the table can sit on the page unwrapped. */
30
+ bordered?: boolean;
31
+ /** Corner rounding, same scale as BxCard. */
32
+ radius?: 'none' | 'sm' | 'md' | 'lg';
33
+ /**
34
+ * `plain` is a table on the page's own ground. `card` puts it on a raised
35
+ * surface, for a table that reads as a block of its own rather than a
36
+ * region of the page. (Note this differs from BxList's `card`, where each
37
+ * ROW is a surface; a table's rows cannot be separated without breaking
38
+ * column alignment, which is the whole point of a table.)
39
+ */
40
+ variant?: 'plain' | 'card';
41
+ /** Row highlight on hover. Off unless rows actually do something. */
42
+ hoverable?: boolean;
43
+ dense?: boolean;
44
+ };
45
+ type __VLS_Slots = {
46
+ default?: () => VNode[] | VNode;
47
+ };
48
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
49
+ bordered: boolean;
50
+ hoverable: boolean;
51
+ radius: "none" | "sm" | "md" | "lg";
52
+ variant: "plain" | "card";
53
+ columns: BxTableColumn[];
54
+ dense: boolean;
55
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
56
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
57
+ export default _default;
58
+ type __VLS_WithSlots<T, S> = T & {
59
+ new (): {
60
+ $slots: S;
61
+ };
62
+ };