@vaneui/ui 0.0.17 → 0.0.18

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.
@@ -259,25 +259,25 @@ const positionClasses = {
259
259
  static: "static"
260
260
  };
261
261
  const shadowClasses = {
262
- xs: "shadow-xs",
263
- sm: "shadow-sm",
264
- md: "shadow-md",
265
- lg: "shadow-lg",
266
- xl: "shadow-xl"
262
+ xs: "shadow-2xs",
263
+ sm: "shadow-xs",
264
+ md: "shadow-sm",
265
+ lg: "shadow-md",
266
+ xl: "shadow-lg"
267
267
  };
268
268
  const hoverShadowClasses = {
269
- xs: "hover:shadow-sm",
270
- sm: "hover:shadow-md",
271
- md: "hover:shadow-lg",
272
- lg: "hover:shadow-xl",
273
- xl: "hover:shadow-2xl"
269
+ xs: "hover:shadow-xs",
270
+ sm: "hover:shadow-sm",
271
+ md: "hover:shadow-md",
272
+ lg: "hover:shadow-lg",
273
+ xl: "hover:shadow-xl"
274
274
  };
275
275
  const activeShadowClasses = {
276
- xs: "active:shadow-sm",
277
- sm: "active:shadow-md",
278
- md: "active:shadow-lg",
279
- lg: "active:shadow-xl",
280
- xl: "active:shadow-2xl"
276
+ xs: "active:shadow-xs",
277
+ sm: "active:shadow-sm",
278
+ md: "active:shadow-md",
279
+ lg: "active:shadow-lg",
280
+ xl: "active:shadow-xl"
281
281
  };
282
282
  const noRingModeClasses = {
283
283
  base: "ring-0",
@@ -333,75 +333,6 @@ class HideTheme extends BaseTheme {
333
333
  }
334
334
  HideTheme.defaultClasses = hideClasses;
335
335
 
336
- const isObject = (item) => {
337
- return item !== null && typeof item === 'object' && !Array.isArray(item);
338
- };
339
- const deepMerge = (target, source) => {
340
- const output = Object.assign(Object.create(Object.getPrototypeOf(target)), target);
341
- for (const key in source) {
342
- if (Object.prototype.hasOwnProperty.call(source, key)) {
343
- const sourceValue = source[key];
344
- const targetValue = output[key];
345
- if (sourceValue === undefined) {
346
- continue;
347
- }
348
- // Special case: If the key is 'defaults', use the contextual mergeDefaults function.
349
- if (key === 'defaults' &&
350
- isObject(targetValue) &&
351
- isObject(sourceValue)) {
352
- output[key] = mergeDefaults(targetValue, sourceValue);
353
- }
354
- // For all other objects, use the standard recursive deep merge.
355
- else if (isObject(targetValue) && isObject(sourceValue)) {
356
- output[key] = deepMerge(targetValue, sourceValue);
357
- }
358
- // For non-object values, just assign the value from the source.
359
- else {
360
- output[key] = sourceValue;
361
- }
362
- }
363
- }
364
- return output;
365
- };
366
- const deepClone = (source) => {
367
- if (!isObject(source)) {
368
- return source;
369
- }
370
- const output = Object.assign(Object.create(Object.getPrototypeOf(source)), source);
371
- for (const key in output) {
372
- if (Object.prototype.hasOwnProperty.call(output, key)) {
373
- output[key] = deepClone(output[key]);
374
- }
375
- }
376
- return output;
377
- };
378
- const findGroup = (key) => EXCLUSIVE_KEY_GROUPS.find(group => group.includes(key));
379
- const mergeDefaults = (baseDefaults, overrideDefaults) => {
380
- const finalDefaults = { ...baseDefaults };
381
- // Iterate over the override keys to apply them.
382
- for (const key in overrideDefaults) {
383
- if (Object.prototype.hasOwnProperty.call(overrideDefaults, key)) {
384
- const overrideValue = overrideDefaults[key];
385
- // If the override is setting a key to true...
386
- if (overrideValue) {
387
- // Find the exclusive group this key belongs to (e.g., SIZE_KEYS).
388
- const group = findGroup(key);
389
- // If the key is part of an exclusive group...
390
- if (group) {
391
- // ...set all other keys in that group to false.
392
- group.forEach(groupKey => {
393
- if (groupKey !== key) {
394
- finalDefaults[groupKey] = false;
395
- }
396
- });
397
- }
398
- }
399
- finalDefaults[key] = overrideValue;
400
- }
401
- }
402
- return finalDefaults;
403
- };
404
-
405
336
  class ItemsTheme extends BaseTheme {
406
337
  constructor(initialConfig) {
407
338
  super();
@@ -530,6 +461,21 @@ const textSizeClasses = {
530
461
  xl: "text-xl",
531
462
  };
532
463
 
464
+ class FontStyleTheme extends BaseTheme {
465
+ constructor(initial) {
466
+ super();
467
+ FONT_STYLE_KEYS.forEach((key) => {
468
+ var _a;
469
+ this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : FontStyleTheme.defaultClasses[key];
470
+ });
471
+ }
472
+ getClasses(props, defaults) {
473
+ const key = pickKey(props, defaults, FONT_STYLE_KEYS);
474
+ return [key ? this[key] : '']; // No default for font style
475
+ }
476
+ }
477
+ FontStyleTheme.defaultClasses = fontStyleClasses;
478
+
533
479
  class FontFamilyTheme extends BaseTheme {
534
480
  constructor(initial) {
535
481
  super();
@@ -560,21 +506,6 @@ class FontWeightTheme extends BaseTheme {
560
506
  }
561
507
  FontWeightTheme.defaultClasses = fontWeightClasses;
562
508
 
563
- class FontStyleTheme extends BaseTheme {
564
- constructor(initial) {
565
- super();
566
- FONT_STYLE_KEYS.forEach((key) => {
567
- var _a;
568
- this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : FontStyleTheme.defaultClasses[key];
569
- });
570
- }
571
- getClasses(props, defaults) {
572
- const key = pickKey(props, defaults, FONT_STYLE_KEYS);
573
- return [key ? this[key] : '']; // No default for font style
574
- }
575
- }
576
- FontStyleTheme.defaultClasses = fontStyleClasses;
577
-
578
509
  class TextDecorationTheme extends BaseTheme {
579
510
  constructor(initial) {
580
511
  super();
@@ -620,6 +551,75 @@ class TextAlignTheme extends BaseTheme {
620
551
  }
621
552
  TextAlignTheme.defaultClasses = textAlignClasses;
622
553
 
554
+ const isObject = (item) => {
555
+ return item !== null && typeof item === 'object' && !Array.isArray(item);
556
+ };
557
+ const deepMerge = (target, source) => {
558
+ const output = Object.assign(Object.create(Object.getPrototypeOf(target)), target);
559
+ for (const key in source) {
560
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
561
+ const sourceValue = source[key];
562
+ const targetValue = output[key];
563
+ if (sourceValue === undefined) {
564
+ continue;
565
+ }
566
+ // Special case: If the key is 'defaults', use the contextual mergeDefaults function.
567
+ if (key === 'defaults' &&
568
+ isObject(targetValue) &&
569
+ isObject(sourceValue)) {
570
+ output[key] = mergeDefaults(targetValue, sourceValue);
571
+ }
572
+ // For all other objects, use the standard recursive deep merge.
573
+ else if (isObject(targetValue) && isObject(sourceValue)) {
574
+ output[key] = deepMerge(targetValue, sourceValue);
575
+ }
576
+ // For non-object values, just assign the value from the source.
577
+ else {
578
+ output[key] = sourceValue;
579
+ }
580
+ }
581
+ }
582
+ return output;
583
+ };
584
+ const deepClone = (source) => {
585
+ if (!isObject(source)) {
586
+ return source;
587
+ }
588
+ const output = Object.assign(Object.create(Object.getPrototypeOf(source)), source);
589
+ for (const key in output) {
590
+ if (Object.prototype.hasOwnProperty.call(output, key)) {
591
+ output[key] = deepClone(output[key]);
592
+ }
593
+ }
594
+ return output;
595
+ };
596
+ const findGroup = (key) => EXCLUSIVE_KEY_GROUPS.find(group => group.includes(key));
597
+ const mergeDefaults = (baseDefaults, overrideDefaults) => {
598
+ const finalDefaults = { ...baseDefaults };
599
+ // Iterate over the override keys to apply them.
600
+ for (const key in overrideDefaults) {
601
+ if (Object.prototype.hasOwnProperty.call(overrideDefaults, key)) {
602
+ const overrideValue = overrideDefaults[key];
603
+ // If the override is setting a key to true...
604
+ if (overrideValue) {
605
+ // Find the exclusive group this key belongs to (e.g., SIZE_KEYS).
606
+ const group = findGroup(key);
607
+ // If the key is part of an exclusive group...
608
+ if (group) {
609
+ // ...set all other keys in that group to false.
610
+ group.forEach(groupKey => {
611
+ if (groupKey !== key) {
612
+ finalDefaults[groupKey] = false;
613
+ }
614
+ });
615
+ }
616
+ }
617
+ finalDefaults[key] = overrideValue;
618
+ }
619
+ }
620
+ return finalDefaults;
621
+ };
622
+
623
623
  class ComponentTheme {
624
624
  constructor(tag, base, subThemes, defaults = {}) {
625
625
  this.tag = tag;
@@ -786,10 +786,15 @@ BorderTheme.defaultClasses = {
786
786
  active: "active:border",
787
787
  },
788
788
  noBorder: {
789
- base: "border-none",
790
- hover: "hover:border-none",
791
- active: "active:border-none",
789
+ base: "",
790
+ hover: "",
791
+ active: "",
792
792
  },
793
+ //noBorder: {
794
+ // base: "border-none",
795
+ // hover: "hover:border-none",
796
+ // active: "active:border-none",
797
+ //},
793
798
  };
794
799
 
795
800
  class RingTheme extends BaseTheme {
@@ -1157,8 +1162,8 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
1157
1162
  px: new PxTheme({
1158
1163
  padding: {
1159
1164
  xs: 'px-2',
1160
- sm: 'px-2.5',
1161
- md: 'px-3.5',
1165
+ sm: 'px-3',
1166
+ md: 'px-4',
1162
1167
  lg: 'px-5',
1163
1168
  xl: 'px-6',
1164
1169
  }
@@ -1168,25 +1173,25 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
1168
1173
  xs: 'py-1',
1169
1174
  sm: 'py-1.5',
1170
1175
  md: 'py-2',
1171
- lg: 'py-3',
1172
- xl: 'py-4',
1176
+ lg: 'py-2.5',
1177
+ xl: 'py-3',
1173
1178
  }
1174
1179
  }),
1175
1180
  gap: new GapTheme({
1176
1181
  gap: {
1177
- xs: 'gap-1.5',
1178
- sm: 'gap-2',
1179
- md: 'gap-3',
1180
- lg: 'gap-4',
1181
- xl: 'gap-5',
1182
+ xs: 'gap-1',
1183
+ sm: 'gap-1.5',
1184
+ md: 'gap-2',
1185
+ lg: 'gap-2.5',
1186
+ xl: 'gap-3',
1182
1187
  }
1183
1188
  }),
1184
1189
  text: new SizeTheme({
1185
- xs: 'text-xs/5',
1186
- sm: 'text-sm/5',
1190
+ xs: 'text-xs',
1191
+ sm: 'text-sm',
1187
1192
  md: 'text-base',
1188
- lg: 'text-lg/6',
1189
- xl: 'text-xl/6',
1193
+ lg: 'text-lg',
1194
+ xl: 'text-xl',
1190
1195
  }),
1191
1196
  shadow: new ShadowTheme(),
1192
1197
  },
@@ -1229,36 +1234,36 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit inline-flex tr
1229
1234
  px: new PxTheme({
1230
1235
  padding: {
1231
1236
  xs: "px-2",
1232
- sm: "px-2.5",
1233
- md: "px-3.5",
1237
+ sm: "px-3",
1238
+ md: "px-4",
1234
1239
  lg: "px-5",
1235
1240
  xl: "px-6"
1236
1241
  }
1237
1242
  }),
1238
1243
  py: new PyTheme({
1239
1244
  padding: {
1240
- xs: "py-1",
1241
- sm: "py-1.5",
1242
- md: "py-2",
1243
- lg: "py-3",
1244
- xl: "py-4"
1245
+ xs: 'py-1',
1246
+ sm: 'py-1.5',
1247
+ md: 'py-2',
1248
+ lg: 'py-2.5',
1249
+ xl: 'py-3',
1245
1250
  }
1246
1251
  }),
1247
1252
  gap: new GapTheme({
1248
1253
  gap: {
1249
- xs: "gap-1",
1250
- sm: "gap-1.5",
1251
- md: "gap-2",
1252
- lg: "gap-2.5",
1253
- xl: "gap-3"
1254
+ xs: 'gap-1',
1255
+ sm: 'gap-1.5',
1256
+ md: 'gap-2',
1257
+ lg: 'gap-2.5',
1258
+ xl: 'gap-3',
1254
1259
  }
1255
1260
  }),
1256
1261
  text: new SizeTheme({
1257
- xs: 'text-xs/5',
1258
- sm: 'text-sm/5',
1262
+ xs: 'text-xs',
1263
+ sm: 'text-sm',
1259
1264
  md: 'text-base',
1260
- lg: 'text-lg/6',
1261
- xl: 'text-xl/6',
1265
+ lg: 'text-lg',
1266
+ xl: 'text-xl',
1262
1267
  }),
1263
1268
  shadow: new ShadowTheme(),
1264
1269
  },
@@ -1308,26 +1313,26 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit inline-flex gap
1308
1313
  padding: {
1309
1314
  xs: 'px-2',
1310
1315
  sm: 'px-2.5',
1311
- md: 'px-3.5',
1312
- lg: 'px-5',
1313
- xl: 'px-6',
1316
+ md: 'px-3',
1317
+ lg: 'px-3.5',
1318
+ xl: 'px-4',
1314
1319
  }
1315
1320
  }),
1316
1321
  py: new PyTheme({
1317
1322
  padding: {
1318
- xs: 'py-1',
1319
- sm: 'py-1.5',
1320
- md: 'py-2',
1321
- lg: 'py-3',
1322
- xl: 'py-4',
1323
+ xs: 'py-0.5',
1324
+ sm: 'py-1',
1325
+ md: 'py-1.5',
1326
+ lg: 'py-2',
1327
+ xl: 'py-2.5',
1323
1328
  }
1324
1329
  }),
1325
1330
  text: new SizeTheme({
1326
1331
  xs: 'text-xs',
1327
1332
  sm: 'text-sm',
1328
- md: 'text-sm',
1329
- lg: 'text-base',
1330
- xl: 'text-base',
1333
+ md: 'text-base',
1334
+ lg: 'text-lg',
1335
+ xl: 'text-xl',
1331
1336
  }),
1332
1337
  gap: new GapTheme({
1333
1338
  gap: {
@@ -1739,18 +1744,18 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex flex-col", {
1739
1744
  }),
1740
1745
  py: new PyTheme({
1741
1746
  padding: {
1742
- xs: 'py-3',
1743
- sm: 'py-5',
1744
- md: 'py-8 max-md:py-5',
1747
+ xs: 'py-4 max-md:py-3',
1748
+ sm: 'py-8 max-md:py-6',
1749
+ md: 'py-12 max-md:py-6',
1745
1750
  lg: 'py-16 max-lg:py-14 max-md:py-12',
1746
1751
  xl: 'py-20 max-lg:py-16 max-md:py-12',
1747
1752
  }
1748
1753
  }),
1749
1754
  gap: new GapTheme({
1750
1755
  gap: {
1751
- xs: 'gap-2',
1752
- sm: 'gap-4',
1753
- md: 'gap-6',
1756
+ xs: 'gap-4',
1757
+ sm: 'gap-6',
1758
+ md: 'gap-8',
1754
1759
  lg: 'gap-12',
1755
1760
  xl: 'gap-16',
1756
1761
  }
@@ -1834,16 +1839,27 @@ const defaultTheme = {
1834
1839
  list: listTheme,
1835
1840
  };
1836
1841
  const ThemeContext = createContext(defaultTheme);
1837
- function ThemeProvider({ children, theme: themeObject = {}, themeOverride }) {
1842
+ function ThemeProvider({ children, theme: themeObject = {}, themeDefaults, themeOverride }) {
1838
1843
  const mergedTheme = useMemo(() => {
1839
- let baseTheme = themeObject
1844
+ let finalTheme = themeObject
1840
1845
  ? deepMerge(defaultTheme, themeObject)
1841
1846
  : defaultTheme;
1842
1847
  if (typeof themeOverride === 'function') {
1843
- const themeToModify = deepClone(baseTheme);
1844
- return themeOverride(themeToModify);
1848
+ const themeToModify = deepClone(finalTheme);
1849
+ finalTheme = themeOverride(themeToModify);
1850
+ }
1851
+ if (themeDefaults !== undefined) {
1852
+ for (const key in themeDefaults) {
1853
+ const componentKey = key;
1854
+ const componentTheme = finalTheme[componentKey];
1855
+ const themeDefault = themeDefaults[componentKey];
1856
+ if (themeDefault !== undefined) {
1857
+ finalTheme[componentKey].defaults =
1858
+ mergeDefaults(componentTheme.defaults, themeDefaults[componentKey]);
1859
+ }
1860
+ }
1845
1861
  }
1846
- return baseTheme;
1862
+ return finalTheme;
1847
1863
  }, [themeObject, themeOverride]);
1848
1864
  return (jsx(ThemeContext.Provider, { value: mergedTheme, children: children }));
1849
1865
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -12,9 +12,11 @@ import { ColTheme } from '../ui/theme/colTheme';
12
12
  import { StackTheme } from '../ui/theme/stackTheme';
13
13
  import { SectionTheme } from "../ui/theme/sectionTheme";
14
14
  import { GridTheme } from "../ui/theme/gridTheme";
15
- import { ButtonProps, GridProps, TypographyComponentProps, CardProps, RowProps, ColProps, StackProps, BadgeProps, ChipProps, DividerProps, ContainerProps, SectionProps } from "../ui/props/props";
15
+ import { BadgeProps, ButtonProps, CardProps, ChipProps, ColProps, ContainerProps, DividerProps, GridProps, RowProps, SectionProps, StackProps, TypographyComponentProps } from "../ui/props/props";
16
16
  import { DeepPartial } from "../utils/deepPartial";
17
- export interface ThemeProps {
17
+ export declare const COMPONENT_KEYS: readonly ["button", "badge", "chip", "card", "divider", "row", "col", "stack", "section", "grid3", "grid4", "pageTitle", "sectionTitle", "title", "text", "link", "list", "listItem"];
18
+ export type ComponentKey = typeof COMPONENT_KEYS[number];
19
+ export interface ThemeProps extends Record<ComponentKey, ComponentTheme<object, object>> {
18
20
  button: ComponentTheme<ButtonProps, ButtonTheme<ButtonProps>>;
19
21
  badge: ComponentTheme<BadgeProps, BadgeTheme<BadgeProps>>;
20
22
  chip: ComponentTheme<ChipProps, ChipTheme<ChipProps>>;
@@ -32,15 +34,17 @@ export interface ThemeProps {
32
34
  title: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
33
35
  text: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
34
36
  link: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
35
- listItem: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
36
37
  list: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
38
+ listItem: ComponentTheme<TypographyComponentProps, TypographyComponentTheme<TypographyComponentProps>>;
37
39
  }
38
40
  export type PartialTheme = DeepPartial<ThemeProps>;
39
41
  export declare const defaultTheme: ThemeProps;
42
+ export type ThemeDefaults = Partial<Record<ComponentKey, Record<string, boolean>>>;
40
43
  export interface ThemeProviderProps {
41
44
  children: React.ReactNode;
42
45
  theme?: PartialTheme;
46
+ themeDefaults?: ThemeDefaults;
43
47
  themeOverride?: (theme: ThemeProps) => ThemeProps;
44
48
  }
45
- export declare function ThemeProvider({ children, theme: themeObject, themeOverride }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare function ThemeProvider({ children, theme: themeObject, themeDefaults, themeOverride }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
46
50
  export declare function useTheme(): ThemeProps;
@@ -4,9 +4,9 @@ import { HideTheme } from "../layout/hideTheme";
4
4
  import { ItemsTheme } from "../layout/itemsTheme";
5
5
  import { JustifyTheme } from "../layout/justifyTheme";
6
6
  import { PositionTheme } from "../layout/positionTheme";
7
+ import { FontStyleTheme } from "../typography/fontStyleTheme";
7
8
  import { FontFamilyTheme } from "../typography/fontFamilyTheme";
8
9
  import { FontWeightTheme } from "../typography/fontWeightTheme";
9
- import { FontStyleTheme } from "../typography/fontStyleTheme";
10
10
  import { TextDecorationTheme } from "../typography/textDecorationTheme";
11
11
  import { TextTransformTheme } from "../typography/textTransformTheme";
12
12
  import { TextAlignTheme } from "../typography/textAlignTheme";
@@ -36,8 +36,8 @@ export interface BaseComponentTheme<P> {
36
36
  export declare class ComponentTheme<P extends object, TThemes extends object> {
37
37
  readonly tag: React.ElementType;
38
38
  readonly base: string;
39
- readonly defaults: Partial<P>;
40
39
  readonly themes: TThemes;
40
+ defaults: Partial<P>;
41
41
  constructor(tag: React.ElementType, base: string, subThemes: DeepPartial<TThemes>, defaults?: Partial<P>);
42
42
  getClasses(props: P, defaults?: Partial<P>): string[];
43
43
  }