@codeleap/styles 4.2.9 → 4.2.11

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 (67) hide show
  1. package/package.json +4 -5
  2. package/package.json.bak +3 -4
  3. package/src/lib/borderCreator.ts +5 -3
  4. package/src/lib/constants.ts +3 -0
  5. package/src/lib/dynamicVariants.ts +28 -13
  6. package/dist/index.d.ts +0 -5
  7. package/dist/index.js +0 -26
  8. package/dist/lib/Cacher.d.ts +0 -37
  9. package/dist/lib/Cacher.js +0 -104
  10. package/dist/lib/StaleControl.d.ts +0 -21
  11. package/dist/lib/StaleControl.js +0 -78
  12. package/dist/lib/StyleCache.d.ts +0 -20
  13. package/dist/lib/StyleCache.js +0 -83
  14. package/dist/lib/StylePersistor.d.ts +0 -13
  15. package/dist/lib/StylePersistor.js +0 -22
  16. package/dist/lib/StyleRegistry.d.ts +0 -47
  17. package/dist/lib/StyleRegistry.js +0 -513
  18. package/dist/lib/borderCreator.d.ts +0 -11
  19. package/dist/lib/borderCreator.js +0 -44
  20. package/dist/lib/constants.d.ts +0 -5
  21. package/dist/lib/constants.js +0 -8
  22. package/dist/lib/createAppVariants.d.ts +0 -6
  23. package/dist/lib/createAppVariants.js +0 -9
  24. package/dist/lib/createStyles.d.ts +0 -4
  25. package/dist/lib/createStyles.js +0 -27
  26. package/dist/lib/createTheme.d.ts +0 -7
  27. package/dist/lib/createTheme.js +0 -74
  28. package/dist/lib/defaultVariants.d.ts +0 -178
  29. package/dist/lib/defaultVariants.js +0 -179
  30. package/dist/lib/dynamicVariants.d.ts +0 -12
  31. package/dist/lib/dynamicVariants.js +0 -88
  32. package/dist/lib/hashKey.d.ts +0 -1
  33. package/dist/lib/hashKey.js +0 -14
  34. package/dist/lib/hooks.d.ts +0 -8
  35. package/dist/lib/hooks.js +0 -76
  36. package/dist/lib/index.d.ts +0 -10
  37. package/dist/lib/index.js +0 -37
  38. package/dist/lib/mediaQuery.d.ts +0 -11
  39. package/dist/lib/mediaQuery.js +0 -65
  40. package/dist/lib/minifier.d.ts +0 -6
  41. package/dist/lib/minifier.js +0 -21
  42. package/dist/lib/multiplierProperty.d.ts +0 -3
  43. package/dist/lib/multiplierProperty.js +0 -13
  44. package/dist/lib/spacing.d.ts +0 -11
  45. package/dist/lib/spacing.js +0 -104
  46. package/dist/lib/themeStore.d.ts +0 -7
  47. package/dist/lib/themeStore.js +0 -9
  48. package/dist/lib/utils.d.ts +0 -8
  49. package/dist/lib/utils.js +0 -177
  50. package/dist/lib/validateTheme.d.ts +0 -2
  51. package/dist/lib/validateTheme.js +0 -68
  52. package/dist/types/cache.d.ts +0 -1
  53. package/dist/types/cache.js +0 -2
  54. package/dist/types/component.d.ts +0 -25
  55. package/dist/types/component.js +0 -2
  56. package/dist/types/core.d.ts +0 -20
  57. package/dist/types/core.js +0 -2
  58. package/dist/types/icon.d.ts +0 -4
  59. package/dist/types/icon.js +0 -3
  60. package/dist/types/index.d.ts +0 -5
  61. package/dist/types/index.js +0 -21
  62. package/dist/types/spacing.d.ts +0 -6
  63. package/dist/types/spacing.js +0 -21
  64. package/dist/types/style.d.ts +0 -14
  65. package/dist/types/style.js +0 -2
  66. package/dist/types/theme.d.ts +0 -67
  67. package/dist/types/theme.js +0 -2
@@ -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 {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });