@geomak/ui 1.3.0 → 1.4.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/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as COLORS, S as SemanticColorKey, a as SemanticRadiusKey, V as VarColorKey, b as VarRadiusKey, c as VarShadowKey, P as palette, s as semanticTokens, v as vars } from './index-CPCiQllz.cjs';
1
+ export { C as COLORS, S as SemanticColorKey, a as SemanticRadiusKey, V as VarColorKey, b as VarRadiusKey, c as VarShadowKey, P as palette, s as semanticTokens, v as vars } from './index-DLGzTj3K.cjs';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import React$1 from 'react';
4
4
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
@@ -329,26 +329,31 @@ declare function Drawer({ isOpen, onClose, hasFooter, placement, width, okText,
329
329
 
330
330
  interface TooltipProps {
331
331
  children: React$1.ReactNode;
332
+ /** The text or node shown inside the tooltip */
332
333
  title: React$1.ReactNode;
333
- /** 'top' | 'right' | 'bottom' | 'left' */
334
+ /** Which side of the trigger the tooltip appears on */
334
335
  placement?: 'top' | 'right' | 'bottom' | 'left';
335
- /** Delay in ms before showing the tooltip */
336
+ /** Delay before showing, ms (default 300) */
336
337
  delayDuration?: number;
338
+ /** Offset from trigger in px (default 8) */
339
+ sideOffset?: number;
337
340
  }
338
341
  /**
339
342
  * Tooltip powered by Radix Tooltip.
340
343
  *
341
- * Radix handles keyboard navigation (escape), pointer events, and ARIA.
342
- * The VesOPS prussian-blue style is preserved.
343
- *
344
- * Wrap your app in `<TooltipProvider>` (re-exported below) to batch providers.
344
+ * Radix handles keyboard navigation (Escape), pointer events, and ARIA.
345
+ * Each placement animates in from the correct direction.
346
+ * Wrap your app in `<TooltipProvider>` (re-exported below) to share a
347
+ * single provider instead of nesting one per tooltip.
345
348
  *
346
349
  * @example
347
- * <Tooltip title="Delete record" placement="right">
348
- * <IconButton icon={<Icon.Trash />} />
349
- * </Tooltip>
350
+ * <TooltipProvider>
351
+ * <Tooltip title="Delete record" placement="top">
352
+ * <IconButton icon={<TrashIcon />} />
353
+ * </Tooltip>
354
+ * </TooltipProvider>
350
355
  */
351
- declare function Tooltip({ children, title, placement, delayDuration, }: TooltipProps): react_jsx_runtime.JSX.Element;
356
+ declare function Tooltip({ children, title, placement, delayDuration, sideOffset, }: TooltipProps): react_jsx_runtime.JSX.Element;
352
357
 
353
358
  declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
354
359
 
@@ -452,6 +457,7 @@ declare function ToggleButton({ items, onChange, activeKey }: ToggleButtonProps)
452
457
 
453
458
  /** ─────────────────── types ─────────────────── */
454
459
  type NotificationType = 'info' | 'success' | 'warning' | 'danger';
460
+ type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
455
461
  interface NotificationPayload {
456
462
  title: React$1.ReactNode;
457
463
  description?: React$1.ReactNode;
@@ -461,35 +467,20 @@ interface NotificationPayload {
461
467
  }
462
468
  /** ─────────────────── provider ─────────────────── */
463
469
  /**
464
- * Wrap your application (or a subtree) in `NotificationProvider` to enable
465
- * toast notifications. Then call `useNotification()` anywhere inside to
466
- * trigger them.
470
+ * Wrap your app in `NotificationProvider`, then call `useNotification()` anywhere inside.
467
471
  *
468
- * Toasts slide in from the right and exit to the right.
469
- * `prefers-reduced-motion` is respected via `useReducedMotion()`.
472
+ * @param position One of 6 viewport positions (default: `top-right`)
470
473
  *
471
474
  * @example
472
- * // main.tsx / _app.tsx
473
- * <NotificationProvider>
475
+ * <NotificationProvider position="bottom-right">
474
476
  * <App />
475
477
  * </NotificationProvider>
476
- *
477
- * // Inside a component
478
- * const notify = useNotification()
479
- * notify.success({ title: 'Saved!', description: 'Your changes were saved.' })
480
478
  */
481
- declare function NotificationProvider({ children }: {
479
+ declare function NotificationProvider({ children, position, }: {
482
480
  children: React$1.ReactNode;
481
+ position?: NotificationPosition;
483
482
  }): react_jsx_runtime.JSX.Element;
484
483
  /** ─────────────────── hook ─────────────────── */
485
- /**
486
- * Imperative notification API. Must be called inside `NotificationProvider`.
487
- *
488
- * @example
489
- * const notify = useNotification()
490
- * notify.success({ title: 'Done', description: 'Record saved.', duration: 3000 })
491
- * notify.danger({ title: 'Error', description: err.message })
492
- */
493
484
  declare function useNotification(): {
494
485
  info: (props: Omit<NotificationPayload, "type">) => void;
495
486
  success: (props: Omit<NotificationPayload, "type">) => void;
@@ -892,6 +883,159 @@ interface TopBarProps {
892
883
  */
893
884
  declare function TopBar({ brand, center, actions, height, className, }: TopBarProps): react_jsx_runtime.JSX.Element;
894
885
 
886
+ /** ─────────────────── types ─────────────────── */
887
+ interface SidebarItem {
888
+ key: string;
889
+ icon: React$1.ReactNode;
890
+ label: string;
891
+ isActive?: boolean;
892
+ onClick?: () => void;
893
+ /** Numeric badge shown on the icon */
894
+ badge?: number;
895
+ }
896
+ interface SidebarSection {
897
+ key: string;
898
+ /** Section title — visible only when expanded */
899
+ title?: string;
900
+ items: SidebarItem[];
901
+ }
902
+ interface SidebarProps {
903
+ sections: SidebarSection[];
904
+ isExpanded: boolean;
905
+ onToggle?: () => void;
906
+ /** Expanded sidebar width in px (default 220) */
907
+ expandedWidth?: number;
908
+ /** Collapsed sidebar width in px (default 52) */
909
+ collapsedWidth?: number;
910
+ /** Slot rendered at the bottom of the sidebar (theme switch, user avatar…) */
911
+ footer?: React$1.ReactNode;
912
+ }
913
+ /** ─────────────────── main component ─────────────────── */
914
+ /**
915
+ * Collapsible application sidebar.
916
+ *
917
+ * When collapsed: icon-only with tooltips. When expanded: icon + label.
918
+ * Width animates with an ease-out-expo curve. The parent (AppShell) is
919
+ * responsible for shifting the main content by the sidebar width.
920
+ *
921
+ * @example
922
+ * const [open, setOpen] = useState(true)
923
+ * <Sidebar
924
+ * sections={NAV_SECTIONS}
925
+ * isExpanded={open}
926
+ * onToggle={() => setOpen(o => !o)}
927
+ * />
928
+ */
929
+ declare function Sidebar({ sections, isExpanded, onToggle, expandedWidth, collapsedWidth, footer, }: SidebarProps): react_jsx_runtime.JSX.Element;
930
+
931
+ interface AppShellProps {
932
+ /**
933
+ * Top navigation bar.
934
+ * Typically `<TopBar brand={...} actions={...} />`.
935
+ */
936
+ topBar?: React$1.ReactNode;
937
+ /** Sidebar navigation sections */
938
+ sidebarSections?: SidebarSection[];
939
+ /** Expanded width of the sidebar in px (default 220) */
940
+ sidebarExpandedWidth?: SidebarProps['expandedWidth'];
941
+ /** Collapsed width of the sidebar in px (default 52) */
942
+ sidebarCollapsedWidth?: SidebarProps['collapsedWidth'];
943
+ /** Start expanded (default false) */
944
+ sidebarDefaultExpanded?: boolean;
945
+ /** Slot rendered at the bottom of the sidebar */
946
+ sidebarFooter?: SidebarProps['footer'];
947
+ /** Main page content */
948
+ children?: React$1.ReactNode;
949
+ /** Root element className */
950
+ className?: string;
951
+ }
952
+ /**
953
+ * Full-page application layout skeleton.
954
+ *
955
+ * Composes a sticky TopBar + collapsible Sidebar + scrollable content area.
956
+ * The main area shifts with the sidebar width via a Framer Motion margin animation.
957
+ *
958
+ * @example
959
+ * <AppShell
960
+ * topBar={<TopBar brand={<Logo />} actions={<ThemeSwitch ... />} />}
961
+ * sidebarSections={NAV_SECTIONS}
962
+ * >
963
+ * <PageContent />
964
+ * </AppShell>
965
+ */
966
+ declare function AppShell({ topBar, sidebarSections, sidebarExpandedWidth, sidebarCollapsedWidth, sidebarDefaultExpanded, sidebarFooter, children, className, }: AppShellProps): react_jsx_runtime.JSX.Element;
967
+
968
+ /** ─────────────────── base ─────────────────── */
969
+ interface SkeletonBaseProps {
970
+ className?: string;
971
+ /** Override inline styles */
972
+ style?: React$1.CSSProperties;
973
+ }
974
+ /** ─────────────────── SkeletonBox ─────────────────── */
975
+ interface SkeletonBoxProps extends SkeletonBaseProps {
976
+ width?: number | string;
977
+ height?: number | string;
978
+ /** Override border-radius (defaults to token --radius-md) */
979
+ radius?: number | string;
980
+ }
981
+ /**
982
+ * Generic rectangular loading placeholder.
983
+ * Use for images, cards, headers, or any block element.
984
+ *
985
+ * @example
986
+ * <SkeletonBox width={240} height={160} />
987
+ * <SkeletonBox width="100%" height={48} radius="var(--radius-lg)" />
988
+ */
989
+ declare function SkeletonBox({ width, height, radius, className, style }: SkeletonBoxProps): react_jsx_runtime.JSX.Element;
990
+ /** ─────────────────── SkeletonText ─────────────────── */
991
+ interface SkeletonTextProps extends SkeletonBaseProps {
992
+ /** Number of lines (default 3) */
993
+ lines?: number;
994
+ /** Width of the last (shortest) line as a percentage (default 60) */
995
+ lastLineWidth?: number;
996
+ /** Line height in px (default 14) */
997
+ lineHeight?: number;
998
+ /** Gap between lines in px (default 8) */
999
+ gap?: number;
1000
+ }
1001
+ /**
1002
+ * Multi-line text loading placeholder.
1003
+ * Last line is shorter to mimic real paragraph layout.
1004
+ *
1005
+ * @example
1006
+ * <SkeletonText lines={4} lastLineWidth={45} />
1007
+ */
1008
+ declare function SkeletonText({ lines, lastLineWidth, lineHeight, gap, className, style, }: SkeletonTextProps): react_jsx_runtime.JSX.Element;
1009
+ /** ─────────────────── SkeletonCircle ─────────────────── */
1010
+ interface SkeletonCircleProps extends SkeletonBaseProps {
1011
+ /** Diameter in px (default 40) */
1012
+ size?: number;
1013
+ }
1014
+ /**
1015
+ * Circular loading placeholder — avatars, icons, status indicators.
1016
+ *
1017
+ * @example
1018
+ * <SkeletonCircle size={48} />
1019
+ */
1020
+ declare function SkeletonCircle({ size, className, style }: SkeletonCircleProps): react_jsx_runtime.JSX.Element;
1021
+ /** ─────────────────── SkeletonCard ─────────────────── */
1022
+ interface SkeletonCardProps extends SkeletonBaseProps {
1023
+ /** Include a circular avatar in the header (default true) */
1024
+ hasAvatar?: boolean;
1025
+ /** Number of text lines in the body (default 3) */
1026
+ lines?: number;
1027
+ }
1028
+ /**
1029
+ * Composite card skeleton — avatar + heading + body text + action strip.
1030
+ * Use as a drop-in while real card data loads.
1031
+ *
1032
+ * @example
1033
+ * <div className="grid grid-cols-3 gap-4">
1034
+ * {loading && Array.from({ length: 3 }).map((_, i) => <SkeletonCard key={i} />)}
1035
+ * </div>
1036
+ */
1037
+ declare function SkeletonCard({ hasAvatar, lines, className, style }: SkeletonCardProps): react_jsx_runtime.JSX.Element;
1038
+
895
1039
  interface ButtonProps {
896
1040
  content?: React$1.ReactNode;
897
1041
  /** Visual style variant */
@@ -1030,40 +1174,40 @@ interface DropdownPillProps {
1030
1174
  declare function DropdownPill({ value, hasSiblings }: DropdownPillProps): react_jsx_runtime.JSX.Element;
1031
1175
 
1032
1176
  interface CheckboxProps {
1033
- /** 'vertical' | 'horizontal' */
1034
- layout?: string;
1035
- /** 'left' | 'right' (label side when horizontal) */
1036
- labelPosition?: string;
1037
- label?: React$1.ReactNode;
1038
- name?: string;
1039
- htmlFor?: string;
1040
- errorMessage?: React$1.ReactNode;
1041
- value?: boolean;
1177
+ /** Controlled checked state */
1178
+ checked?: boolean;
1042
1179
  onChange?: (e: {
1043
1180
  target: {
1044
- value: boolean;
1181
+ checked: boolean;
1045
1182
  id?: string;
1046
1183
  name?: string;
1047
1184
  };
1048
1185
  }) => void;
1049
- [key: string]: any;
1186
+ label?: React$1.ReactNode;
1187
+ name?: string;
1188
+ /** `id` for the hidden input and the `<label htmlFor>` link */
1189
+ htmlFor?: string;
1190
+ errorMessage?: React$1.ReactNode;
1191
+ disabled?: boolean;
1192
+ /** @deprecated Use `checked` */
1193
+ value?: boolean;
1050
1194
  }
1051
1195
  /**
1052
1196
  * Accessible checkbox powered by Radix Checkbox.
1053
1197
  *
1054
- * Radix handles keyboard activation, focus ring, and ARIA checked state.
1055
- * Emits a synthetic `{ target: { value, id, name } }` event to stay
1056
- * compatible with existing form-change handlers.
1198
+ * Radix handles keyboard activation, focus ring, and `role="checkbox"` ARIA.
1199
+ * The check mark pops in with a spring animation on first check.
1057
1200
  *
1058
1201
  * @example
1059
1202
  * <Checkbox
1060
1203
  * htmlFor="agree"
1061
1204
  * label="I agree to the terms"
1062
- * value={form.agree}
1063
- * onChange={({ target }) => setField('agree', target.value)}
1205
+ * checked={form.agree}
1206
+ * onChange={({ target }) => setField('agree', target.checked)}
1064
1207
  * />
1065
1208
  */
1066
- declare function Checkbox({ layout, labelPosition, label, name, htmlFor, errorMessage, value, onChange, }: CheckboxProps): react_jsx_runtime.JSX.Element;
1209
+ declare function Checkbox({ checked, value, // legacy alias
1210
+ onChange, label, name, htmlFor, errorMessage, disabled, }: CheckboxProps): react_jsx_runtime.JSX.Element;
1067
1211
 
1068
1212
  interface SwitchInputProps {
1069
1213
  checked?: boolean;
@@ -1303,4 +1447,4 @@ declare const Temporal: {
1303
1447
  TemporalPicker: typeof TemporalPickerBase;
1304
1448
  };
1305
1449
 
1306
- export { AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, ThemeSwitch, type ThemeSwitchProps, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
1450
+ export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, ThemeSwitch, type ThemeSwitchProps, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as COLORS, S as SemanticColorKey, a as SemanticRadiusKey, V as VarColorKey, b as VarRadiusKey, c as VarShadowKey, P as palette, s as semanticTokens, v as vars } from './index-CPCiQllz.js';
1
+ export { C as COLORS, S as SemanticColorKey, a as SemanticRadiusKey, V as VarColorKey, b as VarRadiusKey, c as VarShadowKey, P as palette, s as semanticTokens, v as vars } from './index-DLGzTj3K.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import React$1 from 'react';
4
4
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
@@ -329,26 +329,31 @@ declare function Drawer({ isOpen, onClose, hasFooter, placement, width, okText,
329
329
 
330
330
  interface TooltipProps {
331
331
  children: React$1.ReactNode;
332
+ /** The text or node shown inside the tooltip */
332
333
  title: React$1.ReactNode;
333
- /** 'top' | 'right' | 'bottom' | 'left' */
334
+ /** Which side of the trigger the tooltip appears on */
334
335
  placement?: 'top' | 'right' | 'bottom' | 'left';
335
- /** Delay in ms before showing the tooltip */
336
+ /** Delay before showing, ms (default 300) */
336
337
  delayDuration?: number;
338
+ /** Offset from trigger in px (default 8) */
339
+ sideOffset?: number;
337
340
  }
338
341
  /**
339
342
  * Tooltip powered by Radix Tooltip.
340
343
  *
341
- * Radix handles keyboard navigation (escape), pointer events, and ARIA.
342
- * The VesOPS prussian-blue style is preserved.
343
- *
344
- * Wrap your app in `<TooltipProvider>` (re-exported below) to batch providers.
344
+ * Radix handles keyboard navigation (Escape), pointer events, and ARIA.
345
+ * Each placement animates in from the correct direction.
346
+ * Wrap your app in `<TooltipProvider>` (re-exported below) to share a
347
+ * single provider instead of nesting one per tooltip.
345
348
  *
346
349
  * @example
347
- * <Tooltip title="Delete record" placement="right">
348
- * <IconButton icon={<Icon.Trash />} />
349
- * </Tooltip>
350
+ * <TooltipProvider>
351
+ * <Tooltip title="Delete record" placement="top">
352
+ * <IconButton icon={<TrashIcon />} />
353
+ * </Tooltip>
354
+ * </TooltipProvider>
350
355
  */
351
- declare function Tooltip({ children, title, placement, delayDuration, }: TooltipProps): react_jsx_runtime.JSX.Element;
356
+ declare function Tooltip({ children, title, placement, delayDuration, sideOffset, }: TooltipProps): react_jsx_runtime.JSX.Element;
352
357
 
353
358
  declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
354
359
 
@@ -452,6 +457,7 @@ declare function ToggleButton({ items, onChange, activeKey }: ToggleButtonProps)
452
457
 
453
458
  /** ─────────────────── types ─────────────────── */
454
459
  type NotificationType = 'info' | 'success' | 'warning' | 'danger';
460
+ type NotificationPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
455
461
  interface NotificationPayload {
456
462
  title: React$1.ReactNode;
457
463
  description?: React$1.ReactNode;
@@ -461,35 +467,20 @@ interface NotificationPayload {
461
467
  }
462
468
  /** ─────────────────── provider ─────────────────── */
463
469
  /**
464
- * Wrap your application (or a subtree) in `NotificationProvider` to enable
465
- * toast notifications. Then call `useNotification()` anywhere inside to
466
- * trigger them.
470
+ * Wrap your app in `NotificationProvider`, then call `useNotification()` anywhere inside.
467
471
  *
468
- * Toasts slide in from the right and exit to the right.
469
- * `prefers-reduced-motion` is respected via `useReducedMotion()`.
472
+ * @param position One of 6 viewport positions (default: `top-right`)
470
473
  *
471
474
  * @example
472
- * // main.tsx / _app.tsx
473
- * <NotificationProvider>
475
+ * <NotificationProvider position="bottom-right">
474
476
  * <App />
475
477
  * </NotificationProvider>
476
- *
477
- * // Inside a component
478
- * const notify = useNotification()
479
- * notify.success({ title: 'Saved!', description: 'Your changes were saved.' })
480
478
  */
481
- declare function NotificationProvider({ children }: {
479
+ declare function NotificationProvider({ children, position, }: {
482
480
  children: React$1.ReactNode;
481
+ position?: NotificationPosition;
483
482
  }): react_jsx_runtime.JSX.Element;
484
483
  /** ─────────────────── hook ─────────────────── */
485
- /**
486
- * Imperative notification API. Must be called inside `NotificationProvider`.
487
- *
488
- * @example
489
- * const notify = useNotification()
490
- * notify.success({ title: 'Done', description: 'Record saved.', duration: 3000 })
491
- * notify.danger({ title: 'Error', description: err.message })
492
- */
493
484
  declare function useNotification(): {
494
485
  info: (props: Omit<NotificationPayload, "type">) => void;
495
486
  success: (props: Omit<NotificationPayload, "type">) => void;
@@ -892,6 +883,159 @@ interface TopBarProps {
892
883
  */
893
884
  declare function TopBar({ brand, center, actions, height, className, }: TopBarProps): react_jsx_runtime.JSX.Element;
894
885
 
886
+ /** ─────────────────── types ─────────────────── */
887
+ interface SidebarItem {
888
+ key: string;
889
+ icon: React$1.ReactNode;
890
+ label: string;
891
+ isActive?: boolean;
892
+ onClick?: () => void;
893
+ /** Numeric badge shown on the icon */
894
+ badge?: number;
895
+ }
896
+ interface SidebarSection {
897
+ key: string;
898
+ /** Section title — visible only when expanded */
899
+ title?: string;
900
+ items: SidebarItem[];
901
+ }
902
+ interface SidebarProps {
903
+ sections: SidebarSection[];
904
+ isExpanded: boolean;
905
+ onToggle?: () => void;
906
+ /** Expanded sidebar width in px (default 220) */
907
+ expandedWidth?: number;
908
+ /** Collapsed sidebar width in px (default 52) */
909
+ collapsedWidth?: number;
910
+ /** Slot rendered at the bottom of the sidebar (theme switch, user avatar…) */
911
+ footer?: React$1.ReactNode;
912
+ }
913
+ /** ─────────────────── main component ─────────────────── */
914
+ /**
915
+ * Collapsible application sidebar.
916
+ *
917
+ * When collapsed: icon-only with tooltips. When expanded: icon + label.
918
+ * Width animates with an ease-out-expo curve. The parent (AppShell) is
919
+ * responsible for shifting the main content by the sidebar width.
920
+ *
921
+ * @example
922
+ * const [open, setOpen] = useState(true)
923
+ * <Sidebar
924
+ * sections={NAV_SECTIONS}
925
+ * isExpanded={open}
926
+ * onToggle={() => setOpen(o => !o)}
927
+ * />
928
+ */
929
+ declare function Sidebar({ sections, isExpanded, onToggle, expandedWidth, collapsedWidth, footer, }: SidebarProps): react_jsx_runtime.JSX.Element;
930
+
931
+ interface AppShellProps {
932
+ /**
933
+ * Top navigation bar.
934
+ * Typically `<TopBar brand={...} actions={...} />`.
935
+ */
936
+ topBar?: React$1.ReactNode;
937
+ /** Sidebar navigation sections */
938
+ sidebarSections?: SidebarSection[];
939
+ /** Expanded width of the sidebar in px (default 220) */
940
+ sidebarExpandedWidth?: SidebarProps['expandedWidth'];
941
+ /** Collapsed width of the sidebar in px (default 52) */
942
+ sidebarCollapsedWidth?: SidebarProps['collapsedWidth'];
943
+ /** Start expanded (default false) */
944
+ sidebarDefaultExpanded?: boolean;
945
+ /** Slot rendered at the bottom of the sidebar */
946
+ sidebarFooter?: SidebarProps['footer'];
947
+ /** Main page content */
948
+ children?: React$1.ReactNode;
949
+ /** Root element className */
950
+ className?: string;
951
+ }
952
+ /**
953
+ * Full-page application layout skeleton.
954
+ *
955
+ * Composes a sticky TopBar + collapsible Sidebar + scrollable content area.
956
+ * The main area shifts with the sidebar width via a Framer Motion margin animation.
957
+ *
958
+ * @example
959
+ * <AppShell
960
+ * topBar={<TopBar brand={<Logo />} actions={<ThemeSwitch ... />} />}
961
+ * sidebarSections={NAV_SECTIONS}
962
+ * >
963
+ * <PageContent />
964
+ * </AppShell>
965
+ */
966
+ declare function AppShell({ topBar, sidebarSections, sidebarExpandedWidth, sidebarCollapsedWidth, sidebarDefaultExpanded, sidebarFooter, children, className, }: AppShellProps): react_jsx_runtime.JSX.Element;
967
+
968
+ /** ─────────────────── base ─────────────────── */
969
+ interface SkeletonBaseProps {
970
+ className?: string;
971
+ /** Override inline styles */
972
+ style?: React$1.CSSProperties;
973
+ }
974
+ /** ─────────────────── SkeletonBox ─────────────────── */
975
+ interface SkeletonBoxProps extends SkeletonBaseProps {
976
+ width?: number | string;
977
+ height?: number | string;
978
+ /** Override border-radius (defaults to token --radius-md) */
979
+ radius?: number | string;
980
+ }
981
+ /**
982
+ * Generic rectangular loading placeholder.
983
+ * Use for images, cards, headers, or any block element.
984
+ *
985
+ * @example
986
+ * <SkeletonBox width={240} height={160} />
987
+ * <SkeletonBox width="100%" height={48} radius="var(--radius-lg)" />
988
+ */
989
+ declare function SkeletonBox({ width, height, radius, className, style }: SkeletonBoxProps): react_jsx_runtime.JSX.Element;
990
+ /** ─────────────────── SkeletonText ─────────────────── */
991
+ interface SkeletonTextProps extends SkeletonBaseProps {
992
+ /** Number of lines (default 3) */
993
+ lines?: number;
994
+ /** Width of the last (shortest) line as a percentage (default 60) */
995
+ lastLineWidth?: number;
996
+ /** Line height in px (default 14) */
997
+ lineHeight?: number;
998
+ /** Gap between lines in px (default 8) */
999
+ gap?: number;
1000
+ }
1001
+ /**
1002
+ * Multi-line text loading placeholder.
1003
+ * Last line is shorter to mimic real paragraph layout.
1004
+ *
1005
+ * @example
1006
+ * <SkeletonText lines={4} lastLineWidth={45} />
1007
+ */
1008
+ declare function SkeletonText({ lines, lastLineWidth, lineHeight, gap, className, style, }: SkeletonTextProps): react_jsx_runtime.JSX.Element;
1009
+ /** ─────────────────── SkeletonCircle ─────────────────── */
1010
+ interface SkeletonCircleProps extends SkeletonBaseProps {
1011
+ /** Diameter in px (default 40) */
1012
+ size?: number;
1013
+ }
1014
+ /**
1015
+ * Circular loading placeholder — avatars, icons, status indicators.
1016
+ *
1017
+ * @example
1018
+ * <SkeletonCircle size={48} />
1019
+ */
1020
+ declare function SkeletonCircle({ size, className, style }: SkeletonCircleProps): react_jsx_runtime.JSX.Element;
1021
+ /** ─────────────────── SkeletonCard ─────────────────── */
1022
+ interface SkeletonCardProps extends SkeletonBaseProps {
1023
+ /** Include a circular avatar in the header (default true) */
1024
+ hasAvatar?: boolean;
1025
+ /** Number of text lines in the body (default 3) */
1026
+ lines?: number;
1027
+ }
1028
+ /**
1029
+ * Composite card skeleton — avatar + heading + body text + action strip.
1030
+ * Use as a drop-in while real card data loads.
1031
+ *
1032
+ * @example
1033
+ * <div className="grid grid-cols-3 gap-4">
1034
+ * {loading && Array.from({ length: 3 }).map((_, i) => <SkeletonCard key={i} />)}
1035
+ * </div>
1036
+ */
1037
+ declare function SkeletonCard({ hasAvatar, lines, className, style }: SkeletonCardProps): react_jsx_runtime.JSX.Element;
1038
+
895
1039
  interface ButtonProps {
896
1040
  content?: React$1.ReactNode;
897
1041
  /** Visual style variant */
@@ -1030,40 +1174,40 @@ interface DropdownPillProps {
1030
1174
  declare function DropdownPill({ value, hasSiblings }: DropdownPillProps): react_jsx_runtime.JSX.Element;
1031
1175
 
1032
1176
  interface CheckboxProps {
1033
- /** 'vertical' | 'horizontal' */
1034
- layout?: string;
1035
- /** 'left' | 'right' (label side when horizontal) */
1036
- labelPosition?: string;
1037
- label?: React$1.ReactNode;
1038
- name?: string;
1039
- htmlFor?: string;
1040
- errorMessage?: React$1.ReactNode;
1041
- value?: boolean;
1177
+ /** Controlled checked state */
1178
+ checked?: boolean;
1042
1179
  onChange?: (e: {
1043
1180
  target: {
1044
- value: boolean;
1181
+ checked: boolean;
1045
1182
  id?: string;
1046
1183
  name?: string;
1047
1184
  };
1048
1185
  }) => void;
1049
- [key: string]: any;
1186
+ label?: React$1.ReactNode;
1187
+ name?: string;
1188
+ /** `id` for the hidden input and the `<label htmlFor>` link */
1189
+ htmlFor?: string;
1190
+ errorMessage?: React$1.ReactNode;
1191
+ disabled?: boolean;
1192
+ /** @deprecated Use `checked` */
1193
+ value?: boolean;
1050
1194
  }
1051
1195
  /**
1052
1196
  * Accessible checkbox powered by Radix Checkbox.
1053
1197
  *
1054
- * Radix handles keyboard activation, focus ring, and ARIA checked state.
1055
- * Emits a synthetic `{ target: { value, id, name } }` event to stay
1056
- * compatible with existing form-change handlers.
1198
+ * Radix handles keyboard activation, focus ring, and `role="checkbox"` ARIA.
1199
+ * The check mark pops in with a spring animation on first check.
1057
1200
  *
1058
1201
  * @example
1059
1202
  * <Checkbox
1060
1203
  * htmlFor="agree"
1061
1204
  * label="I agree to the terms"
1062
- * value={form.agree}
1063
- * onChange={({ target }) => setField('agree', target.value)}
1205
+ * checked={form.agree}
1206
+ * onChange={({ target }) => setField('agree', target.checked)}
1064
1207
  * />
1065
1208
  */
1066
- declare function Checkbox({ layout, labelPosition, label, name, htmlFor, errorMessage, value, onChange, }: CheckboxProps): react_jsx_runtime.JSX.Element;
1209
+ declare function Checkbox({ checked, value, // legacy alias
1210
+ onChange, label, name, htmlFor, errorMessage, disabled, }: CheckboxProps): react_jsx_runtime.JSX.Element;
1067
1211
 
1068
1212
  interface SwitchInputProps {
1069
1213
  checked?: boolean;
@@ -1303,4 +1447,4 @@ declare const Temporal: {
1303
1447
  TemporalPicker: typeof TemporalPickerBase;
1304
1448
  };
1305
1449
 
1306
- export { AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, ThemeSwitch, type ThemeSwitchProps, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
1450
+ export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, ThemeSwitch, type ThemeSwitchProps, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };