@kala-ui/react-app 0.1.0-beta.1 → 0.1.0-beta.10

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.
Files changed (102) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/components/app-shell/app-shell.d.ts +8 -46
  3. package/dist/components/app-shell/app-shell.js +41 -42
  4. package/dist/components/app-shell/app-shell.types.d.ts +45 -0
  5. package/dist/components/app-shell/app-shell.types.js +2 -0
  6. package/dist/components/app-shell/index.d.ts +1 -0
  7. package/dist/components/charts/area-chart.d.ts +1 -1
  8. package/dist/components/charts/area-chart.js +4 -3
  9. package/dist/components/charts/bar-chart.d.ts +1 -1
  10. package/dist/components/charts/bar-chart.js +4 -3
  11. package/dist/components/charts/chart-skeleton.d.ts +0 -21
  12. package/dist/components/charts/chart-skeleton.js +2 -1
  13. package/dist/components/charts/chart-utils.d.ts +56 -0
  14. package/dist/components/charts/chart-utils.js +135 -0
  15. package/dist/components/charts/chart.d.ts +3 -1
  16. package/dist/components/charts/chart.js +13 -3
  17. package/dist/components/charts/chart.types.d.ts +3 -0
  18. package/dist/components/charts/donut-chart.d.ts +1 -1
  19. package/dist/components/charts/donut-chart.js +4 -3
  20. package/dist/components/charts/index.d.ts +1 -1
  21. package/dist/components/charts/index.js +1 -1
  22. package/dist/components/charts/line-chart.d.ts +1 -1
  23. package/dist/components/charts/line-chart.js +4 -3
  24. package/dist/components/charts/radial-bar-chart.d.ts +1 -1
  25. package/dist/components/charts/radial-bar-chart.js +4 -3
  26. package/dist/components/data-table/data-table.js +4 -2
  27. package/dist/components/data-table/data-table.types.d.ts +2 -0
  28. package/dist/components/data-table/index.d.ts +1 -1
  29. package/dist/components/data-table/index.js +1 -1
  30. package/dist/components/data-table/use-table-state.d.ts +29 -0
  31. package/dist/components/data-table/use-table-state.js +312 -0
  32. package/dist/components/dnd/dnd.d.ts +16 -98
  33. package/dist/components/dnd/dnd.js +30 -2
  34. package/dist/components/dnd/dnd.types.d.ts +92 -0
  35. package/dist/components/dnd/dnd.types.js +7 -0
  36. package/dist/components/dnd/index.d.ts +2 -1
  37. package/dist/components/dnd/index.js +1 -1
  38. package/dist/components/footer/footer.d.ts +2 -37
  39. package/dist/components/footer/footer.js +18 -2
  40. package/dist/components/footer/footer.types.d.ts +25 -0
  41. package/dist/components/footer/footer.types.js +2 -0
  42. package/dist/components/footer/index.d.ts +1 -1
  43. package/dist/components/header/header.js +5 -11
  44. package/dist/components/metric-card/index.d.ts +2 -1
  45. package/dist/components/metric-card/metric-card-skeleton.js +2 -1
  46. package/dist/components/metric-card/metric-card.d.ts +2 -14
  47. package/dist/components/metric-card/metric-card.js +32 -28
  48. package/dist/components/metric-card/metric-card.types.d.ts +3 -0
  49. package/dist/components/nav-link/index.d.ts +2 -1
  50. package/dist/components/nav-link/index.js +1 -1
  51. package/dist/components/nav-link/nav-link.d.ts +2 -25
  52. package/dist/components/nav-link/nav-link.js +43 -5
  53. package/dist/components/nav-link/nav-link.types.d.ts +23 -0
  54. package/dist/components/nav-link/nav-link.types.js +2 -0
  55. package/dist/components/navigation/index.d.ts +1 -1
  56. package/dist/components/navigation/navigation.d.ts +1 -24
  57. package/dist/components/navigation/navigation.js +7 -17
  58. package/dist/components/navigation/navigation.types.d.ts +15 -0
  59. package/dist/components/navigation/navigation.types.js +2 -0
  60. package/dist/components/session-card/index.d.ts +2 -1
  61. package/dist/components/session-card/index.js +1 -1
  62. package/dist/components/session-card/session-card-skeleton.d.ts +3 -1
  63. package/dist/components/session-card/session-card-skeleton.js +3 -2
  64. package/dist/components/session-card/session-card.d.ts +3 -26
  65. package/dist/components/session-card/session-card.js +23 -8
  66. package/dist/components/session-card/session-card.types.d.ts +26 -0
  67. package/dist/components/session-card/session-card.types.js +2 -0
  68. package/dist/components/sidebar/sidebar.js +5 -11
  69. package/dist/components/social-login-button/index.d.ts +3 -1
  70. package/dist/components/social-login-button/index.js +2 -1
  71. package/dist/components/social-login-button/social-login-button.d.ts +2 -20
  72. package/dist/components/social-login-button/social-login-button.js +9 -11
  73. package/dist/components/social-login-button/social-login-button.types.d.ts +28 -0
  74. package/dist/components/social-login-button/social-login-button.types.js +2 -0
  75. package/dist/components/social-login-button/social-login-buttons.d.ts +4 -0
  76. package/dist/components/social-login-button/social-login-buttons.js +18 -0
  77. package/dist/components/user-menu-dropdown/index.d.ts +2 -1
  78. package/dist/components/user-menu-dropdown/index.js +1 -1
  79. package/dist/components/user-menu-dropdown/user-menu-dropdown.d.ts +2 -31
  80. package/dist/components/user-menu-dropdown/user-menu-dropdown.js +14 -2
  81. package/dist/components/user-menu-dropdown/user-menu-dropdown.types.d.ts +16 -0
  82. package/dist/components/user-menu-dropdown/user-menu-dropdown.types.js +2 -0
  83. package/dist/config/app-shell.d.ts +13 -0
  84. package/dist/config/app-shell.js +20 -0
  85. package/dist/config/charts.d.ts +23 -0
  86. package/dist/config/charts.js +23 -0
  87. package/dist/config/footer.d.ts +16 -0
  88. package/dist/config/footer.js +16 -0
  89. package/dist/config/index.d.ts +7 -0
  90. package/dist/config/index.js +7 -0
  91. package/dist/config/metric-card.d.ts +36 -0
  92. package/dist/config/metric-card.js +44 -0
  93. package/dist/config/session-card.d.ts +32 -0
  94. package/dist/config/session-card.js +32 -0
  95. package/dist/config/social-login-button.d.ts +15 -0
  96. package/dist/config/social-login-button.js +15 -0
  97. package/dist/config/user-menu-dropdown.d.ts +10 -0
  98. package/dist/config/user-menu-dropdown.js +10 -0
  99. package/dist/index.d.ts +0 -1
  100. package/dist/index.js +0 -1
  101. package/dist/styles/app.css +18 -53
  102. package/package.json +24 -28
@@ -1,31 +1,2 @@
1
- export interface UserMenuDropdownProps extends Omit<React.ComponentProps<"button">, "color"> {
2
- /**
3
- * User information to display
4
- */
5
- user: {
6
- name?: string;
7
- email?: string;
8
- avatar?: string;
9
- };
10
- /**
11
- * Whether the dropdown is currently open
12
- */
13
- isOpen?: boolean;
14
- /**
15
- * Callback when dropdown open state changes
16
- */
17
- onOpenChange?: (open: boolean) => void;
18
- /**
19
- * Callback when logout is clicked
20
- */
21
- onLogout?: () => void;
22
- /**
23
- * Base URL for navigation links (default: '/admin')
24
- */
25
- baseUrl?: string;
26
- /**
27
- * Additional CSS classes for the trigger button
28
- */
29
- className?: string;
30
- }
31
- export declare function UserMenuDropdown({ user, isOpen, onOpenChange, onLogout, baseUrl, className, ref, ...props }: UserMenuDropdownProps): import("react").JSX.Element;
1
+ import type { UserMenuDropdownProps } from "./user-menu-dropdown.types";
2
+ export declare function UserMenuDropdown({ user, isOpen, onOpenChange, onLogout, baseUrl, className, style, slotStyles: slotStylesRaw, ref, ...props }: UserMenuDropdownProps): import("react").JSX.Element;
@@ -3,9 +3,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Avatar, AvatarFallback, AvatarImage } from "@kala-ui/react/avatar";
4
4
  import { Button } from "@kala-ui/react/button";
5
5
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@kala-ui/react/dropdown-menu";
6
+ import { useSlotStyles } from "@kala-ui/react/kala-provider";
7
+ import { applySlot } from "@kala-ui/react/lib/slot-styles";
6
8
  import { cn } from "@kala-ui/react/lib/utils";
7
9
  import { LogOut, Settings, User } from "lucide-react";
8
- export function UserMenuDropdown({ user, isOpen, onOpenChange, onLogout, baseUrl = "/admin", className, ref, ...props }) {
10
+ import { userMenuDropdownStyles } from "../../config/user-menu-dropdown.js";
11
+ export function UserMenuDropdown({ user, isOpen, onOpenChange, onLogout, baseUrl = "/admin", className, style, slotStyles: slotStylesRaw, ref, ...props }) {
12
+ const slotStyles = useSlotStyles("user-menu-dropdown", slotStylesRaw);
9
13
  const initials = user.name
10
14
  ? user.name
11
15
  .split(" ")
@@ -23,5 +27,13 @@ export function UserMenuDropdown({ user, isOpen, onOpenChange, onLogout, baseUrl
23
27
  const handleLogoutClick = () => {
24
28
  onLogout?.();
25
29
  };
26
- return (_jsxs(DropdownMenu, { "data-kala-component": "user-menu-dropdown", ...(isOpen !== undefined && { open: isOpen }), ...(onOpenChange && { onOpenChange }), children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", ref: ref, className: cn("h-auto p-1 rounded-full hover:bg-accent", className), "aria-label": "User menu", ...props, children: _jsxs(Avatar, { className: "size-8", children: [user.avatar && (_jsx(AvatarImage, { src: user.avatar, alt: user.name ?? "User" })), _jsx(AvatarFallback, { className: "bg-primary text-primary-foreground text-sm font-medium", children: initials })] }) }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [_jsx(DropdownMenuLabel, { children: _jsxs("div", { className: "flex flex-col space-y-1", children: [user.name && (_jsx("p", { className: "text-sm font-medium leading-none", children: user.name })), user.email && (_jsx("p", { className: "text-xs text-muted-foreground leading-none", children: user.email }))] }) }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onClick: handleProfileClick, children: [_jsx(User, { className: "mr-2 size-4" }), "Profile"] }), _jsxs(DropdownMenuItem, { onClick: handleSettingsClick, children: [_jsx(Settings, { className: "mr-2 size-4" }), "Settings"] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onClick: handleLogoutClick, color: "destructive", children: [_jsx(LogOut, { className: "mr-2 size-4" }), "Logout"] })] })] }));
30
+ const trigger = applySlot(cn(userMenuDropdownStyles.trigger, className), slotStyles?.trigger);
31
+ const avatar = applySlot(userMenuDropdownStyles.avatar, slotStyles?.avatar);
32
+ const avatarFallback = applySlot(userMenuDropdownStyles.avatarFallback, slotStyles?.avatarFallback);
33
+ const content = applySlot(userMenuDropdownStyles.content, slotStyles?.content);
34
+ const label = applySlot(userMenuDropdownStyles.label, slotStyles?.label);
35
+ const name = applySlot(userMenuDropdownStyles.name, slotStyles?.name);
36
+ const email = applySlot(userMenuDropdownStyles.email, slotStyles?.email);
37
+ const itemIcon = applySlot(userMenuDropdownStyles.itemIcon, slotStyles?.itemIcon);
38
+ return (_jsxs(DropdownMenu, { "data-kala-component": "user-menu-dropdown", ...(isOpen !== undefined && { open: isOpen }), ...(onOpenChange && { onOpenChange }), children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", ref: ref, className: trigger.className, style: trigger.style, "aria-label": "User menu", ...props, children: _jsxs(Avatar, { className: avatar.className, style: avatar.style, children: [user.avatar && (_jsx(AvatarImage, { src: user.avatar, alt: user.name ?? "User" })), _jsx(AvatarFallback, { className: avatarFallback.className, style: avatarFallback.style, children: initials })] }) }) }), _jsxs(DropdownMenuContent, { align: "end", className: content.className, style: content.style, children: [_jsx(DropdownMenuLabel, { children: _jsxs("div", { className: label.className, style: label.style, children: [user.name && (_jsx("p", { className: name.className, style: name.style, children: user.name })), user.email && (_jsx("p", { className: email.className, style: email.style, children: user.email }))] }) }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onClick: handleProfileClick, children: [_jsx(User, { className: itemIcon.className }), "Profile"] }), _jsxs(DropdownMenuItem, { onClick: handleSettingsClick, children: [_jsx(Settings, { className: itemIcon.className }), "Settings"] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onClick: handleLogoutClick, color: "destructive", children: [_jsx(LogOut, { className: itemIcon.className }), "Logout"] })] })] }));
27
39
  }
@@ -0,0 +1,16 @@
1
+ import type { SlotStyles } from "@kala-ui/react/lib/slot-styles";
2
+ import type * as React from "react";
3
+ export interface UserMenuDropdownProps extends Omit<React.ComponentProps<"button">, "color"> {
4
+ user: {
5
+ name?: string;
6
+ email?: string;
7
+ avatar?: string;
8
+ };
9
+ isOpen?: boolean;
10
+ onOpenChange?: (open: boolean) => void;
11
+ onLogout?: () => void;
12
+ baseUrl?: string;
13
+ className?: string;
14
+ /** Per-part overrides: trigger, avatar, avatarFallback, content, label, name, email, itemIcon. */
15
+ slotStyles?: SlotStyles;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export {};
@@ -0,0 +1,13 @@
1
+ export declare const appShellStyles: {
2
+ base: string;
3
+ header: string;
4
+ headerBorder: string;
5
+ navbar: string;
6
+ navbarBorder: string;
7
+ aside: string;
8
+ asideBorder: string;
9
+ main: string;
10
+ footer: string;
11
+ footerBorder: string;
12
+ padding: Record<string, string>;
13
+ };
@@ -0,0 +1,20 @@
1
+ export const appShellStyles = {
2
+ base: "flex min-h-screen flex-col bg-background text-foreground",
3
+ header: "fixed top-0 left-0 right-0 z-50 flex items-center bg-background px-4",
4
+ headerBorder: "border-b",
5
+ navbar: "fixed left-0 z-40 flex flex-col bg-background transition-transform duration-300 ease-in-out",
6
+ navbarBorder: "border-r",
7
+ aside: "fixed right-0 z-40 flex flex-col bg-background transition-transform duration-300 ease-in-out",
8
+ asideBorder: "border-l",
9
+ main: "flex-1 transition-all duration-300 ease-in-out",
10
+ footer: "fixed bottom-0 left-0 right-0 z-50 flex items-center bg-background px-4",
11
+ footerBorder: "border-t",
12
+ padding: {
13
+ none: "p-0",
14
+ xs: "p-2",
15
+ sm: "p-3",
16
+ md: "p-4",
17
+ lg: "p-6",
18
+ xl: "p-8",
19
+ },
20
+ };
@@ -0,0 +1,23 @@
1
+ export declare const chartSkeletonStyles: {
2
+ root: string;
3
+ frame: string;
4
+ frameInner: string;
5
+ frameFill: string;
6
+ legendRow: string;
7
+ legendItem: string;
8
+ legendDot: string;
9
+ legendLabel: string;
10
+ tableWrap: string;
11
+ tableHead: string;
12
+ tableRow: string;
13
+ tableCell: string;
14
+ };
15
+ export declare const chartStyles: {
16
+ root: string;
17
+ empty: string;
18
+ emptyIcon: string;
19
+ emptyText: string;
20
+ titleBlock: string;
21
+ title: string;
22
+ subtitle: string;
23
+ };
@@ -0,0 +1,23 @@
1
+ export const chartSkeletonStyles = {
2
+ root: "w-full space-y-4",
3
+ frame: "w-full rounded-lg border bg-card kala-surface-card",
4
+ frameInner: "flex items-center justify-center h-full",
5
+ frameFill: "h-full w-full",
6
+ legendRow: "flex gap-4 justify-center mt-4",
7
+ legendItem: "flex items-center gap-2",
8
+ legendDot: "h-3 w-3 rounded-full",
9
+ legendLabel: "h-4 w-16",
10
+ tableWrap: "mt-6",
11
+ tableHead: "h-4 w-24",
12
+ tableRow: "border-0",
13
+ tableCell: "h-4 w-20",
14
+ };
15
+ export const chartStyles = {
16
+ root: "w-full",
17
+ empty: "w-full flex flex-col items-center justify-center text-center rounded-lg border bg-card text-muted-foreground",
18
+ emptyIcon: "mb-3 h-10 w-10 opacity-40",
19
+ emptyText: "text-sm",
20
+ titleBlock: "mb-1.5 text-left",
21
+ title: "text-lg font-semibold text-foreground",
22
+ subtitle: "text-sm text-muted-foreground",
23
+ };
@@ -0,0 +1,16 @@
1
+ export declare const footerStyles: {
2
+ root: string;
3
+ inner: string;
4
+ centeredContent: string;
5
+ grid: string;
6
+ sectionTitle: string;
7
+ sectionList: string;
8
+ sectionLink: string;
9
+ customContent: string;
10
+ bottomRow: string;
11
+ bottomRowSide: string;
12
+ bottomRowCentered: string;
13
+ copyright: string;
14
+ socialList: string;
15
+ socialLink: string;
16
+ };
@@ -0,0 +1,16 @@
1
+ export const footerStyles = {
2
+ root: "w-full bg-muted text-muted-foreground border-t",
3
+ inner: "container mx-auto px-4 py-8 md:py-12",
4
+ centeredContent: "mb-12 flex flex-col items-center text-center",
5
+ grid: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-8",
6
+ sectionTitle: "text-foreground font-semibold text-sm uppercase tracking-wider mb-4",
7
+ sectionList: "space-y-2",
8
+ sectionLink: "text-muted-foreground hover:text-primary transition-colors text-sm",
9
+ customContent: "md:col-span-2 lg:col-span-1",
10
+ bottomRow: "border-t pt-8 flex flex-col gap-4",
11
+ bottomRowSide: "md:flex-row md:justify-between md:items-center",
12
+ bottomRowCentered: "items-center",
13
+ copyright: "text-sm text-muted-foreground order-2 md:order-1",
14
+ socialList: "flex items-center gap-4 order-1 md:order-2",
15
+ socialLink: "text-muted-foreground hover:text-primary transition-colors",
16
+ };
@@ -0,0 +1,7 @@
1
+ export { appShellStyles } from "./app-shell";
2
+ export { chartStyles } from "./charts";
3
+ export { footerStyles } from "./footer";
4
+ export { metricCardStyles } from "./metric-card";
5
+ export { sessionCardStyles } from "./session-card";
6
+ export { socialLoginButtonStyles, socialLoginButtonsStyles, } from "./social-login-button";
7
+ export { userMenuDropdownStyles } from "./user-menu-dropdown";
@@ -0,0 +1,7 @@
1
+ export { appShellStyles } from "./app-shell.js";
2
+ export { chartStyles } from "./charts.js";
3
+ export { footerStyles } from "./footer.js";
4
+ export { metricCardStyles } from "./metric-card.js";
5
+ export { sessionCardStyles } from "./session-card.js";
6
+ export { socialLoginButtonStyles, socialLoginButtonsStyles, } from "./social-login-button.js";
7
+ export { userMenuDropdownStyles } from "./user-menu-dropdown.js";
@@ -0,0 +1,36 @@
1
+ export declare const metricCardColorStyles: Record<string, string>;
2
+ export declare const metricCardStyles: {
3
+ body: string;
4
+ head: string;
5
+ title: string;
6
+ titleOnColor: string;
7
+ titleMuted: string;
8
+ icon: string;
9
+ iconOnColor: string;
10
+ iconMuted: string;
11
+ value: string;
12
+ valueBlock: string;
13
+ valueOnColor: string;
14
+ valueMuted: string;
15
+ meta: string;
16
+ change: string;
17
+ changeOnColor: string;
18
+ subtitle: string;
19
+ subtitleOnColor: string;
20
+ subtitleMuted: string;
21
+ };
22
+ export declare const metricCardChangeColors: {
23
+ readonly up: "text-success";
24
+ readonly down: "text-destructive";
25
+ readonly flat: "text-muted-foreground";
26
+ };
27
+ export declare const metricCardSkeletonStyles: {
28
+ body: string;
29
+ head: string;
30
+ title: string;
31
+ icon: string;
32
+ valueBlock: string;
33
+ value: string;
34
+ meta: string;
35
+ metaLine: string;
36
+ };
@@ -0,0 +1,44 @@
1
+ export const metricCardColorStyles = {
2
+ primary: "bg-gradient-to-br from-primary to-primary/90 text-primary-foreground",
3
+ secondary: "bg-gradient-to-br from-secondary to-secondary/90 text-secondary-foreground",
4
+ destructive: "bg-gradient-to-br from-destructive to-destructive/90 text-destructive-foreground",
5
+ success: "bg-gradient-to-br from-success to-success/90 text-success-foreground",
6
+ warning: "bg-gradient-to-br from-warning to-warning/90 text-warning-foreground",
7
+ info: "bg-gradient-to-br from-info to-info/90 text-info-foreground",
8
+ muted: "bg-card border text-card-foreground",
9
+ };
10
+ export const metricCardStyles = {
11
+ body: "p-6",
12
+ head: "flex items-center justify-between mb-4",
13
+ title: "text-xs font-semibold uppercase tracking-wide",
14
+ titleOnColor: "opacity-90",
15
+ titleMuted: "text-muted-foreground",
16
+ icon: "",
17
+ iconOnColor: "opacity-70",
18
+ iconMuted: "text-muted-foreground",
19
+ value: "text-4xl font-bold leading-none",
20
+ valueBlock: "mb-3",
21
+ valueOnColor: "",
22
+ valueMuted: "text-card-foreground",
23
+ meta: "text-sm",
24
+ change: "flex items-center gap-1",
25
+ changeOnColor: "opacity-90",
26
+ subtitle: "",
27
+ subtitleOnColor: "opacity-80",
28
+ subtitleMuted: "text-muted-foreground",
29
+ };
30
+ export const metricCardChangeColors = {
31
+ up: "text-success",
32
+ down: "text-destructive",
33
+ flat: "text-muted-foreground",
34
+ };
35
+ export const metricCardSkeletonStyles = {
36
+ body: "p-6",
37
+ head: "flex items-center justify-between mb-4",
38
+ title: "h-4 w-24",
39
+ icon: "rounded-md",
40
+ valueBlock: "mb-3",
41
+ value: "h-10 w-32",
42
+ meta: "text-sm",
43
+ metaLine: "h-4 w-32",
44
+ };
@@ -0,0 +1,32 @@
1
+ export declare const sessionCardStyles: {
2
+ root: string;
3
+ header: string;
4
+ headerRow: string;
5
+ headerMain: string;
6
+ deviceIcon: string;
7
+ titleBlock: string;
8
+ titleRow: string;
9
+ title: string;
10
+ subtitle: string;
11
+ currentBadge: string;
12
+ revokeButton: string;
13
+ content: string;
14
+ detailList: string;
15
+ detailRow: string;
16
+ detailIcon: string;
17
+ };
18
+ export declare const sessionCardSkeletonStyles: {
19
+ root: string;
20
+ headerRow: string;
21
+ headerMain: string;
22
+ deviceIcon: string;
23
+ titleBlock: string;
24
+ titleSkeleton: string;
25
+ subtitleSkeleton: string;
26
+ badgeSkeleton: string;
27
+ revokeSkeleton: string;
28
+ detailList: string;
29
+ detailRowMedium: string;
30
+ detailRowNarrow: string;
31
+ detailRowWide: string;
32
+ };
@@ -0,0 +1,32 @@
1
+ export const sessionCardStyles = {
2
+ root: "relative",
3
+ header: "pb-3",
4
+ headerRow: "flex items-start justify-between gap-4",
5
+ headerMain: "flex items-start gap-3 flex-1",
6
+ deviceIcon: "size-6 text-muted-foreground mt-0.5",
7
+ titleBlock: "flex-1 min-w-0",
8
+ titleRow: "flex items-center gap-2 flex-wrap",
9
+ title: "font-semibold text-sm",
10
+ subtitle: "text-xs text-muted-foreground mt-0.5",
11
+ currentBadge: "inline-flex items-center rounded-md bg-success/10 px-2 py-1 text-xs font-medium text-success border border-success/20",
12
+ revokeButton: "text-destructive hover:text-destructive hover:bg-destructive/10",
13
+ content: "pt-0",
14
+ detailList: "space-y-1.5 text-xs text-muted-foreground",
15
+ detailRow: "flex items-center gap-1.5",
16
+ detailIcon: "size-3.5",
17
+ };
18
+ export const sessionCardSkeletonStyles = {
19
+ root: "relative",
20
+ headerRow: "flex items-start justify-between gap-4",
21
+ headerMain: "flex items-start gap-3 flex-1",
22
+ deviceIcon: "rounded-md",
23
+ titleBlock: "flex-1 min-w-0",
24
+ titleSkeleton: "h-4 w-32 mb-1",
25
+ subtitleSkeleton: "h-3 w-48",
26
+ badgeSkeleton: "h-5 w-24 rounded-md",
27
+ revokeSkeleton: "h-8 w-16 rounded-md",
28
+ detailList: "space-y-1.5",
29
+ detailRowMedium: "h-4 w-48",
30
+ detailRowNarrow: "h-4 w-40",
31
+ detailRowWide: "h-4 w-56",
32
+ };
@@ -0,0 +1,15 @@
1
+ /** Social-login families: per-part base classes. */
2
+ export declare const socialLoginButtonStyles: {
3
+ root: string;
4
+ icon: string;
5
+ spinner: string;
6
+ };
7
+ export declare const socialLoginButtonsStyles: {
8
+ root: string;
9
+ divider: string;
10
+ dividerLine: string;
11
+ dividerMask: string;
12
+ dividerLabel: string;
13
+ dividerRule: string;
14
+ list: string;
15
+ };
@@ -0,0 +1,15 @@
1
+ /** Social-login families: per-part base classes. */
2
+ export const socialLoginButtonStyles = {
3
+ root: "relative transition-colors duration-200 bg-transparent border-input text-foreground",
4
+ icon: "w-5 h-5 mr-2",
5
+ spinner: "w-5 h-5 mr-2 animate-spin",
6
+ };
7
+ export const socialLoginButtonsStyles = {
8
+ root: "w-full space-y-3",
9
+ divider: "relative",
10
+ dividerLine: "absolute inset-0 flex items-center",
11
+ dividerMask: "relative flex justify-center text-xs uppercase",
12
+ dividerLabel: "bg-background px-2 text-muted-foreground",
13
+ dividerRule: "w-full border-t",
14
+ list: "flex flex-wrap justify-center gap-2",
15
+ };
@@ -0,0 +1,10 @@
1
+ export declare const userMenuDropdownStyles: {
2
+ trigger: string;
3
+ avatar: string;
4
+ avatarFallback: string;
5
+ content: string;
6
+ label: string;
7
+ name: string;
8
+ email: string;
9
+ itemIcon: string;
10
+ };
@@ -0,0 +1,10 @@
1
+ export const userMenuDropdownStyles = {
2
+ trigger: "h-auto p-1 rounded-full hover:bg-accent",
3
+ avatar: "size-8",
4
+ avatarFallback: "bg-primary text-primary-foreground text-sm font-medium",
5
+ content: "w-56",
6
+ label: "flex flex-col space-y-1",
7
+ name: "text-sm font-medium leading-none",
8
+ email: "text-xs text-muted-foreground leading-none",
9
+ itemIcon: "mr-2 size-4",
10
+ };
package/dist/index.d.ts CHANGED
@@ -10,7 +10,6 @@ export * from "./components/navigation";
10
10
  export * from "./components/session-card";
11
11
  export * from "./components/sidebar";
12
12
  export * from "./components/social-login-button";
13
- export * from "./components/social-login-buttons";
14
13
  export * from "./components/sparkline-chart";
15
14
  export * from "./components/user-menu-dropdown";
16
15
  export { isActivePath } from "./lib/active-path";
package/dist/index.js CHANGED
@@ -13,7 +13,6 @@ export * from "./components/navigation/index.js";
13
13
  export * from "./components/session-card/index.js";
14
14
  export * from "./components/sidebar/index.js";
15
15
  export * from "./components/social-login-button/index.js";
16
- export * from "./components/social-login-buttons/index.js";
17
16
  export * from "./components/sparkline-chart/index.js";
18
17
  export * from "./components/user-menu-dropdown/index.js";
19
18
  export { isActivePath } from "./lib/active-path.js";
@@ -3,8 +3,6 @@
3
3
  @layer theme, base, components, utilities;
4
4
  @layer theme {
5
5
  :root, :host {
6
- --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
7
- "Courier New", monospace;
8
6
  --color-orange-500: oklch(70.5% 0.213 47.604);
9
7
  --color-orange-600: oklch(64.6% 0.222 41.116);
10
8
  --color-green-500: oklch(72.3% 0.219 149.579);
@@ -26,10 +24,8 @@
26
24
  --color-indigo-600: oklch(51.1% 0.262 276.966);
27
25
  --color-purple-500: oklch(62.7% 0.265 303.9);
28
26
  --color-purple-600: oklch(55.8% 0.288 302.321);
29
- --color-black: #000;
30
27
  --color-white: #fff;
31
28
  --spacing: 0.25rem;
32
- --container-xs: 20rem;
33
29
  --container-sm: 40rem;
34
30
  --container-md: 48rem;
35
31
  --container-2xl: 96rem;
@@ -90,25 +86,11 @@
90
86
  --color-error: var(--error);
91
87
  --color-info: var(--info);
92
88
  --color-info-foreground: var(--info-foreground);
93
- --color-border: var(--border);
94
- @supports (color: color-mix(in lab, red, red)) {
95
- --color-border: color-mix(
96
- in oklab,
97
- var(--border),
98
- transparent calc((1 - var(--border-alpha, 1)) * 100%)
99
- );
100
- }
89
+ --color-border: var(--kala-mix-border);
101
90
  --color-border-strong: var(--border-strong);
102
91
  --color-input: var(--input);
103
92
  --color-ring: var(--ring);
104
- --color-overlay: var(--overlay);
105
- @supports (color: color-mix(in lab, red, red)) {
106
- --color-overlay: color-mix(
107
- in oklab,
108
- var(--overlay),
109
- transparent calc((1 - var(--overlay-alpha, 0.5)) * 100%)
110
- );
111
- }
93
+ --color-overlay: var(--kala-mix-overlay);
112
94
  --color-brand-google: #4285f4;
113
95
  --color-brand-facebook: #1877f2;
114
96
  --color-brand-twitter: #1da1f2;
@@ -118,6 +100,9 @@
118
100
  }
119
101
  }
120
102
  @layer utilities {
103
+ .pointer-events-none {
104
+ pointer-events: none;
105
+ }
121
106
  .collapse {
122
107
  visibility: collapse;
123
108
  }
@@ -276,6 +261,9 @@
276
261
  .mb-1 {
277
262
  margin-bottom: var(--spacing);
278
263
  }
264
+ .mb-1\.5 {
265
+ margin-bottom: calc(var(--spacing) * 1.5);
266
+ }
279
267
  .mb-2 {
280
268
  margin-bottom: calc(var(--spacing) * 2);
281
269
  }
@@ -386,6 +374,9 @@
386
374
  .h-16 {
387
375
  height: calc(var(--spacing) * 16);
388
376
  }
377
+ .h-20 {
378
+ height: calc(var(--spacing) * 20);
379
+ }
389
380
  .h-48 {
390
381
  height: calc(var(--spacing) * 48);
391
382
  }
@@ -476,9 +467,6 @@
476
467
  .w-80 {
477
468
  width: calc(var(--spacing) * 80);
478
469
  }
479
- .w-96 {
480
- width: calc(var(--spacing) * 96);
481
- }
482
470
  .w-\[70px\] {
483
471
  width: 70px;
484
472
  }
@@ -494,6 +482,9 @@
494
482
  .w-\[440px\] {
495
483
  width: 440px;
496
484
  }
485
+ .w-auto {
486
+ width: auto;
487
+ }
497
488
  .w-full {
498
489
  width: 100%;
499
490
  }
@@ -518,9 +509,6 @@
518
509
  .max-w-sm {
519
510
  max-width: var(--container-sm);
520
511
  }
521
- .max-w-xs {
522
- max-width: var(--container-xs);
523
- }
524
512
  .min-w-0 {
525
513
  min-width: 0px;
526
514
  }
@@ -533,6 +521,9 @@
533
521
  .flex-shrink-0 {
534
522
  flex-shrink: 0;
535
523
  }
524
+ .shrink {
525
+ flex-shrink: 1;
526
+ }
536
527
  .shrink-0 {
537
528
  flex-shrink: 0;
538
529
  }
@@ -843,9 +834,6 @@
843
834
  background-color: color-mix(in oklab, var(--color-background) 80%, transparent);
844
835
  }
845
836
  }
846
- .bg-black {
847
- background-color: var(--color-black);
848
- }
849
837
  .bg-blue-50 {
850
838
  background-color: var(--color-blue-50);
851
839
  }
@@ -883,11 +871,7 @@
883
871
  background-color: var(--color-overlay);
884
872
  }
885
873
  .bg-overlay\/40 {
886
- background-color: color-mix(in srgb, color-mix(
887
- in oklab,
888
- var(--overlay),
889
- transparent calc((1 - var(--overlay-alpha, 0.5)) * 100%)
890
- ) 40%, transparent);
874
+ background-color: var(--color-overlay);
891
875
  @supports (color: color-mix(in lab, red, red)) {
892
876
  background-color: color-mix(in oklab, var(--color-overlay) 40%, transparent);
893
877
  }
@@ -923,10 +907,6 @@
923
907
  --tw-gradient-position: to bottom right in oklab;
924
908
  background-image: linear-gradient(var(--tw-gradient-stops));
925
909
  }
926
- .from-blue-500 {
927
- --tw-gradient-from: var(--color-blue-500);
928
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
929
- }
930
910
  .from-blue-600 {
931
911
  --tw-gradient-from: var(--color-blue-600);
932
912
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
@@ -967,10 +947,6 @@
967
947
  --tw-gradient-from: var(--color-success);
968
948
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
969
949
  }
970
- .from-teal-500 {
971
- --tw-gradient-from: var(--color-teal-500);
972
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
973
- }
974
950
  .from-teal-600 {
975
951
  --tw-gradient-from: var(--color-teal-600);
976
952
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
@@ -983,10 +959,6 @@
983
959
  --tw-gradient-to: var(--color-blue-500);
984
960
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
985
961
  }
986
- .to-blue-600 {
987
- --tw-gradient-to: var(--color-blue-600);
988
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
989
- }
990
962
  .to-destructive\/90 {
991
963
  --tw-gradient-to: var(--color-destructive);
992
964
  @supports (color: color-mix(in lab, red, red)) {
@@ -1042,10 +1014,6 @@
1042
1014
  --tw-gradient-to: var(--color-teal-500);
1043
1015
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1044
1016
  }
1045
- .to-teal-600 {
1046
- --tw-gradient-to: var(--color-teal-600);
1047
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1048
- }
1049
1017
  .to-warning\/90 {
1050
1018
  --tw-gradient-to: var(--color-warning);
1051
1019
  @supports (color: color-mix(in lab, red, red)) {
@@ -1155,9 +1123,6 @@
1155
1123
  .text-right {
1156
1124
  text-align: right;
1157
1125
  }
1158
- .font-mono {
1159
- font-family: var(--font-mono);
1160
- }
1161
1126
  .text-2xl {
1162
1127
  font-size: var(--text-2xl);
1163
1128
  line-height: var(--tw-leading, var(--text-2xl--line-height));