@brightlocal/ui-components 2.6.1 → 2.7.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/component-meta.json +4 -5
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +110 -83
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +428 -389
- package/dist/index.cjs +1 -1
- package/dist/index.js +169 -173
- package/dist/table.cjs +1 -1
- package/dist/table.js +28 -28
- package/package.json +1 -1
- package/src/blocks/data-table.tsx +462 -293
- package/src/components/table.tsx +1 -1
package/dist/table.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import { cva as
|
|
3
|
+
import { cva as m } from "class-variance-authority";
|
|
4
4
|
import { cn as r } from "@brightlocal/ui-components/lib/utils";
|
|
5
|
-
const
|
|
5
|
+
const c = m(
|
|
6
6
|
"align-middle bg-transparent text-foreground text-sm font-normal leading-normal break-words",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
@@ -22,7 +22,7 @@ const b = f(
|
|
|
22
22
|
align: "left"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
),
|
|
25
|
+
), f = m(
|
|
26
26
|
"h-10 p-2 align-middle text-muted-foreground text-sm font-medium leading-normal hover:bg-muted break-words outline-none focus-visible:shadow-default transition-[background-color,box-shadow] duration-150 ease-in-out",
|
|
27
27
|
{
|
|
28
28
|
variants: {
|
|
@@ -36,7 +36,7 @@ const b = f(
|
|
|
36
36
|
align: "left"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
),
|
|
39
|
+
), p = d.forwardRef(
|
|
40
40
|
({ className: a, dataHook: t, trackingEl: e, trackingLabel: o, ...s }, n) => /* @__PURE__ */ l(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
@@ -57,7 +57,7 @@ const b = f(
|
|
|
57
57
|
}
|
|
58
58
|
)
|
|
59
59
|
);
|
|
60
|
-
|
|
60
|
+
p.displayName = "Table";
|
|
61
61
|
const h = d.forwardRef(
|
|
62
62
|
({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
|
|
63
63
|
"thead",
|
|
@@ -71,7 +71,7 @@ const h = d.forwardRef(
|
|
|
71
71
|
)
|
|
72
72
|
);
|
|
73
73
|
h.displayName = "TableHeader";
|
|
74
|
-
const
|
|
74
|
+
const u = d.forwardRef(
|
|
75
75
|
({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
|
|
76
76
|
"tbody",
|
|
77
77
|
{
|
|
@@ -83,8 +83,8 @@ const g = d.forwardRef(
|
|
|
83
83
|
}
|
|
84
84
|
)
|
|
85
85
|
);
|
|
86
|
-
|
|
87
|
-
const
|
|
86
|
+
u.displayName = "TableBody";
|
|
87
|
+
const g = d.forwardRef(
|
|
88
88
|
({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
|
|
89
89
|
"tfoot",
|
|
90
90
|
{
|
|
@@ -96,7 +96,7 @@ const p = d.forwardRef(
|
|
|
96
96
|
}
|
|
97
97
|
)
|
|
98
98
|
);
|
|
99
|
-
|
|
99
|
+
g.displayName = "TableFooter";
|
|
100
100
|
const w = d.forwardRef(
|
|
101
101
|
({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
|
|
102
102
|
"tr",
|
|
@@ -113,12 +113,12 @@ const w = d.forwardRef(
|
|
|
113
113
|
)
|
|
114
114
|
);
|
|
115
115
|
w.displayName = "TableRow";
|
|
116
|
-
const
|
|
117
|
-
({ className: a, dataHook: t, align: e, minWidth: o, style: s, scope: n = "col", ...i },
|
|
116
|
+
const N = d.forwardRef(
|
|
117
|
+
({ className: a, dataHook: t, align: e, minWidth: o, style: s, scope: n = "col", ...i }, b) => /* @__PURE__ */ l(
|
|
118
118
|
"th",
|
|
119
119
|
{
|
|
120
|
-
ref:
|
|
121
|
-
className: r(
|
|
120
|
+
ref: b,
|
|
121
|
+
className: r(f({ align: e }), a),
|
|
122
122
|
"data-hook": t,
|
|
123
123
|
"data-slot": "table-head",
|
|
124
124
|
scope: n,
|
|
@@ -127,13 +127,13 @@ const x = d.forwardRef(
|
|
|
127
127
|
}
|
|
128
128
|
)
|
|
129
129
|
);
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
({ className: a, dataHook: t, size: e, align: o, minWidth: s, style: n, ...i },
|
|
130
|
+
N.displayName = "TableHead";
|
|
131
|
+
const T = d.forwardRef(
|
|
132
|
+
({ className: a, dataHook: t, size: e, align: o, minWidth: s, style: n, ...i }, b) => /* @__PURE__ */ l(
|
|
133
133
|
"td",
|
|
134
134
|
{
|
|
135
|
-
ref:
|
|
136
|
-
className: r(
|
|
135
|
+
ref: b,
|
|
136
|
+
className: r(c({ size: e, align: o }), a),
|
|
137
137
|
"data-hook": t,
|
|
138
138
|
"data-slot": "table-cell",
|
|
139
139
|
style: { minWidth: s, ...n },
|
|
@@ -141,25 +141,25 @@ const N = d.forwardRef(
|
|
|
141
141
|
}
|
|
142
142
|
)
|
|
143
143
|
);
|
|
144
|
-
|
|
145
|
-
const
|
|
144
|
+
T.displayName = "TableCell";
|
|
145
|
+
const x = d.forwardRef(({ className: a, dataHook: t, ...e }, o) => /* @__PURE__ */ l(
|
|
146
146
|
"caption",
|
|
147
147
|
{
|
|
148
148
|
ref: o,
|
|
149
|
-
className: r("
|
|
149
|
+
className: r("caption-bottom py-4", a),
|
|
150
150
|
"data-hook": t,
|
|
151
151
|
"data-slot": "table-caption",
|
|
152
152
|
...e
|
|
153
153
|
}
|
|
154
154
|
));
|
|
155
|
-
|
|
155
|
+
x.displayName = "TableCaption";
|
|
156
156
|
export {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
p as Table,
|
|
158
|
+
u as TableBody,
|
|
159
|
+
x as TableCaption,
|
|
160
|
+
T as TableCell,
|
|
161
|
+
g as TableFooter,
|
|
162
|
+
N as TableHead,
|
|
163
163
|
h as TableHeader,
|
|
164
164
|
w as TableRow
|
|
165
165
|
};
|