sangam-ui 0.1.10 → 1.0.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.ts +335 -33
- package/dist/index.js +1443 -396
- package/package.json +11 -10
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
9
9
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
10
10
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
11
11
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
12
|
+
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
|
13
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
14
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
17
|
* Sangam Button Component
|
|
@@ -23,7 +26,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
23
26
|
* CVA (Class Variance Authority) manages all variants
|
|
24
27
|
*/
|
|
25
28
|
declare const buttonVariants: (props?: ({
|
|
26
|
-
variant?: "
|
|
29
|
+
variant?: "primary" | "link" | "secondary" | "danger" | null | undefined;
|
|
27
30
|
size?: "big" | "small" | null | undefined;
|
|
28
31
|
iconOnly?: boolean | null | undefined;
|
|
29
32
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
@@ -73,7 +76,7 @@ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAtt
|
|
|
73
76
|
* Sangam Toggle (Switch) Component
|
|
74
77
|
*
|
|
75
78
|
* Production-grade toggle following Figma design specs:
|
|
76
|
-
* - Colors:
|
|
79
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
77
80
|
* - Sizes: Big (56×28px), Small (44×24px)
|
|
78
81
|
* - States: Default, Hover, Disabled
|
|
79
82
|
* - Smooth transitions: 200ms ease-out
|
|
@@ -145,7 +148,7 @@ declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAtt
|
|
|
145
148
|
* Sangam Checkbox Component
|
|
146
149
|
*
|
|
147
150
|
* Production-grade checkbox following Figma design specs:
|
|
148
|
-
* - Colors:
|
|
151
|
+
* - Colors: semantic-colors (border, background, text) where available
|
|
149
152
|
* - Sizes: Big (24×24px), Small (20×20px)
|
|
150
153
|
* - States: Default, Hover, Disabled
|
|
151
154
|
* - Smooth transitions: 200ms ease-out
|
|
@@ -219,7 +222,7 @@ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.Re
|
|
|
219
222
|
* Sangam Radio Component
|
|
220
223
|
*
|
|
221
224
|
* Production-grade radio button following Figma design specs:
|
|
222
|
-
* - Colors:
|
|
225
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
223
226
|
* - Sizes: Big (24×24px), Small (20×20px)
|
|
224
227
|
* - States: Default, Hover, Disabled
|
|
225
228
|
* - Smooth transitions: 200ms ease-out
|
|
@@ -323,7 +326,7 @@ declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttri
|
|
|
323
326
|
* Sangam Input Component
|
|
324
327
|
*
|
|
325
328
|
* Production-grade text input following Figma design specs:
|
|
326
|
-
* - Colors:
|
|
329
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
327
330
|
* - Multiple states: Default, Hover, Active, Typing, Filled, Error, Success, Disabled
|
|
328
331
|
* - Consistent padding: 4px 12px
|
|
329
332
|
* - Smooth transitions: 200ms ease-out
|
|
@@ -473,6 +476,10 @@ interface DropdownProps extends Omit<React.ComponentPropsWithoutRef<typeof Selec
|
|
|
473
476
|
* @default 100%
|
|
474
477
|
*/
|
|
475
478
|
width?: number;
|
|
479
|
+
/**
|
|
480
|
+
* Minimum trigger width in pixels (e.g. compact toolbars). Defaults to the standard dropdown trigger width.
|
|
481
|
+
*/
|
|
482
|
+
triggerMinWidth?: number;
|
|
476
483
|
/**
|
|
477
484
|
* Error state (red border, red-800)
|
|
478
485
|
*/
|
|
@@ -537,7 +544,7 @@ declare const DropdownMulti: React.ForwardRefExoticComponent<DropdownMultiProps
|
|
|
537
544
|
*
|
|
538
545
|
* Production-grade search input following Figma design specs:
|
|
539
546
|
* - Width: Fixed 400px
|
|
540
|
-
* - Colors:
|
|
547
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
541
548
|
* - Multiple states: Default, Hover, Active, Typing, Filled, Disabled
|
|
542
549
|
* - Border radius: 8px
|
|
543
550
|
* - Padding: 4px 12px
|
|
@@ -574,7 +581,7 @@ declare const SearchField: React.ForwardRefExoticComponent<SearchFieldProps & Re
|
|
|
574
581
|
* Production-grade textarea following Figma design specs:
|
|
575
582
|
* - Width: 100% with min-width 450px (responsive, matches Input pattern)
|
|
576
583
|
* - Height: Fixed 96px
|
|
577
|
-
* - Colors:
|
|
584
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
578
585
|
* - Multiple states: Default, Hover, Active, Typing, Filled, Error, Success, Disabled
|
|
579
586
|
* - Padding: 4px 12px
|
|
580
587
|
* - Border radius: 8px (sm)
|
|
@@ -706,7 +713,7 @@ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.Re
|
|
|
706
713
|
* Sangam Tooltip Component
|
|
707
714
|
*
|
|
708
715
|
* Production-grade tooltip following Figma design specs:
|
|
709
|
-
* - Colors:
|
|
716
|
+
* - Colors: semantic-colors (background neutralInverse primary, text neutralInverse primary)
|
|
710
717
|
* - Fixed width: 7.5rem (120px at default)
|
|
711
718
|
* - Fixed height: 2rem (32px at default), 3.25rem (52px with description)
|
|
712
719
|
* - Border radius: 4px
|
|
@@ -792,10 +799,10 @@ interface ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "c
|
|
|
792
799
|
*/
|
|
793
800
|
max?: number;
|
|
794
801
|
/**
|
|
795
|
-
*
|
|
796
|
-
* @default
|
|
802
|
+
* When true, shows the percentage label on the right of the bar. When false, bar only (no label).
|
|
803
|
+
* @default true
|
|
797
804
|
*/
|
|
798
|
-
showLabel?:
|
|
805
|
+
showLabel?: boolean;
|
|
799
806
|
/**
|
|
800
807
|
* Track width in pixels. Ignored when fluid is true.
|
|
801
808
|
* @default 476
|
|
@@ -819,11 +826,11 @@ interface ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "c
|
|
|
819
826
|
/**
|
|
820
827
|
* ProgressBar for completion or loading states.
|
|
821
828
|
*
|
|
822
|
-
* @example With
|
|
823
|
-
* <ProgressBar value={50}
|
|
829
|
+
* @example With label on the right (default)
|
|
830
|
+
* <ProgressBar value={50} />
|
|
824
831
|
*
|
|
825
|
-
* @example Bar only
|
|
826
|
-
* <ProgressBar value={75} showLabel=
|
|
832
|
+
* @example Bar only (no label)
|
|
833
|
+
* <ProgressBar value={75} showLabel={false} />
|
|
827
834
|
*/
|
|
828
835
|
declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
829
836
|
|
|
@@ -838,7 +845,7 @@ interface LoaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "childr
|
|
|
838
845
|
"aria-label"?: string;
|
|
839
846
|
/**
|
|
840
847
|
* Gradient color (e.g. #FFFFFF for white on dark backgrounds).
|
|
841
|
-
* @default
|
|
848
|
+
* @default semantic background.neutralInverse.primary (neutral.1100)
|
|
842
849
|
*/
|
|
843
850
|
color?: string;
|
|
844
851
|
/**
|
|
@@ -860,9 +867,9 @@ declare const Loader: React.ForwardRefExoticComponent<LoaderProps & React.RefAtt
|
|
|
860
867
|
*
|
|
861
868
|
* Lightweight, token-friendly loading placeholder.
|
|
862
869
|
* Uses tokens from @esds-sangam/tokens:
|
|
863
|
-
* - Base bg: neutral
|
|
870
|
+
* - Base bg: semantic background.neutral.tertiary (neutral.200)
|
|
864
871
|
* - Border radius: rounded-sm = tokens radius.sm (0.5rem / 8px)
|
|
865
|
-
* - Shimmer:
|
|
872
|
+
* - Shimmer: animate-pulse (Tailwind built-in)
|
|
866
873
|
* - Animation: ease-out, 1s duration, 800ms delay, loops infinitely.
|
|
867
874
|
*
|
|
868
875
|
* By default the component is layout-flexible — width/height
|
|
@@ -886,8 +893,9 @@ declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.Re
|
|
|
886
893
|
*
|
|
887
894
|
* Types: Container, Underline, Icon only.
|
|
888
895
|
* States: Default, Hover, Selected, Disabled.
|
|
896
|
+
* Colors: semantic-colors (background, border, text) where available.
|
|
889
897
|
* Typography: 14px, weight 500, line-height 24px.
|
|
890
|
-
* Spec: Container selected box 178×32, shadow 0 2px 6px; Underline selected 2px
|
|
898
|
+
* Spec: Container selected box 178×32, shadow 0 2px 6px; Underline selected 2px info; Icon only 24×24 box, radius 4, padding 4, gap 8.
|
|
891
899
|
*/
|
|
892
900
|
declare const tabsListVariants: (props?: ({
|
|
893
901
|
type?: "underline" | "iconOnly" | "container" | null | undefined;
|
|
@@ -939,7 +947,7 @@ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttribu
|
|
|
939
947
|
*
|
|
940
948
|
* Two variants: Image (photo or placeholder silhouette) and Letter (initials).
|
|
941
949
|
* Sizes: large (32×32), medium (24×24), small (20×20).
|
|
942
|
-
* Letter: bg
|
|
950
|
+
* Letter: bg/text from semantic-colors (neutral tertiary); weight 500.
|
|
943
951
|
* Letter typography: large tokens base (16px)/leading-6; medium/small tokens 3xs (10px).
|
|
944
952
|
* Token-based, circular (rounded-full).
|
|
945
953
|
*/
|
|
@@ -949,7 +957,7 @@ declare const avatarVariants: (props?: ({
|
|
|
949
957
|
interface AvatarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children">, VariantProps<typeof avatarVariants> {
|
|
950
958
|
/**
|
|
951
959
|
* Variant: "image" (photo or placeholder silhouette) or "letter" (initials).
|
|
952
|
-
* Letter uses bg neutral
|
|
960
|
+
* Letter uses semantic-colors: bg neutral tertiary, text neutral tertiary; typography per size (Big: tokens base, Medium/Small: tokens 3xs = 10px).
|
|
953
961
|
*/
|
|
954
962
|
variant?: "image" | "letter";
|
|
955
963
|
/**
|
|
@@ -967,6 +975,176 @@ interface AvatarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "child
|
|
|
967
975
|
}
|
|
968
976
|
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
969
977
|
|
|
978
|
+
/**
|
|
979
|
+
* Sangam Menu (Menubar) Primitive
|
|
980
|
+
*
|
|
981
|
+
* Token-based styling (no hardcoded hex colors).
|
|
982
|
+
* Compose this primitive to build menus with optional nested submenus.
|
|
983
|
+
*/
|
|
984
|
+
declare const Menu: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
985
|
+
declare const MenuMenu: {
|
|
986
|
+
(props: MenubarPrimitive.MenubarMenuProps & {
|
|
987
|
+
__scopeMenubar?: _radix_ui_react_context.Scope;
|
|
988
|
+
}): react_jsx_runtime.JSX.Element;
|
|
989
|
+
displayName: string;
|
|
990
|
+
};
|
|
991
|
+
declare const MenuTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
992
|
+
declare const MenuContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
993
|
+
declare const MenuItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
994
|
+
declare const MenuSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
995
|
+
declare const MenuSub: React.FC<MenubarPrimitive.MenubarSubProps>;
|
|
996
|
+
declare const MenuSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
997
|
+
declare const MenuSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
998
|
+
|
|
999
|
+
type DrawerDirection = "right";
|
|
1000
|
+
interface DrawerProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root> {
|
|
1001
|
+
/**
|
|
1002
|
+
* Drawer direction. Current Sangam spec: right-aligned drawers.
|
|
1003
|
+
* @default "right"
|
|
1004
|
+
*/
|
|
1005
|
+
direction?: DrawerDirection;
|
|
1006
|
+
}
|
|
1007
|
+
declare function Drawer({ direction, children, ...props }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
1008
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1009
|
+
interface DrawerCloseProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close> {
|
|
1010
|
+
/**
|
|
1011
|
+
* When true, focuses the close icon when opened.
|
|
1012
|
+
* @default true (matches keyboard interaction guidance)
|
|
1013
|
+
*/
|
|
1014
|
+
autoFocusClose?: boolean;
|
|
1015
|
+
}
|
|
1016
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<DrawerCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1017
|
+
declare function DrawerSurface({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
1018
|
+
/** Header region: column with `gap-2xs` between the title row and optional description. */
|
|
1019
|
+
declare const DrawerHeader: ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
1020
|
+
/** One row for title + close (`items-center` so the icon lines up with the title). */
|
|
1021
|
+
declare const DrawerHeaderTop: ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
1022
|
+
declare const DrawerTitle: ({ children, className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => react_jsx_runtime.JSX.Element;
|
|
1023
|
+
declare const DrawerDescription: ({ children, className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) => react_jsx_runtime.JSX.Element;
|
|
1024
|
+
declare const DrawerFooter: ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
1025
|
+
interface DrawerContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
1026
|
+
/**
|
|
1027
|
+
* Controls whether the dimmed backdrop is rendered.
|
|
1028
|
+
* @default true
|
|
1029
|
+
*/
|
|
1030
|
+
showOverlay?: boolean;
|
|
1031
|
+
}
|
|
1032
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* Sangam Table Primitive
|
|
1036
|
+
*
|
|
1037
|
+
* Built on top of shadcn table markup and tokenized Sangam classes.
|
|
1038
|
+
* Use this primitive for tabular layouts; compose rich cell content
|
|
1039
|
+
* (links, badges, avatars, actions) in consuming components/stories.
|
|
1040
|
+
*/
|
|
1041
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
1042
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
1043
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
1044
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
1045
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
1046
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
1047
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
1048
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
1049
|
+
|
|
1050
|
+
interface PopupContentProps {
|
|
1051
|
+
title: string;
|
|
1052
|
+
subtext?: string;
|
|
1053
|
+
children: React.ReactNode;
|
|
1054
|
+
/**
|
|
1055
|
+
* When true, renders the body inside the subtle blue "content box".
|
|
1056
|
+
* Use this for Design guidelines screenshots.
|
|
1057
|
+
* @default false
|
|
1058
|
+
*/
|
|
1059
|
+
showBodyBox?: boolean;
|
|
1060
|
+
cancelText?: string;
|
|
1061
|
+
ctaText?: string;
|
|
1062
|
+
onCancelClick?: () => void;
|
|
1063
|
+
onCtaClick?: () => void;
|
|
1064
|
+
showClose?: boolean;
|
|
1065
|
+
onClose?: () => void;
|
|
1066
|
+
autoFocusClose?: boolean;
|
|
1067
|
+
/**
|
|
1068
|
+
* Used to wire up `aria-labelledby` from the Dialog wrapper.
|
|
1069
|
+
* When used outside of Radix, you can omit these.
|
|
1070
|
+
*/
|
|
1071
|
+
titleId?: string;
|
|
1072
|
+
descriptionId?: string;
|
|
1073
|
+
className?: string;
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Inline "surface" for the popup.
|
|
1077
|
+
* - Does NOT include overlay/backdrop or fixed centering.
|
|
1078
|
+
* - Useful for Storybook design guideline cards where we don't want a full-screen overlay.
|
|
1079
|
+
*/
|
|
1080
|
+
declare function PopupContent({ title, subtext, children, showBodyBox, cancelText, ctaText, onCancelClick, onCtaClick, showClose, onClose, autoFocusClose, titleId, descriptionId, className, }: PopupContentProps): react_jsx_runtime.JSX.Element;
|
|
1081
|
+
interface PopupProps {
|
|
1082
|
+
open: boolean;
|
|
1083
|
+
onOpenChange: (open: boolean) => void;
|
|
1084
|
+
title: string;
|
|
1085
|
+
subtext?: string;
|
|
1086
|
+
children: React.ReactNode;
|
|
1087
|
+
/**
|
|
1088
|
+
* When true, renders the body inside the subtle blue "content box".
|
|
1089
|
+
* @default false
|
|
1090
|
+
*/
|
|
1091
|
+
showBodyBox?: boolean;
|
|
1092
|
+
cancelText?: string;
|
|
1093
|
+
ctaText?: string;
|
|
1094
|
+
onCancelClick?: () => void;
|
|
1095
|
+
onCtaClick?: () => void;
|
|
1096
|
+
showClose?: boolean;
|
|
1097
|
+
showOverlay?: boolean;
|
|
1098
|
+
/**
|
|
1099
|
+
* If true, focuses the close icon when opened (helps with keyboard guidance).
|
|
1100
|
+
* @default true
|
|
1101
|
+
*/
|
|
1102
|
+
autoFocusClose?: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* Styling overrides for the fixed dialog content wrapper.
|
|
1105
|
+
* Note: the popup surface styling is applied inside `PopupContent`.
|
|
1106
|
+
*/
|
|
1107
|
+
contentClassName?: string;
|
|
1108
|
+
surfaceClassName?: string;
|
|
1109
|
+
}
|
|
1110
|
+
/**
|
|
1111
|
+
* Popup dialog:
|
|
1112
|
+
* - Centers in the viewport
|
|
1113
|
+
* - Uses Radix Dialog for focus trap + ESC/overlay dismiss
|
|
1114
|
+
* - Matches Sangam modal geometry (min-width 520px, 16px padding, 16px gaps, 12px between actions)
|
|
1115
|
+
*/
|
|
1116
|
+
declare function Popup({ open, onOpenChange, title, subtext, children, showBodyBox, cancelText, ctaText, onCancelClick, onCtaClick, showClose, showOverlay, autoFocusClose, contentClassName, surfaceClassName, }: PopupProps): react_jsx_runtime.JSX.Element;
|
|
1117
|
+
interface PopupTriggerProps {
|
|
1118
|
+
title: string;
|
|
1119
|
+
subtext?: string;
|
|
1120
|
+
cancelText?: string;
|
|
1121
|
+
ctaText?: string;
|
|
1122
|
+
showClose?: boolean;
|
|
1123
|
+
showOverlay?: boolean;
|
|
1124
|
+
autoFocusClose?: boolean;
|
|
1125
|
+
showBodyBox?: boolean;
|
|
1126
|
+
/**
|
|
1127
|
+
* Label for the trigger button. Default matches your spec: "Click me".
|
|
1128
|
+
*/
|
|
1129
|
+
triggerLabel?: string;
|
|
1130
|
+
/**
|
|
1131
|
+
* Trigger action callbacks. Both close the popup by default.
|
|
1132
|
+
*/
|
|
1133
|
+
onCancelClick?: () => void;
|
|
1134
|
+
onCtaClick?: () => void;
|
|
1135
|
+
/**
|
|
1136
|
+
* Popup body content.
|
|
1137
|
+
*/
|
|
1138
|
+
children: React.ReactNode;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Convenience wrapper that provides:
|
|
1142
|
+
* - A trigger button (defaults to "Click me")
|
|
1143
|
+
* - A centered Popup that opens on click
|
|
1144
|
+
* - Developer-friendly API for Storybook docs
|
|
1145
|
+
*/
|
|
1146
|
+
declare function PopupTrigger({ title, subtext, cancelText, ctaText, showClose, showOverlay, autoFocusClose, triggerLabel, showBodyBox, onCancelClick, onCtaClick, children, }: PopupTriggerProps): react_jsx_runtime.JSX.Element;
|
|
1147
|
+
|
|
970
1148
|
/**
|
|
971
1149
|
* Sangam Badge Component
|
|
972
1150
|
*
|
|
@@ -1033,6 +1211,45 @@ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps
|
|
|
1033
1211
|
*/
|
|
1034
1212
|
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
1035
1213
|
|
|
1214
|
+
/**
|
|
1215
|
+
* Sangam Card Component
|
|
1216
|
+
*
|
|
1217
|
+
* A clickable information card used in lists and selection flows.
|
|
1218
|
+
* - Width/height are dynamic (content-driven)
|
|
1219
|
+
* - Default: 1px border (neutral-200), no shadow
|
|
1220
|
+
* - Hover/Selected: border removed, subtle elevation shadow
|
|
1221
|
+
*
|
|
1222
|
+
* Figma typography:
|
|
1223
|
+
* - Title: 14px / 500 / 24px, black via palette `neutral.1100`
|
|
1224
|
+
* - Subtext: 14px / 400 / 24px, Text–Neutral–Tertiary (#7C7C7C)
|
|
1225
|
+
* - Spacing: `mb-md` (12px) badge → title block; `mt-lg` (16px) title block → body
|
|
1226
|
+
* - Right icon slot: `iconSize.xs` (16px)
|
|
1227
|
+
*/
|
|
1228
|
+
declare const cardVariants: (props?: ({
|
|
1229
|
+
selected?: boolean | null | undefined;
|
|
1230
|
+
interactive?: boolean | null | undefined;
|
|
1231
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
1232
|
+
interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof cardVariants> {
|
|
1233
|
+
/**
|
|
1234
|
+
* Renders the card as a child component (Radix Slot pattern).
|
|
1235
|
+
* Use when you want the Card to render as a link, button, etc.
|
|
1236
|
+
*/
|
|
1237
|
+
asChild?: boolean;
|
|
1238
|
+
/** Title text (ORD - 1234). */
|
|
1239
|
+
title: React.ReactNode;
|
|
1240
|
+
/** Optional secondary text (Subtext). */
|
|
1241
|
+
subtext?: React.ReactNode;
|
|
1242
|
+
/** Optional status element (typically `Badge`). */
|
|
1243
|
+
status?: React.ReactNode;
|
|
1244
|
+
/** Optional right-side icon slot (16×16; use `iconSize.xs` in layout). */
|
|
1245
|
+
icon?: React.ReactNode;
|
|
1246
|
+
/** Optional body content under title/subtext area. */
|
|
1247
|
+
children?: React.ReactNode;
|
|
1248
|
+
/** Class for the content/body region. */
|
|
1249
|
+
contentClassName?: string;
|
|
1250
|
+
}
|
|
1251
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
1252
|
+
|
|
1036
1253
|
/**
|
|
1037
1254
|
* Sangam Chip Component
|
|
1038
1255
|
*
|
|
@@ -1041,12 +1258,12 @@ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttri
|
|
|
1041
1258
|
* Sizes: Large (75×32, close 16×16), Small (67×24, close 12×12).
|
|
1042
1259
|
* Radius 999 (pill). Colors from @esds-sangam/tokens.
|
|
1043
1260
|
*
|
|
1044
|
-
* States:
|
|
1045
|
-
* - Default: bg
|
|
1046
|
-
* - Hover: bg neutral
|
|
1047
|
-
* - Selected: bg
|
|
1048
|
-
* - Disabled: bg neutral
|
|
1049
|
-
* - Focused: bg
|
|
1261
|
+
* States (semantic-colors):
|
|
1262
|
+
* - Default: bg neutral primary, text neutral primary, border neutral primary
|
|
1263
|
+
* - Hover: bg neutral tertiary, border transparent
|
|
1264
|
+
* - Selected: bg neutralInverse primary, text neutralInverse primary
|
|
1265
|
+
* - Disabled: bg neutral disabled, text neutral disabled
|
|
1266
|
+
* - Focused: bg neutral primary, text neutral primary, border 2px neutralInverse primary
|
|
1050
1267
|
*/
|
|
1051
1268
|
declare const chipVariants: (props?: ({
|
|
1052
1269
|
size?: "small" | "large" | null | undefined;
|
|
@@ -1096,6 +1313,49 @@ interface ChipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children
|
|
|
1096
1313
|
*/
|
|
1097
1314
|
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
|
|
1098
1315
|
|
|
1316
|
+
interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
|
|
1317
|
+
/** Current active page (1-indexed) */
|
|
1318
|
+
page: number;
|
|
1319
|
+
/** Total pages count */
|
|
1320
|
+
totalPages: number;
|
|
1321
|
+
/** Called when page changes */
|
|
1322
|
+
onPageChange?: (page: number) => void;
|
|
1323
|
+
/** Total records (optional; not shown in the bar — use in parent for range copy if needed) */
|
|
1324
|
+
totalRecords?: number;
|
|
1325
|
+
/** Current page-size value for the entries selector */
|
|
1326
|
+
pageSize?: number;
|
|
1327
|
+
/** Selectable page-size options */
|
|
1328
|
+
pageSizeOptions?: number[];
|
|
1329
|
+
/** Called when page-size changes */
|
|
1330
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
1331
|
+
/**
|
|
1332
|
+
* Pages shown on each side of the current page (excluding first/last), like MUI `siblingCount`.
|
|
1333
|
+
* @default 1
|
|
1334
|
+
*/
|
|
1335
|
+
siblingCount?: number;
|
|
1336
|
+
}
|
|
1337
|
+
declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* Vertical step list for multi-step flows.
|
|
1341
|
+
* - Completed steps use `Tickmark` (non-filled) at `iconSize` default (16px).
|
|
1342
|
+
* - Per step (when a connector runs to the next step): circle + connector column totals `h-7xl` (64px).
|
|
1343
|
+
* - Connector stroke width: 2px (matches prior spec).
|
|
1344
|
+
*/
|
|
1345
|
+
type StepperStepVariant = "default" | "inProgress" | "complete";
|
|
1346
|
+
interface StepperStep {
|
|
1347
|
+
/** Step title */
|
|
1348
|
+
title: React.ReactNode;
|
|
1349
|
+
/** Optional step subtext */
|
|
1350
|
+
subtext?: React.ReactNode;
|
|
1351
|
+
/** Visual state for this step */
|
|
1352
|
+
variant: StepperStepVariant;
|
|
1353
|
+
}
|
|
1354
|
+
interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1355
|
+
steps: StepperStep[];
|
|
1356
|
+
}
|
|
1357
|
+
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
1358
|
+
|
|
1099
1359
|
/** Toast entry for the provider (id, content, optional duration in ms; default 4000) */
|
|
1100
1360
|
interface ToastEntryOptions {
|
|
1101
1361
|
title: string;
|
|
@@ -1155,7 +1415,7 @@ declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttri
|
|
|
1155
1415
|
* - Optional subtext line below the title
|
|
1156
1416
|
* - Optional up to three CTA buttons on the right
|
|
1157
1417
|
* - Optional close icon button on the right
|
|
1158
|
-
* - Tabs: underline style, 14px/500/24px, active blue-600, border neutral
|
|
1418
|
+
* - Tabs: underline style, 14px/500/24px, active blue-600, border semantic neutral tertiary
|
|
1159
1419
|
*/
|
|
1160
1420
|
interface PageHeaderTab {
|
|
1161
1421
|
value: string;
|
|
@@ -1265,9 +1525,40 @@ interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, "title
|
|
|
1265
1525
|
}
|
|
1266
1526
|
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
1267
1527
|
|
|
1528
|
+
type PageFooterAction = {
|
|
1529
|
+
/**
|
|
1530
|
+
* Visible label for the button.
|
|
1531
|
+
*/
|
|
1532
|
+
label: string;
|
|
1533
|
+
/**
|
|
1534
|
+
* Click handler for the button.
|
|
1535
|
+
*/
|
|
1536
|
+
onClick?: () => void;
|
|
1537
|
+
/**
|
|
1538
|
+
* Visual style of the button. Defaults to primary.
|
|
1539
|
+
*/
|
|
1540
|
+
variant?: "primary" | "secondary";
|
|
1541
|
+
/**
|
|
1542
|
+
* Optional icon to render alongside the label.
|
|
1543
|
+
*/
|
|
1544
|
+
icon?: React.ReactNode;
|
|
1545
|
+
/**
|
|
1546
|
+
* Position of the icon relative to the label. Defaults to leading.
|
|
1547
|
+
*/
|
|
1548
|
+
iconPosition?: "leading" | "trailing";
|
|
1549
|
+
};
|
|
1268
1550
|
interface PageFooterProps extends React.HTMLAttributes<HTMLElement> {
|
|
1269
1551
|
/**
|
|
1270
|
-
*
|
|
1552
|
+
* Primary CTA button (rightmost). When set with secondaryAction, renders as props-based actions.
|
|
1553
|
+
*/
|
|
1554
|
+
primaryAction?: PageFooterAction;
|
|
1555
|
+
/**
|
|
1556
|
+
* Secondary CTA button (left of primary). Renders before primaryAction when both are set.
|
|
1557
|
+
*/
|
|
1558
|
+
secondaryAction?: PageFooterAction;
|
|
1559
|
+
/**
|
|
1560
|
+
* Action buttons or content. When provided, overrides primaryAction/secondaryAction.
|
|
1561
|
+
* Defaults to primary small "Convert" button when neither children nor actions are set.
|
|
1271
1562
|
*/
|
|
1272
1563
|
children?: React.ReactNode;
|
|
1273
1564
|
/**
|
|
@@ -1289,7 +1580,7 @@ declare const PageFooter: React.ForwardRefExoticComponent<PageFooterProps & Reac
|
|
|
1289
1580
|
* to show labels (hover state). Selected items show a box highlight.
|
|
1290
1581
|
*
|
|
1291
1582
|
* - Default: collapsed 48×1024px, sticky left; hover expands to the right only.
|
|
1292
|
-
* - Hover/Selected: expanded
|
|
1583
|
+
* - Hover/Selected: expanded 196×1024px, white bg, shadow-elevation-right-sm. Logo and items left-aligned.
|
|
1293
1584
|
* - Selected item: 36×36 (collapsed) or 120×36 (expanded) box, radius 8px (rounded-sm), shadow-elevation-bottom-sm.
|
|
1294
1585
|
*
|
|
1295
1586
|
* Logo 36×28. Text: 12px, weight 500, line-height 16px.
|
|
@@ -1317,9 +1608,20 @@ interface SideMenuProps extends Omit<React.HTMLAttributes<HTMLElement>, "childre
|
|
|
1317
1608
|
expanded?: boolean;
|
|
1318
1609
|
/** Callback when an item is clicked */
|
|
1319
1610
|
onItemClick?: (id: string) => void;
|
|
1611
|
+
/**
|
|
1612
|
+
* Project switcher shown below the logo.
|
|
1613
|
+
* Collapsed: shows a `P` badge. Expanded: shows a dropdown with project options.
|
|
1614
|
+
*/
|
|
1615
|
+
projects?: DropdownOption[];
|
|
1616
|
+
/** Controlled selected project value. */
|
|
1617
|
+
project?: string;
|
|
1618
|
+
/** Initial selected project when uncontrolled. */
|
|
1619
|
+
defaultProject?: string;
|
|
1620
|
+
/** Callback when project changes. */
|
|
1621
|
+
onProjectChange?: (value: string) => void;
|
|
1320
1622
|
}
|
|
1321
1623
|
declare const sideMenuVariants: (props?: ({
|
|
1322
|
-
variant?: "default" | "selected" | "hover" | null | undefined;
|
|
1624
|
+
variant?: "default" | "sticky" | "selected" | "hover" | null | undefined;
|
|
1323
1625
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
1324
1626
|
declare const SideMenu: React.ForwardRefExoticComponent<SideMenuProps & React.RefAttributes<HTMLElement>>;
|
|
1325
1627
|
|
|
@@ -1350,7 +1652,7 @@ interface UploadProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "childr
|
|
|
1350
1652
|
}
|
|
1351
1653
|
declare const Upload: React.ForwardRefExoticComponent<UploadProps & React.RefAttributes<HTMLDivElement>>;
|
|
1352
1654
|
declare const uploadFileItemBoxVariants: (props?: ({
|
|
1353
|
-
status?: "
|
|
1655
|
+
status?: "complete" | "uploading" | "failed" | null | undefined;
|
|
1354
1656
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
1355
1657
|
type UploadFileItemStatus = "uploading" | "complete" | "failed";
|
|
1356
1658
|
interface UploadFileItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof uploadFileItemBoxVariants> {
|
|
@@ -1395,4 +1697,4 @@ type Size = "sm" | "md" | "lg";
|
|
|
1395
1697
|
type Variant = "primary" | "secondary" | "outline" | "ghost";
|
|
1396
1698
|
type ColorScheme = "primary" | "secondary" | "success" | "error" | "warning" | "info";
|
|
1397
1699
|
|
|
1398
|
-
export { Avatar, Badge, type BaseComponentProps, Button, Checkbox, Chip, type ColorScheme, Dropdown, DropdownMulti, type DropdownMultiProps, type DropdownOption, type DropdownProps, Input, Label, Loader, PageFooter, type PageFooterProps, PageHeader, type PageHeaderAction, type PageHeaderProps, type PageHeaderTab, ProgressBar, Radio, RadioGroup, SearchField, SideMenu, type SideMenuItem, type SideMenuProps, type Size, Skeleton, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, type TabsTriggerOption, type TabsTriggerProps, Textarea, Toast, type ToastEntryOptions, ToastProvider, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Upload, UploadFileItem, type UploadFileItemProps, type UploadFileItemStatus, type UploadProps, type Variant, avatarVariants, badgeVariants, buttonVariants, checkboxRootVariants as checkboxVariants, chipVariants, dropdownContentVariants, dropdownItemVariants, dropdownTriggerVariants, inputVariants, loaderVariants, pageHeaderVariants, radioVariants, searchFieldVariants, sideMenuVariants, skeletonVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, toastVariants, toggleVariants, tooltipContentVariants, uploadBoxVariants, uploadFileItemBoxVariants, useToast };
|
|
1700
|
+
export { Avatar, Badge, type BaseComponentProps, Button, Card, Checkbox, Chip, type ColorScheme, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderTop, DrawerSurface, DrawerTitle, DrawerTrigger, Dropdown, DropdownMulti, type DropdownMultiProps, type DropdownOption, type DropdownProps, Input, Label, Loader, Menu, MenuContent, MenuItem, MenuMenu, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, PageFooter, type PageFooterAction, type PageFooterProps, PageHeader, type PageHeaderAction, type PageHeaderProps, type PageHeaderTab, Pagination, Popup, PopupContent, PopupTrigger, ProgressBar, Radio, RadioGroup, SearchField, SideMenu, type SideMenuItem, type SideMenuProps, type Size, Skeleton, Stepper, type StepperProps, type StepperStep, type StepperStepVariant, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, type TabsTriggerOption, type TabsTriggerProps, Textarea, Toast, type ToastEntryOptions, ToastProvider, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Upload, UploadFileItem, type UploadFileItemProps, type UploadFileItemStatus, type UploadProps, type Variant, avatarVariants, badgeVariants, buttonVariants, cardVariants, checkboxRootVariants as checkboxVariants, chipVariants, dropdownContentVariants, dropdownItemVariants, dropdownTriggerVariants, inputVariants, loaderVariants, pageHeaderVariants, radioVariants, searchFieldVariants, sideMenuVariants, skeletonVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, toastVariants, toggleVariants, tooltipContentVariants, uploadBoxVariants, uploadFileItemBoxVariants, useToast };
|