sangam-ui 1.0.3 → 1.0.5
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 +196 -141
- package/dist/index.js +620 -402
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
61
61
|
*/
|
|
62
62
|
label?: React.ReactNode;
|
|
63
63
|
/**
|
|
64
|
-
* Interaction state (Figma: **state**
|
|
64
|
+
* Interaction state (Figma: **state** — Enabled / Disabled).
|
|
65
65
|
* @default "enabled"
|
|
66
66
|
*/
|
|
67
67
|
state?: "enabled" | "disabled";
|
|
@@ -101,7 +101,7 @@ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAtt
|
|
|
101
101
|
*
|
|
102
102
|
* Production-grade toggle following Figma design specs:
|
|
103
103
|
* - Colors: semantic-colors (background, border, text) where available
|
|
104
|
-
* - Sizes: Big (56
|
|
104
|
+
* - Sizes: Big (56×28px), Small (44×24px)
|
|
105
105
|
* - States: Default, Hover, Disabled
|
|
106
106
|
* - Smooth transitions: 200ms ease-out
|
|
107
107
|
*
|
|
@@ -118,7 +118,7 @@ declare const toggleVariants: (props?: ({
|
|
|
118
118
|
* - Toggle + Title: title only (14px, #111111, weight 500, line-height 24px)
|
|
119
119
|
* - Toggle + Title & Subtitle: title + subtitle (subtitle: 12px, #7C7C7C, weight 400, line-height 16px)
|
|
120
120
|
*/
|
|
121
|
-
interface ToggleProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>, VariantProps<typeof toggleVariants> {
|
|
121
|
+
interface ToggleProps extends Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>, "asChild">, VariantProps<typeof toggleVariants> {
|
|
122
122
|
/**
|
|
123
123
|
* Size of the toggle
|
|
124
124
|
* @default "big"
|
|
@@ -140,18 +140,10 @@ interface ToggleProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimit
|
|
|
140
140
|
* Toggle state (Figma **isOn**).
|
|
141
141
|
*/
|
|
142
142
|
isOn?: boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Callback when `isOn` changes.
|
|
145
|
-
*/
|
|
146
|
-
onIsOnChange?: (isOn: boolean) => void;
|
|
147
143
|
/**
|
|
148
144
|
* @deprecated Use `isOn`.
|
|
149
145
|
*/
|
|
150
146
|
checked?: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* @deprecated Use `onIsOnChange`.
|
|
153
|
-
*/
|
|
154
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
155
147
|
}
|
|
156
148
|
/**
|
|
157
149
|
* Sangam Toggle Component
|
|
@@ -166,7 +158,7 @@ interface ToggleProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimit
|
|
|
166
158
|
* <Toggle />
|
|
167
159
|
*
|
|
168
160
|
* @example Controlled
|
|
169
|
-
* <Toggle isOn={isOn}
|
|
161
|
+
* <Toggle isOn={isOn} onCheckedChange={setIsOn} />
|
|
170
162
|
*
|
|
171
163
|
* @example Small size
|
|
172
164
|
* <Toggle size="small" />
|
|
@@ -193,33 +185,28 @@ declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAtt
|
|
|
193
185
|
*
|
|
194
186
|
* Production-grade checkbox following Figma design specs:
|
|
195
187
|
* - Colors: semantic-colors (border, background, text) where available
|
|
196
|
-
* - Sizes: Big (24
|
|
188
|
+
* - Sizes: Big (24×24px), Small (20×20px)
|
|
197
189
|
* - States: Default, Hover, Disabled
|
|
198
190
|
* - Smooth transitions: 200ms ease-out
|
|
199
191
|
*
|
|
200
192
|
* Built on Radix UI Checkbox for accessibility
|
|
201
193
|
*/
|
|
202
|
-
/** Outer container: hit area only. Big 24
|
|
194
|
+
/** Outer container: hit area only. Big 24×24, small 20×20. No border/bg here. */
|
|
203
195
|
declare const checkboxRootVariants: (props?: ({
|
|
204
196
|
size?: "big" | "small" | null | undefined;
|
|
205
197
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
206
198
|
type CheckboxVisualState = "default" | "disabled" | "hover";
|
|
207
|
-
interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "checked" | "onCheckedChange" | "disabled" | "title"> {
|
|
199
|
+
interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "checked" | "onCheckedChange" | "disabled" | "title" | "asChild"> {
|
|
208
200
|
size?: "big" | "small";
|
|
209
201
|
/**
|
|
210
202
|
* Selected state (Figma **isOn**).
|
|
211
203
|
* Prefer over Radix `checked` for design-system alignment.
|
|
212
204
|
*/
|
|
213
205
|
isOn?: boolean;
|
|
214
|
-
onIsOnChange?: (isOn: boolean) => void;
|
|
215
206
|
/**
|
|
216
|
-
* @deprecated Use `isOn
|
|
207
|
+
* @deprecated Use `isOn`.
|
|
217
208
|
*/
|
|
218
209
|
checked?: boolean;
|
|
219
|
-
/**
|
|
220
|
-
* @deprecated Use `onIsOnChange`.
|
|
221
|
-
*/
|
|
222
|
-
onCheckedChange?: (checked: boolean | "indeterminate") => void;
|
|
223
210
|
/**
|
|
224
211
|
* Interaction / preview state (Figma **state**).
|
|
225
212
|
* **hover** applies hover styling without a pointer (e.g. docs).
|
|
@@ -252,7 +239,7 @@ interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<typeof Check
|
|
|
252
239
|
subtextText?: string;
|
|
253
240
|
}
|
|
254
241
|
/**
|
|
255
|
-
* Sangam Checkbox
|
|
242
|
+
* Sangam Checkbox — Radix Checkbox + CVA + Sangam tokens.
|
|
256
243
|
*/
|
|
257
244
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
258
245
|
|
|
@@ -261,7 +248,7 @@ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.Re
|
|
|
261
248
|
*
|
|
262
249
|
* Production-grade radio button following Figma design specs:
|
|
263
250
|
* - Colors: semantic-colors (background, border, text) where available
|
|
264
|
-
* - Sizes: Big (24
|
|
251
|
+
* - Sizes: Big (24×24px), Small (20×20px)
|
|
265
252
|
* - States: Default, Hover, Disabled
|
|
266
253
|
* - Smooth transitions: 200ms ease-out
|
|
267
254
|
* - Circular shape (rounded-full)
|
|
@@ -284,7 +271,7 @@ interface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGro
|
|
|
284
271
|
* - Radio + Title: title only (14px, #111111, weight 500, line-height 24px)
|
|
285
272
|
* - Radio + Title & Subtext: title + subtext (subtext: 12px, #7C7C7C, weight 400, line-height 16px)
|
|
286
273
|
*/
|
|
287
|
-
interface RadioProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, VariantProps<typeof radioVariants> {
|
|
274
|
+
interface RadioProps extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, "asChild">, VariantProps<typeof radioVariants> {
|
|
288
275
|
/**
|
|
289
276
|
* Size of the radio button
|
|
290
277
|
* @default "big"
|
|
@@ -382,7 +369,15 @@ declare const inputVariants: (props?: ({
|
|
|
382
369
|
/**
|
|
383
370
|
* Input Props
|
|
384
371
|
*/
|
|
385
|
-
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof inputVariants> {
|
|
372
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "placeholder">, VariantProps<typeof inputVariants> {
|
|
373
|
+
/**
|
|
374
|
+
* Placeholder when the field is empty
|
|
375
|
+
*/
|
|
376
|
+
inputText?: string;
|
|
377
|
+
/**
|
|
378
|
+
* @deprecated Use `inputText`.
|
|
379
|
+
*/
|
|
380
|
+
placeholder?: string;
|
|
386
381
|
/**
|
|
387
382
|
* Error state - shows red border
|
|
388
383
|
*/
|
|
@@ -394,6 +389,10 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
394
389
|
/**
|
|
395
390
|
* Label text
|
|
396
391
|
*/
|
|
392
|
+
labelText?: string;
|
|
393
|
+
/**
|
|
394
|
+
* @deprecated Use `labelText`.
|
|
395
|
+
*/
|
|
397
396
|
label?: string;
|
|
398
397
|
/**
|
|
399
398
|
* Whether the label is required (shows red asterisk)
|
|
@@ -485,14 +484,14 @@ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttri
|
|
|
485
484
|
* - Accessible label and helper text
|
|
486
485
|
*
|
|
487
486
|
* @example Basic usage
|
|
488
|
-
* <Input
|
|
487
|
+
* <Input labelText="Email" inputText="Enter your email" />
|
|
489
488
|
*
|
|
490
489
|
* @example Required field
|
|
491
|
-
* <Input
|
|
490
|
+
* <Input labelText="Username" asterisk />
|
|
492
491
|
*
|
|
493
492
|
* @example Error state
|
|
494
493
|
* <Input
|
|
495
|
-
*
|
|
494
|
+
* labelText="Password"
|
|
496
495
|
* error
|
|
497
496
|
* supportText="Password must be at least 8 characters"
|
|
498
497
|
* supportingText
|
|
@@ -506,11 +505,11 @@ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttri
|
|
|
506
505
|
* />
|
|
507
506
|
*
|
|
508
507
|
* @example Disabled
|
|
509
|
-
* <Input
|
|
508
|
+
* <Input labelText="Username" disabled value="john.doe" />
|
|
510
509
|
*
|
|
511
510
|
* @example With helper text
|
|
512
511
|
* <Input
|
|
513
|
-
*
|
|
512
|
+
* labelText="Email"
|
|
514
513
|
* supportText="We'll never share your email"
|
|
515
514
|
* supportingText
|
|
516
515
|
* />
|
|
@@ -531,6 +530,10 @@ interface DropdownProps extends Omit<React.ComponentPropsWithoutRef<typeof Selec
|
|
|
531
530
|
/**
|
|
532
531
|
* Label text (same as Input)
|
|
533
532
|
*/
|
|
533
|
+
labelText?: string;
|
|
534
|
+
/**
|
|
535
|
+
* @deprecated Use `labelText`.
|
|
536
|
+
*/
|
|
534
537
|
label?: string;
|
|
535
538
|
/**
|
|
536
539
|
* Required field (red asterisk)
|
|
@@ -543,6 +546,10 @@ interface DropdownProps extends Omit<React.ComponentPropsWithoutRef<typeof Selec
|
|
|
543
546
|
/**
|
|
544
547
|
* Placeholder when no value selected
|
|
545
548
|
*/
|
|
549
|
+
inputText?: string;
|
|
550
|
+
/**
|
|
551
|
+
* @deprecated Use `inputText`.
|
|
552
|
+
*/
|
|
546
553
|
placeholder?: string;
|
|
547
554
|
/**
|
|
548
555
|
* Options for the dropdown
|
|
@@ -600,15 +607,19 @@ interface DropdownProps extends Omit<React.ComponentPropsWithoutRef<typeof Selec
|
|
|
600
607
|
selectAllLabel?: string;
|
|
601
608
|
}
|
|
602
609
|
/**
|
|
603
|
-
* Dropdown (single select)
|
|
610
|
+
* Dropdown (single select) — Input-style trigger with chevron, Radix Select content.
|
|
604
611
|
*/
|
|
605
612
|
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
|
|
606
613
|
/** Multi-select dropdown: trigger bg white, border neutral-400; menu border neutral-200, divider neutral-200; padding 8, gap 8 */
|
|
607
614
|
interface DropdownMultiProps {
|
|
615
|
+
labelText?: string;
|
|
616
|
+
/** @deprecated Use `labelText`. */
|
|
608
617
|
label?: string;
|
|
609
618
|
asterisk?: boolean;
|
|
610
619
|
/** @deprecated Use `asterisk`. */
|
|
611
620
|
required?: boolean;
|
|
621
|
+
inputText?: string;
|
|
622
|
+
/** @deprecated Use `inputText`. */
|
|
612
623
|
placeholder?: string;
|
|
613
624
|
options: DropdownOption[];
|
|
614
625
|
value: string[];
|
|
@@ -652,30 +663,40 @@ declare const DropdownMulti: React.ForwardRefExoticComponent<DropdownMultiProps
|
|
|
652
663
|
* - Border radius: 8px
|
|
653
664
|
* - Padding: 4px 12px
|
|
654
665
|
* - Gap: 8px
|
|
655
|
-
* - Icon size: 16
|
|
656
|
-
* - Close icon: 16
|
|
666
|
+
* - Icon size: 16×16px
|
|
667
|
+
* - Close icon: 16×16px (same as search icon)
|
|
657
668
|
* - Smooth transitions: 200ms ease-out
|
|
658
669
|
*/
|
|
659
670
|
declare const searchFieldVariants: (props?: ({} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
660
671
|
/**
|
|
661
672
|
* SearchField Props
|
|
662
673
|
*/
|
|
663
|
-
interface SearchFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
664
|
-
/**
|
|
665
|
-
|
|
666
|
-
* @default 100%
|
|
667
|
-
*/
|
|
668
|
-
width?: number | string;
|
|
669
|
-
/**
|
|
670
|
-
* Callback when clear button is clicked
|
|
671
|
-
*/
|
|
672
|
-
onClear?: () => void;
|
|
673
|
-
/**
|
|
674
|
-
* Whether to show the clear button when input has value
|
|
675
|
-
* @default true
|
|
676
|
-
*/
|
|
677
|
-
showClearButton?: boolean;
|
|
674
|
+
interface SearchFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "placeholder"> {
|
|
675
|
+
/** Hint text shown when the field is empty */
|
|
676
|
+
text?: string;
|
|
678
677
|
}
|
|
678
|
+
/**
|
|
679
|
+
* Sangam SearchField Component
|
|
680
|
+
*
|
|
681
|
+
* Production-grade search input built with:
|
|
682
|
+
* - CVA (for type-safe variants)
|
|
683
|
+
* - Sangam tokens (for consistent styling)
|
|
684
|
+
* - Sangam icons (Search, Close)
|
|
685
|
+
* - 200ms ease-out transitions
|
|
686
|
+
* - Clear button functionality
|
|
687
|
+
*
|
|
688
|
+
* @example Basic usage
|
|
689
|
+
* <SearchField text="Search..." />
|
|
690
|
+
*
|
|
691
|
+
* @example Controlled
|
|
692
|
+
* <SearchField
|
|
693
|
+
* value={query}
|
|
694
|
+
* onChange={(e) => setQuery(e.target.value)}
|
|
695
|
+
* />
|
|
696
|
+
*
|
|
697
|
+
* @example Disabled
|
|
698
|
+
* <SearchField text="Search..." disabled />
|
|
699
|
+
*/
|
|
679
700
|
declare const SearchField: React.ForwardRefExoticComponent<SearchFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
680
701
|
|
|
681
702
|
/**
|
|
@@ -700,19 +721,24 @@ declare const textareaVariants: (props?: ({
|
|
|
700
721
|
/**
|
|
701
722
|
* Textarea Props
|
|
702
723
|
*/
|
|
703
|
-
interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size">, VariantProps<typeof textareaVariants> {
|
|
724
|
+
interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "placeholder">, Omit<VariantProps<typeof textareaVariants>, "variant" | "filled"> {
|
|
704
725
|
/**
|
|
705
|
-
*
|
|
726
|
+
* Visual state of the textarea.
|
|
727
|
+
* @default "default"
|
|
728
|
+
*/
|
|
729
|
+
state?: "default" | "disabled" | "error" | "success";
|
|
730
|
+
/**
|
|
731
|
+
* @deprecated Use `state="error"`.
|
|
706
732
|
*/
|
|
707
733
|
error?: boolean;
|
|
708
734
|
/**
|
|
709
|
-
*
|
|
735
|
+
* @deprecated Use `state="success"`.
|
|
710
736
|
*/
|
|
711
737
|
success?: boolean;
|
|
712
738
|
/**
|
|
713
739
|
* Label text
|
|
714
740
|
*/
|
|
715
|
-
|
|
741
|
+
labelText?: string;
|
|
716
742
|
/**
|
|
717
743
|
* Whether the label is required (shows red asterisk)
|
|
718
744
|
*/
|
|
@@ -734,9 +760,9 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
|
|
|
734
760
|
*/
|
|
735
761
|
helperText?: string;
|
|
736
762
|
/**
|
|
737
|
-
*
|
|
763
|
+
* Placeholder / input hint text
|
|
738
764
|
*/
|
|
739
|
-
|
|
765
|
+
inputText?: string;
|
|
740
766
|
/**
|
|
741
767
|
* Maximum character length
|
|
742
768
|
* @default 250
|
|
@@ -786,56 +812,56 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
|
|
|
786
812
|
* - Fixed height (96px)
|
|
787
813
|
*
|
|
788
814
|
* @example Basic usage
|
|
789
|
-
* <Textarea
|
|
815
|
+
* <Textarea labelText="Description" inputText="Enter description..." />
|
|
790
816
|
*
|
|
791
817
|
* @example Required field
|
|
792
|
-
* <Textarea
|
|
818
|
+
* <Textarea labelText="Comments" required />
|
|
793
819
|
*
|
|
794
820
|
* @example Error state
|
|
795
821
|
* <Textarea
|
|
796
|
-
*
|
|
797
|
-
* error
|
|
822
|
+
* labelText="Message"
|
|
823
|
+
* state="error"
|
|
798
824
|
* helperText="Message must be at least 10 characters"
|
|
799
825
|
* />
|
|
800
826
|
*
|
|
801
827
|
* @example Success state
|
|
802
828
|
* <Textarea
|
|
803
|
-
*
|
|
804
|
-
* success
|
|
829
|
+
* labelText="Feedback"
|
|
830
|
+
* state="success"
|
|
805
831
|
* value="Great product!"
|
|
806
832
|
* />
|
|
807
833
|
*
|
|
808
834
|
* @example Disabled
|
|
809
|
-
* <Textarea
|
|
835
|
+
* <Textarea labelText="Notes" state="disabled" value="Read-only notes" />
|
|
810
836
|
*
|
|
811
837
|
* @example With helper text
|
|
812
838
|
* <Textarea
|
|
813
|
-
*
|
|
839
|
+
* labelText="Bio"
|
|
814
840
|
* helperText="Tell us about yourself (max 500 characters)"
|
|
815
841
|
* />
|
|
816
842
|
*
|
|
817
843
|
* @example Label with info icon
|
|
818
|
-
* <Textarea
|
|
844
|
+
* <Textarea labelText="Description" showLabelIcon required />
|
|
819
845
|
*
|
|
820
846
|
* @example With supporting text and icon
|
|
821
847
|
* <Textarea
|
|
822
|
-
*
|
|
848
|
+
* labelText="Comments"
|
|
823
849
|
* helperText="Supporting text"
|
|
824
850
|
* showHelperIcon
|
|
825
851
|
* />
|
|
826
852
|
*
|
|
827
853
|
* @example Success with icon
|
|
828
854
|
* <Textarea
|
|
829
|
-
*
|
|
830
|
-
* success
|
|
855
|
+
* labelText="Feedback"
|
|
856
|
+
* state="success"
|
|
831
857
|
* helperText="Supporting text"
|
|
832
858
|
* value="Great product!"
|
|
833
859
|
* />
|
|
834
860
|
*
|
|
835
861
|
* @example Error with icon
|
|
836
862
|
* <Textarea
|
|
837
|
-
*
|
|
838
|
-
* error
|
|
863
|
+
* labelText="Message"
|
|
864
|
+
* state="error"
|
|
839
865
|
* helperText="Supporting text"
|
|
840
866
|
* />
|
|
841
867
|
*/
|
|
@@ -845,14 +871,14 @@ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.Re
|
|
|
845
871
|
* Sangam Tooltip Component
|
|
846
872
|
*
|
|
847
873
|
* Production-grade tooltip following Figma design specs:
|
|
848
|
-
* - Colors: semantic-colors (background
|
|
874
|
+
* - Colors: semantic-colors (background neutral black, text neutral white)
|
|
849
875
|
* - Fixed width: 7.5rem (120px at default)
|
|
850
876
|
* - Fixed height: 2rem (32px at default), 3.25rem (52px with description)
|
|
851
877
|
* - Border radius: 4px
|
|
852
878
|
* - Padding: 16px
|
|
853
879
|
* - Gap: 4px
|
|
854
880
|
* - Title: 12px, 500 weight, 16px line-height
|
|
855
|
-
* - Arrow: 12
|
|
881
|
+
* - Arrow: 12×8px (all directions)
|
|
856
882
|
*
|
|
857
883
|
* Uses rem for dimensions to respect user font size preferences (accessibility)
|
|
858
884
|
*
|
|
@@ -946,35 +972,41 @@ declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProp
|
|
|
946
972
|
|
|
947
973
|
interface ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
948
974
|
/**
|
|
949
|
-
* Current progress value (0
|
|
975
|
+
* Current progress value (0–100).
|
|
950
976
|
*/
|
|
951
977
|
value: number;
|
|
952
978
|
/**
|
|
953
979
|
* Maximum value (default 100).
|
|
980
|
+
* @ignore Not part of Storybook testing surface.
|
|
954
981
|
*/
|
|
955
982
|
max?: number;
|
|
956
983
|
/**
|
|
957
984
|
* When true, shows the percentage label on the right of the bar. When false, bar only (no label).
|
|
958
985
|
* @default true
|
|
986
|
+
* @ignore Not part of Storybook testing surface.
|
|
959
987
|
*/
|
|
960
988
|
showLabel?: boolean;
|
|
961
989
|
/**
|
|
962
990
|
* Track width in pixels. Ignored when fluid is true.
|
|
963
991
|
* @default 476
|
|
992
|
+
* @ignore Not part of Storybook testing surface.
|
|
964
993
|
*/
|
|
965
994
|
width?: number;
|
|
966
995
|
/**
|
|
967
996
|
* When true, track uses full width of container (responsive).
|
|
968
997
|
* @default false
|
|
998
|
+
* @ignore Not part of Storybook testing surface.
|
|
969
999
|
*/
|
|
970
1000
|
fluid?: boolean;
|
|
971
1001
|
/**
|
|
972
1002
|
* Track height in pixels.
|
|
973
1003
|
* @default 6
|
|
1004
|
+
* @ignore Not part of Storybook testing surface.
|
|
974
1005
|
*/
|
|
975
1006
|
height?: number;
|
|
976
1007
|
/**
|
|
977
1008
|
* Accessible label for the progress bar.
|
|
1009
|
+
* @ignore Not part of Storybook testing surface.
|
|
978
1010
|
*/
|
|
979
1011
|
"aria-label"?: string;
|
|
980
1012
|
}
|
|
@@ -993,27 +1025,12 @@ declare const loaderVariants: (props?: ({
|
|
|
993
1025
|
size?: "big" | "medium" | "small" | "extraSmall" | null | undefined;
|
|
994
1026
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
995
1027
|
interface LoaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof loaderVariants> {
|
|
996
|
-
/**
|
|
997
|
-
* Accessible label for screen readers.
|
|
998
|
-
* @default "Loading"
|
|
999
|
-
*/
|
|
1000
|
-
"aria-label"?: string;
|
|
1001
|
-
/**
|
|
1002
|
-
* Gradient color (e.g. #FFFFFF for white on dark backgrounds).
|
|
1003
|
-
* @default semantic background.neutralInverse.primary (neutral.1100)
|
|
1004
|
-
*/
|
|
1005
|
-
color?: string;
|
|
1006
|
-
/**
|
|
1007
|
-
* Transparent end of gradient (e.g. #FFFFFF00). Defaults to `${color}00` when color is set.
|
|
1008
|
-
*/
|
|
1009
|
-
colorTransparent?: string;
|
|
1010
1028
|
}
|
|
1011
1029
|
/**
|
|
1012
1030
|
* Loader component for loading or processing states.
|
|
1013
1031
|
*
|
|
1014
1032
|
* @example
|
|
1015
1033
|
* <Loader size="big" />
|
|
1016
|
-
* <Loader size="small" aria-label="Loading results" />
|
|
1017
1034
|
*/
|
|
1018
1035
|
declare const Loader: React.ForwardRefExoticComponent<LoaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
1019
1036
|
|
|
@@ -1050,7 +1067,7 @@ declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.Re
|
|
|
1050
1067
|
* States: Default, Hover, Selected, Disabled.
|
|
1051
1068
|
* Colors: semantic-colors (background, border, text) where available.
|
|
1052
1069
|
* Typography: 14px, weight 500, line-height 24px.
|
|
1053
|
-
* Spec: Container selected box 178
|
|
1070
|
+
* 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.
|
|
1054
1071
|
*/
|
|
1055
1072
|
declare const tabsListVariants: (props?: ({
|
|
1056
1073
|
type?: "underline" | "iconOnly" | "container" | null | undefined;
|
|
@@ -1155,6 +1172,13 @@ declare const MenuMenu: {
|
|
|
1155
1172
|
declare const MenuTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
1156
1173
|
declare const MenuContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1157
1174
|
interface MenuItemProps extends Omit<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item>, "children"> {
|
|
1175
|
+
/**
|
|
1176
|
+
* Menu item label text.
|
|
1177
|
+
*/
|
|
1178
|
+
text?: React.ReactNode;
|
|
1179
|
+
/**
|
|
1180
|
+
* @deprecated Use `text` instead.
|
|
1181
|
+
*/
|
|
1158
1182
|
children?: React.ReactNode;
|
|
1159
1183
|
/**
|
|
1160
1184
|
* Optional icon before the label (Figma **Leading icon** on single-select items).
|
|
@@ -1265,7 +1289,7 @@ interface PopupProps {
|
|
|
1265
1289
|
cancelText?: string;
|
|
1266
1290
|
ctaText?: string;
|
|
1267
1291
|
/** Controls CTA button row visibility. @default true */
|
|
1268
|
-
|
|
1292
|
+
showCta?: boolean;
|
|
1269
1293
|
onCancelClick?: () => void;
|
|
1270
1294
|
onCtaClick?: () => void;
|
|
1271
1295
|
showClose?: boolean;
|
|
@@ -1288,7 +1312,7 @@ interface PopupProps {
|
|
|
1288
1312
|
* - Uses Radix Dialog for focus trap + ESC/overlay dismiss
|
|
1289
1313
|
* - Matches Sangam modal geometry (min-width 520px, 16px padding, 16px gaps, 12px between actions)
|
|
1290
1314
|
*/
|
|
1291
|
-
declare function Popup({ open, onOpenChange, title, subtext, showSubtext, children, showBodyBox, cancelText, ctaText,
|
|
1315
|
+
declare function Popup({ open, onOpenChange, title, subtext, showSubtext, children, showBodyBox, cancelText, ctaText, showCta, onCancelClick, onCtaClick, showClose, showOverlay, autoFocusClose, contentClassName, surfaceClassName, }: PopupProps): react_jsx_runtime.JSX.Element;
|
|
1292
1316
|
interface PopupTriggerProps {
|
|
1293
1317
|
title: string;
|
|
1294
1318
|
subtext?: string;
|
|
@@ -1297,7 +1321,7 @@ interface PopupTriggerProps {
|
|
|
1297
1321
|
cancelText?: string;
|
|
1298
1322
|
ctaText?: string;
|
|
1299
1323
|
/** Controls CTA button row visibility. @default true */
|
|
1300
|
-
|
|
1324
|
+
showCta?: boolean;
|
|
1301
1325
|
showClose?: boolean;
|
|
1302
1326
|
showOverlay?: boolean;
|
|
1303
1327
|
autoFocusClose?: boolean;
|
|
@@ -1322,7 +1346,7 @@ interface PopupTriggerProps {
|
|
|
1322
1346
|
* - A centered Popup that opens on click
|
|
1323
1347
|
* - Developer-friendly API for Storybook docs
|
|
1324
1348
|
*/
|
|
1325
|
-
declare function PopupTrigger({ title, subtext, showSubtext, cancelText, ctaText,
|
|
1349
|
+
declare function PopupTrigger({ title, subtext, showSubtext, cancelText, ctaText, showCta, showClose, showOverlay, autoFocusClose, triggerLabel, showBodyBox, onCancelClick, onCtaClick, children, }: PopupTriggerProps): react_jsx_runtime.JSX.Element;
|
|
1326
1350
|
|
|
1327
1351
|
/**
|
|
1328
1352
|
* Sangam Badge Component
|
|
@@ -1336,8 +1360,8 @@ declare function PopupTrigger({ title, subtext, showSubtext, cancelText, ctaText
|
|
|
1336
1360
|
* Border radius: rounded variant uses 8px (tokens radius.sm = 0.5rem).
|
|
1337
1361
|
*
|
|
1338
1362
|
* Sizes:
|
|
1339
|
-
* - Big: Rounded/Pill 48
|
|
1340
|
-
* - Small: Rounded/Pill 48
|
|
1363
|
+
* - Big: Rounded/Pill 48×24px; Number 24×24px (circular)
|
|
1364
|
+
* - Small: Rounded/Pill 48×20px; Number 20×20px (circular)
|
|
1341
1365
|
*
|
|
1342
1366
|
* Label typography (both sizes): weight 500, size 12px, line-height 16px.
|
|
1343
1367
|
* Padding (rounded/pill): Big top=4 bottom=4 left=8 right=8; Small top=2 bottom=2 left=8 right=8.
|
|
@@ -1448,7 +1472,7 @@ interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">,
|
|
|
1448
1472
|
subtext?: React.ReactNode;
|
|
1449
1473
|
/** Optional status element (typically `Badge`). */
|
|
1450
1474
|
status?: React.ReactNode;
|
|
1451
|
-
/** Optional right-side icon slot (16×16; use `iconSize.xs` in layout). */
|
|
1475
|
+
/** Optional right-side icon slot (16×16; use `iconSize.xs` in layout). Omit this prop to hide the icon. */
|
|
1452
1476
|
icon?: React.ReactNode;
|
|
1453
1477
|
/** Optional body content under title/subtext area. */
|
|
1454
1478
|
children?: React.ReactNode;
|
|
@@ -1462,15 +1486,15 @@ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttribu
|
|
|
1462
1486
|
*
|
|
1463
1487
|
* Structural variants: 1) Only label, 2) Label + close icon, 3) Tick icon + label + close icon.
|
|
1464
1488
|
* Token-based chip: Default, Hover, Selected, Disabled, Focused.
|
|
1465
|
-
* Sizes: Large (75
|
|
1489
|
+
* Sizes: Large (75×32, close 16×16), Small (67×24, close 12×12).
|
|
1466
1490
|
* Radius 999 (pill). Colors from @esds-sangam/tokens.
|
|
1467
1491
|
*
|
|
1468
1492
|
* States (semantic-colors):
|
|
1469
|
-
* - Default:
|
|
1470
|
-
* - Hover:
|
|
1471
|
-
* - Selected:
|
|
1472
|
-
* - Disabled:
|
|
1473
|
-
* - Focused:
|
|
1493
|
+
* - Default: chips.background.default, chips.text.default, chips.border.default
|
|
1494
|
+
* - Hover: chips.background.hover, chips.text.hover
|
|
1495
|
+
* - Selected: chips.background.selected, chips.text.selected
|
|
1496
|
+
* - Disabled: chips.background.disabled, chips.text.disabled
|
|
1497
|
+
* - Focused: chips.border.focused
|
|
1474
1498
|
*/
|
|
1475
1499
|
declare const chipVariants: (props?: ({
|
|
1476
1500
|
size?: "small" | "large" | null | undefined;
|
|
@@ -1481,9 +1505,13 @@ interface ChipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children
|
|
|
1481
1505
|
/**
|
|
1482
1506
|
* Chip label (e.g. "Chip").
|
|
1483
1507
|
*/
|
|
1508
|
+
text?: React.ReactNode;
|
|
1509
|
+
/**
|
|
1510
|
+
* @deprecated Use `text` instead.
|
|
1511
|
+
*/
|
|
1484
1512
|
children?: React.ReactNode;
|
|
1485
1513
|
/**
|
|
1486
|
-
* Size: large (75
|
|
1514
|
+
* Size: large (75×32, close 16×16) or small (67×24, close 12×12).
|
|
1487
1515
|
*/
|
|
1488
1516
|
size?: "large" | "small";
|
|
1489
1517
|
/**
|
|
@@ -1494,19 +1522,15 @@ interface ChipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children
|
|
|
1494
1522
|
* Disabled state: muted background and text.
|
|
1495
1523
|
*/
|
|
1496
1524
|
disabled?: boolean;
|
|
1497
|
-
/**
|
|
1498
|
-
* Callback when close icon is clicked. When provided, close icon is shown (variant: Label + close).
|
|
1499
|
-
*/
|
|
1500
|
-
onDismiss?: () => void;
|
|
1501
1525
|
/**
|
|
1502
1526
|
* Controls close icon visibility.
|
|
1503
1527
|
* - true: close icon visible
|
|
1504
1528
|
* - false: close icon hidden
|
|
1505
|
-
* @default
|
|
1529
|
+
* @default false
|
|
1506
1530
|
*/
|
|
1507
1531
|
closeIcon?: boolean;
|
|
1508
1532
|
/**
|
|
1509
|
-
* When true, show tick icon before the label. Use with
|
|
1533
|
+
* When true, show tick icon before the label. Use with `closeIcon` for the Tick + label + close variant.
|
|
1510
1534
|
*/
|
|
1511
1535
|
leadingIcon?: boolean;
|
|
1512
1536
|
}
|
|
@@ -1514,16 +1538,16 @@ interface ChipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children
|
|
|
1514
1538
|
* Chip for tags, filters, or removable items.
|
|
1515
1539
|
*
|
|
1516
1540
|
* @example Default
|
|
1517
|
-
* <Chip size="large"
|
|
1541
|
+
* <Chip size="large" text="Chip" />
|
|
1518
1542
|
*
|
|
1519
|
-
* @example
|
|
1520
|
-
* <Chip size="large"
|
|
1543
|
+
* @example Label + close
|
|
1544
|
+
* <Chip size="large" text="Chip" closeIcon />
|
|
1521
1545
|
*
|
|
1522
1546
|
* @example Tick + label + close
|
|
1523
|
-
* <Chip size="large"
|
|
1547
|
+
* <Chip size="large" text="Chip" closeIcon leadingIcon />
|
|
1524
1548
|
*
|
|
1525
1549
|
* @example Selected
|
|
1526
|
-
* <Chip size="large" selected
|
|
1550
|
+
* <Chip size="large" text="Chip" selected />
|
|
1527
1551
|
*/
|
|
1528
1552
|
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
|
|
1529
1553
|
|
|
@@ -1534,7 +1558,7 @@ interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1534
1558
|
totalPages: number;
|
|
1535
1559
|
/** Called when page changes */
|
|
1536
1560
|
onPageChange?: (page: number) => void;
|
|
1537
|
-
/** Total records (optional; not shown in the bar
|
|
1561
|
+
/** Total records (optional; not shown in the bar — use in parent for range copy if needed) */
|
|
1538
1562
|
totalRecords?: number;
|
|
1539
1563
|
/** Current page-size value for the entries selector */
|
|
1540
1564
|
pageSize?: number;
|
|
@@ -1551,12 +1575,13 @@ interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1551
1575
|
declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
|
|
1552
1576
|
|
|
1553
1577
|
/**
|
|
1554
|
-
*
|
|
1578
|
+
* Step list for multi-step flows (vertical or horizontal).
|
|
1555
1579
|
* - Completed steps use `Tickmark` (non-filled) at `iconSize` default (16px).
|
|
1556
|
-
* -
|
|
1557
|
-
* -
|
|
1580
|
+
* - Vertical: per step, circle + connector column totals `h-7xl` (64px); connector 2px wide.
|
|
1581
|
+
* - Horizontal: with description, circle and connector align to the title/description boundary.
|
|
1558
1582
|
*/
|
|
1559
1583
|
type StepperState = "default" | "inProgress" | "complete";
|
|
1584
|
+
type StepperType = "vertical" | "horizontal";
|
|
1560
1585
|
/** @deprecated Use `StepperState`. */
|
|
1561
1586
|
type StepperStepVariant = StepperState;
|
|
1562
1587
|
interface StepperStep {
|
|
@@ -1576,6 +1601,8 @@ interface StepperStep {
|
|
|
1576
1601
|
stepNumber?: number;
|
|
1577
1602
|
}
|
|
1578
1603
|
interface StepperProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1604
|
+
/** Layout direction: `vertical` (default) or `horizontal`. */
|
|
1605
|
+
type?: StepperType;
|
|
1579
1606
|
/**
|
|
1580
1607
|
* Preferred single-step API (playground-aligned).
|
|
1581
1608
|
*/
|
|
@@ -1662,7 +1689,8 @@ declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttri
|
|
|
1662
1689
|
* - Optional subtext line below the title
|
|
1663
1690
|
* - Optional up to three CTA buttons on the right
|
|
1664
1691
|
* - Optional close icon button on the right
|
|
1665
|
-
* - Tabs:
|
|
1692
|
+
* - Tabs (withTabs): fixed 64px height; labels vertically centered with ~20px below text (Figma)
|
|
1693
|
+
* - Tabs (titleTabs): underline style below title row
|
|
1666
1694
|
*/
|
|
1667
1695
|
interface PageHeaderTab {
|
|
1668
1696
|
value: string;
|
|
@@ -1695,6 +1723,15 @@ declare const pageHeaderVariants: (props?: ({
|
|
|
1695
1723
|
variant?: "withTitle" | "withTabs" | "titleTabs" | null | undefined;
|
|
1696
1724
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
1697
1725
|
interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, VariantProps<typeof pageHeaderVariants> {
|
|
1726
|
+
/**
|
|
1727
|
+
* Layout type.
|
|
1728
|
+
* @default "withTitle"
|
|
1729
|
+
*/
|
|
1730
|
+
type?: "withTitle" | "withTabs" | "titleTabs";
|
|
1731
|
+
/**
|
|
1732
|
+
* @deprecated Use `type` instead.
|
|
1733
|
+
*/
|
|
1734
|
+
variant?: "withTitle" | "withTabs" | "titleTabs";
|
|
1698
1735
|
/**
|
|
1699
1736
|
* Page title. Required for withTitle and titleTabs variants.
|
|
1700
1737
|
*/
|
|
@@ -1732,7 +1769,7 @@ interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, "title
|
|
|
1732
1769
|
*/
|
|
1733
1770
|
onBackClick?: () => void;
|
|
1734
1771
|
/**
|
|
1735
|
-
* When
|
|
1772
|
+
* When false, hides the title and any inline `breadcrumbs` content.
|
|
1736
1773
|
* Defaults to true (title shown).
|
|
1737
1774
|
*/
|
|
1738
1775
|
showTitle?: boolean;
|
|
@@ -1802,7 +1839,7 @@ interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, "title
|
|
|
1802
1839
|
*/
|
|
1803
1840
|
onMaximiseClick?: () => void;
|
|
1804
1841
|
/**
|
|
1805
|
-
* Optional breadcrumbs content rendered
|
|
1842
|
+
* Optional breadcrumbs content rendered beside the title row.
|
|
1806
1843
|
* Example: `<Breadcrumbs type="L2" title="Additional Details" l1="..." l2="..." />`
|
|
1807
1844
|
*/
|
|
1808
1845
|
breadcrumbs?: React.ReactNode;
|
|
@@ -1827,6 +1864,27 @@ interface BreadcrumbsProps extends Omit<React.HTMLAttributes<HTMLElement>, "titl
|
|
|
1827
1864
|
}
|
|
1828
1865
|
declare const Breadcrumbs: React.ForwardRefExoticComponent<BreadcrumbsProps & React.RefAttributes<HTMLElement>>;
|
|
1829
1866
|
|
|
1867
|
+
/**
|
|
1868
|
+
* PageFooter Pattern
|
|
1869
|
+
*
|
|
1870
|
+
* Composes primitives (Button) for page bottom layout.
|
|
1871
|
+
* Spec: full width of container, height 64px, padding 16, gap 8, elevation top/small shadow.
|
|
1872
|
+
* Default: primary small "Convert" button aligned right.
|
|
1873
|
+
* Actions follow same pattern as PageHeader: primaryAction + secondaryAction.
|
|
1874
|
+
*
|
|
1875
|
+
* @example Default — built-in single primary button (no props)
|
|
1876
|
+
* ```tsx
|
|
1877
|
+
* <PageFooter />
|
|
1878
|
+
* ```
|
|
1879
|
+
*
|
|
1880
|
+
* @example With secondary CTA — pass both `secondaryAction` (left) and `primaryAction` (right)
|
|
1881
|
+
* ```tsx
|
|
1882
|
+
* <PageFooter
|
|
1883
|
+
* secondaryAction={{ label: "Cancel", variant: "secondary", onClick: handleCancel }}
|
|
1884
|
+
* primaryAction={{ label: "Convert", variant: "primary", onClick: handleConvert }}
|
|
1885
|
+
* />
|
|
1886
|
+
* ```
|
|
1887
|
+
*/
|
|
1830
1888
|
type PageFooterAction = {
|
|
1831
1889
|
/**
|
|
1832
1890
|
* Visible label for the button.
|
|
@@ -1863,15 +1921,6 @@ interface PageFooterProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1863
1921
|
* Defaults to primary small "Convert" button when neither children nor actions are set.
|
|
1864
1922
|
*/
|
|
1865
1923
|
children?: React.ReactNode;
|
|
1866
|
-
/**
|
|
1867
|
-
* Footer width in pixels.
|
|
1868
|
-
* @default 532
|
|
1869
|
-
*/
|
|
1870
|
-
width?: number;
|
|
1871
|
-
/**
|
|
1872
|
-
* Optional class name for the inner content wrapper (flex container).
|
|
1873
|
-
*/
|
|
1874
|
-
contentClassName?: string;
|
|
1875
1924
|
}
|
|
1876
1925
|
declare const PageFooter: React.ForwardRefExoticComponent<PageFooterProps & React.RefAttributes<HTMLElement>>;
|
|
1877
1926
|
|
|
@@ -1881,11 +1930,17 @@ declare const PageFooter: React.ForwardRefExoticComponent<PageFooterProps & Reac
|
|
|
1881
1930
|
* Collapsible side navigation. Default state shows icons only; hovering expands
|
|
1882
1931
|
* to show labels (hover state). Selected items show a box highlight.
|
|
1883
1932
|
*
|
|
1884
|
-
* -
|
|
1885
|
-
* -
|
|
1886
|
-
* -
|
|
1933
|
+
* - Full viewport height; outer slot reserves `h-screen`, nav clips overflow; bottom utilities pinned.
|
|
1934
|
+
* - Default: collapsed 48px wide, sticky left; hover expands to the right only.
|
|
1935
|
+
* - Hover: expanded 196px wide, navy rail bg, shadow-elevation-right-sm. Sticky: expanded without shadow.
|
|
1936
|
+
* - Selected item: 36×36 (collapsed) or full-width (expanded), navy.700 surface, radius 8px (rounded-sm), shadow-elevation-bottom-sm.
|
|
1887
1937
|
*
|
|
1888
1938
|
* Logo 36×28. Text: 12px, weight 500, line-height 16px.
|
|
1939
|
+
*
|
|
1940
|
+
* Bottom utilities are fixed: Search, Notification, Settings, Profile
|
|
1941
|
+
* ({@link SIDE_MENU_UTILITY_ITEM_IDS}). Pass only `topGroups` for navigation.
|
|
1942
|
+
*
|
|
1943
|
+
* Each nav row button exposes `data-sidemenu-item={id}` for anchoring submenus/flyouts in app code.
|
|
1889
1944
|
*/
|
|
1890
1945
|
/**
|
|
1891
1946
|
* Data for one row in a {@link SideMenuGroup}.
|
|
@@ -1914,13 +1969,14 @@ interface SideMenuItemGroup {
|
|
|
1914
1969
|
items: SideMenuNavItem[];
|
|
1915
1970
|
showGroup?: boolean;
|
|
1916
1971
|
}
|
|
1972
|
+
/** Fixed utility row IDs rendered at the bottom of every {@link SideMenu}. */
|
|
1973
|
+
declare const SIDE_MENU_UTILITY_ITEM_IDS: readonly ["search", "notification", "settings", "profile"];
|
|
1974
|
+
type SideMenuUtilityItemId = (typeof SIDE_MENU_UTILITY_ITEM_IDS)[number];
|
|
1917
1975
|
interface SideMenuProps extends Omit<React.HTMLAttributes<HTMLElement>, "children">, VariantProps<typeof sideMenuVariants> {
|
|
1918
1976
|
/** Logo element (e.g. img 36×28) */
|
|
1919
1977
|
logo: React.ReactNode;
|
|
1920
1978
|
/** Top groups of nav rows (e.g., AI Services, Compute, Storage). */
|
|
1921
1979
|
topGroups: SideMenuItemGroup[];
|
|
1922
|
-
/** Bottom groups of nav rows (e.g., utilities/profile section). */
|
|
1923
|
-
bottomGroups: SideMenuItemGroup[];
|
|
1924
1980
|
/** ID of currently selected item (controlled). Omit for uncontrolled; use defaultSelectedId for initial. */
|
|
1925
1981
|
selectedId?: string;
|
|
1926
1982
|
/** Initial selected ID when uncontrolled. Ignored if selectedId is provided. */
|
|
@@ -1928,8 +1984,7 @@ interface SideMenuProps extends Omit<React.HTMLAttributes<HTMLElement>, "childre
|
|
|
1928
1984
|
/** Controlled expanded state. When undefined and variant is default, expands on hover. */
|
|
1929
1985
|
expanded?: boolean;
|
|
1930
1986
|
/**
|
|
1931
|
-
*
|
|
1932
|
-
* Applies only when `state` is `hover`, `selected`, or `sticky`.
|
|
1987
|
+
* @deprecated No longer used. Scrollbar appears only when expanded (hover/selected/sticky).
|
|
1933
1988
|
*/
|
|
1934
1989
|
showScrollbar?: boolean;
|
|
1935
1990
|
/** Callback when an item is clicked */
|
|
@@ -1975,7 +2030,7 @@ interface SideMenuItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
1975
2030
|
declare const SideMenuItem: React.ForwardRefExoticComponent<SideMenuItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1976
2031
|
|
|
1977
2032
|
/**
|
|
1978
|
-
* Upload Pattern
|
|
2033
|
+
* Upload Pattern – Stage 1: File uploader
|
|
1979
2034
|
*
|
|
1980
2035
|
* Token-based, accessible file uploader pattern with:
|
|
1981
2036
|
* - Label (12px, weight 500, line-height 16)
|
|
@@ -2019,7 +2074,7 @@ interface UploadFileItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
2019
2074
|
fileName: string;
|
|
2020
2075
|
/** File size or status line (e.g. "5.5MB"). 12px, weight 400, line-height 16, neutral-600. When failed, show "Upload failed" in red-800. */
|
|
2021
2076
|
fileSize?: string;
|
|
2022
|
-
/** Current progress 0
|
|
2077
|
+
/** Current progress 0–100 (for uploading/complete). Hidden when status is "failed". */
|
|
2023
2078
|
process?: number;
|
|
2024
2079
|
/** @deprecated Use `process`. */
|
|
2025
2080
|
progress?: number;
|
|
@@ -2031,9 +2086,9 @@ interface UploadFileItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
2031
2086
|
onDelete?: () => void;
|
|
2032
2087
|
}
|
|
2033
2088
|
/**
|
|
2034
|
-
* UploadFileItem
|
|
2035
|
-
* Box: 536
|
|
2036
|
-
* Left: DocumentPdf 24
|
|
2089
|
+
* UploadFileItem – single file row in the upload pattern.
|
|
2090
|
+
* Box: 536×100 (min), border neutral-300 (red-800 when failed), radius 12px (tokens rounded-md), padding 16, gap 8.
|
|
2091
|
+
* Left: DocumentPdf 24×24, fileName (14/500/24 neutral-1100), fileSize or "Upload failed" (12/400/16).
|
|
2037
2092
|
* Right: uploading = Close + %; complete = tickmarkFilled + Delete + 100%; failed = Retry + Delete.
|
|
2038
2093
|
* Progress bar below when not failed (ProgressBar primitive, 10% / 50% / 100%).
|
|
2039
2094
|
*/
|
|
@@ -2058,4 +2113,4 @@ type Size = "sm" | "md" | "lg";
|
|
|
2058
2113
|
type Variant = "primary" | "secondary" | "outline" | "ghost";
|
|
2059
2114
|
type ColorScheme = "primary" | "secondary" | "success" | "error" | "warning" | "info";
|
|
2060
2115
|
|
|
2061
|
-
export { Avatar, Badge, type BaseComponentProps, Breadcrumbs, type BreadcrumbsProps, type BreadcrumbsType, 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, type MenuItemProps, 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, SideMenuItem, type SideMenuItemGroup, type SideMenuItemProps, type SideMenuNavItem, type SideMenuProps, type Size, Skeleton, Stepper, type StepperProps, type StepperState, 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 };
|
|
2116
|
+
export { Avatar, Badge, type BaseComponentProps, Breadcrumbs, type BreadcrumbsProps, type BreadcrumbsType, 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, type MenuItemProps, 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, SIDE_MENU_UTILITY_ITEM_IDS, SearchField, SideMenu, SideMenuItem, type SideMenuItemGroup, type SideMenuItemProps, type SideMenuNavItem, type SideMenuProps, type SideMenuUtilityItemId, type Size, Skeleton, Stepper, type StepperProps, type StepperState, type StepperStep, type StepperStepVariant, type StepperType, 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 };
|