type: support string | number (#49810) (#49855)

* type(token): height / width support string | number

* rever
This commit is contained in:
thinkasany 2024-07-14 00:36:43 +08:00 committed by GitHub
parent d9f70d738c
commit da1d8df417
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 66 additions and 66 deletions

View File

@ -17,12 +17,12 @@ export interface ComponentToken {
* @desc
* @descEN Height of badge
*/
indicatorHeight: number;
indicatorHeight: number | string;
/**
* @desc
* @descEN Height of small badge
*/
indicatorHeightSM: number;
indicatorHeightSM: number | string;
/**
* @desc
* @descEN Size of dot badge

View File

@ -16,17 +16,17 @@ export interface ComponentToken {
* @desc
* @descEN Width of year select
*/
yearControlWidth: number;
yearControlWidth: number | string;
/**
* @desc
* @descEN Width of month select
*/
monthControlWidth: number;
monthControlWidth: number | string;
/**
* @desc
* @descEN Height of mini calendar content
*/
miniContentHeight: number;
miniContentHeight: number | string;
/**
* @desc
* @descEN Background color of full calendar
@ -46,9 +46,9 @@ export interface ComponentToken {
interface CalendarToken extends FullToken<'Calendar'>, PickerPanelToken, PanelComponentToken {
calendarCls: string;
dateValueHeight: number;
weekHeight: number;
dateContentHeight: number;
dateValueHeight: number | string;
weekHeight: number | string;
dateContentHeight: number | string;
}
export const genCalendarStyles = (token: CalendarToken): CSSObject => {

View File

@ -15,22 +15,22 @@ export interface ComponentToken {
* @desc
* @descEN Font size of card header
*/
headerFontSize: number;
headerFontSize: number | string;
/**
* @desc
* @descEN Font size of small card header
*/
headerFontSizeSM: number;
headerFontSizeSM: number | string;
/**
* @desc
* @descEN Height of card header
*/
headerHeight: number;
headerHeight: number | string;
/**
* @desc
* @descEN Height of small card header
*/
headerHeightSM: number;
headerHeightSM: number | string;
/**
* @desc
* @descEN Background color of card actions

View File

@ -9,12 +9,12 @@ export interface ComponentToken {
* @desc
* @descEN Width of indicator
*/
dotWidth: number;
dotWidth: number | string;
/**
* @desc
* @descEN Height of indicator
*/
dotHeight: number;
dotHeight: number | string;
/**
* @desc
* @descEN gap between indicator
@ -31,7 +31,7 @@ export interface ComponentToken {
* @desc
* @descEN Width of active indicator
*/
dotActiveWidth: number;
dotActiveWidth: number | string;
/**
* @desc
* @descEN Size of arrows

View File

@ -11,17 +11,17 @@ export interface ComponentToken {
* @desc
* @descEN Width of Cascader
*/
controlWidth: number;
controlWidth: number | string;
/**
* @desc
* @descEN Width of item
*/
controlItemWidth: number;
controlItemWidth: number | string;
/**
* @desc
* @descEN Height of dropdown
*/
dropdownHeight: number;
dropdownHeight: number | string;
/**
* @desc
* @descEN Background color of selected item

View File

@ -11,7 +11,7 @@ interface EmptyToken extends FullToken<'Empty'> {
emptyImgCls: string;
emptyImgHeight: number | string;
emptyImgHeightSM: number | string;
emptyImgHeightMD: number;
emptyImgHeightMD: number | string;
}
// ============================== Shared ==============================

View File

@ -29,7 +29,7 @@ export interface ComponentToken {
* @desc
* @descEN Label height
*/
labelHeight: number;
labelHeight: number | string;
/**
* @desc
* @descEN Label colon margin-inline-start

View File

@ -58,7 +58,7 @@ export interface ComponentToken {
* @desc
* @descEN Height of sider trigger
*/
triggerHeight: number;
triggerHeight: number | string;
/**
* @desc
* @descEN Background Color of sider trigger

View File

@ -11,7 +11,7 @@ export interface ComponentToken {
* @desc
* @descEN Width of content
*/
contentWidth: number;
contentWidth: number | string;
/**
* @desc
* @descEN Padding of large item
@ -66,7 +66,7 @@ export interface ComponentToken {
interface ListToken extends FullToken<'List'> {
listBorderedCls: string;
minHeight: number;
minHeight: number | string;
}
const genBorderedStyle = (token: ListToken): CSSObject => {

View File

@ -27,12 +27,12 @@ export interface ComponentToken extends SharedComponentToken {
* @desc
* @descEN Height of popup
*/
dropdownHeight: number;
dropdownHeight: number | string;
/**
* @desc
* @descEN Height of menu item
*/
controlItemWidth: number;
controlItemWidth: number | string;
}
type MentionsToken = FullToken<'Mentions'> &

View File

@ -19,7 +19,7 @@ export interface ComponentToken {
* @desc
* @descEN Width of popup menu
*/
dropdownWidth: number;
dropdownWidth: number | string;
/**
* @desc z-index
* @descEN z-index of popup menu
@ -205,12 +205,12 @@ export interface ComponentToken {
// Ink Bar
/** @deprecated Use `activeBarWidth` instead */
colorActiveBarWidth: number;
colorActiveBarWidth: number | string;
/**
* @desc
* @descEN Width of menu item active bar
*/
activeBarWidth: number;
activeBarWidth: number | string;
/** @deprecated Use `activeBarHeight` instead */
colorActiveBarHeight: number;
@ -226,7 +226,7 @@ export interface ComponentToken {
* @desc
* @descEN Border width of menu item active bar
*/
activeBarBorderWidth: number;
activeBarBorderWidth: number | string;
/**
* @desc
@ -247,12 +247,12 @@ export interface ComponentToken {
* @desc
* @descEN Height of menu item
*/
itemHeight: number;
itemHeight: number | string;
/**
* @desc
* @descEN Width when collapsed
*/
collapsedWidth: number;
collapsedWidth: number | string;
/**
* @desc
* @descEN Background color of popup
@ -366,7 +366,7 @@ export interface ComponentToken {
*/
darkDangerItemActiveBg: string;
/** @internal */
itemWidth: string;
itemWidth: number | string;
}
export interface MenuToken extends FullToken<'Menu'> {

View File

@ -20,7 +20,7 @@ export interface ComponentToken {
* @desc
* @descEN Line height of title
*/
titleLineHeight: number;
titleLineHeight: number | string;
/**
* @desc
* @descEN Font size of title
@ -73,7 +73,7 @@ export interface ModalToken extends FullToken<'Modal'> {
modalHeaderHeight: number | string;
modalFooterBorderColorSplit: string;
modalFooterBorderStyle: string;
modalFooterBorderWidth: number;
modalFooterBorderWidth: number | string;
modalCloseIconColor: string;
modalCloseIconHoverColor: string;
modalCloseBtnSize: number | string;

View File

@ -20,11 +20,11 @@ export interface ComponentToken {
* @desc
* @descEN Width of Notification
*/
width: number;
width: number | string;
}
export interface NotificationToken extends FullToken<'Notification'> {
animationMaxHeight: number;
animationMaxHeight: number | string;
notificationBg: string;
notificationPadding: string;
notificationPaddingVertical: number;

View File

@ -18,18 +18,18 @@ export interface ComponentToken extends ArrowToken, ArrowOffsetToken {
* @desc
* @descEN Width of Popover
*/
width?: number;
width?: number | string;
/**
* @deprecated Please use `titleMinWidth` instead
* @desc
* @descEN Min width of Popover
*/
minWidth?: number;
minWidth?: number | string;
/**
* @desc
* @descEN Min width of Popover title
*/
titleMinWidth: number;
titleMinWidth: number | string;
/**
* @desc z-index
* @descEN z-index of Popover

View File

@ -29,8 +29,8 @@ export interface ComponentToken {
}
interface ResultToken extends FullToken<'Result'> {
imageWidth: number;
imageHeight: number;
imageWidth: number | string;
imageHeight: number | string;
resultInfoIconColor: string;
resultSuccessIconColor: string;
resultWarningIconColor: string;

View File

@ -24,7 +24,7 @@ export type ComponentToken = {
* @desc
* @descEN Height of title skeleton
*/
titleHeight: number;
titleHeight: number | string;
/**
* @desc
* @descEN Border radius of skeleton

View File

@ -38,12 +38,12 @@ export interface ComponentToken {
* @desc
* @descEN Border width of handle
*/
handleLineWidth: number;
handleLineWidth: number | string;
/**
* @desc
* @descEN Border width of handle when hover
*/
handleLineWidthHover: number;
handleLineWidthHover: number | string;
/**
* @desc
* @descEN Size of dot

View File

@ -10,7 +10,7 @@ export interface ComponentToken {
* @desc
* @descEN Height of content area
*/
contentHeight: number;
contentHeight: number | string;
/**
* @desc
* @descEN Loading icon size

View File

@ -81,7 +81,7 @@ export interface ComponentToken {
* @desc
* @descEN Line height of title
*/
titleLineHeight: number;
titleLineHeight: number | string;
/**
* @internal
*/

View File

@ -11,22 +11,22 @@ export interface ComponentToken {
* @desc
* @descEN Height of Switch
*/
trackHeight: number;
trackHeight: number | string;
/**
* @desc
* @descEN Height of small Switch
*/
trackHeightSM: number;
trackHeightSM: number | string;
/**
* @desc
* @descEN Minimum width of Switch
*/
trackMinWidth: number;
trackMinWidth: number | string;
/**
* @desc
* @descEN Minimum width of small Switch
*/
trackMinWidthSM: number;
trackMinWidthSM: number | string;
/**
* @desc
* @descEN Padding of Switch

View File

@ -166,7 +166,7 @@ export interface ComponentToken {
* @desc
* @descEN Width of selection column
*/
selectionColumnWidth: number;
selectionColumnWidth: number | string;
/**
* @desc Sticky
* @descEN Background of sticky scrollbar
@ -214,14 +214,14 @@ export interface TableToken extends FullToken<'Table'> {
tableFixedHeaderSortActiveBg: string;
tableHeaderFilterActiveBg: string;
tableFilterDropdownBg: string;
tableFilterDropdownHeight: number;
tableFilterDropdownHeight: number | string;
tableRowHoverBg: string;
tableSelectedRowBg: string;
tableSelectedRowHoverBg: string;
tableFontSizeMiddle: number;
tableFontSizeSmall: number;
tableSelectionColumnWidth: number;
tableSelectionColumnWidth: number | string;
tableExpandIconBg: string;
tableExpandColumnWidth: number | string;
tableExpandedRowBg: string;

View File

@ -21,7 +21,7 @@ export interface ComponentToken {
* @desc
* @descEN Height of card tab
*/
cardHeight: number;
cardHeight: number | string;
/**
* @desc
* @descEN Padding of card tab
@ -134,8 +134,8 @@ export interface TabsToken extends FullToken<'Tabs'> {
dropdownEdgeChildVerticalPadding: number;
tabsNavWrapPseudoWidth: number;
tabsActiveTextShadow: string;
tabsDropdownHeight: number;
tabsDropdownWidth: number;
tabsDropdownHeight: number | string;
tabsDropdownWidth: number | string;
tabsHorizontalItemMargin: string;
tabsHorizontalItemMarginRTL: string;
}

View File

@ -15,12 +15,12 @@ export interface ComponentToken {
* @desc
* @descEN Line width
*/
tailWidth: number;
tailWidth: number | string;
/**
* @desc
* @descEN Border width of node
*/
dotBorderWidth: number;
dotBorderWidth: number | string;
/**
* @desc
* @descEN Background color of node

View File

@ -37,8 +37,8 @@ export interface ComponentToken extends ArrowOffsetToken, ArrowToken {
interface TourToken extends FullToken<'Tour'> {
tourZIndexPopup: number;
indicatorWidth: number;
indicatorHeight: number;
indicatorWidth: number | string;
indicatorHeight: number | string;
tourBorderRadius: number;
}

View File

@ -10,32 +10,32 @@ export interface ComponentToken {
* @desc
* @descEN Width of list
*/
listWidth: number;
listWidth: number | string;
/**
* @desc
* @descEN Width of large list
*/
listWidthLG: number;
listWidthLG: number | string;
/**
* @desc
* @descEN Height of list
*/
listHeight: number;
listHeight: number | string;
/**
* @desc
* @descEN Height of list item
*/
itemHeight: number;
itemHeight: number | string;
/**
* @desc
* @descEN Vertical padding of list item
*/
itemPaddingBlock: number;
itemPaddingBlock: number | string;
/**
* @desc
* @descEN Height of header
*/
headerHeight: number;
headerHeight: number | string;
}
interface TransferToken extends FullToken<'Transfer'> {