@animus-ui/core 0.1.1-beta.21 → 0.1.1-beta.23
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/CHANGELOG.md +16 -0
- package/dist/Animus.d.ts +3 -3
- package/dist/AnimusExtended.d.ts +3 -3
- package/dist/compatTheme.d.ts +1 -1
- package/dist/index.js +173 -413
- package/dist/legacy/config.d.ts +11 -11
- package/dist/properties/styledOptions.d.ts +3 -4
- package/dist/types/config.d.ts +9 -9
- package/dist/types/properties.d.ts +7 -7
- package/dist/types/props.d.ts +3 -3
- package/dist/types/scales.d.ts +2 -2
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/utils.d.ts +4 -4
- package/package.json +5 -5
- package/rollup.config.js +2 -2
- package/tsconfig.json +4 -3
package/dist/legacy/config.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { DefaultCSSPropertyValue, PropertyTypes } from '../types/properties';
|
|
|
4
4
|
import { AbstractProps, ResponsiveProp, ThemeProps } from '../types/props';
|
|
5
5
|
import { CSSObject } from '../types/shared';
|
|
6
6
|
import { AllUnionKeys, Key, KeyFromUnion } from '../types/utils';
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type MapScale = Record<string | number, string | number>;
|
|
8
|
+
export type ArrayScale = readonly (string | number | CSSObject)[] & {
|
|
9
9
|
length: 0;
|
|
10
10
|
};
|
|
11
11
|
export interface BaseProperty {
|
|
@@ -26,12 +26,12 @@ export interface AbstractParser {
|
|
|
26
26
|
propNames: string[];
|
|
27
27
|
config: Record<string, AbstractPropTransformer>;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
30
|
-
export
|
|
29
|
+
export type PropertyValues<Property extends keyof PropertyTypes, All extends boolean = false> = Exclude<PropertyTypes<All extends true ? DefaultCSSPropertyValue : never>[Property], All extends true ? never : object | any[]>;
|
|
30
|
+
export type ScaleValue<Config extends Prop> = Config['scale'] extends keyof Theme ? keyof Theme[Config['scale']] | PropertyValues<Config['property']> : Config['scale'] extends MapScale ? keyof Config['scale'] | PropertyValues<Config['property']> : Config['scale'] extends ArrayScale ? Config['scale'][number] | PropertyValues<Config['property']> : PropertyValues<Config['property'], true>;
|
|
31
31
|
/**
|
|
32
32
|
* Value or something
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export type Scale<Config extends Prop> = ResponsiveProp<ScaleValue<Config> | ((theme: Theme) => ScaleValue<Config>)>;
|
|
35
35
|
export interface TransformFn<P extends string, Config extends Prop> {
|
|
36
36
|
(value: Scale<Config> | Scale<Config>, prop: P, props: ThemeProps<{
|
|
37
37
|
[K in P]?: Scale<Config>;
|
|
@@ -41,7 +41,7 @@ export interface PropTransformer<P extends string, C extends Prop> extends Abstr
|
|
|
41
41
|
prop: P;
|
|
42
42
|
styleFn: TransformFn<P, C>;
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export type TransformerMap<Config extends Record<string, Prop>> = {
|
|
45
45
|
[P in Key<keyof Config>]: PropTransformer<Key<P>, Config[P]>;
|
|
46
46
|
};
|
|
47
47
|
export interface Parser<Config extends Record<string, AbstractPropTransformer>> {
|
|
@@ -49,7 +49,7 @@ export interface Parser<Config extends Record<string, AbstractPropTransformer>>
|
|
|
49
49
|
propNames: (keyof Config)[];
|
|
50
50
|
config: Config;
|
|
51
51
|
}
|
|
52
|
-
export
|
|
52
|
+
export type Compose<Args extends AbstractParser[]> = {
|
|
53
53
|
[K in AllUnionKeys<Args[number]['config']>]: KeyFromUnion<Args[number]['config'], K>;
|
|
54
54
|
};
|
|
55
55
|
export interface Variant<P extends AbstractParser> {
|
|
@@ -66,16 +66,16 @@ export interface States<P extends AbstractParser> {
|
|
|
66
66
|
export interface CSS<P extends AbstractParser> {
|
|
67
67
|
<Props extends AbstractProps>(config: CSSProps<Props, SystemProps<P>>): (props: ThemeProps) => CSSObject;
|
|
68
68
|
}
|
|
69
|
-
export
|
|
69
|
+
export type ParserProps<Config extends Record<string, AbstractPropTransformer>> = ThemeProps<{
|
|
70
70
|
[P in keyof Config]?: Parameters<Config[P]['styleFn']>[2][Config[P]['prop']];
|
|
71
71
|
}>;
|
|
72
|
-
export
|
|
72
|
+
export type SystemProps<P extends AbstractParser> = {
|
|
73
73
|
[K in keyof Omit<Parameters<P>[0], 'theme'>]: Omit<Parameters<P>[0], 'theme'>[K];
|
|
74
74
|
};
|
|
75
|
-
export
|
|
75
|
+
export type VariantProps<T extends string, V> = {
|
|
76
76
|
[Key in T]?: V;
|
|
77
77
|
};
|
|
78
|
-
export
|
|
78
|
+
export type Arg<T extends (...args: any) => any> = Parameters<T>[0];
|
|
79
79
|
export interface PropConfig {
|
|
80
80
|
props: {
|
|
81
81
|
[i: string]: Prop;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/**
|
|
3
2
|
* Emotion will not attempt to forward all system props - so this pre filters all possible exceptions to search agains
|
|
4
3
|
* props like `color` and `width`.
|
|
5
4
|
*/
|
|
6
|
-
export
|
|
5
|
+
export type ForwardableProps<El extends keyof JSX.IntrinsicElements, Reserved> = Exclude<El extends keyof JSX.IntrinsicElements ? keyof JSX.IntrinsicElements[El] : keyof Element, Reserved>;
|
|
7
6
|
/**
|
|
8
7
|
* @description
|
|
9
8
|
* This object can be passed to the second argument of `styled('div', styledOptions)` or be called as a function to filter additional prop names
|
|
@@ -15,7 +14,7 @@ export declare const createStyledOptions: <T extends Record<string, any>>(props:
|
|
|
15
14
|
forward?: readonly Forward[] | undefined;
|
|
16
15
|
filter?: readonly Filter[] | undefined;
|
|
17
16
|
} | undefined) => {
|
|
18
|
-
shouldForwardProp: (prop: PropertyKey) => prop is Forward | Exclude<El extends keyof JSX.IntrinsicElements ? keyof JSX.IntrinsicElements[El] : keyof Element,
|
|
17
|
+
shouldForwardProp: (prop: PropertyKey) => prop is Forward | Exclude<El extends keyof JSX.IntrinsicElements ? keyof JSX.IntrinsicElements[El] : keyof Element, Filter | keyof T | "variant" | "mode">;
|
|
19
18
|
}) & {
|
|
20
|
-
shouldForwardProp: (prop: PropertyKey) => prop is Exclude<"ref", "mode" | "variant" | keyof T> | Exclude<"key", "mode" | "variant" | keyof T> | Exclude<"color", "mode" | "variant" | keyof T> | Exclude<"translate", "mode" | "variant" | keyof T> | Exclude<"property", "mode" | "variant" | keyof T> | Exclude<"hidden", "mode" | "variant" | keyof T> | Exclude<"style", "mode" | "variant" | keyof T> | Exclude<"slot", "mode" | "variant" | keyof T> | Exclude<"title", "mode" | "variant" | keyof T> | Exclude<"className", "mode" | "variant" | keyof T> | Exclude<"id", "mode" | "variant" | keyof T> | Exclude<"prefix", "mode" | "variant" | keyof T> | Exclude<"children", "mode" | "variant" | keyof T> | Exclude<"lang", "mode" | "variant" | keyof T> | Exclude<"role", "mode" | "variant" | keyof T> | Exclude<"tabIndex", "mode" | "variant" | keyof T> | Exclude<"aria-activedescendant", "mode" | "variant" | keyof T> | Exclude<"aria-atomic", "mode" | "variant" | keyof T> | Exclude<"aria-autocomplete", "mode" | "variant" | keyof T> | Exclude<"aria-busy", "mode" | "variant" | keyof T> | Exclude<"aria-checked", "mode" | "variant" | keyof T> | Exclude<"aria-colcount", "mode" | "variant" | keyof T> | Exclude<"aria-colindex", "mode" | "variant" | keyof T> | Exclude<"aria-colspan", "mode" | "variant" | keyof T> | Exclude<"aria-controls", "mode" | "variant" | keyof T> | Exclude<"aria-current", "mode" | "variant" | keyof T> | Exclude<"aria-describedby", "mode" | "variant" | keyof T> | Exclude<"aria-details", "mode" | "variant" | keyof T> | Exclude<"aria-disabled", "mode" | "variant" | keyof T> | Exclude<"aria-dropeffect", "mode" | "variant" | keyof T> | Exclude<"aria-errormessage", "mode" | "variant" | keyof T> | Exclude<"aria-expanded", "mode" | "variant" | keyof T> | Exclude<"aria-flowto", "mode" | "variant" | keyof T> | Exclude<"aria-grabbed", "mode" | "variant" | keyof T> | Exclude<"aria-haspopup", "mode" | "variant" | keyof T> | Exclude<"aria-hidden", "mode" | "variant" | keyof T> | Exclude<"aria-invalid", "mode" | "variant" | keyof T> | Exclude<"aria-keyshortcuts", "mode" | "variant" | keyof T> | Exclude<"aria-label", "mode" | "variant" | keyof T> | Exclude<"aria-labelledby", "mode" | "variant" | keyof T> | Exclude<"aria-level", "mode" | "variant" | keyof T> | Exclude<"aria-live", "mode" | "variant" | keyof T> | Exclude<"aria-modal", "mode" | "variant" | keyof T> | Exclude<"aria-multiline", "mode" | "variant" | keyof T> | Exclude<"aria-multiselectable", "mode" | "variant" | keyof T> | Exclude<"aria-orientation", "mode" | "variant" | keyof T> | Exclude<"aria-owns", "mode" | "variant" | keyof T> | Exclude<"aria-placeholder", "mode" | "variant" | keyof T> | Exclude<"aria-posinset", "mode" | "variant" | keyof T> | Exclude<"aria-pressed", "mode" | "variant" | keyof T> | Exclude<"aria-readonly", "mode" | "variant" | keyof T> | Exclude<"aria-relevant", "mode" | "variant" | keyof T> | Exclude<"aria-required", "mode" | "variant" | keyof T> | Exclude<"aria-roledescription", "mode" | "variant" | keyof T> | Exclude<"aria-rowcount", "mode" | "variant" | keyof T> | Exclude<"aria-rowindex", "mode" | "variant" | keyof T> | Exclude<"aria-rowspan", "mode" | "variant" | keyof T> | Exclude<"aria-selected", "mode" | "variant" | keyof T> | Exclude<"aria-setsize", "mode" | "variant" | keyof T> | Exclude<"aria-sort", "mode" | "variant" | keyof T> | Exclude<"aria-valuemax", "mode" | "variant" | keyof T> | Exclude<"aria-valuemin", "mode" | "variant" | keyof T> | Exclude<"aria-valuenow", "mode" | "variant" | keyof T> | Exclude<"aria-valuetext", "mode" | "variant" | keyof T> | Exclude<"dangerouslySetInnerHTML", "mode" | "variant" | keyof T> | Exclude<"onCopy", "mode" | "variant" | keyof T> | Exclude<"onCopyCapture", "mode" | "variant" | keyof T> | Exclude<"onCut", "mode" | "variant" | keyof T> | Exclude<"onCutCapture", "mode" | "variant" | keyof T> | Exclude<"onPaste", "mode" | "variant" | keyof T> | Exclude<"onPasteCapture", "mode" | "variant" | keyof T> | Exclude<"onCompositionEnd", "mode" | "variant" | keyof T> | Exclude<"onCompositionEndCapture", "mode" | "variant" | keyof T> | Exclude<"onCompositionStart", "mode" | "variant" | keyof T> | Exclude<"onCompositionStartCapture", "mode" | "variant" | keyof T> | Exclude<"onCompositionUpdate", "mode" | "variant" | keyof T> | Exclude<"onCompositionUpdateCapture", "mode" | "variant" | keyof T> | Exclude<"onFocus", "mode" | "variant" | keyof T> | Exclude<"onFocusCapture", "mode" | "variant" | keyof T> | Exclude<"onBlur", "mode" | "variant" | keyof T> | Exclude<"onBlurCapture", "mode" | "variant" | keyof T> | Exclude<"onChange", "mode" | "variant" | keyof T> | Exclude<"onChangeCapture", "mode" | "variant" | keyof T> | Exclude<"onBeforeInput", "mode" | "variant" | keyof T> | Exclude<"onBeforeInputCapture", "mode" | "variant" | keyof T> | Exclude<"onInput", "mode" | "variant" | keyof T> | Exclude<"onInputCapture", "mode" | "variant" | keyof T> | Exclude<"onReset", "mode" | "variant" | keyof T> | Exclude<"onResetCapture", "mode" | "variant" | keyof T> | Exclude<"onSubmit", "mode" | "variant" | keyof T> | Exclude<"onSubmitCapture", "mode" | "variant" | keyof T> | Exclude<"onInvalid", "mode" | "variant" | keyof T> | Exclude<"onInvalidCapture", "mode" | "variant" | keyof T> | Exclude<"onLoad", "mode" | "variant" | keyof T> | Exclude<"onLoadCapture", "mode" | "variant" | keyof T> | Exclude<"onError", "mode" | "variant" | keyof T> | Exclude<"onErrorCapture", "mode" | "variant" | keyof T> | Exclude<"onKeyDown", "mode" | "variant" | keyof T> | Exclude<"onKeyDownCapture", "mode" | "variant" | keyof T> | Exclude<"onKeyPress", "mode" | "variant" | keyof T> | Exclude<"onKeyPressCapture", "mode" | "variant" | keyof T> | Exclude<"onKeyUp", "mode" | "variant" | keyof T> | Exclude<"onKeyUpCapture", "mode" | "variant" | keyof T> | Exclude<"onAbort", "mode" | "variant" | keyof T> | Exclude<"onAbortCapture", "mode" | "variant" | keyof T> | Exclude<"onCanPlay", "mode" | "variant" | keyof T> | Exclude<"onCanPlayCapture", "mode" | "variant" | keyof T> | Exclude<"onCanPlayThrough", "mode" | "variant" | keyof T> | Exclude<"onCanPlayThroughCapture", "mode" | "variant" | keyof T> | Exclude<"onDurationChange", "mode" | "variant" | keyof T> | Exclude<"onDurationChangeCapture", "mode" | "variant" | keyof T> | Exclude<"onEmptied", "mode" | "variant" | keyof T> | Exclude<"onEmptiedCapture", "mode" | "variant" | keyof T> | Exclude<"onEncrypted", "mode" | "variant" | keyof T> | Exclude<"onEncryptedCapture", "mode" | "variant" | keyof T> | Exclude<"onEnded", "mode" | "variant" | keyof T> | Exclude<"onEndedCapture", "mode" | "variant" | keyof T> | Exclude<"onLoadedData", "mode" | "variant" | keyof T> | Exclude<"onLoadedDataCapture", "mode" | "variant" | keyof T> | Exclude<"onLoadedMetadata", "mode" | "variant" | keyof T> | Exclude<"onLoadedMetadataCapture", "mode" | "variant" | keyof T> | Exclude<"onLoadStart", "mode" | "variant" | keyof T> | Exclude<"onLoadStartCapture", "mode" | "variant" | keyof T> | Exclude<"onPause", "mode" | "variant" | keyof T> | Exclude<"onPauseCapture", "mode" | "variant" | keyof T> | Exclude<"onPlay", "mode" | "variant" | keyof T> | Exclude<"onPlayCapture", "mode" | "variant" | keyof T> | Exclude<"onPlaying", "mode" | "variant" | keyof T> | Exclude<"onPlayingCapture", "mode" | "variant" | keyof T> | Exclude<"onProgress", "mode" | "variant" | keyof T> | Exclude<"onProgressCapture", "mode" | "variant" | keyof T> | Exclude<"onRateChange", "mode" | "variant" | keyof T> | Exclude<"onRateChangeCapture", "mode" | "variant" | keyof T> | Exclude<"onSeeked", "mode" | "variant" | keyof T> | Exclude<"onSeekedCapture", "mode" | "variant" | keyof T> | Exclude<"onSeeking", "mode" | "variant" | keyof T> | Exclude<"onSeekingCapture", "mode" | "variant" | keyof T> | Exclude<"onStalled", "mode" | "variant" | keyof T> | Exclude<"onStalledCapture", "mode" | "variant" | keyof T> | Exclude<"onSuspend", "mode" | "variant" | keyof T> | Exclude<"onSuspendCapture", "mode" | "variant" | keyof T> | Exclude<"onTimeUpdate", "mode" | "variant" | keyof T> | Exclude<"onTimeUpdateCapture", "mode" | "variant" | keyof T> | Exclude<"onVolumeChange", "mode" | "variant" | keyof T> | Exclude<"onVolumeChangeCapture", "mode" | "variant" | keyof T> | Exclude<"onWaiting", "mode" | "variant" | keyof T> | Exclude<"onWaitingCapture", "mode" | "variant" | keyof T> | Exclude<"onAuxClick", "mode" | "variant" | keyof T> | Exclude<"onAuxClickCapture", "mode" | "variant" | keyof T> | Exclude<"onClick", "mode" | "variant" | keyof T> | Exclude<"onClickCapture", "mode" | "variant" | keyof T> | Exclude<"onContextMenu", "mode" | "variant" | keyof T> | Exclude<"onContextMenuCapture", "mode" | "variant" | keyof T> | Exclude<"onDoubleClick", "mode" | "variant" | keyof T> | Exclude<"onDoubleClickCapture", "mode" | "variant" | keyof T> | Exclude<"onDrag", "mode" | "variant" | keyof T> | Exclude<"onDragCapture", "mode" | "variant" | keyof T> | Exclude<"onDragEnd", "mode" | "variant" | keyof T> | Exclude<"onDragEndCapture", "mode" | "variant" | keyof T> | Exclude<"onDragEnter", "mode" | "variant" | keyof T> | Exclude<"onDragEnterCapture", "mode" | "variant" | keyof T> | Exclude<"onDragExit", "mode" | "variant" | keyof T> | Exclude<"onDragExitCapture", "mode" | "variant" | keyof T> | Exclude<"onDragLeave", "mode" | "variant" | keyof T> | Exclude<"onDragLeaveCapture", "mode" | "variant" | keyof T> | Exclude<"onDragOver", "mode" | "variant" | keyof T> | Exclude<"onDragOverCapture", "mode" | "variant" | keyof T> | Exclude<"onDragStart", "mode" | "variant" | keyof T> | Exclude<"onDragStartCapture", "mode" | "variant" | keyof T> | Exclude<"onDrop", "mode" | "variant" | keyof T> | Exclude<"onDropCapture", "mode" | "variant" | keyof T> | Exclude<"onMouseDown", "mode" | "variant" | keyof T> | Exclude<"onMouseDownCapture", "mode" | "variant" | keyof T> | Exclude<"onMouseEnter", "mode" | "variant" | keyof T> | Exclude<"onMouseLeave", "mode" | "variant" | keyof T> | Exclude<"onMouseMove", "mode" | "variant" | keyof T> | Exclude<"onMouseMoveCapture", "mode" | "variant" | keyof T> | Exclude<"onMouseOut", "mode" | "variant" | keyof T> | Exclude<"onMouseOutCapture", "mode" | "variant" | keyof T> | Exclude<"onMouseOver", "mode" | "variant" | keyof T> | Exclude<"onMouseOverCapture", "mode" | "variant" | keyof T> | Exclude<"onMouseUp", "mode" | "variant" | keyof T> | Exclude<"onMouseUpCapture", "mode" | "variant" | keyof T> | Exclude<"onSelect", "mode" | "variant" | keyof T> | Exclude<"onSelectCapture", "mode" | "variant" | keyof T> | Exclude<"onTouchCancel", "mode" | "variant" | keyof T> | Exclude<"onTouchCancelCapture", "mode" | "variant" | keyof T> | Exclude<"onTouchEnd", "mode" | "variant" | keyof T> | Exclude<"onTouchEndCapture", "mode" | "variant" | keyof T> | Exclude<"onTouchMove", "mode" | "variant" | keyof T> | Exclude<"onTouchMoveCapture", "mode" | "variant" | keyof T> | Exclude<"onTouchStart", "mode" | "variant" | keyof T> | Exclude<"onTouchStartCapture", "mode" | "variant" | keyof T> | Exclude<"onPointerDown", "mode" | "variant" | keyof T> | Exclude<"onPointerDownCapture", "mode" | "variant" | keyof T> | Exclude<"onPointerMove", "mode" | "variant" | keyof T> | Exclude<"onPointerMoveCapture", "mode" | "variant" | keyof T> | Exclude<"onPointerUp", "mode" | "variant" | keyof T> | Exclude<"onPointerUpCapture", "mode" | "variant" | keyof T> | Exclude<"onPointerCancel", "mode" | "variant" | keyof T> | Exclude<"onPointerCancelCapture", "mode" | "variant" | keyof T> | Exclude<"onPointerEnter", "mode" | "variant" | keyof T> | Exclude<"onPointerEnterCapture", "mode" | "variant" | keyof T> | Exclude<"onPointerLeave", "mode" | "variant" | keyof T> | Exclude<"onPointerLeaveCapture", "mode" | "variant" | keyof T> | Exclude<"onPointerOver", "mode" | "variant" | keyof T> | Exclude<"onPointerOverCapture", "mode" | "variant" | keyof T> | Exclude<"onPointerOut", "mode" | "variant" | keyof T> | Exclude<"onPointerOutCapture", "mode" | "variant" | keyof T> | Exclude<"onGotPointerCapture", "mode" | "variant" | keyof T> | Exclude<"onGotPointerCaptureCapture", "mode" | "variant" | keyof T> | Exclude<"onLostPointerCapture", "mode" | "variant" | keyof T> | Exclude<"onLostPointerCaptureCapture", "mode" | "variant" | keyof T> | Exclude<"onScroll", "mode" | "variant" | keyof T> | Exclude<"onScrollCapture", "mode" | "variant" | keyof T> | Exclude<"onWheel", "mode" | "variant" | keyof T> | Exclude<"onWheelCapture", "mode" | "variant" | keyof T> | Exclude<"onAnimationStart", "mode" | "variant" | keyof T> | Exclude<"onAnimationStartCapture", "mode" | "variant" | keyof T> | Exclude<"onAnimationEnd", "mode" | "variant" | keyof T> | Exclude<"onAnimationEndCapture", "mode" | "variant" | keyof T> | Exclude<"onAnimationIteration", "mode" | "variant" | keyof T> | Exclude<"onAnimationIterationCapture", "mode" | "variant" | keyof T> | Exclude<"onTransitionEnd", "mode" | "variant" | keyof T> | Exclude<"onTransitionEndCapture", "mode" | "variant" | keyof T> | Exclude<"defaultChecked", "mode" | "variant" | keyof T> | Exclude<"defaultValue", "mode" | "variant" | keyof T> | Exclude<"suppressContentEditableWarning", "mode" | "variant" | keyof T> | Exclude<"suppressHydrationWarning", "mode" | "variant" | keyof T> | Exclude<"accessKey", "mode" | "variant" | keyof T> | Exclude<"contentEditable", "mode" | "variant" | keyof T> | Exclude<"contextMenu", "mode" | "variant" | keyof T> | Exclude<"dir", "mode" | "variant" | keyof T> | Exclude<"draggable", "mode" | "variant" | keyof T> | Exclude<"placeholder", "mode" | "variant" | keyof T> | Exclude<"spellCheck", "mode" | "variant" | keyof T> | Exclude<"radioGroup", "mode" | "variant" | keyof T> | Exclude<"about", "mode" | "variant" | keyof T> | Exclude<"datatype", "mode" | "variant" | keyof T> | Exclude<"inlist", "mode" | "variant" | keyof T> | Exclude<"resource", "mode" | "variant" | keyof T> | Exclude<"typeof", "mode" | "variant" | keyof T> | Exclude<"vocab", "mode" | "variant" | keyof T> | Exclude<"autoCapitalize", "mode" | "variant" | keyof T> | Exclude<"autoCorrect", "mode" | "variant" | keyof T> | Exclude<"autoSave", "mode" | "variant" | keyof T> | Exclude<"itemProp", "mode" | "variant" | keyof T> | Exclude<"itemScope", "mode" | "variant" | keyof T> | Exclude<"itemType", "mode" | "variant" | keyof T> | Exclude<"itemID", "mode" | "variant" | keyof T> | Exclude<"itemRef", "mode" | "variant" | keyof T> | Exclude<"results", "mode" | "variant" | keyof T> | Exclude<"security", "mode" | "variant" | keyof T> | Exclude<"unselectable", "mode" | "variant" | keyof T> | Exclude<"inputMode", "mode" | "variant" | keyof T> | Exclude<"is", "mode" | "variant" | keyof T>;
|
|
19
|
+
shouldForwardProp: (prop: PropertyKey) => prop is Exclude<"ref", keyof T | "variant" | "mode"> | Exclude<"key", keyof T | "variant" | "mode"> | Exclude<"slot", keyof T | "variant" | "mode"> | Exclude<"style", keyof T | "variant" | "mode"> | Exclude<"title", keyof T | "variant" | "mode"> | Exclude<"className", keyof T | "variant" | "mode"> | Exclude<"id", keyof T | "variant" | "mode"> | Exclude<"prefix", keyof T | "variant" | "mode"> | Exclude<"role", keyof T | "variant" | "mode"> | Exclude<"children", keyof T | "variant" | "mode"> | Exclude<"color", keyof T | "variant" | "mode"> | Exclude<"lang", keyof T | "variant" | "mode"> | Exclude<"tabIndex", keyof T | "variant" | "mode"> | Exclude<"aria-activedescendant", keyof T | "variant" | "mode"> | Exclude<"aria-atomic", keyof T | "variant" | "mode"> | Exclude<"aria-autocomplete", keyof T | "variant" | "mode"> | Exclude<"aria-busy", keyof T | "variant" | "mode"> | Exclude<"aria-checked", keyof T | "variant" | "mode"> | Exclude<"aria-colcount", keyof T | "variant" | "mode"> | Exclude<"aria-colindex", keyof T | "variant" | "mode"> | Exclude<"aria-colspan", keyof T | "variant" | "mode"> | Exclude<"aria-controls", keyof T | "variant" | "mode"> | Exclude<"aria-current", keyof T | "variant" | "mode"> | Exclude<"aria-describedby", keyof T | "variant" | "mode"> | Exclude<"aria-details", keyof T | "variant" | "mode"> | Exclude<"aria-disabled", keyof T | "variant" | "mode"> | Exclude<"aria-dropeffect", keyof T | "variant" | "mode"> | Exclude<"aria-errormessage", keyof T | "variant" | "mode"> | Exclude<"aria-expanded", keyof T | "variant" | "mode"> | Exclude<"aria-flowto", keyof T | "variant" | "mode"> | Exclude<"aria-grabbed", keyof T | "variant" | "mode"> | Exclude<"aria-haspopup", keyof T | "variant" | "mode"> | Exclude<"aria-hidden", keyof T | "variant" | "mode"> | Exclude<"aria-invalid", keyof T | "variant" | "mode"> | Exclude<"aria-keyshortcuts", keyof T | "variant" | "mode"> | Exclude<"aria-label", keyof T | "variant" | "mode"> | Exclude<"aria-labelledby", keyof T | "variant" | "mode"> | Exclude<"aria-level", keyof T | "variant" | "mode"> | Exclude<"aria-live", keyof T | "variant" | "mode"> | Exclude<"aria-modal", keyof T | "variant" | "mode"> | Exclude<"aria-multiline", keyof T | "variant" | "mode"> | Exclude<"aria-multiselectable", keyof T | "variant" | "mode"> | Exclude<"aria-orientation", keyof T | "variant" | "mode"> | Exclude<"aria-owns", keyof T | "variant" | "mode"> | Exclude<"aria-placeholder", keyof T | "variant" | "mode"> | Exclude<"aria-posinset", keyof T | "variant" | "mode"> | Exclude<"aria-pressed", keyof T | "variant" | "mode"> | Exclude<"aria-readonly", keyof T | "variant" | "mode"> | Exclude<"aria-relevant", keyof T | "variant" | "mode"> | Exclude<"aria-required", keyof T | "variant" | "mode"> | Exclude<"aria-roledescription", keyof T | "variant" | "mode"> | Exclude<"aria-rowcount", keyof T | "variant" | "mode"> | Exclude<"aria-rowindex", keyof T | "variant" | "mode"> | Exclude<"aria-rowspan", keyof T | "variant" | "mode"> | Exclude<"aria-selected", keyof T | "variant" | "mode"> | Exclude<"aria-setsize", keyof T | "variant" | "mode"> | Exclude<"aria-sort", keyof T | "variant" | "mode"> | Exclude<"aria-valuemax", keyof T | "variant" | "mode"> | Exclude<"aria-valuemin", keyof T | "variant" | "mode"> | Exclude<"aria-valuenow", keyof T | "variant" | "mode"> | Exclude<"aria-valuetext", keyof T | "variant" | "mode"> | Exclude<"dangerouslySetInnerHTML", keyof T | "variant" | "mode"> | Exclude<"onCopy", keyof T | "variant" | "mode"> | Exclude<"onCopyCapture", keyof T | "variant" | "mode"> | Exclude<"onCut", keyof T | "variant" | "mode"> | Exclude<"onCutCapture", keyof T | "variant" | "mode"> | Exclude<"onPaste", keyof T | "variant" | "mode"> | Exclude<"onPasteCapture", keyof T | "variant" | "mode"> | Exclude<"onCompositionEnd", keyof T | "variant" | "mode"> | Exclude<"onCompositionEndCapture", keyof T | "variant" | "mode"> | Exclude<"onCompositionStart", keyof T | "variant" | "mode"> | Exclude<"onCompositionStartCapture", keyof T | "variant" | "mode"> | Exclude<"onCompositionUpdate", keyof T | "variant" | "mode"> | Exclude<"onCompositionUpdateCapture", keyof T | "variant" | "mode"> | Exclude<"onFocus", keyof T | "variant" | "mode"> | Exclude<"onFocusCapture", keyof T | "variant" | "mode"> | Exclude<"onBlur", keyof T | "variant" | "mode"> | Exclude<"onBlurCapture", keyof T | "variant" | "mode"> | Exclude<"onChange", keyof T | "variant" | "mode"> | Exclude<"onChangeCapture", keyof T | "variant" | "mode"> | Exclude<"onBeforeInput", keyof T | "variant" | "mode"> | Exclude<"onBeforeInputCapture", keyof T | "variant" | "mode"> | Exclude<"onInput", keyof T | "variant" | "mode"> | Exclude<"onInputCapture", keyof T | "variant" | "mode"> | Exclude<"onReset", keyof T | "variant" | "mode"> | Exclude<"onResetCapture", keyof T | "variant" | "mode"> | Exclude<"onSubmit", keyof T | "variant" | "mode"> | Exclude<"onSubmitCapture", keyof T | "variant" | "mode"> | Exclude<"onInvalid", keyof T | "variant" | "mode"> | Exclude<"onInvalidCapture", keyof T | "variant" | "mode"> | Exclude<"onLoad", keyof T | "variant" | "mode"> | Exclude<"onLoadCapture", keyof T | "variant" | "mode"> | Exclude<"onError", keyof T | "variant" | "mode"> | Exclude<"onErrorCapture", keyof T | "variant" | "mode"> | Exclude<"onKeyDown", keyof T | "variant" | "mode"> | Exclude<"onKeyDownCapture", keyof T | "variant" | "mode"> | Exclude<"onKeyPress", keyof T | "variant" | "mode"> | Exclude<"onKeyPressCapture", keyof T | "variant" | "mode"> | Exclude<"onKeyUp", keyof T | "variant" | "mode"> | Exclude<"onKeyUpCapture", keyof T | "variant" | "mode"> | Exclude<"onAbort", keyof T | "variant" | "mode"> | Exclude<"onAbortCapture", keyof T | "variant" | "mode"> | Exclude<"onCanPlay", keyof T | "variant" | "mode"> | Exclude<"onCanPlayCapture", keyof T | "variant" | "mode"> | Exclude<"onCanPlayThrough", keyof T | "variant" | "mode"> | Exclude<"onCanPlayThroughCapture", keyof T | "variant" | "mode"> | Exclude<"onDurationChange", keyof T | "variant" | "mode"> | Exclude<"onDurationChangeCapture", keyof T | "variant" | "mode"> | Exclude<"onEmptied", keyof T | "variant" | "mode"> | Exclude<"onEmptiedCapture", keyof T | "variant" | "mode"> | Exclude<"onEncrypted", keyof T | "variant" | "mode"> | Exclude<"onEncryptedCapture", keyof T | "variant" | "mode"> | Exclude<"onEnded", keyof T | "variant" | "mode"> | Exclude<"onEndedCapture", keyof T | "variant" | "mode"> | Exclude<"onLoadedData", keyof T | "variant" | "mode"> | Exclude<"onLoadedDataCapture", keyof T | "variant" | "mode"> | Exclude<"onLoadedMetadata", keyof T | "variant" | "mode"> | Exclude<"onLoadedMetadataCapture", keyof T | "variant" | "mode"> | Exclude<"onLoadStart", keyof T | "variant" | "mode"> | Exclude<"onLoadStartCapture", keyof T | "variant" | "mode"> | Exclude<"onPause", keyof T | "variant" | "mode"> | Exclude<"onPauseCapture", keyof T | "variant" | "mode"> | Exclude<"onPlay", keyof T | "variant" | "mode"> | Exclude<"onPlayCapture", keyof T | "variant" | "mode"> | Exclude<"onPlaying", keyof T | "variant" | "mode"> | Exclude<"onPlayingCapture", keyof T | "variant" | "mode"> | Exclude<"onProgress", keyof T | "variant" | "mode"> | Exclude<"onProgressCapture", keyof T | "variant" | "mode"> | Exclude<"onRateChange", keyof T | "variant" | "mode"> | Exclude<"onRateChangeCapture", keyof T | "variant" | "mode"> | Exclude<"onResize", keyof T | "variant" | "mode"> | Exclude<"onResizeCapture", keyof T | "variant" | "mode"> | Exclude<"onSeeked", keyof T | "variant" | "mode"> | Exclude<"onSeekedCapture", keyof T | "variant" | "mode"> | Exclude<"onSeeking", keyof T | "variant" | "mode"> | Exclude<"onSeekingCapture", keyof T | "variant" | "mode"> | Exclude<"onStalled", keyof T | "variant" | "mode"> | Exclude<"onStalledCapture", keyof T | "variant" | "mode"> | Exclude<"onSuspend", keyof T | "variant" | "mode"> | Exclude<"onSuspendCapture", keyof T | "variant" | "mode"> | Exclude<"onTimeUpdate", keyof T | "variant" | "mode"> | Exclude<"onTimeUpdateCapture", keyof T | "variant" | "mode"> | Exclude<"onVolumeChange", keyof T | "variant" | "mode"> | Exclude<"onVolumeChangeCapture", keyof T | "variant" | "mode"> | Exclude<"onWaiting", keyof T | "variant" | "mode"> | Exclude<"onWaitingCapture", keyof T | "variant" | "mode"> | Exclude<"onAuxClick", keyof T | "variant" | "mode"> | Exclude<"onAuxClickCapture", keyof T | "variant" | "mode"> | Exclude<"onClick", keyof T | "variant" | "mode"> | Exclude<"onClickCapture", keyof T | "variant" | "mode"> | Exclude<"onContextMenu", keyof T | "variant" | "mode"> | Exclude<"onContextMenuCapture", keyof T | "variant" | "mode"> | Exclude<"onDoubleClick", keyof T | "variant" | "mode"> | Exclude<"onDoubleClickCapture", keyof T | "variant" | "mode"> | Exclude<"onDrag", keyof T | "variant" | "mode"> | Exclude<"onDragCapture", keyof T | "variant" | "mode"> | Exclude<"onDragEnd", keyof T | "variant" | "mode"> | Exclude<"onDragEndCapture", keyof T | "variant" | "mode"> | Exclude<"onDragEnter", keyof T | "variant" | "mode"> | Exclude<"onDragEnterCapture", keyof T | "variant" | "mode"> | Exclude<"onDragExit", keyof T | "variant" | "mode"> | Exclude<"onDragExitCapture", keyof T | "variant" | "mode"> | Exclude<"onDragLeave", keyof T | "variant" | "mode"> | Exclude<"onDragLeaveCapture", keyof T | "variant" | "mode"> | Exclude<"onDragOver", keyof T | "variant" | "mode"> | Exclude<"onDragOverCapture", keyof T | "variant" | "mode"> | Exclude<"onDragStart", keyof T | "variant" | "mode"> | Exclude<"onDragStartCapture", keyof T | "variant" | "mode"> | Exclude<"onDrop", keyof T | "variant" | "mode"> | Exclude<"onDropCapture", keyof T | "variant" | "mode"> | Exclude<"onMouseDown", keyof T | "variant" | "mode"> | Exclude<"onMouseDownCapture", keyof T | "variant" | "mode"> | Exclude<"onMouseEnter", keyof T | "variant" | "mode"> | Exclude<"onMouseLeave", keyof T | "variant" | "mode"> | Exclude<"onMouseMove", keyof T | "variant" | "mode"> | Exclude<"onMouseMoveCapture", keyof T | "variant" | "mode"> | Exclude<"onMouseOut", keyof T | "variant" | "mode"> | Exclude<"onMouseOutCapture", keyof T | "variant" | "mode"> | Exclude<"onMouseOver", keyof T | "variant" | "mode"> | Exclude<"onMouseOverCapture", keyof T | "variant" | "mode"> | Exclude<"onMouseUp", keyof T | "variant" | "mode"> | Exclude<"onMouseUpCapture", keyof T | "variant" | "mode"> | Exclude<"onSelect", keyof T | "variant" | "mode"> | Exclude<"onSelectCapture", keyof T | "variant" | "mode"> | Exclude<"onTouchCancel", keyof T | "variant" | "mode"> | Exclude<"onTouchCancelCapture", keyof T | "variant" | "mode"> | Exclude<"onTouchEnd", keyof T | "variant" | "mode"> | Exclude<"onTouchEndCapture", keyof T | "variant" | "mode"> | Exclude<"onTouchMove", keyof T | "variant" | "mode"> | Exclude<"onTouchMoveCapture", keyof T | "variant" | "mode"> | Exclude<"onTouchStart", keyof T | "variant" | "mode"> | Exclude<"onTouchStartCapture", keyof T | "variant" | "mode"> | Exclude<"onPointerDown", keyof T | "variant" | "mode"> | Exclude<"onPointerDownCapture", keyof T | "variant" | "mode"> | Exclude<"onPointerMove", keyof T | "variant" | "mode"> | Exclude<"onPointerMoveCapture", keyof T | "variant" | "mode"> | Exclude<"onPointerUp", keyof T | "variant" | "mode"> | Exclude<"onPointerUpCapture", keyof T | "variant" | "mode"> | Exclude<"onPointerCancel", keyof T | "variant" | "mode"> | Exclude<"onPointerCancelCapture", keyof T | "variant" | "mode"> | Exclude<"onPointerEnter", keyof T | "variant" | "mode"> | Exclude<"onPointerEnterCapture", keyof T | "variant" | "mode"> | Exclude<"onPointerLeave", keyof T | "variant" | "mode"> | Exclude<"onPointerLeaveCapture", keyof T | "variant" | "mode"> | Exclude<"onPointerOver", keyof T | "variant" | "mode"> | Exclude<"onPointerOverCapture", keyof T | "variant" | "mode"> | Exclude<"onPointerOut", keyof T | "variant" | "mode"> | Exclude<"onPointerOutCapture", keyof T | "variant" | "mode"> | Exclude<"onGotPointerCapture", keyof T | "variant" | "mode"> | Exclude<"onGotPointerCaptureCapture", keyof T | "variant" | "mode"> | Exclude<"onLostPointerCapture", keyof T | "variant" | "mode"> | Exclude<"onLostPointerCaptureCapture", keyof T | "variant" | "mode"> | Exclude<"onScroll", keyof T | "variant" | "mode"> | Exclude<"onScrollCapture", keyof T | "variant" | "mode"> | Exclude<"onWheel", keyof T | "variant" | "mode"> | Exclude<"onWheelCapture", keyof T | "variant" | "mode"> | Exclude<"onAnimationStart", keyof T | "variant" | "mode"> | Exclude<"onAnimationStartCapture", keyof T | "variant" | "mode"> | Exclude<"onAnimationEnd", keyof T | "variant" | "mode"> | Exclude<"onAnimationEndCapture", keyof T | "variant" | "mode"> | Exclude<"onAnimationIteration", keyof T | "variant" | "mode"> | Exclude<"onAnimationIterationCapture", keyof T | "variant" | "mode"> | Exclude<"onTransitionEnd", keyof T | "variant" | "mode"> | Exclude<"onTransitionEndCapture", keyof T | "variant" | "mode"> | Exclude<"defaultChecked", keyof T | "variant" | "mode"> | Exclude<"defaultValue", keyof T | "variant" | "mode"> | Exclude<"suppressContentEditableWarning", keyof T | "variant" | "mode"> | Exclude<"suppressHydrationWarning", keyof T | "variant" | "mode"> | Exclude<"accessKey", keyof T | "variant" | "mode"> | Exclude<"contentEditable", keyof T | "variant" | "mode"> | Exclude<"contextMenu", keyof T | "variant" | "mode"> | Exclude<"dir", keyof T | "variant" | "mode"> | Exclude<"draggable", keyof T | "variant" | "mode"> | Exclude<"hidden", keyof T | "variant" | "mode"> | Exclude<"nonce", keyof T | "variant" | "mode"> | Exclude<"placeholder", keyof T | "variant" | "mode"> | Exclude<"spellCheck", keyof T | "variant" | "mode"> | Exclude<"translate", keyof T | "variant" | "mode"> | Exclude<"radioGroup", keyof T | "variant" | "mode"> | Exclude<"about", keyof T | "variant" | "mode"> | Exclude<"datatype", keyof T | "variant" | "mode"> | Exclude<"inlist", keyof T | "variant" | "mode"> | Exclude<"property", keyof T | "variant" | "mode"> | Exclude<"resource", keyof T | "variant" | "mode"> | Exclude<"typeof", keyof T | "variant" | "mode"> | Exclude<"vocab", keyof T | "variant" | "mode"> | Exclude<"autoCapitalize", keyof T | "variant" | "mode"> | Exclude<"autoCorrect", keyof T | "variant" | "mode"> | Exclude<"autoSave", keyof T | "variant" | "mode"> | Exclude<"itemProp", keyof T | "variant" | "mode"> | Exclude<"itemScope", keyof T | "variant" | "mode"> | Exclude<"itemType", keyof T | "variant" | "mode"> | Exclude<"itemID", keyof T | "variant" | "mode"> | Exclude<"itemRef", keyof T | "variant" | "mode"> | Exclude<"results", keyof T | "variant" | "mode"> | Exclude<"security", keyof T | "variant" | "mode"> | Exclude<"unselectable", keyof T | "variant" | "mode"> | Exclude<"inputMode", keyof T | "variant" | "mode"> | Exclude<"is", keyof T | "variant" | "mode">;
|
|
21
20
|
};
|
package/dist/types/config.d.ts
CHANGED
|
@@ -19,12 +19,12 @@ export interface AbstractParser {
|
|
|
19
19
|
propNames: string[];
|
|
20
20
|
config: Record<string, Prop>;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
22
|
+
type IsEmpty<T> = [] extends T ? true : false | {} extends T ? true : false;
|
|
23
|
+
export type PropertyValues<Property extends Prop, IncludeGlobals = false> = Exclude<PropertyTypes<IncludeGlobals extends true ? DefaultCSSPropertyValue : never>[Property['property']], IncludeGlobals extends true ? never : object | any[]>;
|
|
24
|
+
type CompatValue<Key extends keyof CompatTheme> = CompatTheme[Key] extends MapScale ? keyof CompatTheme[Key] : CompatTheme[Key] extends ArrayScale ? CompatTheme[Key][number] : never;
|
|
25
|
+
export type ScaleValue<Config extends Prop> = Config['scale'] extends keyof Theme ? keyof Theme[Config['scale']] | PropertyValues<Config, IsEmpty<Theme[Config['scale']]>> : Config['scale'] extends MapScale ? keyof Config['scale'] | PropertyValues<Config, IsEmpty<Config['scale']>> : Config['scale'] extends ArrayScale ? Config['scale'][number] | PropertyValues<Config, IsEmpty<Config['scale']>> : Config['scale'] extends keyof CompatTheme ? CompatValue<Config['scale']> | PropertyValues<Config, IsEmpty<CompatTheme[Config['scale']]>> : PropertyValues<Config, true>;
|
|
26
|
+
export type Scale<Config extends Prop> = ResponsiveProp<ScaleValue<Config> | ((theme: Theme) => ScaleValue<Config>)>;
|
|
27
|
+
export type ParserProps<Config extends Record<string, Prop>> = ThemeProps<{
|
|
28
28
|
[P in keyof Config]?: Scale<Config[P]>;
|
|
29
29
|
}>;
|
|
30
30
|
export interface Parser<Config extends Record<string, Prop>> {
|
|
@@ -32,7 +32,7 @@ export interface Parser<Config extends Record<string, Prop>> {
|
|
|
32
32
|
propNames: Extract<keyof Config, string>[];
|
|
33
33
|
config: Config;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
35
|
+
export type SystemProps<P extends AbstractParser, SafeProps = Omit<Arg<P>, 'theme'>> = {
|
|
36
36
|
[K in keyof SafeProps]: SafeProps[K];
|
|
37
37
|
};
|
|
38
38
|
export interface VariantConfig {
|
|
@@ -41,10 +41,10 @@ export interface VariantConfig {
|
|
|
41
41
|
base?: CSSProps<AbstractProps, SystemProps<AbstractParser>>;
|
|
42
42
|
variants: CSSPropMap<AbstractProps, SystemProps<AbstractParser>>;
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export type CSSPropMap<Props, System> = {
|
|
45
45
|
[K in keyof Props]?: CSSProps<Props[K], System>;
|
|
46
46
|
};
|
|
47
|
-
export
|
|
47
|
+
export type CSSProps<Props, System> = {
|
|
48
48
|
[K in keyof Props]?: K extends keyof System ? System[K] : K extends keyof PropertyTypes ? PropertyTypes[K] : Omit<PropertyTypes, keyof System> & Omit<System, 'theme'>;
|
|
49
49
|
};
|
|
50
50
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Globals, StandardProperties, SvgProperties, VendorProperties } from 'csstype';
|
|
2
2
|
import { CSSObject, NarrowPrimitive } from './shared';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type AnimusCSSProperties<Overrides = DefaultCSSPropertyValue> = StandardProperties<Overrides> & VendorProperties<Overrides> & Omit<SvgProperties<Overrides>, keyof StandardProperties>;
|
|
4
|
+
type ColorProperties = 'color' | `${string}Color` | 'fill' | 'stroke';
|
|
5
|
+
type ColorGlobals = {
|
|
6
6
|
[K in Extract<keyof AnimusCSSProperties, ColorProperties>]?: Globals | 'currentColor' | 'transparent' | NarrowPrimitive<string>;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
type SizeProperties = 'left' | 'right' | 'top' | 'bottom' | 'inset' | 'width' | 'height' | `${string}${'Width' | 'Height'}`;
|
|
9
|
+
type SizeValues = `${number}${'px' | 'rem' | 'vh' | 'vw' | 'vmax' | 'vmin' | '%'}` | `calc(${any})`;
|
|
10
|
+
type SizeGlobals = {
|
|
11
11
|
[K in Extract<keyof AnimusCSSProperties, SizeProperties>]?: AnimusCSSProperties[K] | SizeValues | NarrowPrimitive<number>;
|
|
12
12
|
};
|
|
13
13
|
/** This is a placeholder type for CSS properties that may not have any specific global values (outlineOffset).
|
|
@@ -15,7 +15,7 @@ declare type SizeGlobals = {
|
|
|
15
15
|
*
|
|
16
16
|
* This ensures that autosuggestions will still work for literal types but still allow any string for certain properties.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type DefaultCSSPropertyValue = (string & {}) | 0;
|
|
19
19
|
export interface PropertyTypes<Overrides = DefaultCSSPropertyValue> extends Omit<AnimusCSSProperties<Overrides>, keyof ColorGlobals | keyof SizeGlobals>, ColorGlobals, SizeGlobals {
|
|
20
20
|
none?: never;
|
|
21
21
|
variables?: CSSObject;
|
package/dist/types/props.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Theme } from '@emotion/react';
|
|
2
|
-
export
|
|
2
|
+
export type AbstractProps = ThemeProps<Record<string, unknown>>;
|
|
3
3
|
interface MediaQueryByKey<T = string> {
|
|
4
4
|
xs: T;
|
|
5
5
|
sm: T;
|
|
@@ -11,7 +11,7 @@ export interface MediaQueryCache {
|
|
|
11
11
|
map: MediaQueryByKey;
|
|
12
12
|
array: string[];
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type ThemeProps<Props = {}> = Props & {
|
|
15
15
|
theme?: Theme;
|
|
16
16
|
};
|
|
17
17
|
export interface MediaQueryArray<T> {
|
|
@@ -30,5 +30,5 @@ export interface MediaQueryMap<T> {
|
|
|
30
30
|
lg?: T;
|
|
31
31
|
xl?: T;
|
|
32
32
|
}
|
|
33
|
-
export
|
|
33
|
+
export type ResponsiveProp<T> = T | MediaQueryMap<T> | MediaQueryArray<T>;
|
|
34
34
|
export {};
|
package/dist/types/scales.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type MapScale = Record<string | number, string | number>;
|
|
2
|
+
export type ArrayScale = readonly (string | number)[];
|
package/dist/types/shared.d.ts
CHANGED
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type Arg<T extends (...args: any) => any> = Parameters<T>[0];
|
|
2
|
+
export type AllUnionKeys<T> = T extends any ? keyof T : never;
|
|
3
|
+
export type KeyFromUnion<T, K> = T extends any ? K extends keyof T ? T[K] : never : never;
|
|
4
|
+
export type Key<T> = T extends string ? T : never;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/core",
|
|
3
3
|
"description": "Constraint based CSS in JS Foundations",
|
|
4
|
-
"version": "0.1.1-beta.
|
|
4
|
+
"version": "0.1.1-beta.23",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"emotion",
|
|
7
7
|
"css",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"module": "./dist/index.js",
|
|
14
14
|
"main": "./dist/index.js",
|
|
15
|
-
"types": "dist/index.d.ts",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"compile": "tsc --noEmit"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@emotion/react": ">=11.0.0",
|
|
31
|
-
"@emotion/styled": ">=11.0.0",
|
|
32
30
|
"lodash": "*",
|
|
33
31
|
"typescript": ">=4.3.5"
|
|
34
32
|
},
|
|
35
33
|
"dependencies": {
|
|
36
34
|
"@emotion/is-prop-valid": "^1.1.1",
|
|
35
|
+
"@emotion/react": "^11.0.0",
|
|
36
|
+
"@emotion/styled": "^11.0.0",
|
|
37
37
|
"csstype": "^3.0.7"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "815998212fbe5f4603aa2ddf38d086c484ab88d2"
|
|
40
40
|
}
|
package/rollup.config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
const config = require('../../rollup.config');
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
module.exports = config();
|
package/tsconfig.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../../tsconfig.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"rootDir": "./src",
|
|
5
6
|
"outDir": "./dist"
|
|
6
7
|
},
|
|
7
|
-
"include": ["
|
|
8
|
-
"exclude": ["
|
|
8
|
+
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
|
9
|
+
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
|
|
9
10
|
}
|