@bergetai/ui 0.13.2 → 0.13.4
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/dist/index.cjs +20 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +20 -13
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +51 -20
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -88,7 +88,7 @@ declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAtt
|
|
|
88
88
|
|
|
89
89
|
declare const badgeVariants: (props?: ({
|
|
90
90
|
variant?: "default" | "tag" | "semantic" | null | undefined;
|
|
91
|
-
status?: "default" | "error" | "active" | "
|
|
91
|
+
status?: "default" | "error" | "active" | "info" | "success" | "warning" | "tagDefault" | "tagActive" | "tagGhost" | null | undefined;
|
|
92
92
|
size?: "sm" | "md" | null | undefined;
|
|
93
93
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
94
94
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -394,7 +394,7 @@ declare function Sidebar({ side, variant, collapsible, className, children, dir,
|
|
|
394
394
|
}): react_jsx_runtime.JSX.Element;
|
|
395
395
|
declare function SidebarTrigger({ className, onClick, ...props }: React$1.ComponentProps<typeof Button$1>): react_jsx_runtime.JSX.Element;
|
|
396
396
|
declare function SidebarRail({ className, ...props }: React$1.ComponentProps<"button">): react_jsx_runtime.JSX.Element;
|
|
397
|
-
declare function SidebarInset({ className, ...props }: React$1.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
|
|
397
|
+
declare function SidebarInset$1({ className, ...props }: React$1.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
|
|
398
398
|
declare function SidebarInput({ className, ...props }: React$1.ComponentProps<typeof Input>): react_jsx_runtime.JSX.Element;
|
|
399
399
|
declare function SidebarHeader$1({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
400
400
|
declare function SidebarFooter$1({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
@@ -435,6 +435,15 @@ declare function SidebarGroupLabel({ className, ...props }: React$1.ComponentPro
|
|
|
435
435
|
/** Provider with the Berget icon-rail width (60px = 10px gutters + 40px
|
|
436
436
|
* buttons). Consumers can still override via `style`. */
|
|
437
437
|
declare function SidebarProvider({ className, style, ...props }: React$1.ComponentProps<typeof SidebarProvider$1>): react_jsx_runtime.JSX.Element;
|
|
438
|
+
/** Inset with min-w-0 so the content column can shrink below its min-content
|
|
439
|
+
* width. Without it (flex items default to min-width:auto), wide content — a
|
|
440
|
+
* nowrap table, a code block — makes the inset refuse to yield space: the
|
|
441
|
+
* sidebar's gap spacer collapses and the inset (and its sticky page header)
|
|
442
|
+
* slides under the fixed sidebar, painting over it on scroll. A scroll
|
|
443
|
+
* wrapper on the wide child alone is not sufficient — block-level
|
|
444
|
+
* overflow-x-auto still propagates min-content up to the flex item.
|
|
445
|
+
* Upstream shadcn-ui/ui#11370; no-op for pages that don't overflow. */
|
|
446
|
+
declare function SidebarInset({ className, ...props }: React$1.ComponentProps<typeof SidebarInset$1>): react_jsx_runtime.JSX.Element;
|
|
438
447
|
/** Group with 10px horizontal gutters in icon mode (10 + 40 + 10 = 60px). */
|
|
439
448
|
declare function SidebarGroup({ className, ...props }: React$1.ComponentProps<typeof SidebarGroup$1>): react_jsx_runtime.JSX.Element;
|
|
440
449
|
/** Footer with a top border mirroring the sidebar header's bottom border, and
|
|
@@ -690,7 +699,7 @@ declare const BergetLogo: React$1.ForwardRefExoticComponent<BergetLogoProps & Re
|
|
|
690
699
|
|
|
691
700
|
interface IconProps extends Omit<LucideProps, 'size'> {
|
|
692
701
|
icon: LucideIcon;
|
|
693
|
-
size: 16 | 24 | 32;
|
|
702
|
+
size: 12 | 16 | 24 | 32;
|
|
694
703
|
className?: string;
|
|
695
704
|
'aria-label'?: string;
|
|
696
705
|
'aria-hidden'?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -88,7 +88,7 @@ declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAtt
|
|
|
88
88
|
|
|
89
89
|
declare const badgeVariants: (props?: ({
|
|
90
90
|
variant?: "default" | "tag" | "semantic" | null | undefined;
|
|
91
|
-
status?: "default" | "error" | "active" | "
|
|
91
|
+
status?: "default" | "error" | "active" | "info" | "success" | "warning" | "tagDefault" | "tagActive" | "tagGhost" | null | undefined;
|
|
92
92
|
size?: "sm" | "md" | null | undefined;
|
|
93
93
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
94
94
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -394,7 +394,7 @@ declare function Sidebar({ side, variant, collapsible, className, children, dir,
|
|
|
394
394
|
}): react_jsx_runtime.JSX.Element;
|
|
395
395
|
declare function SidebarTrigger({ className, onClick, ...props }: React$1.ComponentProps<typeof Button$1>): react_jsx_runtime.JSX.Element;
|
|
396
396
|
declare function SidebarRail({ className, ...props }: React$1.ComponentProps<"button">): react_jsx_runtime.JSX.Element;
|
|
397
|
-
declare function SidebarInset({ className, ...props }: React$1.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
|
|
397
|
+
declare function SidebarInset$1({ className, ...props }: React$1.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
|
|
398
398
|
declare function SidebarInput({ className, ...props }: React$1.ComponentProps<typeof Input>): react_jsx_runtime.JSX.Element;
|
|
399
399
|
declare function SidebarHeader$1({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
400
400
|
declare function SidebarFooter$1({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
@@ -435,6 +435,15 @@ declare function SidebarGroupLabel({ className, ...props }: React$1.ComponentPro
|
|
|
435
435
|
/** Provider with the Berget icon-rail width (60px = 10px gutters + 40px
|
|
436
436
|
* buttons). Consumers can still override via `style`. */
|
|
437
437
|
declare function SidebarProvider({ className, style, ...props }: React$1.ComponentProps<typeof SidebarProvider$1>): react_jsx_runtime.JSX.Element;
|
|
438
|
+
/** Inset with min-w-0 so the content column can shrink below its min-content
|
|
439
|
+
* width. Without it (flex items default to min-width:auto), wide content — a
|
|
440
|
+
* nowrap table, a code block — makes the inset refuse to yield space: the
|
|
441
|
+
* sidebar's gap spacer collapses and the inset (and its sticky page header)
|
|
442
|
+
* slides under the fixed sidebar, painting over it on scroll. A scroll
|
|
443
|
+
* wrapper on the wide child alone is not sufficient — block-level
|
|
444
|
+
* overflow-x-auto still propagates min-content up to the flex item.
|
|
445
|
+
* Upstream shadcn-ui/ui#11370; no-op for pages that don't overflow. */
|
|
446
|
+
declare function SidebarInset({ className, ...props }: React$1.ComponentProps<typeof SidebarInset$1>): react_jsx_runtime.JSX.Element;
|
|
438
447
|
/** Group with 10px horizontal gutters in icon mode (10 + 40 + 10 = 60px). */
|
|
439
448
|
declare function SidebarGroup({ className, ...props }: React$1.ComponentProps<typeof SidebarGroup$1>): react_jsx_runtime.JSX.Element;
|
|
440
449
|
/** Footer with a top border mirroring the sidebar header's bottom border, and
|
|
@@ -690,7 +699,7 @@ declare const BergetLogo: React$1.ForwardRefExoticComponent<BergetLogoProps & Re
|
|
|
690
699
|
|
|
691
700
|
interface IconProps extends Omit<LucideProps, 'size'> {
|
|
692
701
|
icon: LucideIcon;
|
|
693
|
-
size: 16 | 24 | 32;
|
|
702
|
+
size: 12 | 16 | 24 | 32;
|
|
694
703
|
className?: string;
|
|
695
704
|
'aria-label'?: string;
|
|
696
705
|
'aria-hidden'?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -629,28 +629,31 @@ import * as React6 from "react";
|
|
|
629
629
|
import { cva as cva4 } from "class-variance-authority";
|
|
630
630
|
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
631
631
|
var badgeVariants = cva4(
|
|
632
|
-
|
|
632
|
+
// Tinted status style: small uppercase label on a 15% brand tint.
|
|
633
|
+
// `variant`/`size` are kept for API compatibility but no longer change
|
|
634
|
+
// the appearance; `status` alone picks the tint.
|
|
635
|
+
"inline-flex flex-shrink-0 items-center whitespace-nowrap rounded-[4px] py-[0.15rem] px-2 text-[0.65rem] font-semibold uppercase tracking-[0.05em] transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2",
|
|
633
636
|
{
|
|
634
637
|
variants: {
|
|
635
638
|
variant: {
|
|
636
|
-
default: "
|
|
637
|
-
tag: "
|
|
638
|
-
semantic: "
|
|
639
|
+
default: "",
|
|
640
|
+
tag: "",
|
|
641
|
+
semantic: ""
|
|
639
642
|
},
|
|
640
643
|
status: {
|
|
641
644
|
default: "bg-berget-badge-default-bg text-berget-badge-default-fg",
|
|
642
645
|
active: "bg-berget-badge-active-bg text-berget-badge-active-fg",
|
|
646
|
+
info: "bg-berget-badge-info-bg text-berget-badge-info-fg",
|
|
647
|
+
success: "bg-berget-badge-success-bg text-berget-badge-success-fg",
|
|
648
|
+
warning: "bg-berget-badge-warning-bg text-berget-badge-warning-fg",
|
|
649
|
+
error: "bg-berget-badge-error-bg text-berget-badge-error-fg",
|
|
643
650
|
tagDefault: "bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg",
|
|
644
651
|
tagActive: "bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg",
|
|
645
|
-
tagGhost: "bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg"
|
|
646
|
-
info: "berget-tint berget-tint-info",
|
|
647
|
-
success: "berget-tint berget-tint-success",
|
|
648
|
-
warning: "berget-tint berget-tint-warning",
|
|
649
|
-
error: "berget-tint berget-tint-error"
|
|
652
|
+
tagGhost: "bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg"
|
|
650
653
|
},
|
|
651
654
|
size: {
|
|
652
|
-
sm: "
|
|
653
|
-
md: "
|
|
655
|
+
sm: "",
|
|
656
|
+
md: ""
|
|
654
657
|
}
|
|
655
658
|
},
|
|
656
659
|
defaultVariants: {
|
|
@@ -2705,6 +2708,9 @@ function SidebarProvider2({
|
|
|
2705
2708
|
}
|
|
2706
2709
|
);
|
|
2707
2710
|
}
|
|
2711
|
+
function SidebarInset2({ className, ...props }) {
|
|
2712
|
+
return /* @__PURE__ */ jsx27(SidebarInset, { className: cn("min-w-0", className), ...props });
|
|
2713
|
+
}
|
|
2708
2714
|
function SidebarGroup2({ className, ...props }) {
|
|
2709
2715
|
return /* @__PURE__ */ jsx27(
|
|
2710
2716
|
SidebarGroup,
|
|
@@ -3672,6 +3678,7 @@ import { ChevronDown as ChevronDown2, Globe } from "lucide-react";
|
|
|
3672
3678
|
import * as React21 from "react";
|
|
3673
3679
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3674
3680
|
var iconStrokeMap = {
|
|
3681
|
+
12: 1.4,
|
|
3675
3682
|
16: 1.4,
|
|
3676
3683
|
24: 1.6,
|
|
3677
3684
|
32: 1.8
|
|
@@ -3686,7 +3693,7 @@ var Icon = React21.forwardRef(
|
|
|
3686
3693
|
...props
|
|
3687
3694
|
}, ref) => {
|
|
3688
3695
|
const strokeWidth = iconStrokeMap[size];
|
|
3689
|
-
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
3696
|
+
const sizeClass = size === 12 ? "w-3 h-3" : size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
3690
3697
|
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
3691
3698
|
return /* @__PURE__ */ jsx37(
|
|
3692
3699
|
IconComponent,
|
|
@@ -5356,7 +5363,7 @@ export {
|
|
|
5356
5363
|
SidebarGroupLabel2 as SidebarGroupLabel,
|
|
5357
5364
|
SidebarHeader2 as SidebarHeader,
|
|
5358
5365
|
SidebarInput,
|
|
5359
|
-
SidebarInset,
|
|
5366
|
+
SidebarInset2 as SidebarInset,
|
|
5360
5367
|
SidebarLogo,
|
|
5361
5368
|
SidebarMenu,
|
|
5362
5369
|
SidebarMenuAction,
|