This commit is contained in:
zhaowenkai 2023-12-06 16:09:00 +08:00
Родитель 11f484c154
Коммит fe17f9a33e
9 изменённых файлов: 436 добавлений и 91 удалений

Просмотреть файл

@ -8,7 +8,11 @@ namespace AntDesign
{
public class AffixToken : TokenWithCommonCls
{
public int ZIndexPopup { get; set; }
public int ZIndexPopup
{
get => (int)_tokens["zIndexPopup"];
set => _tokens["zIndexPopup"] = value;
}
}

Просмотреть файл

@ -8,11 +8,23 @@ namespace AntDesign
{
public partial class AlertToken : TokenWithCommonCls
{
public string DefaultPadding { get; set; }
public string DefaultPadding
{
get => (string)_tokens["defaultPadding"];
set => _tokens["defaultPadding"] = value;
}
public string WithDescriptionPadding { get; set; }
public string WithDescriptionPadding
{
get => (string)_tokens["withDescriptionPadding"];
set => _tokens["withDescriptionPadding"] = value;
}
public int WithDescriptionIconSize { get; set; }
public int WithDescriptionIconSize
{
get => (int)_tokens["withDescriptionIconSize"];
set => _tokens["withDescriptionIconSize"] = value;
}
}

Просмотреть файл

@ -8,21 +8,45 @@ namespace AntDesign
{
public partial class AnchorToken : TokenWithCommonCls
{
public int LinkPaddingBlock { get; set; }
public int LinkPaddingBlock
{
get => (int)_tokens["linkPaddingBlock"];
set => _tokens["linkPaddingBlock"] = value;
}
public int LinkPaddingInlineStart { get; set; }
public int LinkPaddingInlineStart
{
get => (int)_tokens["linkPaddingInlineStart"];
set => _tokens["linkPaddingInlineStart"] = value;
}
}
public partial class AnchorToken
{
public int HolderOffsetBlock { get; set; }
public int HolderOffsetBlock
{
get => (int)_tokens["holderOffsetBlock"];
set => _tokens["holderOffsetBlock"] = value;
}
public int AnchorPaddingBlockSecondary { get; set; }
public int AnchorPaddingBlockSecondary
{
get => (int)_tokens["anchorPaddingBlockSecondary"];
set => _tokens["anchorPaddingBlockSecondary"] = value;
}
public int AnchorBallSize { get; set; }
public int AnchorBallSize
{
get => (int)_tokens["anchorBallSize"];
set => _tokens["anchorBallSize"] = value;
}
public int AnchorTitleBlock { get; set; }
public int AnchorTitleBlock
{
get => (int)_tokens["anchorTitleBlock"];
set => _tokens["anchorTitleBlock"] = value;
}
}

Просмотреть файл

@ -8,33 +8,81 @@ namespace AntDesign
{
public partial class AvatarToken : TokenWithCommonCls
{
public int ContainerSize { get; set; }
public int ContainerSize
{
get => (int)_tokens["containerSize"];
set => _tokens["containerSize"] = value;
}
public int ContainerSizeLG { get; set; }
public int ContainerSizeLG
{
get => (int)_tokens["containerSizeLG"];
set => _tokens["containerSizeLG"] = value;
}
public int ContainerSizeSM { get; set; }
public int ContainerSizeSM
{
get => (int)_tokens["containerSizeSM"];
set => _tokens["containerSizeSM"] = value;
}
public int TextFontSize { get; set; }
public int TextFontSize
{
get => (int)_tokens["textFontSize"];
set => _tokens["textFontSize"] = value;
}
public int TextFontSizeLG { get; set; }
public int TextFontSizeLG
{
get => (int)_tokens["textFontSizeLG"];
set => _tokens["textFontSizeLG"] = value;
}
public int TextFontSizeSM { get; set; }
public int TextFontSizeSM
{
get => (int)_tokens["textFontSizeSM"];
set => _tokens["textFontSizeSM"] = value;
}
public int GroupSpace { get; set; }
public int GroupSpace
{
get => (int)_tokens["groupSpace"];
set => _tokens["groupSpace"] = value;
}
public int GroupOverlapping { get; set; }
public int GroupOverlapping
{
get => (int)_tokens["groupOverlapping"];
set => _tokens["groupOverlapping"] = value;
}
public string GroupBorderColor { get; set; }
public string GroupBorderColor
{
get => (string)_tokens["groupBorderColor"];
set => _tokens["groupBorderColor"] = value;
}
}
public partial class AvatarToken
{
public string AvatarBgColor { get; set; }
public string AvatarBgColor
{
get => (string)_tokens["avatarBgColor"];
set => _tokens["avatarBgColor"] = value;
}
public string AvatarBg { get; set; }
public string AvatarBg
{
get => (string)_tokens["avatarBg"];
set => _tokens["avatarBg"] = value;
}
public string AvatarColor { get; set; }
public string AvatarColor
{
get => (string)_tokens["avatarColor"];
set => _tokens["avatarColor"] = value;
}
}

Просмотреть файл

@ -8,29 +8,69 @@ namespace AntDesign
{
public partial class BackTopToken : TokenWithCommonCls
{
public int ZIndexPopup { get; set; }
public int ZIndexPopup
{
get => (int)_tokens["zIndexPopup"];
set => _tokens["zIndexPopup"] = value;
}
}
public partial class BackTopToken
{
public string BackTopBackground { get; set; }
public string BackTopBackground
{
get => (string)_tokens["backTopBackground"];
set => _tokens["backTopBackground"] = value;
}
public string BackTopColor { get; set; }
public string BackTopColor
{
get => (string)_tokens["backTopColor"];
set => _tokens["backTopColor"] = value;
}
public string BackTopHoverBackground { get; set; }
public string BackTopHoverBackground
{
get => (string)_tokens["backTopHoverBackground"];
set => _tokens["backTopHoverBackground"] = value;
}
public int BackTopFontSize { get; set; }
public int BackTopFontSize
{
get => (int)_tokens["backTopFontSize"];
set => _tokens["backTopFontSize"] = value;
}
public int BackTopSize { get; set; }
public int BackTopSize
{
get => (int)_tokens["backTopSize"];
set => _tokens["backTopSize"] = value;
}
public int BackTopBlockEnd { get; set; }
public int BackTopBlockEnd
{
get => (int)_tokens["backTopBlockEnd"];
set => _tokens["backTopBlockEnd"] = value;
}
public int BackTopInlineEnd { get; set; }
public int BackTopInlineEnd
{
get => (int)_tokens["backTopInlineEnd"];
set => _tokens["backTopInlineEnd"] = value;
}
public int BackTopInlineEndMD { get; set; }
public int BackTopInlineEndMD
{
get => (int)_tokens["backTopInlineEndMD"];
set => _tokens["backTopInlineEndMD"] = value;
}
public int BackTopInlineEndXS { get; set; }
public int BackTopInlineEndXS
{
get => (int)_tokens["backTopInlineEndXS"];
set => _tokens["backTopInlineEndXS"] = value;
}
}

Просмотреть файл

@ -9,45 +9,117 @@ namespace AntDesign
{
public partial class BadgeToken
{
public string IndicatorZIndex { get; set; }
public string IndicatorZIndex
{
get => (string)_tokens["indicatorZIndex"];
set => _tokens["indicatorZIndex"] = value;
}
public int IndicatorHeight { get; set; }
public int IndicatorHeight
{
get => (int)_tokens["indicatorHeight"];
set => _tokens["indicatorHeight"] = value;
}
public int IndicatorHeightSM { get; set; }
public int IndicatorHeightSM
{
get => (int)_tokens["indicatorHeightSM"];
set => _tokens["indicatorHeightSM"] = value;
}
public int DotSize { get; set; }
public int DotSize
{
get => (int)_tokens["dotSize"];
set => _tokens["dotSize"] = value;
}
public int TextFontSize { get; set; }
public int TextFontSize
{
get => (int)_tokens["textFontSize"];
set => _tokens["textFontSize"] = value;
}
public int TextFontSizeSM { get; set; }
public int TextFontSizeSM
{
get => (int)_tokens["textFontSizeSM"];
set => _tokens["textFontSizeSM"] = value;
}
public string TextFontWeight { get; set; }
public string TextFontWeight
{
get => (string)_tokens["textFontWeight"];
set => _tokens["textFontWeight"] = value;
}
public int StatusSize { get; set; }
public int StatusSize
{
get => (int)_tokens["statusSize"];
set => _tokens["statusSize"] = value;
}
}
public partial class BadgeToken : TokenWithCommonCls
{
public int BadgeFontHeight { get; set; }
public int BadgeFontHeight
{
get => (int)_tokens["badgeFontHeight"];
set => _tokens["badgeFontHeight"] = value;
}
public string BadgeTextColor { get; set; }
public string BadgeTextColor
{
get => (string)_tokens["badgeTextColor"];
set => _tokens["badgeTextColor"] = value;
}
public string BadgeColor { get; set; }
public string BadgeColor
{
get => (string)_tokens["badgeColor"];
set => _tokens["badgeColor"] = value;
}
public string BadgeColorHover { get; set; }
public string BadgeColorHover
{
get => (string)_tokens["badgeColorHover"];
set => _tokens["badgeColorHover"] = value;
}
public int BadgeShadowSize { get; set; }
public int BadgeShadowSize
{
get => (int)_tokens["badgeShadowSize"];
set => _tokens["badgeShadowSize"] = value;
}
public string BadgeShadowColor { get; set; }
public string BadgeShadowColor
{
get => (string)_tokens["badgeShadowColor"];
set => _tokens["badgeShadowColor"] = value;
}
public string BadgeProcessingDuration { get; set; }
public string BadgeProcessingDuration
{
get => (string)_tokens["badgeProcessingDuration"];
set => _tokens["badgeProcessingDuration"] = value;
}
public int BadgeRibbonOffset { get; set; }
public int BadgeRibbonOffset
{
get => (int)_tokens["badgeRibbonOffset"];
set => _tokens["badgeRibbonOffset"] = value;
}
public string BadgeRibbonCornerTransform { get; set; }
public string BadgeRibbonCornerTransform
{
get => (string)_tokens["badgeRibbonCornerTransform"];
set => _tokens["badgeRibbonCornerTransform"] = value;
}
public string BadgeRibbonCornerFilter { get; set; }
public string BadgeRibbonCornerFilter
{
get => (string)_tokens["badgeRibbonCornerFilter"];
set => _tokens["badgeRibbonCornerFilter"] = value;
}
}

Просмотреть файл

@ -8,19 +8,47 @@ namespace AntDesign
{
public partial class BreadcrumbToken
{
public string ItemColor { get; set; }
public string ItemColor
{
get => (string)_tokens["itemColor"];
set => _tokens["itemColor"] = value;
}
public int IconFontSize { get; set; }
public int IconFontSize
{
get => (int)_tokens["iconFontSize"];
set => _tokens["iconFontSize"] = value;
}
public string LinkColor { get; set; }
public string LinkColor
{
get => (string)_tokens["linkColor"];
set => _tokens["linkColor"] = value;
}
public string LinkHoverColor { get; set; }
public string LinkHoverColor
{
get => (string)_tokens["linkHoverColor"];
set => _tokens["linkHoverColor"] = value;
}
public string LastItemColor { get; set; }
public string LastItemColor
{
get => (string)_tokens["lastItemColor"];
set => _tokens["lastItemColor"] = value;
}
public int SeparatorMargin { get; set; }
public int SeparatorMargin
{
get => (int)_tokens["separatorMargin"];
set => _tokens["separatorMargin"] = value;
}
public string SeparatorColor { get; set; }
public string SeparatorColor
{
get => (string)_tokens["separatorColor"];
set => _tokens["separatorColor"] = value;
}
}

Просмотреть файл

@ -1,4 +1,4 @@
using System;
using System;
using CssInCSharp;
using static AntDesign.GlobalStyle;
using static AntDesign.Theme;
@ -8,63 +8,171 @@ namespace AntDesign
{
public partial class ButtonToken
{
public int FontWeight { get; set; }
public int FontWeight
{
get => (int)_tokens["fontWeight"];
set => _tokens["fontWeight"] = value;
}
public string DefaultShadow { get; set; }
public string DefaultShadow
{
get => (string)_tokens["defaultShadow"];
set => _tokens["defaultShadow"] = value;
}
public string PrimaryShadow { get; set; }
public string PrimaryShadow
{
get => (string)_tokens["primaryShadow"];
set => _tokens["primaryShadow"] = value;
}
public string DangerShadow { get; set; }
public string DangerShadow
{
get => (string)_tokens["dangerShadow"];
set => _tokens["dangerShadow"] = value;
}
public string PrimaryColor { get; set; }
public string PrimaryColor
{
get => (string)_tokens["primaryColor"];
set => _tokens["primaryColor"] = value;
}
public string DefaultColor { get; set; }
public string DefaultColor
{
get => (string)_tokens["defaultColor"];
set => _tokens["defaultColor"] = value;
}
public string DefaultBg { get; set; }
public string DefaultBg
{
get => (string)_tokens["defaultBg"];
set => _tokens["defaultBg"] = value;
}
public string DefaultBorderColor { get; set; }
public string DefaultBorderColor
{
get => (string)_tokens["defaultBorderColor"];
set => _tokens["defaultBorderColor"] = value;
}
public string DangerColor { get; set; }
public string DangerColor
{
get => (string)_tokens["dangerColor"];
set => _tokens["dangerColor"] = value;
}
public string BorderColorDisabled { get; set; }
public string BorderColorDisabled
{
get => (string)_tokens["borderColorDisabled"];
set => _tokens["borderColorDisabled"] = value;
}
public string DefaultGhostColor { get; set; }
public string DefaultGhostColor
{
get => (string)_tokens["defaultGhostColor"];
set => _tokens["defaultGhostColor"] = value;
}
public string GhostBg { get; set; }
public string GhostBg
{
get => (string)_tokens["ghostBg"];
set => _tokens["ghostBg"] = value;
}
public string DefaultGhostBorderColor { get; set; }
public string DefaultGhostBorderColor
{
get => (string)_tokens["defaultGhostBorderColor"];
set => _tokens["defaultGhostBorderColor"] = value;
}
public int PaddingInline { get; set; }
public int PaddingInline
{
get => (int)_tokens["paddingInline"];
set => _tokens["paddingInline"] = value;
}
public int PaddingInlineLG { get; set; }
public int PaddingInlineLG
{
get => (int)_tokens["paddingInlineLG"];
set => _tokens["paddingInlineLG"] = value;
}
public int PaddingInlineSM { get; set; }
public int PaddingInlineSM
{
get => (int)_tokens["paddingInlineSM"];
set => _tokens["paddingInlineSM"] = value;
}
public int OnlyIconSize { get; set; }
public int OnlyIconSize
{
get => (int)_tokens["onlyIconSize"];
set => _tokens["onlyIconSize"] = value;
}
public int OnlyIconSizeLG { get; set; }
public int OnlyIconSizeLG
{
get => (int)_tokens["onlyIconSizeLG"];
set => _tokens["onlyIconSizeLG"] = value;
}
public int OnlyIconSizeSM { get; set; }
public int OnlyIconSizeSM
{
get => (int)_tokens["onlyIconSizeSM"];
set => _tokens["onlyIconSizeSM"] = value;
}
public string GroupBorderColor { get; set; }
public string GroupBorderColor
{
get => (string)_tokens["groupBorderColor"];
set => _tokens["groupBorderColor"] = value;
}
public string LinkHoverBg { get; set; }
public string LinkHoverBg
{
get => (string)_tokens["linkHoverBg"];
set => _tokens["linkHoverBg"] = value;
}
public string TextHoverBg { get; set; }
public string TextHoverBg
{
get => (string)_tokens["textHoverBg"];
set => _tokens["textHoverBg"] = value;
}
public int ContentFontSize { get; set; }
public int ContentFontSize
{
get => (int)_tokens["contentFontSize"];
set => _tokens["contentFontSize"] = value;
}
public int ContentFontSizeLG { get; set; }
public int ContentFontSizeLG
{
get => (int)_tokens["contentFontSizeLG"];
set => _tokens["contentFontSizeLG"] = value;
}
public int ContentFontSizeSM { get; set; }
public int ContentFontSizeSM
{
get => (int)_tokens["contentFontSizeSM"];
set => _tokens["contentFontSizeSM"] = value;
}
}
public partial class ButtonToken : TokenWithCommonCls
{
public int ButtonPaddingHorizontal { get; set; }
public int ButtonPaddingHorizontal
{
get => (int)_tokens["buttonPaddingHorizontal"];
set => _tokens["buttonPaddingHorizontal"] = value;
}
public int ButtonIconOnlyFontSize { get; set; }
public int ButtonIconOnlyFontSize
{
get => (int)_tokens["buttonIconOnlyFontSize"];
set => _tokens["buttonIconOnlyFontSize"] = value;
}
}
@ -776,4 +884,4 @@ namespace AntDesign
}
}
}

Просмотреть файл

@ -1169,6 +1169,7 @@ export const data2: Component[] = [
csOptions: {
...defaultOptions,
defaultClass: 'Affix',
propertyMap: '_tokens',
typeMap: [
{ from: 'Unknown1', to: 'AffixToken', includes: [1] },
{ from: 'Unknown2', to: 'AffixToken', includes: [1] },
@ -1188,6 +1189,7 @@ export const data2: Component[] = [
csOptions: {
...defaultOptions,
defaultClass: 'Alert',
propertyMap: '_tokens',
typeMap: [
{ from: 'Padding<string | number>', to: 'string' },
{ from: 'Unknown6', to: 'CSSInterpolation', includes: [1] },
@ -1209,6 +1211,7 @@ export const data2: Component[] = [
csOptions: {
...defaultOptions,
defaultClass: 'Anchor',
propertyMap: '_tokens',
typeMap: [
{ from: 'Unknown1', to: 'AnchorToken', includes: [1] },
{ from: 'Unknown2', to: 'AnchorToken', includes: [1] },
@ -1232,6 +1235,7 @@ export const data2: Component[] = [
csOptions: {
...defaultOptions,
defaultClass: 'Avatar',
propertyMap: '_tokens',
typeMap: [
{ from: 'Unknown1', to: 'CSSObject', ranges: [[1, 9]] },
{ from: 'Unknown1', to: 'AvatarToken', includes: [2] },
@ -1258,6 +1262,7 @@ export const data2: Component[] = [
csOptions: {
...defaultOptions,
defaultClass: 'BackTop',
propertyMap: '_tokens',
typeMap: [
{ from: 'Unknown1', to: 'BackTopToken', includes: [1] },
{ from: 'Unknown2', to: 'BackTopToken', includes: [1] },
@ -1285,6 +1290,7 @@ export const data2: Component[] = [
...defaultOptions,
usings: defaultOptions.usings.concat(['using Keyframes = CssInCSharp.Keyframe;']),
defaultClass: 'Badge',
propertyMap: '_tokens',
typeMap: [
{ from: 'Keyframes', to: 'CSSObject' },
{ from: 'Unknown7', to: 'CSSObject', includes: [1, 2, 3] },
@ -1316,6 +1322,7 @@ export const data2: Component[] = [
csOptions: {
...defaultOptions,
defaultClass: 'Breadcrumb',
propertyMap: '_tokens',
typeMap: [
{ from: 'Unknown1', to: 'CSSObject', ranges: [[1, 19]] },
{ from: 'Unknown1', to: 'BreadcrumbToken', includes: [2] },
@ -1333,10 +1340,6 @@ export const data2: Component[] = [
]
}
},
];
// 用于生成的实例,将需要生成的组件配置放到这里
export const components: Component[] = [
{
name: 'Button',
src: [
@ -1347,6 +1350,7 @@ export const components: Component[] = [
csOptions: {
...defaultOptions,
defaultClass: 'Button',
propertyMap: '_tokens',
typeMap: [
{ from: 'FontWeight', to: 'int' },
{ from: 'PaddingInline<string | number>', to: 'int' },
@ -1406,4 +1410,9 @@ export const components: Component[] = [
]
}
},
]
];
// 用于生成的实例,将需要生成的组件配置放到这里
export const components: Component[] = [
];