@true-engineering/true-react-common-ui-kit 3.53.1 → 3.55.0

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.
Files changed (47) hide show
  1. package/README.md +15 -0
  2. package/dist/components/Button/Button.styles.d.ts +1 -1
  3. package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -1
  4. package/dist/components/FiltersPane/components/FilterInterval/FilterInterval.styles.d.ts +1 -1
  5. package/dist/components/FiltersPane/components/FilterSelect/FilterSelect.styles.d.ts +1 -1
  6. package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.d.ts +2 -2
  7. package/dist/components/List/List.d.ts +1 -1
  8. package/dist/components/List/index.d.ts +2 -1
  9. package/dist/components/List/types.d.ts +4 -0
  10. package/dist/components/Select/index.d.ts +1 -1
  11. package/dist/hooks/index.d.ts +1 -0
  12. package/dist/hooks/use-merge.d.ts +1 -0
  13. package/dist/hooks/use-mixed-styles.d.ts +3 -1
  14. package/dist/hooks/use-tweak-styles.d.ts +5 -5
  15. package/dist/theme/Provider.d.ts +6 -3
  16. package/dist/theme/create-themed-styles.d.ts +2 -0
  17. package/dist/theme/helpers.d.ts +9 -3
  18. package/dist/theme/index.d.ts +2 -0
  19. package/dist/theme/true-jss/ThemedStylesManager.d.ts +18 -0
  20. package/dist/theme/true-jss/TweakStylesManager.d.ts +34 -0
  21. package/dist/theme/true-jss/index.d.ts +2 -0
  22. package/dist/theme/true-jss/jss-context.d.ts +9 -0
  23. package/dist/theme/types.d.ts +4 -2
  24. package/dist/true-react-common-ui-kit.js +3388 -2512
  25. package/dist/true-react-common-ui-kit.js.map +1 -1
  26. package/dist/true-react-common-ui-kit.umd.cjs +3380 -2505
  27. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  28. package/dist/types.d.ts +2 -1
  29. package/package.json +1 -1
  30. package/src/components/List/List.tsx +5 -2
  31. package/src/components/List/index.ts +2 -1
  32. package/src/components/List/types.ts +5 -0
  33. package/src/components/Select/index.ts +1 -1
  34. package/src/hooks/index.ts +1 -0
  35. package/src/hooks/use-merge.ts +8 -0
  36. package/src/hooks/use-mixed-styles.ts +9 -11
  37. package/src/hooks/use-tweak-styles.ts +49 -27
  38. package/src/theme/Provider.tsx +10 -5
  39. package/src/theme/create-themed-styles.ts +78 -0
  40. package/src/theme/helpers.ts +39 -39
  41. package/src/theme/index.ts +2 -0
  42. package/src/theme/true-jss/ThemedStylesManager.ts +92 -0
  43. package/src/theme/true-jss/TweakStylesManager.ts +157 -0
  44. package/src/theme/true-jss/index.ts +2 -0
  45. package/src/theme/true-jss/jss-context.tsx +34 -0
  46. package/src/theme/types.ts +4 -2
  47. package/src/types.ts +2 -1
package/README.md CHANGED
@@ -12,6 +12,21 @@
12
12
 
13
13
  # Release Notes
14
14
 
15
+ ## 3.55.0
16
+
17
+ ### Changes
18
+
19
+ - **Select**: Добавлен экспорт компонента `SelectList`
20
+ - **List**: Для `ListItem` добавлена опция `isHidden`
21
+
22
+ ## 3.54.0
23
+
24
+ ### Changes
25
+
26
+ - **TweakStyles**: Теперь могут быть массивом. Адаптированы типы и хелперы
27
+ - **createThemedStyles**: Добавлен режим `tweakStylesArch="react-jss"`, оптимизирующий работу с tweakStyles
28
+ - **createThemedStyles**: Добавлен режим `tweakStylesArch="true-jss"` (бета)
29
+
15
30
  ## 3.53.1
16
31
 
17
32
  ### Changes
@@ -1,7 +1,7 @@
1
1
  import { ITweakStyles } from '../../theme';
2
2
  import { IThemedPreloaderStyles } from '../ThemedPreloader';
3
3
  import { IButtonSize } from './types';
4
- export declare const useStyles: import("../../theme").IUseStyles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown>;
4
+ export declare const useStyles: import("../../theme").IUseStyles<"content" | "outline" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown>;
5
5
  export declare const getPreloaderStyles: (size: IButtonSize) => IThemedPreloaderStyles | undefined;
6
6
  export type IButtonStyles = ITweakStyles<typeof useStyles, {
7
7
  tweakPreloader: IThemedPreloaderStyles;
@@ -1,3 +1,3 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- export declare const useStyles: import("../../theme").IUseStyles<"input" | "invalid" | "root" | "disabled" | "children" | "checked" | "check" | "labelPositionLeft", unknown>;
2
+ export declare const useStyles: import("../../theme").IUseStyles<"input" | "invalid" | "children" | "root" | "disabled" | "checked" | "check" | "labelPositionLeft", unknown>;
3
3
  export type ICheckboxStyles = ITweakStyles<typeof useStyles>;
@@ -3,7 +3,7 @@ import { IButtonStyles } from '../../../Button';
3
3
  import { IInputStyles } from '../../../Input';
4
4
  export declare const useStyles: import("../../../../theme").IUseStyles<"clear" | "root" | "inputWrapper" | "autosize", unknown>;
5
5
  export declare const inputStyles: IInputStyles;
6
- export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
6
+ export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
7
7
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
8
8
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
9
9
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
@@ -3,7 +3,7 @@ import { IButtonStyles } from '../../../Button';
3
3
  import { ISearchInputStyles } from '../../../SearchInput';
4
4
  export declare const useStyles: import("../../../../theme").IUseStyles<"clear" | "item" | "root" | "icon" | "label" | "preloader" | "footer" | "list" | "labelChosen" | "withoutTopGap" | "withClearButton" | "option" | "panel" | "panelWithFooter" | "dropdownInput" | "nothingFound", unknown>;
5
5
  export declare const searchInputStyles: ISearchInputStyles;
6
- export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
6
+ export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
7
7
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
8
8
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
9
9
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
@@ -2,13 +2,13 @@ import { ITweakStyles } from '../../../../theme';
2
2
  import { IButtonStyles } from '../../../Button';
3
3
  import { IDatePickerStyles } from '../../../DatePicker';
4
4
  export declare const useStyles: import("../../../../theme").IUseStyles<"container" | "root" | "datepicker" | "containerItem" | "btnRow", unknown>;
5
- export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
5
+ export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
6
6
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
7
7
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
8
8
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
9
9
  }>;
10
10
  }>;
11
- export declare const backButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
11
+ export declare const backButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
12
12
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
13
13
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
14
14
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
@@ -1,6 +1,6 @@
1
1
  import { FC, KeyboardEvent, MouseEvent } from 'react';
2
2
  import { ICommonProps } from '../../types';
3
- import { IListItemProps as IListItem } from './components';
3
+ import { IListItem } from './types';
4
4
  import { IListStyles } from './List.styles';
5
5
  export interface IListProps extends ICommonProps<IListStyles> {
6
6
  items: IListItem[];
@@ -1,3 +1,4 @@
1
1
  export * from './List';
2
2
  export type { IListStyles } from './List.styles';
3
- export { type IListItemStyles, type IListItemProps as IListItem, ListItem } from './components';
3
+ export type { IListItem } from './types';
4
+ export { type IListItemStyles, type IListItemProps, ListItem } from './components';
@@ -0,0 +1,4 @@
1
+ import { IListItemProps } from './components';
2
+ export interface IListItem extends IListItemProps {
3
+ isHidden?: boolean;
4
+ }
@@ -1,4 +1,4 @@
1
1
  export * from './Select';
2
2
  export * from './types';
3
3
  export type { ISelectStyles } from './Select.styles';
4
- export type { ISelectListStyles } from './components';
4
+ export { type ISelectListStyles, SelectList } from './components';
@@ -5,3 +5,4 @@ export * from './use-tweak-styles';
5
5
  export * from './use-did-mount-effect';
6
6
  export * from './use-mixed-styles';
7
7
  export * from './use-merged-refs';
8
+ export * from './use-merge';
@@ -0,0 +1 @@
1
+ export declare const useMerge: <T>(one?: T | undefined, two?: T | undefined) => T | undefined;
@@ -1 +1,3 @@
1
- export declare const useMixedStyles: <StyleSheet_1>(baseStyles?: StyleSheet_1 | undefined, tweakStyles?: StyleSheet_1 | undefined) => StyleSheet_1 | undefined;
1
+ import type { IMixedStyles } from '../theme';
2
+ export declare const mixStyles: <T>(...tweakStyles: IMixedStyles<T>[]) => NonNullable<T>[];
3
+ export declare const useMixedStyles: <StyleSheet_1>(baseStyles?: IMixedStyles<StyleSheet_1>, tweakStyles?: IMixedStyles<StyleSheet_1>) => NonNullable<StyleSheet_1>[];
@@ -1,15 +1,15 @@
1
- import { IComponentName } from '../theme';
2
- export declare const useTweakStyles: <StyleSheet_1, ClassName extends keyof StyleSheet_1 & `tweak${string}`>({ innerStyles, tweakStyles: currentComponentTweakStyles, className, currentComponentName, }: {
1
+ import { IComponentName, IMaybeArray, IMixedStyles } from '../theme';
2
+ export declare const useTweakStyles: <StyleSheet_1, ClassName extends keyof StyleSheet_1 & `tweak${string}`>({ innerStyles, tweakStyles, className, currentComponentName, }: {
3
3
  /**
4
4
  * Это tweakStyles, определенные в родительском компоненте
5
5
  * (например, стили для Input, определенные в стилях компонента Select)
6
6
  */
7
- innerStyles?: StyleSheet_1[ClassName] | undefined;
7
+ innerStyles?: IMixedStyles<StyleSheet_1[ClassName]>;
8
8
  /**
9
9
  * Пропса tweakStyles из родительского компонента
10
10
  * (это уже непосредственно ISelectProps.tweakStyles)
11
11
  */
12
- tweakStyles?: StyleSheet_1 | undefined;
12
+ tweakStyles?: IMaybeArray<StyleSheet_1> | undefined;
13
13
  /**
14
14
  * Класс для переопределения tweakStyles из-вне. (Например, 'tweakInput')
15
15
  */
@@ -18,4 +18,4 @@ export declare const useTweakStyles: <StyleSheet_1, ClassName extends keyof Styl
18
18
  * Название компонента который вызывает useTweakStyles. (В данном примере 'Select')
19
19
  */
20
20
  currentComponentName?: keyof import("../theme").IComponentStyles | undefined;
21
- }) => StyleSheet_1[ClassName];
21
+ }) => NonNullable<StyleSheet_1[ClassName]>[];
@@ -1,11 +1,14 @@
1
1
  import { FC, ReactNode } from 'react';
2
- import { IUiKitTheme } from './types';
2
+ import type { IUiKitTheme } from './types';
3
3
  export interface IThemedProviderProps {
4
4
  theme: IUiKitTheme;
5
5
  children: ReactNode;
6
6
  }
7
7
  export declare const getTheme: () => IUiKitTheme;
8
- export declare const ThemeContext: import("react").Context<{
8
+ interface ThemeContextValue {
9
9
  theme: IUiKitTheme;
10
- }>;
10
+ }
11
+ export declare const ThemeContext: import("react").Context<ThemeContextValue>;
11
12
  export declare const ThemeProvider: FC<IThemedProviderProps>;
13
+ export declare const useTheme: () => IUiKitTheme;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IComponentName, IStyles, IUseStyles } from './types';
2
+ export declare function createThemedStyles<C extends string>(...args: [IStyles<C>] | [IComponentName, IStyles<C>]): IUseStyles<C>;
@@ -1,4 +1,9 @@
1
- import { IComponentName, IStyles, IUseStyles } from './types';
1
+ import { IMaybeArray } from './types';
2
+ export declare const isTweakStyle: (key: string) => boolean;
3
+ export declare const isStylesNotEmpty: <T>(tweakStyles?: T | undefined) => tweakStyles is NonNullable<T>;
4
+ export declare const cleanStyles: <T>(tweakStyles?: T | undefined) => T;
5
+ export declare const mergeTweakStyles: <T>(tweakStyles?: IMaybeArray<T> | undefined) => T | undefined;
6
+ export declare const checkStyles: (componentName: string, styles: Record<string, unknown>) => void;
2
7
  export declare const areStylesThemed: (styles: Record<string, unknown>) => boolean;
3
8
  /**
4
9
  * Подмешивает стили из темы. Мутирует, добавляя специально поле,
@@ -6,5 +11,6 @@ export declare const areStylesThemed: (styles: Record<string, unknown>) => boole
6
11
  * тем самым сохраняя ссылку на объект и позволяя этим кэшировать JSS стили
7
12
  */
8
13
  export declare const themedStyles: <T>(styles: T, themeComponentStyles: T) => T;
9
- export declare function createThemedStyles<C extends string, P>(styles: IStyles<C, P>): IUseStyles<C, P>;
10
- export declare function createThemedStyles<C extends string, P>(componentName: IComponentName, styles: IStyles<C, P>): IUseStyles<C, P>;
14
+ type TweakStylesCache = (styles: object[], prev?: object[]) => object | undefined;
15
+ export declare const getTweakStylesCache: () => TweakStylesCache;
16
+ export {};
@@ -1,4 +1,6 @@
1
1
  export * from './Provider';
2
+ export * from './true-jss';
2
3
  export * from './common';
3
4
  export * from './types';
4
5
  export * from './helpers';
6
+ export * from './create-themed-styles';
@@ -0,0 +1,18 @@
1
+ import type { Classes } from 'jss';
2
+ import { IStyles } from '../types';
3
+ import { IPartialStyle } from './TweakStylesManager';
4
+ import { IJssContext } from './jss-context';
5
+ interface IThemedStylesManagerOptions<C extends string> {
6
+ styles: IStyles<C>;
7
+ name: string;
8
+ }
9
+ export declare class ThemedStylesManager<C extends string> {
10
+ #private;
11
+ constructor({ styles, name }: IThemedStylesManagerOptions<C>);
12
+ getClasses(theme: object | undefined, tweak: IPartialStyle[], jssContext: IJssContext): Classes<C>;
13
+ manageTweak(theme: object | undefined, tweak: IPartialStyle[]): VoidFunction | undefined;
14
+ manage(theme?: object): VoidFunction | undefined;
15
+ private unmanage;
16
+ private getOrCreate;
17
+ }
18
+ export {};
@@ -0,0 +1,34 @@
1
+ import type { StyleSheet, Classes } from 'jss';
2
+ export type IPartialStyle = object;
3
+ interface TweakStylesManagerOptions<C extends string> {
4
+ sheet: StyleSheet<C>;
5
+ classes: Classes<C>;
6
+ tweak?: IPartialStyle[];
7
+ }
8
+ export declare class TweakStylesManager<C extends string> {
9
+ #private;
10
+ constructor({ sheet, classes, tweak }: TweakStylesManagerOptions<C>);
11
+ getClasses([next, ...rest]: IPartialStyle[]): Classes<C>;
12
+ manage([next, ...rest]: IPartialStyle[]): void;
13
+ unmanage([next, ...rest]: IPartialStyle[]): void;
14
+ private getNextManager;
15
+ private getOrCreate;
16
+ private addRules;
17
+ private addRule;
18
+ private insertRules;
19
+ private deleteRules;
20
+ private getInsertIndex;
21
+ }
22
+ declare module 'jss' {
23
+ interface RuleList {
24
+ index: Rule[];
25
+ }
26
+ interface StyleSheet<RuleName> {
27
+ rules: RuleList;
28
+ deleteRule(rule: Rule): boolean;
29
+ addRule(name: RuleName, style: JssStyle, options?: Partial<Rule['options']>): (Rule & {
30
+ id: string;
31
+ }) | null;
32
+ }
33
+ }
34
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './ThemedStylesManager';
2
+ export * from './jss-context';
@@ -0,0 +1,9 @@
1
+ import { Context, FC, PropsWithChildren } from 'react';
2
+ import { GenerateId } from 'jss';
3
+ export interface IJssContext {
4
+ generateId?: GenerateId;
5
+ tweakStylesArch?: 'react-jss' | 'true-jss';
6
+ }
7
+ /** Типизация JssContext оказалась некорректна */
8
+ export declare const JssContext: Context<IJssContext>;
9
+ export declare const JssProvider: FC<PropsWithChildren<IJssContext>>;
@@ -1,9 +1,11 @@
1
1
  import { Styles } from 'react-jss';
2
2
  import { Classes, JssValue } from 'jss';
3
3
  import type { IAccountInfoStyles, IAddButtonStyles, IButtonStyles, ICheckboxStyles, ICloseButtonStyles, ICommonIcon, IComplexIcon, ICssBaselineStyles, IDateInputStyles, IDatePickerHeaderStyles, IDatePickerStyles, IDescriptionStyles, IDotsPreloaderStyles, IFilterIntervalStyles, IFilterSelectStyles, IFiltersPaneSearchStyles, IFiltersPaneStyles, IFilterValueViewStyles, IFilterWithDatesStyles, IFilterWithPeriodStyles, IFilterWrapperStyles, IFlagStyles, IFlexibleTableCellStyles, IFlexibleTableRowStyles, IFlexibleTableStyles, IIconButtonStyles, IIconStyles, IIncrementInputStyles, IInputStyles, IListItemStyles, IListStyles, IModalStyles, IMoreMenuStyles, IMultiSelectInputStyles, IMultiSelectListStyles, IMultiSelectStyles, INotificationStyles, IPhoneInputCountryListStyles, IPhoneInputStyles, IPreloaderSvgType, IRadioButtonStyles, ISearchInputStyles, ISelectListStyles, ISelectorStyles, ISelectStyles, ISkeletonStyles, IStatusStyles, ISvgIcon, ISvgPreloaderStyles, ISwitchStyles, ITextAreaStyles, ITextButtonStyles, ITextWithInfoStyles, ITextWithTooltipStyles, IThemedPreloaderStyles, IToasterStyles, ITooltipStyles, IWithPopupStyles, INewMoreMenuStyles, IFileInputStyles, IFileItemStyles, IWithTooltipStyles } from '../components';
4
- export type IStyles<C extends string, P> = Styles<C, P, Partial<Styles<C, P>>>;
4
+ export type IStyles<C extends string, P = unknown> = Styles<C, P, Partial<Styles<C, P>>>;
5
+ export type IMaybeArray<T> = T[] | T;
6
+ export type IMixedStyles<T> = IMaybeArray<T | boolean | undefined>;
5
7
  export type IUseStyles<C extends string, P = unknown> = (data?: P & {
6
- theme?: Partial<Styles<C, P>>;
8
+ theme?: IMaybeArray<Partial<Styles<C, P>>>;
7
9
  }) => Classes<C>;
8
10
  export type ITweakStyles<StyleCreator, ChildTweakStyles = unknown> = StyleCreator extends IUseStyles<infer C, infer P> ? Partial<Styles<C, P>> & Partial<ChildTweakStyles> : never;
9
11
  export interface IComponentStyles {