@jonapin006/tiger 1.0.41 → 1.0.43

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: {
@@ -135,6 +130,10 @@ export declare interface ThemeGeometryConfig {
135
130
  badges: (Record<ComponentSize.Small | ComponentSize.Medium, {
136
131
  container: string;
137
132
  }> & {
133
+ typographyMappings: {
134
+ small: TypographySize;
135
+ medium: TypographySize;
136
+ };
138
137
  typography: string;
139
138
  baseStyles: string;
140
139
  });
@@ -142,13 +141,7 @@ export declare interface ThemeGeometryConfig {
142
141
  size: string;
143
142
  contentSize: string;
144
143
  }> & {
145
- typographyMappings: {
146
- none: ComponentSize;
147
- small: ComponentSize;
148
- medium: ComponentSize;
149
- large: ComponentSize;
150
- xlarge: ComponentSize;
151
- };
144
+ typographyMappings: ComponentSizeToTypography;
152
145
  wrapper: string;
153
146
  disabled: string;
154
147
  segment: {
@@ -180,26 +173,19 @@ export declare interface ThemeGeometryConfig {
180
173
  corner: string;
181
174
  padding: string;
182
175
  }> & {
183
- typographyMappings: {
184
- none: ComponentSize;
185
- small: ComponentSize;
186
- medium: ComponentSize;
187
- large: ComponentSize;
188
- xlarge: ComponentSize;
189
- };
176
+ typographyMappings: ComponentSizeToTypography;
190
177
  baseStyles: string;
191
178
  interactiveStyles: string;
192
179
  borderStyle: string;
193
180
  });
194
- checkbox: (Record<ComponentSize.None | ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large, {
181
+ checkbox: (Record<ComponentSize.Small | ComponentSize.Medium | ComponentSize.Large, {
195
182
  size: string;
196
183
  iconSize: number;
197
184
  }> & {
198
185
  typographyMappings: {
199
- none: ComponentSize;
200
- small: ComponentSize;
201
- medium: ComponentSize;
202
- large: ComponentSize;
186
+ small: TypographySize;
187
+ medium: TypographySize;
188
+ large: TypographySize;
203
189
  };
204
190
  disabledStyles: string;
205
191
  icon: {
@@ -214,20 +200,14 @@ export declare interface ThemeGeometryConfig {
214
200
  transition: string;
215
201
  interactiveStyles: string;
216
202
  typographyMappings: {
217
- default: ComponentSize;
203
+ default: TypographySize;
218
204
  };
219
205
  };
220
206
  input: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
221
207
  size: string;
222
208
  }> & {
223
209
  baseStyles: string;
224
- typographyMappings: {
225
- none: ComponentSize;
226
- small: ComponentSize;
227
- medium: ComponentSize;
228
- large: ComponentSize;
229
- xlarge: ComponentSize;
230
- };
210
+ typographyMappings: ComponentSizeToTypography;
231
211
  });
232
212
  list: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
233
213
  size: string;
@@ -238,13 +218,7 @@ export declare interface ThemeGeometryConfig {
238
218
  transition: string;
239
219
  itemCorner: string;
240
220
  containerCorner: string;
241
- typographyMappings: {
242
- none: ComponentSize;
243
- small: ComponentSize;
244
- medium: ComponentSize;
245
- large: ComponentSize;
246
- xlarge: ComponentSize;
247
- };
221
+ typographyMappings: ComponentSizeToTypography;
248
222
  itemHoverResetColor: string;
249
223
  typographyInherit: string;
250
224
  });
@@ -257,9 +231,8 @@ export declare interface ThemeGeometryConfig {
257
231
  actionsWrapper: string;
258
232
  iconSize: string;
259
233
  typographyMappings: {
260
- none: ComponentSize;
261
- title: ComponentSize;
262
- description: ComponentSize;
234
+ title: TypographySize;
235
+ description: TypographySize;
263
236
  };
264
237
  titleExtra: string;
265
238
  descriptionExtra: string;
@@ -288,9 +261,8 @@ export declare interface ThemeGeometryConfig {
288
261
  dataBorder: string;
289
262
  dataTypography: string;
290
263
  typographyMappings: {
291
- none: ComponentSize;
292
- header: ComponentSize;
293
- data: ComponentSize;
264
+ header: TypographySize;
265
+ data: TypographySize;
294
266
  };
295
267
  });
296
268
  modal: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
@@ -306,11 +278,7 @@ export declare interface ThemeGeometryConfig {
306
278
  closeButton: string;
307
279
  titleExtra: string;
308
280
  footerBorder: string;
309
- typographyMappings: {
310
- none: ComponentSize;
311
- title: ComponentSize;
312
- content: ComponentSize;
313
- };
281
+ typographyMappings: ComponentSizeToTypography;
314
282
  });
315
283
  progress: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
316
284
  height: string;
@@ -327,19 +295,13 @@ export declare interface ThemeGeometryConfig {
327
295
  stepEffect: string;
328
296
  valueContainer: string;
329
297
  valueStyles: string;
330
- typographyMappings: Record<'none' | 'small' | 'medium' | 'large' | 'xlarge', ComponentSize>;
298
+ typographyMappings: ComponentSizeToTypography;
331
299
  });
332
300
  dropdown: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
333
301
  size: string;
334
302
  }> & {
335
303
  contentPositioning: string;
336
- typographyMappings: {
337
- none: ComponentSize;
338
- small: ComponentSize;
339
- medium: ComponentSize;
340
- large: ComponentSize;
341
- xlarge: ComponentSize;
342
- };
304
+ typographyMappings: ComponentSizeToTypography;
343
305
  });
344
306
  stack: (Record<Exclude<ComponentSize, ComponentSize.Xsmall>, {
345
307
  gap: string;
@@ -434,6 +396,10 @@ export declare interface ThemeGeometryConfig {
434
396
  title: string;
435
397
  descriptionContainer: string;
436
398
  actionsContainer: string;
399
+ typographyMappings: {
400
+ medium: TypographySize.Medium;
401
+ large: TypographySize.Large;
402
+ };
437
403
  };
438
404
  layout: {
439
405
  bodyWrapper: string;
@@ -669,6 +635,7 @@ export declare const TigerBadge: default_2.FC<TigerBadgeProps>;
669
635
  declare interface TigerBadgeProps extends BaseComponentProps {
670
636
  variant?: TigerBadgeVariant;
671
637
  size?: ComponentSize.Small | ComponentSize.Medium;
638
+ typographySize?: TypographySize;
672
639
  }
673
640
 
674
641
  export declare enum TigerBadgeVariant {
@@ -768,12 +735,14 @@ export declare const TigerList: default_2.FC<TigerListProps>;
768
735
  export declare const TigerListItem: default_2.FC<TigerListItemProps>;
769
736
 
770
737
  declare interface TigerListItemProps extends Omit<SizedComponentProps, 'size'> {
771
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
738
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
739
+ typographySize?: TypographySize;
772
740
  icon?: default_2.ReactNode;
773
741
  }
774
742
 
775
743
  declare interface TigerListProps extends Omit<SizedComponentProps, 'size'> {
776
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
744
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
745
+ typographySize?: TypographySize;
777
746
  divided?: boolean;
778
747
  }
779
748
 
@@ -786,6 +755,7 @@ export declare interface TigerMessageProps extends BaseComponentProps {
786
755
  variant?: TigerMessageVariant;
787
756
  action?: default_2.ReactNode;
788
757
  onClose?: () => void;
758
+ typographySize?: TypographySize;
789
759
  }
790
760
 
791
761
  export declare enum TigerMessageVariant {
@@ -804,6 +774,7 @@ export declare interface TigerModalProps extends BaseComponentProps {
804
774
  title?: string;
805
775
  footer?: default_2.ReactNode;
806
776
  size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
777
+ typographySize?: TypographySize;
807
778
  showCloseButton?: boolean;
808
779
  }
809
780
 
@@ -816,6 +787,7 @@ declare interface TigerProgressProps {
816
787
  variant?: ProgressVariant;
817
788
  max?: number;
818
789
  size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
790
+ typographySize?: TypographySize;
819
791
  showValue?: boolean;
820
792
  className?: string;
821
793
  }
@@ -829,6 +801,7 @@ export declare interface TigerSidebarProps {
829
801
  header?: default_2.ReactNode;
830
802
  footer?: default_2.ReactNode;
831
803
  className?: string;
804
+ typographySize?: TypographySize;
832
805
  }
833
806
 
834
807
  export declare const TigerStack: default_2.FC<TigerStackProps>;
@@ -870,7 +843,7 @@ export declare interface TigerTabItem {
870
843
  export declare const TigerTable: default_2.FC<TigerTableProps>;
871
844
 
872
845
  declare interface TigerTableProps extends BaseComponentProps {
873
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
846
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
874
847
  }
875
848
 
876
849
  export declare const TigerTabs: default_2.FC<TigerTabsProps>;
@@ -881,7 +854,8 @@ export declare interface TigerTabsProps extends VariantComponentProps<TigerTabsV
881
854
  defaultActiveId?: string;
882
855
  onChange?: (id: string) => void;
883
856
  fullWidth?: boolean;
884
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
857
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
858
+ typographySize?: TypographySize;
885
859
  }
886
860
 
887
861
  export declare enum TigerTabsVariant {
@@ -893,13 +867,14 @@ export declare enum TigerTabsVariant {
893
867
  export declare const TigerTbody: default_2.FC<TigerTbodyProps>;
894
868
 
895
869
  declare interface TigerTbodyProps extends BaseComponentProps {
896
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
870
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
897
871
  }
898
872
 
899
873
  export declare const TigerTd: default_2.FC<TigerTdProps>;
900
874
 
901
875
  declare interface TigerTdProps extends default_2.TdHTMLAttributes<HTMLTableCellElement> {
902
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
876
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
877
+ typographySize?: TypographySize;
903
878
  }
904
879
 
905
880
  export declare const TigerTh: default_2.FC<TigerThProps>;
@@ -907,11 +882,12 @@ export declare const TigerTh: default_2.FC<TigerThProps>;
907
882
  export declare const TigerThead: default_2.FC<TigerTheadProps>;
908
883
 
909
884
  declare interface TigerTheadProps extends BaseComponentProps {
910
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
885
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
911
886
  }
912
887
 
913
888
  declare interface TigerThProps extends default_2.ThHTMLAttributes<HTMLTableHeaderCellElement> {
914
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
889
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
890
+ typographySize?: TypographySize;
915
891
  }
916
892
 
917
893
  export declare const TigerThumbnail: default_2.FC<TigerThumbnailProps>;
@@ -948,6 +924,7 @@ declare interface TigerToastItem {
948
924
 
949
925
  declare interface TigerToastProps extends TigerToastItem {
950
926
  onClose: () => void;
927
+ typographySize?: TypographySize;
951
928
  }
952
929
 
953
930
  declare type TigerToastType = 'success' | 'error' | 'info' | 'warning' | 'neutral';
@@ -959,20 +936,22 @@ export declare interface TigerTopBarProps {
959
936
  description?: default_2.ReactNode;
960
937
  actions?: default_2.ReactNode;
961
938
  className?: string;
939
+ titleTypographySize?: TypographySize;
940
+ descriptionTypographySize?: TypographySize;
962
941
  }
963
942
 
964
943
  export declare const TigerTr: default_2.FC<TigerTrProps>;
965
944
 
966
945
  declare interface TigerTrProps extends BaseComponentProps {
967
946
  isHeader?: boolean;
968
- size?: Exclude<ComponentSize, ComponentSize.Xsmall>;
947
+ size?: Exclude<ComponentSize, ComponentSize.Xsmall | ComponentSize.None>;
969
948
  }
970
949
 
971
950
  export declare const TigerTypography: default_2.FC<TigerTypographyProps>;
972
951
 
973
952
  declare interface TigerTypographyProps {
974
953
  children: default_2.ReactNode;
975
- size?: ComponentSize;
954
+ typographySize?: TypographySize;
976
955
  variant?: 'h1' | 'h2' | 'h3' | 'p' | 'span';
977
956
  bold?: boolean;
978
957
  italic?: boolean;
@@ -981,6 +960,14 @@ declare interface TigerTypographyProps {
981
960
  id?: string;
982
961
  }
983
962
 
963
+ export declare enum TypographySize {
964
+ Xsmall = "xsmall",
965
+ Small = "small",
966
+ Medium = "medium",
967
+ Large = "large",
968
+ Xlarge = "xlarge"
969
+ }
970
+
984
971
  export declare const useTheme: () => ThemeContextType;
985
972
 
986
973
  export declare interface VariantComponentProps<T = string> extends SizedComponentProps {