sangam-ui 0.1.10 → 0.1.11
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 +62 -30
- package/dist/index.js +271 -233
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
23
23
|
* CVA (Class Variance Authority) manages all variants
|
|
24
24
|
*/
|
|
25
25
|
declare const buttonVariants: (props?: ({
|
|
26
|
-
variant?: "
|
|
26
|
+
variant?: "primary" | "link" | "secondary" | "danger" | null | undefined;
|
|
27
27
|
size?: "big" | "small" | null | undefined;
|
|
28
28
|
iconOnly?: boolean | null | undefined;
|
|
29
29
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
@@ -73,7 +73,7 @@ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAtt
|
|
|
73
73
|
* Sangam Toggle (Switch) Component
|
|
74
74
|
*
|
|
75
75
|
* Production-grade toggle following Figma design specs:
|
|
76
|
-
* - Colors:
|
|
76
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
77
77
|
* - Sizes: Big (56×28px), Small (44×24px)
|
|
78
78
|
* - States: Default, Hover, Disabled
|
|
79
79
|
* - Smooth transitions: 200ms ease-out
|
|
@@ -145,7 +145,7 @@ declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAtt
|
|
|
145
145
|
* Sangam Checkbox Component
|
|
146
146
|
*
|
|
147
147
|
* Production-grade checkbox following Figma design specs:
|
|
148
|
-
* - Colors:
|
|
148
|
+
* - Colors: semantic-colors (border, background, text) where available
|
|
149
149
|
* - Sizes: Big (24×24px), Small (20×20px)
|
|
150
150
|
* - States: Default, Hover, Disabled
|
|
151
151
|
* - Smooth transitions: 200ms ease-out
|
|
@@ -219,7 +219,7 @@ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.Re
|
|
|
219
219
|
* Sangam Radio Component
|
|
220
220
|
*
|
|
221
221
|
* Production-grade radio button following Figma design specs:
|
|
222
|
-
* - Colors:
|
|
222
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
223
223
|
* - Sizes: Big (24×24px), Small (20×20px)
|
|
224
224
|
* - States: Default, Hover, Disabled
|
|
225
225
|
* - Smooth transitions: 200ms ease-out
|
|
@@ -323,7 +323,7 @@ declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttri
|
|
|
323
323
|
* Sangam Input Component
|
|
324
324
|
*
|
|
325
325
|
* Production-grade text input following Figma design specs:
|
|
326
|
-
* - Colors:
|
|
326
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
327
327
|
* - Multiple states: Default, Hover, Active, Typing, Filled, Error, Success, Disabled
|
|
328
328
|
* - Consistent padding: 4px 12px
|
|
329
329
|
* - Smooth transitions: 200ms ease-out
|
|
@@ -537,7 +537,7 @@ declare const DropdownMulti: React.ForwardRefExoticComponent<DropdownMultiProps
|
|
|
537
537
|
*
|
|
538
538
|
* Production-grade search input following Figma design specs:
|
|
539
539
|
* - Width: Fixed 400px
|
|
540
|
-
* - Colors:
|
|
540
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
541
541
|
* - Multiple states: Default, Hover, Active, Typing, Filled, Disabled
|
|
542
542
|
* - Border radius: 8px
|
|
543
543
|
* - Padding: 4px 12px
|
|
@@ -574,7 +574,7 @@ declare const SearchField: React.ForwardRefExoticComponent<SearchFieldProps & Re
|
|
|
574
574
|
* Production-grade textarea following Figma design specs:
|
|
575
575
|
* - Width: 100% with min-width 450px (responsive, matches Input pattern)
|
|
576
576
|
* - Height: Fixed 96px
|
|
577
|
-
* - Colors:
|
|
577
|
+
* - Colors: semantic-colors (background, border, text) where available
|
|
578
578
|
* - Multiple states: Default, Hover, Active, Typing, Filled, Error, Success, Disabled
|
|
579
579
|
* - Padding: 4px 12px
|
|
580
580
|
* - Border radius: 8px (sm)
|
|
@@ -706,7 +706,7 @@ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.Re
|
|
|
706
706
|
* Sangam Tooltip Component
|
|
707
707
|
*
|
|
708
708
|
* Production-grade tooltip following Figma design specs:
|
|
709
|
-
* - Colors:
|
|
709
|
+
* - Colors: semantic-colors (background neutralInverse primary, text neutralInverse primary)
|
|
710
710
|
* - Fixed width: 7.5rem (120px at default)
|
|
711
711
|
* - Fixed height: 2rem (32px at default), 3.25rem (52px with description)
|
|
712
712
|
* - Border radius: 4px
|
|
@@ -792,10 +792,10 @@ interface ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "c
|
|
|
792
792
|
*/
|
|
793
793
|
max?: number;
|
|
794
794
|
/**
|
|
795
|
-
*
|
|
796
|
-
* @default
|
|
795
|
+
* When true, shows the percentage label on the right of the bar. When false, bar only (no label).
|
|
796
|
+
* @default true
|
|
797
797
|
*/
|
|
798
|
-
showLabel?:
|
|
798
|
+
showLabel?: boolean;
|
|
799
799
|
/**
|
|
800
800
|
* Track width in pixels. Ignored when fluid is true.
|
|
801
801
|
* @default 476
|
|
@@ -819,11 +819,11 @@ interface ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "c
|
|
|
819
819
|
/**
|
|
820
820
|
* ProgressBar for completion or loading states.
|
|
821
821
|
*
|
|
822
|
-
* @example With
|
|
823
|
-
* <ProgressBar value={50}
|
|
822
|
+
* @example With label on the right (default)
|
|
823
|
+
* <ProgressBar value={50} />
|
|
824
824
|
*
|
|
825
|
-
* @example Bar only
|
|
826
|
-
* <ProgressBar value={75} showLabel=
|
|
825
|
+
* @example Bar only (no label)
|
|
826
|
+
* <ProgressBar value={75} showLabel={false} />
|
|
827
827
|
*/
|
|
828
828
|
declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
829
829
|
|
|
@@ -838,7 +838,7 @@ interface LoaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "childr
|
|
|
838
838
|
"aria-label"?: string;
|
|
839
839
|
/**
|
|
840
840
|
* Gradient color (e.g. #FFFFFF for white on dark backgrounds).
|
|
841
|
-
* @default
|
|
841
|
+
* @default semantic background.neutralInverse.primary (neutral.1100)
|
|
842
842
|
*/
|
|
843
843
|
color?: string;
|
|
844
844
|
/**
|
|
@@ -860,9 +860,9 @@ declare const Loader: React.ForwardRefExoticComponent<LoaderProps & React.RefAtt
|
|
|
860
860
|
*
|
|
861
861
|
* Lightweight, token-friendly loading placeholder.
|
|
862
862
|
* Uses tokens from @esds-sangam/tokens:
|
|
863
|
-
* - Base bg: neutral
|
|
863
|
+
* - Base bg: semantic background.neutral.tertiary (neutral.200)
|
|
864
864
|
* - Border radius: rounded-sm = tokens radius.sm (0.5rem / 8px)
|
|
865
|
-
* - Shimmer:
|
|
865
|
+
* - Shimmer: animate-pulse (Tailwind built-in)
|
|
866
866
|
* - Animation: ease-out, 1s duration, 800ms delay, loops infinitely.
|
|
867
867
|
*
|
|
868
868
|
* By default the component is layout-flexible — width/height
|
|
@@ -886,8 +886,9 @@ declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.Re
|
|
|
886
886
|
*
|
|
887
887
|
* Types: Container, Underline, Icon only.
|
|
888
888
|
* States: Default, Hover, Selected, Disabled.
|
|
889
|
+
* Colors: semantic-colors (background, border, text) where available.
|
|
889
890
|
* Typography: 14px, weight 500, line-height 24px.
|
|
890
|
-
* Spec: Container selected box 178×32, shadow 0 2px 6px; Underline selected 2px
|
|
891
|
+
* 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
892
|
*/
|
|
892
893
|
declare const tabsListVariants: (props?: ({
|
|
893
894
|
type?: "underline" | "iconOnly" | "container" | null | undefined;
|
|
@@ -939,7 +940,7 @@ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttribu
|
|
|
939
940
|
*
|
|
940
941
|
* Two variants: Image (photo or placeholder silhouette) and Letter (initials).
|
|
941
942
|
* Sizes: large (32×32), medium (24×24), small (20×20).
|
|
942
|
-
* Letter: bg
|
|
943
|
+
* Letter: bg/text from semantic-colors (neutral tertiary); weight 500.
|
|
943
944
|
* Letter typography: large tokens base (16px)/leading-6; medium/small tokens 3xs (10px).
|
|
944
945
|
* Token-based, circular (rounded-full).
|
|
945
946
|
*/
|
|
@@ -949,7 +950,7 @@ declare const avatarVariants: (props?: ({
|
|
|
949
950
|
interface AvatarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children">, VariantProps<typeof avatarVariants> {
|
|
950
951
|
/**
|
|
951
952
|
* Variant: "image" (photo or placeholder silhouette) or "letter" (initials).
|
|
952
|
-
* Letter uses bg neutral
|
|
953
|
+
* Letter uses semantic-colors: bg neutral tertiary, text neutral tertiary; typography per size (Big: tokens base, Medium/Small: tokens 3xs = 10px).
|
|
953
954
|
*/
|
|
954
955
|
variant?: "image" | "letter";
|
|
955
956
|
/**
|
|
@@ -1041,12 +1042,12 @@ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttri
|
|
|
1041
1042
|
* Sizes: Large (75×32, close 16×16), Small (67×24, close 12×12).
|
|
1042
1043
|
* Radius 999 (pill). Colors from @esds-sangam/tokens.
|
|
1043
1044
|
*
|
|
1044
|
-
* States:
|
|
1045
|
-
* - Default: bg
|
|
1046
|
-
* - Hover: bg neutral
|
|
1047
|
-
* - Selected: bg
|
|
1048
|
-
* - Disabled: bg neutral
|
|
1049
|
-
* - Focused: bg
|
|
1045
|
+
* States (semantic-colors):
|
|
1046
|
+
* - Default: bg neutral primary, text neutral primary, border neutral primary
|
|
1047
|
+
* - Hover: bg neutral tertiary, border transparent
|
|
1048
|
+
* - Selected: bg neutralInverse primary, text neutralInverse primary
|
|
1049
|
+
* - Disabled: bg neutral disabled, text neutral disabled
|
|
1050
|
+
* - Focused: bg neutral primary, text neutral primary, border 2px neutralInverse primary
|
|
1050
1051
|
*/
|
|
1051
1052
|
declare const chipVariants: (props?: ({
|
|
1052
1053
|
size?: "small" | "large" | null | undefined;
|
|
@@ -1155,7 +1156,7 @@ declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttri
|
|
|
1155
1156
|
* - Optional subtext line below the title
|
|
1156
1157
|
* - Optional up to three CTA buttons on the right
|
|
1157
1158
|
* - Optional close icon button on the right
|
|
1158
|
-
* - Tabs: underline style, 14px/500/24px, active blue-600, border neutral
|
|
1159
|
+
* - Tabs: underline style, 14px/500/24px, active blue-600, border semantic neutral tertiary
|
|
1159
1160
|
*/
|
|
1160
1161
|
interface PageHeaderTab {
|
|
1161
1162
|
value: string;
|
|
@@ -1265,9 +1266,40 @@ interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, "title
|
|
|
1265
1266
|
}
|
|
1266
1267
|
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
1267
1268
|
|
|
1269
|
+
type PageFooterAction = {
|
|
1270
|
+
/**
|
|
1271
|
+
* Visible label for the button.
|
|
1272
|
+
*/
|
|
1273
|
+
label: string;
|
|
1274
|
+
/**
|
|
1275
|
+
* Click handler for the button.
|
|
1276
|
+
*/
|
|
1277
|
+
onClick?: () => void;
|
|
1278
|
+
/**
|
|
1279
|
+
* Visual style of the button. Defaults to primary.
|
|
1280
|
+
*/
|
|
1281
|
+
variant?: "primary" | "secondary";
|
|
1282
|
+
/**
|
|
1283
|
+
* Optional icon to render alongside the label.
|
|
1284
|
+
*/
|
|
1285
|
+
icon?: React.ReactNode;
|
|
1286
|
+
/**
|
|
1287
|
+
* Position of the icon relative to the label. Defaults to leading.
|
|
1288
|
+
*/
|
|
1289
|
+
iconPosition?: "leading" | "trailing";
|
|
1290
|
+
};
|
|
1268
1291
|
interface PageFooterProps extends React.HTMLAttributes<HTMLElement> {
|
|
1269
1292
|
/**
|
|
1270
|
-
*
|
|
1293
|
+
* Primary CTA button (rightmost). When set with secondaryAction, renders as props-based actions.
|
|
1294
|
+
*/
|
|
1295
|
+
primaryAction?: PageFooterAction;
|
|
1296
|
+
/**
|
|
1297
|
+
* Secondary CTA button (left of primary). Renders before primaryAction when both are set.
|
|
1298
|
+
*/
|
|
1299
|
+
secondaryAction?: PageFooterAction;
|
|
1300
|
+
/**
|
|
1301
|
+
* Action buttons or content. When provided, overrides primaryAction/secondaryAction.
|
|
1302
|
+
* Defaults to primary small "Convert" button when neither children nor actions are set.
|
|
1271
1303
|
*/
|
|
1272
1304
|
children?: React.ReactNode;
|
|
1273
1305
|
/**
|
|
@@ -1395,4 +1427,4 @@ type Size = "sm" | "md" | "lg";
|
|
|
1395
1427
|
type Variant = "primary" | "secondary" | "outline" | "ghost";
|
|
1396
1428
|
type ColorScheme = "primary" | "secondary" | "success" | "error" | "warning" | "info";
|
|
1397
1429
|
|
|
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 };
|
|
1430
|
+
export { Avatar, Badge, type BaseComponentProps, Button, Checkbox, Chip, type ColorScheme, Dropdown, DropdownMulti, type DropdownMultiProps, type DropdownOption, type DropdownProps, Input, Label, Loader, PageFooter, type PageFooterAction, 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 };
|