@craftzbay/ui 0.2.2 → 0.2.3
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-lib/components/ui/Avatar.d.ts +2 -2
- package/dist-lib/components/ui/Sidebar.d.ts +7 -0
- package/dist-lib/index.cjs +3 -3
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +1110 -1090
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@ declare const sizeMap: {
|
|
|
8
8
|
readonly lg: "size-10 text-sm";
|
|
9
9
|
readonly xl: "size-12 text-base";
|
|
10
10
|
};
|
|
11
|
-
declare const
|
|
11
|
+
declare const avatarWrapper: (props?: ({
|
|
12
12
|
size?: "md" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
13
13
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
|
-
export interface AvatarProps extends ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof
|
|
14
|
+
export interface AvatarProps extends ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarWrapper> {
|
|
15
15
|
/** Image URL. If absent or fails to load, fallback initials are shown. */
|
|
16
16
|
src?: string;
|
|
17
17
|
/** Alt text for the image; falls back to fallback when there's no `src`. */
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
interface SidebarContextValue {
|
|
3
|
+
collapsed: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** Read the parent Sidebar's collapsed state. Useful for brand/footer slots
|
|
6
|
+
* that need to swap between full and compact rendering. */
|
|
7
|
+
export declare function useSidebar(): SidebarContextValue;
|
|
2
8
|
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
3
9
|
/** Default state on first mount. Use `defaultCollapsed` for uncontrolled. */
|
|
4
10
|
defaultCollapsed?: boolean;
|
|
@@ -67,3 +73,4 @@ export declare function SidebarGroup({ icon, label, defaultOpen, children }: Sid
|
|
|
67
73
|
export declare namespace SidebarGroup {
|
|
68
74
|
var displayName: string;
|
|
69
75
|
}
|
|
76
|
+
export {};
|