@jonapin006/tiger 1.0.41 → 1.0.42

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 CHANGED
@@ -12,7 +12,8 @@ export declare interface BaseComponentProps {
12
12
 
13
13
  declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
14
14
  variant?: TigerButtonVariant;
15
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
15
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
16
+ typographySize?: TypographySize;
16
17
  iconLeft?: default_2.ElementType;
17
18
  iconRight?: default_2.ElementType;
18
19
  fullWidth?: boolean;
@@ -21,6 +22,7 @@ declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonE
21
22
  declare interface CardProps extends SizedComponentProps {
22
23
  onClick?: () => void;
23
24
  size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
25
+ typographySize?: TypographySize;
24
26
  }
25
27
 
26
28
  export declare enum ComponentSize {
@@ -32,6 +34,8 @@ export declare enum ComponentSize {
32
34
  Xlarge = "xlarge"
33
35
  }
34
36
 
37
+ export declare type ComponentSizeToTypography = Record<Exclude<ComponentSize, ComponentSize.None>, TypographySize>;
38
+
35
39
  export declare const glassmorphismTheme: ThemeDefinition;
36
40
 
37
41
  declare interface IconButtonProps extends VariantComponentProps<TigerButtonVariant> {
@@ -93,11 +97,8 @@ export declare interface ThemeDefinition {
93
97
 
94
98
  export declare interface ThemeGeometryConfig {
95
99
  typography: {
96
- none: string;
97
- small: string;
98
- medium: string;
99
- large: string;
100
- xlarge: string;
100
+ [key in TypographySize]: string;
101
+ } & {
101
102
  weights: {
102
103
  bold: string;
103
104
  normal: string;
@@ -110,13 +111,7 @@ export declare interface ThemeGeometryConfig {
110
111
  buttons: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
111
112
  size: string;
112
113
  }> & {
113
- typographyMappings: {
114
- none: ComponentSize;
115
- small: ComponentSize;
116
- medium: ComponentSize;
117
- large: ComponentSize;
118
- xlarge: ComponentSize;
119
- };
114
+ typographyMappings: ComponentSizeToTypography;
120
115
  baseTypography: string;
121
116
  baseStyles: string;
122
117
  layout: {
@@ -142,13 +137,7 @@ export declare interface ThemeGeometryConfig {
142
137
  size: string;
143
138
  contentSize: string;
144
139
  }> & {
145
- typographyMappings: {
146
- none: ComponentSize;
147
- small: ComponentSize;
148
- medium: ComponentSize;
149
- large: ComponentSize;
150
- xlarge: ComponentSize;
151
- };
140
+ typographyMappings: ComponentSizeToTypography;
152
141
  wrapper: string;
153
142
  disabled: string;
154
143
  segment: {
@@ -180,26 +169,19 @@ export declare interface ThemeGeometryConfig {
180
169
  corner: string;
181
170
  padding: string;
182
171
  }> & {
183
- typographyMappings: {
184
- none: ComponentSize;
185
- small: ComponentSize;
186
- medium: ComponentSize;
187
- large: ComponentSize;
188
- xlarge: ComponentSize;
189
- };
172
+ typographyMappings: ComponentSizeToTypography;
190
173
  baseStyles: string;
191
174
  interactiveStyles: string;
192
175
  borderStyle: string;
193
176
  });
194
- checkbox: (Record<ComponentSize.None | ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large, {
177
+ checkbox: (Record<ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large, {
195
178
  size: string;
196
179
  iconSize: number;
197
180
  }> & {
198
181
  typographyMappings: {
199
- none: ComponentSize;
200
- small: ComponentSize;
201
- medium: ComponentSize;
202
- large: ComponentSize;
182
+ small: TypographySize;
183
+ medium: TypographySize;
184
+ large: TypographySize;
203
185
  };
204
186
  disabledStyles: string;
205
187
  icon: {
@@ -214,20 +196,14 @@ export declare interface ThemeGeometryConfig {
214
196
  transition: string;
215
197
  interactiveStyles: string;
216
198
  typographyMappings: {
217
- default: ComponentSize;
199
+ default: TypographySize;
218
200
  };
219
201
  };
220
202
  input: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
221
203
  size: string;
222
204
  }> & {
223
205
  baseStyles: string;
224
- typographyMappings: {
225
- none: ComponentSize;
226
- small: ComponentSize;
227
- medium: ComponentSize;
228
- large: ComponentSize;
229
- xlarge: ComponentSize;
230
- };
206
+ typographyMappings: ComponentSizeToTypography;
231
207
  });
232
208
  list: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
233
209
  size: string;
@@ -238,13 +214,7 @@ export declare interface ThemeGeometryConfig {
238
214
  transition: string;
239
215
  itemCorner: string;
240
216
  containerCorner: string;
241
- typographyMappings: {
242
- none: ComponentSize;
243
- small: ComponentSize;
244
- medium: ComponentSize;
245
- large: ComponentSize;
246
- xlarge: ComponentSize;
247
- };
217
+ typographyMappings: ComponentSizeToTypography;
248
218
  itemHoverResetColor: string;
249
219
  typographyInherit: string;
250
220
  });
@@ -257,9 +227,8 @@ export declare interface ThemeGeometryConfig {
257
227
  actionsWrapper: string;
258
228
  iconSize: string;
259
229
  typographyMappings: {
260
- none: ComponentSize;
261
- title: ComponentSize;
262
- description: ComponentSize;
230
+ title: TypographySize;
231
+ description: TypographySize;
263
232
  };
264
233
  titleExtra: string;
265
234
  descriptionExtra: string;
@@ -288,9 +257,8 @@ export declare interface ThemeGeometryConfig {
288
257
  dataBorder: string;
289
258
  dataTypography: string;
290
259
  typographyMappings: {
291
- none: ComponentSize;
292
- header: ComponentSize;
293
- data: ComponentSize;
260
+ header: TypographySize;
261
+ data: TypographySize;
294
262
  };
295
263
  });
296
264
  modal: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
@@ -306,11 +274,7 @@ export declare interface ThemeGeometryConfig {
306
274
  closeButton: string;
307
275
  titleExtra: string;
308
276
  footerBorder: string;
309
- typographyMappings: {
310
- none: ComponentSize;
311
- title: ComponentSize;
312
- content: ComponentSize;
313
- };
277
+ typographyMappings: ComponentSizeToTypography;
314
278
  });
315
279
  progress: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
316
280
  height: string;
@@ -327,19 +291,13 @@ export declare interface ThemeGeometryConfig {
327
291
  stepEffect: string;
328
292
  valueContainer: string;
329
293
  valueStyles: string;
330
- typographyMappings: Record<'none' | 'small' | 'medium' | 'large' | 'xlarge', ComponentSize>;
294
+ typographyMappings: ComponentSizeToTypography;
331
295
  });
332
296
  dropdown: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
333
297
  size: string;
334
298
  }> & {
335
299
  contentPositioning: string;
336
- typographyMappings: {
337
- none: ComponentSize;
338
- small: ComponentSize;
339
- medium: ComponentSize;
340
- large: ComponentSize;
341
- xlarge: ComponentSize;
342
- };
300
+ typographyMappings: ComponentSizeToTypography;
343
301
  });
344
302
  stack: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
345
303
  gap: string;
@@ -669,6 +627,7 @@ export declare const TigerBadge: default_2.FC<TigerBadgeProps>;
669
627
  declare interface TigerBadgeProps extends BaseComponentProps {
670
628
  variant?: TigerBadgeVariant;
671
629
  size?: ComponentSize.Small | ComponentSize.Medium;
630
+ typographySize?: TypographySize;
672
631
  }
673
632
 
674
633
  export declare enum TigerBadgeVariant {
@@ -768,12 +727,14 @@ export declare const TigerList: default_2.FC<TigerListProps>;
768
727
  export declare const TigerListItem: default_2.FC<TigerListItemProps>;
769
728
 
770
729
  declare interface TigerListItemProps extends Omit<SizedComponentProps, 'size'> {
771
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
730
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
731
+ typographySize?: TypographySize;
772
732
  icon?: default_2.ReactNode;
773
733
  }
774
734
 
775
735
  declare interface TigerListProps extends Omit<SizedComponentProps, 'size'> {
776
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
736
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
737
+ typographySize?: TypographySize;
777
738
  divided?: boolean;
778
739
  }
779
740
 
@@ -786,6 +747,7 @@ export declare interface TigerMessageProps extends BaseComponentProps {
786
747
  variant?: TigerMessageVariant;
787
748
  action?: default_2.ReactNode;
788
749
  onClose?: () => void;
750
+ typographySize?: TypographySize;
789
751
  }
790
752
 
791
753
  export declare enum TigerMessageVariant {
@@ -804,6 +766,7 @@ export declare interface TigerModalProps extends BaseComponentProps {
804
766
  title?: string;
805
767
  footer?: default_2.ReactNode;
806
768
  size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
769
+ typographySize?: TypographySize;
807
770
  showCloseButton?: boolean;
808
771
  }
809
772
 
@@ -815,7 +778,8 @@ declare interface TigerProgressProps {
815
778
  totalSteps?: number;
816
779
  variant?: ProgressVariant;
817
780
  max?: number;
818
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
781
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
782
+ typographySize?: TypographySize;
819
783
  showValue?: boolean;
820
784
  className?: string;
821
785
  }
@@ -829,6 +793,7 @@ export declare interface TigerSidebarProps {
829
793
  header?: default_2.ReactNode;
830
794
  footer?: default_2.ReactNode;
831
795
  className?: string;
796
+ typographySize?: TypographySize;
832
797
  }
833
798
 
834
799
  export declare const TigerStack: default_2.FC<TigerStackProps>;
@@ -870,7 +835,7 @@ export declare interface TigerTabItem {
870
835
  export declare const TigerTable: default_2.FC<TigerTableProps>;
871
836
 
872
837
  declare interface TigerTableProps extends BaseComponentProps {
873
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
838
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
874
839
  }
875
840
 
876
841
  export declare const TigerTabs: default_2.FC<TigerTabsProps>;
@@ -881,7 +846,8 @@ export declare interface TigerTabsProps extends VariantComponentProps<TigerTabsV
881
846
  defaultActiveId?: string;
882
847
  onChange?: (id: string) => void;
883
848
  fullWidth?: boolean;
884
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
849
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
850
+ typographySize?: TypographySize;
885
851
  }
886
852
 
887
853
  export declare enum TigerTabsVariant {
@@ -893,13 +859,14 @@ export declare enum TigerTabsVariant {
893
859
  export declare const TigerTbody: default_2.FC<TigerTbodyProps>;
894
860
 
895
861
  declare interface TigerTbodyProps extends BaseComponentProps {
896
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
862
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
897
863
  }
898
864
 
899
865
  export declare const TigerTd: default_2.FC<TigerTdProps>;
900
866
 
901
867
  declare interface TigerTdProps extends default_2.TdHTMLAttributes<HTMLTableCellElement> {
902
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
868
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
869
+ typographySize?: TypographySize;
903
870
  }
904
871
 
905
872
  export declare const TigerTh: default_2.FC<TigerThProps>;
@@ -907,11 +874,12 @@ export declare const TigerTh: default_2.FC<TigerThProps>;
907
874
  export declare const TigerThead: default_2.FC<TigerTheadProps>;
908
875
 
909
876
  declare interface TigerTheadProps extends BaseComponentProps {
910
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
877
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
911
878
  }
912
879
 
913
880
  declare interface TigerThProps extends default_2.ThHTMLAttributes<HTMLTableHeaderCellElement> {
914
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
881
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
882
+ typographySize?: TypographySize;
915
883
  }
916
884
 
917
885
  export declare const TigerThumbnail: default_2.FC<TigerThumbnailProps>;
@@ -948,6 +916,7 @@ declare interface TigerToastItem {
948
916
 
949
917
  declare interface TigerToastProps extends TigerToastItem {
950
918
  onClose: () => void;
919
+ typographySize?: TypographySize;
951
920
  }
952
921
 
953
922
  declare type TigerToastType = 'success' | 'error' | 'info' | 'warning' | 'neutral';
@@ -959,20 +928,22 @@ export declare interface TigerTopBarProps {
959
928
  description?: default_2.ReactNode;
960
929
  actions?: default_2.ReactNode;
961
930
  className?: string;
931
+ titleTypographySize?: TypographySize;
932
+ descriptionTypographySize?: TypographySize;
962
933
  }
963
934
 
964
935
  export declare const TigerTr: default_2.FC<TigerTrProps>;
965
936
 
966
937
  declare interface TigerTrProps extends BaseComponentProps {
967
938
  isHeader?: boolean;
968
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
939
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
969
940
  }
970
941
 
971
942
  export declare const TigerTypography: default_2.FC<TigerTypographyProps>;
972
943
 
973
944
  declare interface TigerTypographyProps {
974
945
  children: default_2.ReactNode;
975
- size?: ComponentSize;
946
+ typographySize?: TypographySize;
976
947
  variant?: 'h1' | 'h2' | 'h3' | 'p' | 'span';
977
948
  bold?: boolean;
978
949
  italic?: boolean;
@@ -981,6 +952,14 @@ declare interface TigerTypographyProps {
981
952
  id?: string;
982
953
  }
983
954
 
955
+ export declare enum TypographySize {
956
+ Xsmall = "xsmall",
957
+ Small = "small",
958
+ Medium = "medium",
959
+ Large = "large",
960
+ Xlarge = "xlarge"
961
+ }
962
+
984
963
  export declare const useTheme: () => ThemeContextType;
985
964
 
986
965
  export declare interface VariantComponentProps<T = string> extends SizedComponentProps {