@cronocode/react-box 3.0.1 → 3.0.2
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/README.md +53 -42
- package/core/boxExtends.d.ts +4 -2
- package/core/boxStyles.d.ts +21 -1
- package/core/coreTypes.d.ts +1 -2
- package/core/theme.d.ts +4 -0
- package/core/variables.d.ts +256 -0
- package/core.cjs +4 -4
- package/core.mjs +583 -269
- package/package.json +1 -1
- package/types.d.ts +11 -6
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { breakpoints, cssStyles, pseudo1, pseudo2, pseudoClasses, pseudoGroupClasses } from './core/boxStyles';
|
|
2
|
-
import {
|
|
3
|
-
export type ExtractBoxStyles<T extends Record<string, BoxStyle[]>> = {
|
|
4
|
-
[K in keyof T]?: BoxStylesType<ArrayType<T[K]>['values']>;
|
|
5
|
-
};
|
|
6
|
-
export type PseudoClassesType = keyof typeof pseudoClasses;
|
|
2
|
+
import { BoxStyle, BoxStylesType, ExtractKeys } from './core/coreTypes';
|
|
7
3
|
export declare namespace Augmented {
|
|
8
4
|
interface BoxProps {
|
|
9
5
|
}
|
|
6
|
+
interface BoxPropTypes {
|
|
7
|
+
}
|
|
10
8
|
}
|
|
11
|
-
|
|
9
|
+
type ExtractBoxStylesInternal<T extends Record<string, BoxStyle[]>> = {
|
|
10
|
+
[K in keyof T]?: K extends keyof Augmented.BoxPropTypes ? BoxStylesType<ArrayType<T[K]>['values']> | Augmented.BoxPropTypes[K] : BoxStylesType<ArrayType<T[K]>['values']>;
|
|
11
|
+
};
|
|
12
|
+
export type ExtractBoxStyles<T extends Record<string, BoxStyle[]>> = {
|
|
13
|
+
[K in keyof T]?: BoxStylesType<ArrayType<T[K]>['values']>;
|
|
14
|
+
};
|
|
15
|
+
export type PseudoClassesType = keyof typeof pseudoClasses;
|
|
16
|
+
export type BoxStyles = ExtractBoxStylesInternal<typeof cssStyles> & Augmented.BoxProps;
|
|
12
17
|
type BoxPseudoClassesStyles1 = ExtractKeys<typeof pseudo1, BoxStylesWithPseudoClasses>;
|
|
13
18
|
type BoxPseudoClassesStyles2Nested = ExtractKeys<typeof pseudo2, BoxStylesWithPseudoClasses>;
|
|
14
19
|
type BoxPseudoClassesStyles2TopLevel = ExtractKeys<typeof pseudo2, boolean | [boolean, BoxStylesWithPseudoClasses]>;
|