-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [0.1.4](v0.1.3...v0.1.4) (2021-09-27) ### Bug Fixes * fix fake thing ([871c75a](871c75a))
- Loading branch information
1 parent
871c75a
commit 5224f88
Showing
3 changed files
with
17 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,16 @@ | ||
import type { | ||
ResponsiveLazy, | ||
ResponsiveOne, | ||
ResponsiveStyle, | ||
ResponsiveStyles, | ||
} from "@dash-ui/responsive"; | ||
import type { | ||
Style, | ||
Styles, | ||
StylesLazy, | ||
StylesOne, | ||
DashTokens, | ||
} from "@dash-ui/styles"; | ||
import type { ResponsiveLazy, ResponsiveOne, ResponsiveStyle, ResponsiveStyles } from "@dash-ui/responsive"; | ||
import type { DashTokens, Style, Styles, StylesLazy, StylesOne } from "@dash-ui/styles"; | ||
/** | ||
* A factory function that creates a compound styles utility | ||
* | ||
* @param styles | ||
*/ | ||
declare function compound<Tokens extends DashTokens, ThemeNames extends string>( | ||
styles: Styles<Tokens, ThemeNames> | ResponsiveStyles<Tokens, any, ThemeNames> | ||
): < | ||
Keys extends string, | ||
T extends Record< | ||
Keys, | ||
| StylesOne | ||
| ResponsiveStyle<any, any, any> | ||
| Style<any, DashTokens> | ||
| ResponsiveOne<any> | ||
| StylesLazy<any> | ||
| ResponsiveLazy<any, any> | ||
>, | ||
StyleMap extends { [Name in keyof T]: T[Name] } | ||
>( | ||
styleMap: StyleMap, | ||
options?: CompoundStylesOptions | ||
) => (( | ||
compoundMap?: { | ||
[Name_1 in keyof StyleMap]?: Parameters<StyleMap[Name_1]>[0] | undefined; | ||
}, | ||
compoundOptions?: CompoundStylesOptions | ||
) => string) & { | ||
css: (compoundMap: { | ||
[Name_2 in keyof StyleMap]?: Parameters<StyleMap[Name_2]>[0] | undefined; | ||
}) => string; | ||
atomicCss: (compoundMap: { | ||
[Name_3 in keyof StyleMap]?: Parameters<StyleMap[Name_3]>[0] | undefined; | ||
}) => string[]; | ||
styles: StyleMap; | ||
declare function compound<Tokens extends DashTokens, ThemeNames extends string>(styles: Styles<Tokens, ThemeNames> | ResponsiveStyles<Tokens, any, ThemeNames>): <Keys extends string, T extends Record<Keys, StylesOne | ResponsiveStyle<any, any, any> | Style<any, DashTokens> | ResponsiveOne<any> | StylesLazy<any> | ResponsiveLazy<any, any>>, StyleMap extends { [Name in keyof T]: T[Name]; }>(styleMap: StyleMap, options?: CompoundStylesOptions) => ((compoundMap?: { [Name_1 in keyof StyleMap]?: Parameters<StyleMap[Name_1]>[0] | undefined; }, compoundOptions?: CompoundStylesOptions) => string) & { | ||
css: (compoundMap: { [Name_2 in keyof StyleMap]?: Parameters<StyleMap[Name_2]>[0] | undefined; }) => string; | ||
atomicCss: (compoundMap: { [Name_3 in keyof StyleMap]?: Parameters<StyleMap[Name_3]>[0] | undefined; }) => string[]; | ||
styles: StyleMap; | ||
}; | ||
export declare type CompoundStylesOptions = { | ||
atomic?: boolean; | ||
atomic?: boolean; | ||
}; | ||
export default compound; |