@brightlocal/ui-components 2.16.0 → 2.17.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 +2 -1
- package/deprecations.json +189 -0
- package/dist/badge.d.ts +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +26 -0
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +75 -59
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +2 -0
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +17 -2
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +34 -10
- package/dist/index.cjs +1 -1
- package/dist/index.js +346 -345
- package/dist/rating.cjs +1 -1
- package/dist/rating.d.ts +10 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +38 -33
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +13 -2
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +38 -30
- package/package.json +7 -4
- package/src/components/chart.tsx +39 -1
- package/src/components/field.tsx +2 -0
- package/src/components/global-layout.tsx +56 -6
- package/src/components/rating.tsx +20 -1
- package/src/components/sheet.tsx +30 -5
package/src/components/sheet.tsx
CHANGED
|
@@ -274,20 +274,45 @@ const SheetFooter = React.forwardRef<
|
|
|
274
274
|
));
|
|
275
275
|
SheetFooter.displayName = "SheetFooter";
|
|
276
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Props for the SheetTitle component
|
|
279
|
+
*/
|
|
280
|
+
interface SheetTitleProps extends React.ComponentProps<
|
|
281
|
+
typeof SheetPrimitive.Title
|
|
282
|
+
> {
|
|
283
|
+
/**
|
|
284
|
+
* Optional icon rendered before the title text.
|
|
285
|
+
* Pass any React node (typically a DS icon component).
|
|
286
|
+
* @example <SheetTitle icon={<Heart />}>Title</SheetTitle>
|
|
287
|
+
*/
|
|
288
|
+
icon?: React.ReactNode;
|
|
289
|
+
}
|
|
290
|
+
|
|
277
291
|
/**
|
|
278
292
|
* Sheet title component for the main heading.
|
|
279
293
|
* Should be used within SheetHeader.
|
|
280
294
|
*/
|
|
281
295
|
const SheetTitle = React.forwardRef<
|
|
282
296
|
React.ComponentRef<typeof SheetPrimitive.Title>,
|
|
283
|
-
|
|
284
|
-
>(({ className, ...props }, ref) => (
|
|
297
|
+
SheetTitleProps
|
|
298
|
+
>(({ className, icon, children, ...props }, ref) => (
|
|
285
299
|
<SheetPrimitive.Title
|
|
286
300
|
ref={ref}
|
|
287
|
-
className={cn(
|
|
301
|
+
className={cn(
|
|
302
|
+
"text-foreground text-lg font-semibold",
|
|
303
|
+
icon && "flex items-center gap-2",
|
|
304
|
+
className
|
|
305
|
+
)}
|
|
288
306
|
data-slot="sheet-title"
|
|
289
307
|
{...props}
|
|
290
|
-
|
|
308
|
+
>
|
|
309
|
+
{icon && (
|
|
310
|
+
<span className="shrink-0 [&_svg]:size-5" data-slot="sheet-title-icon">
|
|
311
|
+
{icon}
|
|
312
|
+
</span>
|
|
313
|
+
)}
|
|
314
|
+
{children}
|
|
315
|
+
</SheetPrimitive.Title>
|
|
291
316
|
));
|
|
292
317
|
SheetTitle.displayName = "SheetTitle";
|
|
293
318
|
|
|
@@ -321,4 +346,4 @@ export {
|
|
|
321
346
|
SheetTrigger,
|
|
322
347
|
};
|
|
323
348
|
|
|
324
|
-
export type { SheetContentProps, SheetTriggerProps };
|
|
349
|
+
export type { SheetContentProps, SheetTitleProps, SheetTriggerProps };
|