@codeleap/styles 4.2.8 → 4.2.10
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/package.json +4 -5
- package/package.json.bak +3 -4
- package/src/lib/borderCreator.ts +5 -3
- package/src/lib/constants.ts +3 -0
- package/src/lib/dynamicVariants.ts +28 -13
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -26
- package/dist/lib/Cacher.d.ts +0 -37
- package/dist/lib/Cacher.js +0 -104
- package/dist/lib/StaleControl.d.ts +0 -21
- package/dist/lib/StaleControl.js +0 -78
- package/dist/lib/StyleCache.d.ts +0 -20
- package/dist/lib/StyleCache.js +0 -83
- package/dist/lib/StylePersistor.d.ts +0 -13
- package/dist/lib/StylePersistor.js +0 -22
- package/dist/lib/StyleRegistry.d.ts +0 -47
- package/dist/lib/StyleRegistry.js +0 -513
- package/dist/lib/borderCreator.d.ts +0 -11
- package/dist/lib/borderCreator.js +0 -44
- package/dist/lib/constants.d.ts +0 -5
- package/dist/lib/constants.js +0 -8
- package/dist/lib/createAppVariants.d.ts +0 -6
- package/dist/lib/createAppVariants.js +0 -9
- package/dist/lib/createStyles.d.ts +0 -4
- package/dist/lib/createStyles.js +0 -27
- package/dist/lib/createTheme.d.ts +0 -7
- package/dist/lib/createTheme.js +0 -74
- package/dist/lib/defaultVariants.d.ts +0 -178
- package/dist/lib/defaultVariants.js +0 -179
- package/dist/lib/dynamicVariants.d.ts +0 -12
- package/dist/lib/dynamicVariants.js +0 -88
- package/dist/lib/hashKey.d.ts +0 -1
- package/dist/lib/hashKey.js +0 -14
- package/dist/lib/hooks.d.ts +0 -8
- package/dist/lib/hooks.js +0 -76
- package/dist/lib/index.d.ts +0 -10
- package/dist/lib/index.js +0 -37
- package/dist/lib/mediaQuery.d.ts +0 -11
- package/dist/lib/mediaQuery.js +0 -65
- package/dist/lib/minifier.d.ts +0 -6
- package/dist/lib/minifier.js +0 -21
- package/dist/lib/multiplierProperty.d.ts +0 -3
- package/dist/lib/multiplierProperty.js +0 -13
- package/dist/lib/spacing.d.ts +0 -11
- package/dist/lib/spacing.js +0 -104
- package/dist/lib/themeStore.d.ts +0 -7
- package/dist/lib/themeStore.js +0 -9
- package/dist/lib/utils.d.ts +0 -8
- package/dist/lib/utils.js +0 -177
- package/dist/lib/validateTheme.d.ts +0 -2
- package/dist/lib/validateTheme.js +0 -68
- package/dist/types/cache.d.ts +0 -1
- package/dist/types/cache.js +0 -2
- package/dist/types/component.d.ts +0 -25
- package/dist/types/component.js +0 -2
- package/dist/types/core.d.ts +0 -20
- package/dist/types/core.js +0 -2
- package/dist/types/icon.d.ts +0 -4
- package/dist/types/icon.js +0 -3
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.js +0 -21
- package/dist/types/spacing.d.ts +0 -6
- package/dist/types/spacing.js +0 -21
- package/dist/types/style.d.ts +0 -14
- package/dist/types/style.js +0 -2
- package/dist/types/theme.d.ts +0 -67
- package/dist/types/theme.js +0 -2
package/dist/types/style.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DynamicVariants } from '../lib/dynamicVariants';
|
|
2
|
-
import { DefaultVariants } from '../lib/defaultVariants';
|
|
3
|
-
import { AnyRecord, IAppVariants, IBreakpoints, ICSS, IEffects, ITheme } from './core';
|
|
4
|
-
import { Multiplier, Spacing } from './spacing';
|
|
5
|
-
type Inset = `top:${Multiplier}` | `bottom:${Multiplier}` | `left:${Multiplier}` | `right:${Multiplier}`;
|
|
6
|
-
export type CommonVariants = Spacing | Inset | DynamicVariants | keyof DefaultVariants | keyof IAppVariants | `effect:${keyof IEffects}`;
|
|
7
|
-
type StyleAtom<Composition = AnyRecord, Variants = string, HasBreakpoints = string, HasComposition = string> = ICSS | Variants | CommonVariants | boolean | null | '' | (HasBreakpoints extends string ? {
|
|
8
|
-
'breakpoints': Partial<Record<keyof IBreakpoints, StyleAtom<Composition, Variants, boolean, string> | StyleAtom<Composition, Variants, boolean, string>[]>>;
|
|
9
|
-
} : null) | (HasComposition extends string ? Partial<Record<keyof Composition, StyleAtom<AnyRecord, Variants, boolean, boolean> | StyleAtom<AnyRecord, Variants, boolean, boolean>[]>> : null) | Array<Variants | ICSS | Partial<Record<keyof Composition, StyleAtom<AnyRecord, Variants, boolean, boolean> | StyleAtom<AnyRecord, Variants, boolean, boolean>[]>>>;
|
|
10
|
-
export type StyleProp<Composition = AnyRecord, Variants = string> = StyleAtom<Composition, Variants> | StyleAtom<Composition, Variants>[];
|
|
11
|
-
export type VariantStyleSheet = Record<string, any>;
|
|
12
|
-
export type StyledProp<T extends string> = StyleProp<Record<T, ICSS>>;
|
|
13
|
-
export type StyleAggregator<T extends string = any> = (theme: ITheme, style: Record<T, ICSS>) => Record<T, ICSS>;
|
|
14
|
-
export {};
|
package/dist/types/style.js
DELETED
package/dist/types/theme.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { BorderCreator } from '../lib/borderCreator';
|
|
2
|
-
import { MediaQueries } from '../lib/mediaQuery';
|
|
3
|
-
import type { DefaultVariants } from '../lib/defaultVariants';
|
|
4
|
-
import { MultiplierFunction, Spacings } from '../lib/spacing';
|
|
5
|
-
import { ICSS, IEffect } from './core';
|
|
6
|
-
type AnyMap = {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
type ColorMap = {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
type BreakpointMap = {
|
|
13
|
-
[key: string]: number;
|
|
14
|
-
};
|
|
15
|
-
type EffectsMap = {
|
|
16
|
-
[key: string]: IEffect;
|
|
17
|
-
};
|
|
18
|
-
export type SpacingMap = Spacings<'margin'> & Spacings<'padding'> & Spacings<'m', string> & Spacings<'p', string> & {
|
|
19
|
-
gap: MultiplierFunction;
|
|
20
|
-
};
|
|
21
|
-
export type InsetMap = {
|
|
22
|
-
bottom: MultiplierFunction;
|
|
23
|
-
top: MultiplierFunction;
|
|
24
|
-
left: MultiplierFunction;
|
|
25
|
-
right: MultiplierFunction;
|
|
26
|
-
};
|
|
27
|
-
export type Theme = {
|
|
28
|
-
colors: ColorMap;
|
|
29
|
-
alternateColors?: {
|
|
30
|
-
[key: string]: ColorMap;
|
|
31
|
-
};
|
|
32
|
-
breakpoints?: BreakpointMap;
|
|
33
|
-
baseSpacing?: number;
|
|
34
|
-
presets?: AnyMap;
|
|
35
|
-
borderRadius?: AnyMap;
|
|
36
|
-
effects?: EffectsMap;
|
|
37
|
-
typography: AnyMap;
|
|
38
|
-
icons: AnyMap;
|
|
39
|
-
values?: AnyMap;
|
|
40
|
-
};
|
|
41
|
-
export type DefaultColorSchemeName = 'default';
|
|
42
|
-
export type ColorScheme<T extends Theme = Theme> = DefaultColorSchemeName | keyof T['alternateColors'];
|
|
43
|
-
type PredefinedThemeDerivedValues<T extends Theme> = {
|
|
44
|
-
colors: T['colors'];
|
|
45
|
-
breakpoints: T['breakpoints'];
|
|
46
|
-
presets: DefaultVariants & T['presets'];
|
|
47
|
-
borderRadius: T['borderRadius'];
|
|
48
|
-
effects: T['effects'];
|
|
49
|
-
typography: T['typography'];
|
|
50
|
-
icons: T['icons'];
|
|
51
|
-
values: T['values'];
|
|
52
|
-
};
|
|
53
|
-
type PredefinedAppTheme<T extends Theme> = PredefinedThemeDerivedValues<T> & {
|
|
54
|
-
setColorScheme: (colorScheme: ColorScheme<T>) => void;
|
|
55
|
-
currentColorScheme: ColorScheme<T>;
|
|
56
|
-
spacing: SpacingMap;
|
|
57
|
-
media: MediaQueries;
|
|
58
|
-
border: BorderCreator;
|
|
59
|
-
inset: InsetMap;
|
|
60
|
-
baseSpacing: number;
|
|
61
|
-
value: (multiplier: number) => number;
|
|
62
|
-
sized: (size: number | string) => ICSS;
|
|
63
|
-
};
|
|
64
|
-
export type AppTheme<T extends Theme> = PredefinedAppTheme<T> & {
|
|
65
|
-
[P in Exclude<keyof T, keyof PredefinedThemeDerivedValues<T>>]: T[P];
|
|
66
|
-
};
|
|
67
|
-
export {};
|
package/dist/types/theme.js
DELETED