-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement splitVariantProps to avoid unexpected className
- Loading branch information
Showing
75 changed files
with
564 additions
and
301 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
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,17 +1,21 @@ | ||
interface ActionSheetVariant { | ||
declare interface ActionSheetVariant { | ||
|
||
} | ||
|
||
type ActionSheetVariantMap = { | ||
declare type ActionSheetVariantMap = { | ||
[key in keyof ActionSheetVariant]: Array<ActionSheetVariant[key]>; | ||
}; | ||
|
||
export type ActionSheetVariantProps = Partial<ActionSheetVariant>; | ||
export declare type ActionSheetVariantProps = Partial<ActionSheetVariant>; | ||
|
||
export type ActionSheetSlotName = "backdrop" | "container" | "content" | "list" | "group" | "footer"; | ||
export declare type ActionSheetSlotName = "backdrop" | "container" | "content" | "list" | "group" | "footer"; | ||
|
||
export const actionSheetVariantMap: ActionSheetVariantMap; | ||
export declare const actionSheetVariantMap: ActionSheetVariantMap; | ||
|
||
export function actionSheet( | ||
export declare const actionSheet: (( | ||
props?: ActionSheetVariantProps, | ||
): Record<ActionSheetSlotName, string>; | ||
) => Record<ActionSheetSlotName, string>) & { | ||
splitVariantProps: <T extends ActionSheetVariantProps>( | ||
props: T, | ||
) => [ActionSheetVariantProps, Omit<T, keyof ActionSheetVariantProps>]; | ||
} |
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,17 +1,21 @@ | ||
interface ActionSheetCloseButtonVariant { | ||
declare interface ActionSheetCloseButtonVariant { | ||
|
||
} | ||
|
||
type ActionSheetCloseButtonVariantMap = { | ||
declare type ActionSheetCloseButtonVariantMap = { | ||
[key in keyof ActionSheetCloseButtonVariant]: Array<ActionSheetCloseButtonVariant[key]>; | ||
}; | ||
|
||
export type ActionSheetCloseButtonVariantProps = Partial<ActionSheetCloseButtonVariant>; | ||
export declare type ActionSheetCloseButtonVariantProps = Partial<ActionSheetCloseButtonVariant>; | ||
|
||
export type ActionSheetCloseButtonSlotName = "root" | "label"; | ||
export declare type ActionSheetCloseButtonSlotName = "root" | "label"; | ||
|
||
export const actionSheetCloseButtonVariantMap: ActionSheetCloseButtonVariantMap; | ||
export declare const actionSheetCloseButtonVariantMap: ActionSheetCloseButtonVariantMap; | ||
|
||
export function actionSheetCloseButton( | ||
export declare const actionSheetCloseButton: (( | ||
props?: ActionSheetCloseButtonVariantProps, | ||
): Record<ActionSheetCloseButtonSlotName, string>; | ||
) => Record<ActionSheetCloseButtonSlotName, string>) & { | ||
splitVariantProps: <T extends ActionSheetCloseButtonVariantProps>( | ||
props: T, | ||
) => [ActionSheetCloseButtonVariantProps, Omit<T, keyof ActionSheetCloseButtonVariantProps>]; | ||
} |
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,20 +1,24 @@ | ||
interface ActionSheetItemVariant { | ||
declare interface ActionSheetItemVariant { | ||
/** | ||
* @default neutral | ||
*/ | ||
tone: "neutral" | "danger"; | ||
} | ||
|
||
type ActionSheetItemVariantMap = { | ||
declare type ActionSheetItemVariantMap = { | ||
[key in keyof ActionSheetItemVariant]: Array<ActionSheetItemVariant[key]>; | ||
}; | ||
|
||
export type ActionSheetItemVariantProps = Partial<ActionSheetItemVariant>; | ||
export declare type ActionSheetItemVariantProps = Partial<ActionSheetItemVariant>; | ||
|
||
export type ActionSheetItemSlotName = "root" | "prefixIcon" | "label"; | ||
export declare type ActionSheetItemSlotName = "root" | "prefixIcon" | "label"; | ||
|
||
export const actionSheetItemVariantMap: ActionSheetItemVariantMap; | ||
export declare const actionSheetItemVariantMap: ActionSheetItemVariantMap; | ||
|
||
export function actionSheetItem( | ||
export declare const actionSheetItem: (( | ||
props?: ActionSheetItemVariantProps, | ||
): Record<ActionSheetItemSlotName, string>; | ||
) => Record<ActionSheetItemSlotName, string>) & { | ||
splitVariantProps: <T extends ActionSheetItemVariantProps>( | ||
props: T, | ||
) => [ActionSheetItemVariantProps, Omit<T, keyof ActionSheetItemVariantProps>]; | ||
} |
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,20 +1,24 @@ | ||
interface AvatarVariant { | ||
declare interface AvatarVariant { | ||
/** | ||
* @default 48 | ||
*/ | ||
size: "20" | "24" | "36" | "48" | "64" | "80" | "96"; | ||
} | ||
|
||
type AvatarVariantMap = { | ||
declare type AvatarVariantMap = { | ||
[key in keyof AvatarVariant]: Array<AvatarVariant[key]>; | ||
}; | ||
|
||
export type AvatarVariantProps = Partial<AvatarVariant>; | ||
export declare type AvatarVariantProps = Partial<AvatarVariant>; | ||
|
||
export type AvatarSlotName = "root" | "image" | "fallback" | "badge"; | ||
export declare type AvatarSlotName = "root" | "image" | "fallback" | "badge"; | ||
|
||
export const avatarVariantMap: AvatarVariantMap; | ||
export declare const avatarVariantMap: AvatarVariantMap; | ||
|
||
export function avatar( | ||
export declare const avatar: (( | ||
props?: AvatarVariantProps, | ||
): Record<AvatarSlotName, string>; | ||
) => Record<AvatarSlotName, string>) & { | ||
splitVariantProps: <T extends AvatarVariantProps>( | ||
props: T, | ||
) => [AvatarVariantProps, Omit<T, keyof AvatarVariantProps>]; | ||
} |
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,20 +1,24 @@ | ||
interface AvatarStackVariant { | ||
declare interface AvatarStackVariant { | ||
/** | ||
* @default 48 | ||
*/ | ||
size: "20" | "24" | "36" | "48" | "64"; | ||
} | ||
|
||
type AvatarStackVariantMap = { | ||
declare type AvatarStackVariantMap = { | ||
[key in keyof AvatarStackVariant]: Array<AvatarStackVariant[key]>; | ||
}; | ||
|
||
export type AvatarStackVariantProps = Partial<AvatarStackVariant>; | ||
export declare type AvatarStackVariantProps = Partial<AvatarStackVariant>; | ||
|
||
export type AvatarStackSlotName = "root" | "item"; | ||
export declare type AvatarStackSlotName = "root" | "item"; | ||
|
||
export const avatarStackVariantMap: AvatarStackVariantMap; | ||
export declare const avatarStackVariantMap: AvatarStackVariantMap; | ||
|
||
export function avatarStack( | ||
export declare const avatarStack: (( | ||
props?: AvatarStackVariantProps, | ||
): Record<AvatarStackSlotName, string>; | ||
) => Record<AvatarStackSlotName, string>) & { | ||
splitVariantProps: <T extends AvatarStackVariantProps>( | ||
props: T, | ||
) => [AvatarStackVariantProps, Omit<T, keyof AvatarStackVariantProps>]; | ||
} |
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
Oops, something went wrong.