@cbrl/design 0.10.0 → 0.11.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.
Files changed (37) hide show
  1. package/README.md +73 -0
  2. package/dist/components/app-shell.d.ts +45 -10
  3. package/dist/components/app-shell.js +214 -25
  4. package/dist/components/badge.js +1 -1
  5. package/dist/components/button-group.d.ts +1 -1
  6. package/dist/components/button-group.js +1 -1
  7. package/dist/components/button.js +1 -1
  8. package/dist/components/container.d.ts +1 -1
  9. package/dist/components/container.js +1 -1
  10. package/dist/components/dropdown-menu.js +1 -1
  11. package/dist/components/field.d.ts +1 -1
  12. package/dist/components/field.js +1 -1
  13. package/dist/components/list.js +1 -1
  14. package/dist/components/main.js +1 -1
  15. package/dist/components/page-header.js +3 -3
  16. package/dist/components/settings-dialog-mobile.d.ts +23 -0
  17. package/dist/components/settings-dialog-mobile.js +198 -0
  18. package/dist/components/settings-dialog.d.ts +32 -1
  19. package/dist/components/settings-dialog.js +63 -9
  20. package/dist/components/settings-mobile-blocks.d.ts +25 -0
  21. package/dist/components/settings-mobile-blocks.js +126 -0
  22. package/dist/components/sidebar-core.js +2 -2
  23. package/dist/components/sidebar-menu.js +1 -1
  24. package/dist/components/status-dot.js +1 -1
  25. package/dist/components/tabs.d.ts +1 -1
  26. package/dist/components/tabs.js +1 -1
  27. package/dist/components/typography.js +1 -1
  28. package/dist/components/user-menu.js +2 -1
  29. package/dist/components/workspace-picker.d.ts +21 -0
  30. package/dist/components/workspace-picker.js +51 -0
  31. package/dist/globals.css +33 -0
  32. package/dist/hooks/use-mobile.d.ts +1 -0
  33. package/dist/hooks/use-mobile.js +14 -7
  34. package/dist/index.d.ts +7 -4
  35. package/dist/index.js +2 -1
  36. package/dist/lib/mobile-chrome.js +12 -0
  37. package/package.json +1 -1
@@ -0,0 +1,51 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ // src/components/workspace-picker.tsx
5
+ function WorkspacePicker({ brand, title, items, onSelect, footer, className }) {
6
+ return /* @__PURE__ */ jsxs("div", {
7
+ "data-slot": "workspace-picker",
8
+ className: cn("bg-background pt-safe pb-safe px-safe flex min-h-dvh flex-col items-center", className),
9
+ children: [
10
+ /* @__PURE__ */ jsx("div", {
11
+ className: "flex h-20 items-center justify-center text-2xl font-semibold",
12
+ children: brand
13
+ }),
14
+ /* @__PURE__ */ jsxs("div", {
15
+ className: "flex w-full max-w-md flex-1 flex-col justify-center gap-8 px-4",
16
+ children: [/* @__PURE__ */ jsx("h1", {
17
+ className: "text-center text-3xl font-semibold tracking-tight",
18
+ children: title
19
+ }), /* @__PURE__ */ jsx("ul", {
20
+ className: "bg-card overflow-hidden rounded-3xl border",
21
+ children: items.map(({ id, name, kind, icon: Icon }) => /* @__PURE__ */ jsx("li", {
22
+ className: "border-b last:border-b-0",
23
+ children: /* @__PURE__ */ jsxs("button", {
24
+ type: "button",
25
+ onClick: () => onSelect(id),
26
+ className: "active:bg-muted hover:bg-muted/60 flex min-h-18 w-full cursor-pointer items-center gap-4 px-6 py-3 text-left",
27
+ children: [Icon ? /* @__PURE__ */ jsx(Icon, {
28
+ "aria-hidden": true,
29
+ className: "text-muted-foreground size-7 shrink-0"
30
+ }) : null, /* @__PURE__ */ jsxs("span", {
31
+ className: "grid min-w-0",
32
+ children: [kind ? /* @__PURE__ */ jsx("span", {
33
+ className: "text-muted-foreground text-sm",
34
+ children: kind
35
+ }) : null, /* @__PURE__ */ jsx("span", {
36
+ className: "truncate text-lg",
37
+ children: name
38
+ })]
39
+ })]
40
+ })
41
+ }, id))
42
+ })]
43
+ }),
44
+ footer ? /* @__PURE__ */ jsx("div", {
45
+ className: "flex min-h-24 items-center justify-center",
46
+ children: footer
47
+ }) : null
48
+ ]
49
+ });
50
+ }
51
+ export { WorkspacePicker };
package/dist/globals.css CHANGED
@@ -48,6 +48,39 @@
48
48
  html:has([data-slot='sidebar-wrapper']) {
49
49
  overflow-y: hidden;
50
50
  }
51
+ html {
52
+ -webkit-text-size-adjust: 100%;
53
+ -webkit-tap-highlight-color: transparent;
54
+ }
55
+ /*
56
+ * Phones (below `md`, the same breakpoint where the shell folds): the root
57
+ * goes to 17px, the iOS body size. Every rem-based size follows, so the type
58
+ * lands on the iOS Dynamic Type scale — text-base = Body (17), text-sm ≈
59
+ * Subheadline (15), text-xs ≈ Footnote (13) — and icons, rows and touch
60
+ * targets grow with it. Desktop (md+) keeps 16px, untouched.
61
+ */
62
+ @media (max-width: 767px) {
63
+ html {
64
+ font-size: 106.25%;
65
+ }
66
+ }
67
+ }
68
+
69
+ /*
70
+ * Safe areas (notch, status bar, iPhone home indicator, Android gesture bar).
71
+ * They are only non-zero when the app sets `viewport-fit=cover` (Next.js:
72
+ * `viewport.viewportFit = 'cover'`); then the shell pads itself with them.
73
+ * Apps can use the same utilities on their own fixed/full-screen surfaces.
74
+ */
75
+ @utility pt-safe {
76
+ padding-top: env(safe-area-inset-top, 0px);
77
+ }
78
+ @utility pb-safe {
79
+ padding-bottom: env(safe-area-inset-bottom, 0px);
80
+ }
81
+ @utility px-safe {
82
+ padding-left: env(safe-area-inset-left, 0px);
83
+ padding-right: env(safe-area-inset-right, 0px);
51
84
  }
52
85
 
53
86
  /*
@@ -1 +1,2 @@
1
+ /** Phone or not; `false` until the browser says (see `useMobileState`). */
1
2
  export declare function useIsMobile(): boolean;
@@ -1,17 +1,24 @@
1
1
  import * as React from "react";
2
2
  // src/hooks/use-mobile.ts
3
3
  const MOBILE_BREAKPOINT = 768;
4
- function useIsMobile() {
4
+ /**
5
+ * Phone or not, and `undefined` until the browser says (server render and
6
+ * hydration) — so chrome can render both layouts gated by CSS meanwhile,
7
+ * instead of flashing the desktop one on phones.
8
+ */
9
+ function useMobileState() {
5
10
  const [isMobile, setIsMobile] = React.useState(void 0);
6
11
  React.useEffect(() => {
7
12
  const mql = window.matchMedia(`(max-width: 767px)`);
8
- const onChange = () => {
9
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
10
- };
13
+ const onChange = () => setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
11
14
  mql.addEventListener("change", onChange);
12
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
15
+ onChange();
13
16
  return () => mql.removeEventListener("change", onChange);
14
17
  }, []);
15
- return !!isMobile;
18
+ return isMobile;
19
+ }
20
+ /** Phone or not; `false` until the browser says (see `useMobileState`). */
21
+ function useIsMobile() {
22
+ return useMobileState() === true;
16
23
  }
17
- export { useIsMobile };
24
+ export { useIsMobile, useMobileState };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  import { cn } from "./lib/cn.js";
2
2
  import { initials } from "./lib/initials.js";
3
3
  import { NavItem, NavMatch, NavSection, hasActiveChild, isActive } from "./lib/nav.js";
4
- import { AppShell, AppShellNavLink, AppShellProps } from "./components/app-shell.js";
4
+ import { AppShell, AppShellAction, AppShellMobileAccount, AppShellNavLink, AppShellProps } from "./components/app-shell.js";
5
+ import { SettingsAppearanceLabels, SettingsSignOut, SettingsWorkspace, SettingsWorkspaces } from "./components/settings-mobile-blocks.js";
6
+ import { WorkspacePicker, WorkspacePickerItem, WorkspacePickerProps } from "./components/workspace-picker.js";
7
+ import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInput, SidebarInset, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "./components/sidebar-core.js";
5
8
  import { DropdownMenuAccountHeader, USER_MENU_WIDTH, UserMenu, UserMenuProps, userMenuInitials } from "./components/user-menu.js";
9
+ import { SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem } from "./components/sidebar-menu.js";
6
10
  import { Calendar } from "./components/calendar.js";
7
- import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInput, SidebarInset, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "./components/sidebar-core.js";
8
11
  import { DateField, DateFieldProps } from "./components/date-field.js";
9
- import { SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem } from "./components/sidebar-menu.js";
10
12
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./components/alert-dialog.js";
11
13
  import { AuthSplitScreen, AuthSplitScreenProps } from "./components/auth-split-screen.js";
12
14
  import { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from "./components/avatar.js";
@@ -53,6 +55,7 @@ import { ScrollArea, ScrollBar } from "./components/scroll-area.js";
53
55
  import { Separator } from "./components/separator.js";
54
56
  import { SettingRow, SettingRowGroup } from "./components/setting-row.js";
55
57
  import { SettingsDialog, SettingsDialogLabels, SettingsDialogProps, SettingsDialogSection, SettingsEmpty, SettingsGroup, SettingsItem, matchSections } from "./components/settings-dialog.js";
58
+ import { SettingsAbout, SettingsAboutLink, SettingsDialogAccount } from "./components/settings-dialog-mobile.js";
56
59
  import { SettingsSection } from "./components/settings-section.js";
57
60
  import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./components/sheet.js";
58
61
  import "./components/sidebar.js";
@@ -63,4 +66,4 @@ import { ElementSize, useElementSize } from "./hooks/use-element-size.js";
63
66
  import { HashSection, useHashSection } from "./hooks/use-hash-section.js";
64
67
  import { useIsMobile } from "./hooks/use-mobile.js";
65
68
  import { ScrollStripEdges, useScrollStrip } from "./hooks/use-scroll-strip.js";
66
- export { APP_TOOLBAR_HEIGHT, AccountSettings, type AccountSettingsLabels, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppShell, type AppShellNavLink, type AppShellProps, AppToolbar, type AppToolbarLabels, AuthSplitScreen, type AuthSplitScreenProps, type AutosaveFormOptions, type AutosaveResult, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BrandIconProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Container, type ContainerProps, DateField, type DateFieldProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuAccountHeader, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type ElementSize, EmptyState, type EmptyStateProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GoogleIcon, type HashSection, HighlightedTextarea, Input, InputGroup, InputGroupAddon, InputGroupInput, Label, List, type ListEmptyContent, type ListFilterConfig, ListItem, ListItemActions, ListItemContent, ListItemDescription, type ListItemDescriptor, ListItemLeading, ListItemMedia, ListItemMeta, ListItemTitle, ListItemTrailing, type ListPaginationConfig, type ListProps, type ListSearchConfig, Main, type NavItem, type NavMatch, type NavSection, PageHeader, type PageHeaderProps, PageHeaderSkeleton, type PageHeaderSkeletonProps, Pagination, type PaginationProps, PeekSidebar, Popover, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, type ScrollStripEdges, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingRow, SettingRowGroup, type SettingsAccount, SettingsDialog, type SettingsDialogLabels, type SettingsDialogProps, type SettingsDialogSection, SettingsEmpty, SettingsGroup, SettingsItem, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarPeekProvider, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusDot, type StatusDotProps, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsCount, TabsList, TabsTrigger, Textarea, type ThemeChoice, ThemeProvider, ThemeSetting, type ThemeSettingLabels, ThemeToggle, type ThemeToggleLabels, type ThemeToggleProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, USER_MENU_WIDTH, UserMenu, type UserMenuProps, WhatsappIcon, badgeVariants, buttonGroupVariants, buttonVariants, cn, containerVariants, hasActiveChild as hasActiveNavChild, initials, isActive as isNavItemActive, listItemVariants, listVariants, mainVariants, matchSections as matchSettingsSections, statusDotVariants, tabsListVariants, typographyVariants, useAutosaveForm, useElementSize, useHashSection, useIsMobile, useScrollStrip, useSidebar, useSidebarPeek, userMenuInitials };
69
+ export { APP_TOOLBAR_HEIGHT, AccountSettings, type AccountSettingsLabels, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppShell, type AppShellAction, type AppShellMobileAccount, type AppShellNavLink, type AppShellProps, AppToolbar, type AppToolbarLabels, AuthSplitScreen, type AuthSplitScreenProps, type AutosaveFormOptions, type AutosaveResult, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BrandIconProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Container, type ContainerProps, DateField, type DateFieldProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuAccountHeader, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type ElementSize, EmptyState, type EmptyStateProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GoogleIcon, type HashSection, HighlightedTextarea, Input, InputGroup, InputGroupAddon, InputGroupInput, Label, List, type ListEmptyContent, type ListFilterConfig, ListItem, ListItemActions, ListItemContent, ListItemDescription, type ListItemDescriptor, ListItemLeading, ListItemMedia, ListItemMeta, ListItemTitle, ListItemTrailing, type ListPaginationConfig, type ListProps, type ListSearchConfig, Main, type NavItem, type NavMatch, type NavSection, PageHeader, type PageHeaderProps, PageHeaderSkeleton, type PageHeaderSkeletonProps, Pagination, type PaginationProps, PeekSidebar, Popover, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, type ScrollStripEdges, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingRow, SettingRowGroup, type SettingsAbout, type SettingsAboutLink, type SettingsAccount, type SettingsAppearanceLabels, SettingsDialog, type SettingsDialogAccount, type SettingsDialogLabels, type SettingsDialogProps, type SettingsDialogSection, SettingsEmpty, SettingsGroup, SettingsItem, SettingsSection, type SettingsSignOut, type SettingsWorkspace, type SettingsWorkspaces, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarPeekProvider, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusDot, type StatusDotProps, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsCount, TabsList, TabsTrigger, Textarea, type ThemeChoice, ThemeProvider, ThemeSetting, type ThemeSettingLabels, ThemeToggle, type ThemeToggleLabels, type ThemeToggleProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, USER_MENU_WIDTH, UserMenu, type UserMenuProps, WhatsappIcon, WorkspacePicker, type WorkspacePickerItem, type WorkspacePickerProps, badgeVariants, buttonGroupVariants, buttonVariants, cn, containerVariants, hasActiveChild as hasActiveNavChild, initials, isActive as isNavItemActive, listItemVariants, listVariants, mainVariants, matchSections as matchSettingsSections, statusDotVariants, tabsListVariants, typographyVariants, useAutosaveForm, useElementSize, useHashSection, useIsMobile, useScrollStrip, useSidebar, useSidebarPeek, userMenuInitials };
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ import { cn } from "./lib/cn.js";
2
2
  import { initials } from "./lib/initials.js";
3
3
  import { hasActiveChild, isActive } from "./lib/nav.js";
4
4
  import { AppShell } from "./components/app-shell.js";
5
+ import { WorkspacePicker } from "./components/workspace-picker.js";
5
6
  import { DropdownMenuAccountHeader, USER_MENU_WIDTH, UserMenu, userMenuInitials } from "./components/user-menu.js";
6
7
  import { Calendar } from "./components/calendar.js";
7
8
  import { DateField } from "./components/date-field.js";
@@ -61,4 +62,4 @@ import { useElementSize } from "./hooks/use-element-size.js";
61
62
  import { useHashSection } from "./hooks/use-hash-section.js";
62
63
  import { useIsMobile } from "./hooks/use-mobile.js";
63
64
  import { useScrollStrip } from "./hooks/use-scroll-strip.js";
64
- export { APP_TOOLBAR_HEIGHT, AccountSettings, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppShell, AppToolbar, AuthSplitScreen, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Container, DateField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuAccountHeader, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GoogleIcon, HighlightedTextarea, Input, InputGroup, InputGroupAddon, InputGroupInput, Label, List, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemLeading, ListItemMedia, ListItemMeta, ListItemTitle, ListItemTrailing, Main, PageHeader, PageHeaderSkeleton, Pagination, PeekSidebar, Popover, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingRow, SettingRowGroup, SettingsDialog, SettingsEmpty, SettingsGroup, SettingsItem, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarPeekProvider, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusDot, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsCount, TabsList, TabsTrigger, Textarea, ThemeProvider, ThemeSetting, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, USER_MENU_WIDTH, UserMenu, WhatsappIcon, badgeVariants, buttonGroupVariants, buttonVariants, cn, containerVariants, hasActiveChild as hasActiveNavChild, initials, isActive as isNavItemActive, listItemVariants, listVariants, mainVariants, matchSections as matchSettingsSections, statusDotVariants, tabsListVariants, typographyVariants, useAutosaveForm, useElementSize, useHashSection, useIsMobile, useScrollStrip, useSidebar, useSidebarPeek, userMenuInitials };
65
+ export { APP_TOOLBAR_HEIGHT, AccountSettings, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppShell, AppToolbar, AuthSplitScreen, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Container, DateField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuAccountHeader, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GoogleIcon, HighlightedTextarea, Input, InputGroup, InputGroupAddon, InputGroupInput, Label, List, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemLeading, ListItemMedia, ListItemMeta, ListItemTitle, ListItemTrailing, Main, PageHeader, PageHeaderSkeleton, Pagination, PeekSidebar, Popover, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingRow, SettingRowGroup, SettingsDialog, SettingsEmpty, SettingsGroup, SettingsItem, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarPeekProvider, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StatusDot, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsCount, TabsList, TabsTrigger, Textarea, ThemeProvider, ThemeSetting, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, USER_MENU_WIDTH, UserMenu, WhatsappIcon, WorkspacePicker, badgeVariants, buttonGroupVariants, buttonVariants, cn, containerVariants, hasActiveChild as hasActiveNavChild, initials, isActive as isNavItemActive, listItemVariants, listVariants, mainVariants, matchSections as matchSettingsSections, statusDotVariants, tabsListVariants, typographyVariants, useAutosaveForm, useElementSize, useHashSection, useIsMobile, useScrollStrip, useSidebar, useSidebarPeek, userMenuInitials };
@@ -0,0 +1,12 @@
1
+ // src/lib/mobile-chrome.ts
2
+ /**
3
+ * A bar floating over its scroller, translucent: the content blurs beneath it
4
+ * as it scrolls. Position it (`absolute inset-x-0 top-0`) and give the
5
+ * scroller a top padding of the bar's height.
6
+ */
7
+ const MOBILE_BAR = "bg-background/70 supports-[backdrop-filter]:bg-background/55 z-30 backdrop-blur-xl backdrop-saturate-150";
8
+ /** Height of the bar's row (4rem); pair with `MOBILE_BAR_OFFSET` on the scroller. */
9
+ const MOBILE_BAR_ROW = "h-16";
10
+ /** Round, softly filled icon button of the phone chrome. */
11
+ const MOBILE_ROUND_BUTTON = "bg-muted/80 text-foreground border-border/60 hover:bg-muted active:bg-muted focus-visible:ring-ring/50 inline-flex size-11 shrink-0 cursor-pointer items-center justify-center rounded-full border shadow-sm backdrop-blur outline-none focus-visible:ring-3 [&_svg]:size-5";
12
+ export { MOBILE_BAR, MOBILE_BAR_ROW, MOBILE_ROUND_BUTTON };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbrl/design",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Design system on Radix + Tailwind v4: shadcn-style components, layout shells and design tokens with an overridable brand accent.",
5
5
  "license": "MIT",
6
6
  "author": "Kayron Cabral",