@brightlocal/ui-components 2.6.1 → 2.8.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 +8 -7
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +184 -109
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +462 -401
- package/dist/index.cjs +1 -1
- package/dist/index.js +151 -153
- package/dist/split-layout.cjs +1 -1
- package/dist/split-layout.d.ts +15 -0
- package/dist/split-layout.d.ts.map +1 -1
- package/dist/split-layout.js +40 -38
- package/dist/table.cjs +1 -1
- package/dist/table.js +28 -28
- package/package.json +3 -3
- package/src/blocks/data-table.tsx +598 -366
- package/src/components/split-layout.tsx +19 -2
- package/src/components/table.tsx +1 -1
|
@@ -158,6 +158,13 @@ SplitLayoutHeader.displayName = "SplitLayoutHeader";
|
|
|
158
158
|
|
|
159
159
|
interface SplitLayoutContentLeftProps extends React.ComponentProps<"div"> {
|
|
160
160
|
children: React.ReactNode;
|
|
161
|
+
/**
|
|
162
|
+
* Pins the column to the viewport on desktop (≥lg) so it stays visible
|
|
163
|
+
* while the sibling column grows beyond one screen.
|
|
164
|
+
* Applies `sticky top-0 h-screen self-start`.
|
|
165
|
+
* @default false
|
|
166
|
+
*/
|
|
167
|
+
sticky?: boolean;
|
|
161
168
|
}
|
|
162
169
|
|
|
163
170
|
/**
|
|
@@ -170,13 +177,14 @@ interface SplitLayoutContentLeftProps extends React.ComponentProps<"div"> {
|
|
|
170
177
|
const SplitLayoutContentLeft = React.forwardRef<
|
|
171
178
|
HTMLDivElement,
|
|
172
179
|
SplitLayoutContentLeftProps
|
|
173
|
-
>(({ className, children, ...props }, ref) => {
|
|
180
|
+
>(({ className, sticky = false, children, ...props }, ref) => {
|
|
174
181
|
return (
|
|
175
182
|
<div
|
|
176
183
|
ref={ref}
|
|
177
184
|
className={cn(
|
|
178
185
|
"p-section-sm col-start-1 row-start-2 flex min-h-0 items-center justify-center overflow-auto",
|
|
179
186
|
"group-has-[[data-slot=split-layout-header]]/split-layout:pt-2",
|
|
187
|
+
sticky && "lg:sticky lg:top-0 lg:h-screen lg:self-start",
|
|
180
188
|
className
|
|
181
189
|
)}
|
|
182
190
|
data-slot="split-layout-left"
|
|
@@ -201,6 +209,14 @@ interface SplitLayoutContentRightProps extends React.ComponentProps<"div"> {
|
|
|
201
209
|
* @default false
|
|
202
210
|
*/
|
|
203
211
|
flush?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Pins the column to the viewport on desktop (≥lg) so it stays visible
|
|
214
|
+
* while the sibling column grows beyond one screen.
|
|
215
|
+
* Applies `sticky top-0 h-screen self-start`.
|
|
216
|
+
* Can be combined with `flush` for a sticky full-bleed panel.
|
|
217
|
+
* @default false
|
|
218
|
+
*/
|
|
219
|
+
sticky?: boolean;
|
|
204
220
|
}
|
|
205
221
|
|
|
206
222
|
/**
|
|
@@ -215,7 +231,7 @@ interface SplitLayoutContentRightProps extends React.ComponentProps<"div"> {
|
|
|
215
231
|
const SplitLayoutContentRight = React.forwardRef<
|
|
216
232
|
HTMLDivElement,
|
|
217
233
|
SplitLayoutContentRightProps
|
|
218
|
-
>(({ className, flush = false, children, ...props }, ref) => {
|
|
234
|
+
>(({ className, flush = false, sticky = false, children, ...props }, ref) => {
|
|
219
235
|
return (
|
|
220
236
|
<div
|
|
221
237
|
ref={ref}
|
|
@@ -224,6 +240,7 @@ const SplitLayoutContentRight = React.forwardRef<
|
|
|
224
240
|
flush
|
|
225
241
|
? "relative overflow-hidden lg:block"
|
|
226
242
|
: "p-section-sm min-h-0 items-center justify-center overflow-auto lg:flex",
|
|
243
|
+
sticky && "lg:sticky lg:top-0 lg:h-screen lg:self-start",
|
|
227
244
|
className
|
|
228
245
|
)}
|
|
229
246
|
data-slot="split-layout-right"
|
package/src/components/table.tsx
CHANGED
|
@@ -294,7 +294,7 @@ const TableCaption = React.forwardRef<
|
|
|
294
294
|
>(({ className, dataHook, ...props }, ref) => (
|
|
295
295
|
<caption
|
|
296
296
|
ref={ref}
|
|
297
|
-
className={cn("
|
|
297
|
+
className={cn("caption-bottom py-4", className)}
|
|
298
298
|
data-hook={dataHook}
|
|
299
299
|
data-slot="table-caption"
|
|
300
300
|
{...props}
|