mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
refactor: rename some cssr vars
This commit is contained in:
parent
12e58dd5aa
commit
42f05ff382
@ -8,8 +8,8 @@ export default c([
|
||||
railColorActive,
|
||||
linkTextColor,
|
||||
linkTextColorHover,
|
||||
linkTextColorActive,
|
||||
linkTextColorMatch
|
||||
linkTextColorPressed,
|
||||
linkTextColorActive
|
||||
} = props.$local
|
||||
const {
|
||||
cubicBezierEaseInOut
|
||||
@ -108,10 +108,10 @@ export default c([
|
||||
color: linkTextColorHover
|
||||
}),
|
||||
c('&:active', {
|
||||
color: linkTextColorActive
|
||||
color: linkTextColorPressed
|
||||
}),
|
||||
cM('active', {
|
||||
color: linkTextColorMatch
|
||||
color: linkTextColorActive
|
||||
})
|
||||
])
|
||||
])
|
||||
|
@ -22,8 +22,8 @@ export default create({
|
||||
linkColor: changeColor(primaryColor, { alpha: 0.15 }),
|
||||
linkTextColor: textColor2Overlay,
|
||||
linkTextColorHover: primaryColorHover,
|
||||
linkTextColorActive: primaryColorPressed,
|
||||
linkTextColorMatch: primaryColor
|
||||
linkTextColorPressed: primaryColorPressed,
|
||||
linkTextColorActive: primaryColor
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -22,8 +22,8 @@ export default create({
|
||||
linkColor: changeColor(primaryColor, { alpha: 0.15 }),
|
||||
linkTextColor: textColor2Overlay,
|
||||
linkTextColorHover: primaryColorHover,
|
||||
linkTextColorActive: primaryColorPressed,
|
||||
linkTextColorMatch: primaryColor
|
||||
linkTextColorPressed: primaryColorPressed,
|
||||
linkTextColorActive: primaryColor
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -14,7 +14,7 @@ export default c([
|
||||
borderRadius,
|
||||
closeColor,
|
||||
closeColorHover,
|
||||
closeColorActive
|
||||
closeColorPressed
|
||||
} = props.$local
|
||||
return cTB(
|
||||
'card',
|
||||
@ -136,7 +136,7 @@ export default c([
|
||||
color: closeColorHover
|
||||
}),
|
||||
c('&:active', {
|
||||
color: closeColorActive
|
||||
color: closeColorPressed
|
||||
})
|
||||
])
|
||||
]),
|
||||
|
@ -18,7 +18,7 @@ export default create({
|
||||
titleFontWeight: base.fontWeightStrong,
|
||||
closeColor: derived.closeColorOverlay,
|
||||
closeColorHover: derived.colorColorHoverOverlay,
|
||||
closeColorActive: derived.closeColorPressedOverlay,
|
||||
closeColorPressed: derived.closeColorPressedOverlay,
|
||||
borderRadius
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ export default create({
|
||||
titleFontWeight: base.fontWeightStrong,
|
||||
closeColor: derived.closeColor,
|
||||
closeColorHover: derived.closeColorHover,
|
||||
closeColorActive: derived.closeColorPressed,
|
||||
closeColorPressed: derived.closeColorPressed,
|
||||
borderRadius
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ export default c([
|
||||
color,
|
||||
colorDisabled,
|
||||
colorTableHeader,
|
||||
colorModalTableHeader,
|
||||
colorTableHeaderModal,
|
||||
iconColor,
|
||||
iconColorDisabled,
|
||||
borderColor,
|
||||
@ -156,7 +156,7 @@ export default c([
|
||||
cNotM('indeterminate', [
|
||||
cNotM('disabled', [
|
||||
cB('checkbox-box', {
|
||||
backgroundColor: colorModalTableHeader
|
||||
backgroundColor: colorTableHeaderModal
|
||||
})
|
||||
])
|
||||
])
|
||||
|
@ -21,7 +21,7 @@ export default create({
|
||||
color: 'transparent',
|
||||
colorDisabled: inputColorDisabledOverlay,
|
||||
colorTableHeader: cardColor,
|
||||
colorModalTableHeader: modalColor,
|
||||
colorTableHeaderModal: modalColor,
|
||||
iconColor: cardColor,
|
||||
iconColorDisabled: textColorDisabledOverlay,
|
||||
borderColor: borderColorOverlay,
|
||||
|
@ -22,7 +22,7 @@ export default create({
|
||||
color: baseColor,
|
||||
colorDisabled: inputColorDisabled,
|
||||
colorTableHeader: cardColor,
|
||||
colorModalTableHeader: modalColor,
|
||||
colorTableHeaderModal: modalColor,
|
||||
iconColor: baseColor,
|
||||
iconColorDisabled: textColorDisabled,
|
||||
borderColor: borderColor,
|
||||
|
@ -12,7 +12,7 @@ export default c([
|
||||
titleFontWeight,
|
||||
closeColor,
|
||||
closeColorHover,
|
||||
closeColorActive,
|
||||
closeColorPressed,
|
||||
iconColorInfo,
|
||||
iconColorSuccess,
|
||||
iconColorWarning,
|
||||
@ -100,7 +100,7 @@ export default c([
|
||||
color: closeColorHover
|
||||
}),
|
||||
c('&:active', {
|
||||
color: closeColorActive
|
||||
color: closeColorPressed
|
||||
})
|
||||
])
|
||||
])
|
||||
|
@ -22,7 +22,7 @@ export default create({
|
||||
color: modalColor,
|
||||
closeColor: closeOverylayColor,
|
||||
closeColorHover: colorColorHoverOverlay,
|
||||
closeColorActive: closeActiveOverylayColor,
|
||||
closeColorPressed: closeActiveOverylayColor,
|
||||
iconColorInfo: infoColor,
|
||||
iconColorSuccess: successColor,
|
||||
iconColorWarning: warningColor,
|
||||
|
@ -22,7 +22,7 @@ export default create({
|
||||
color: cardColor,
|
||||
closeColor: closeColor,
|
||||
closeColorHover: closeColorHover,
|
||||
closeColorActive: closeColorPressed,
|
||||
closeColorPressed: closeColorPressed,
|
||||
iconColorInfo: infoColor,
|
||||
iconColorSuccess: successColor,
|
||||
iconColorWarning: warningColor,
|
||||
|
@ -1,4 +0,0 @@
|
||||
export default {
|
||||
addHeight: 'unset',
|
||||
addBorderStyle: 'unset'
|
||||
}
|
@ -28,10 +28,10 @@ export default c([
|
||||
const {
|
||||
closeColor,
|
||||
closeColorHover,
|
||||
closeColorActive,
|
||||
closeColorPressed,
|
||||
closeColorLoading,
|
||||
closeColorHoverLoading,
|
||||
closeColorActiveLoading
|
||||
closeColorPressedLoading
|
||||
} = props.$local
|
||||
const {
|
||||
cubicBezierEaseInOut
|
||||
@ -112,8 +112,8 @@ export default c([
|
||||
}),
|
||||
c('&:active', {
|
||||
raw: `
|
||||
fill: ${closeColorActive};
|
||||
stroke: ${closeColorActive};
|
||||
fill: ${closeColorPressed};
|
||||
stroke: ${closeColorPressed};
|
||||
`
|
||||
})
|
||||
])
|
||||
@ -134,8 +134,8 @@ export default c([
|
||||
}),
|
||||
c('&:active', {
|
||||
raw: `
|
||||
fill: ${closeColorActiveLoading};
|
||||
stroke: ${closeColorActiveLoading};
|
||||
fill: ${closeColorPressedLoading};
|
||||
stroke: ${closeColorPressedLoading};
|
||||
`
|
||||
})
|
||||
])
|
||||
|
@ -40,10 +40,10 @@ export default create({
|
||||
iconColorLoading: 'rgba(255, 255, 255, .5)',
|
||||
closeColor: 'rgba(255, 255, 255, .5)',
|
||||
closeColorHover: 'rgba(255, 255, 255, .6)',
|
||||
closeColorActive: 'rgba(255, 255, 255, .4)',
|
||||
closeColorPressed: 'rgba(255, 255, 255, .4)',
|
||||
closeColorLoading: 'rgba(255, 255, 255, .5)',
|
||||
closeColorHoverLoading: 'rgba(255, 255, 255, .6)',
|
||||
closeColorActiveLoading: 'rgba(255, 255, 255, .4)'
|
||||
closeColorPressedLoading: 'rgba(255, 255, 255, .4)'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -42,10 +42,10 @@ export default create({
|
||||
iconColorLoading: 'rgba(255, 255, 255, .45)',
|
||||
closeColor: 'rgba(255, 255, 255, .5)',
|
||||
closeColorHover: 'rgba(255, 255, 255, .6)',
|
||||
closeColorActive: 'rgba(255, 255, 255, .4)',
|
||||
closeColorPressed: 'rgba(255, 255, 255, .4)',
|
||||
closeColorLoading: closeColor,
|
||||
closeColorHoverLoading: closeColorHover,
|
||||
closeColorActiveLoading: closeColor
|
||||
closeColorPressedLoading: closeColor
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -66,7 +66,7 @@ export default c([
|
||||
textColor,
|
||||
closeColor,
|
||||
closeColorHover,
|
||||
closeColorActive,
|
||||
closeColorPressed,
|
||||
headerTextColor,
|
||||
contentTextColor,
|
||||
descriptionTextColor,
|
||||
@ -165,7 +165,7 @@ export default c([
|
||||
color: closeColorHover
|
||||
}),
|
||||
c('&:active', {
|
||||
color: closeColorActive
|
||||
color: closeColorPressed
|
||||
})
|
||||
])
|
||||
]),
|
||||
|
@ -35,7 +35,7 @@ export default create({
|
||||
textColor: textColor2Overlay,
|
||||
closeColor: closeColorOverlay,
|
||||
closeColorHover: colorColorHoverOverlay,
|
||||
closeColorActive: closeColorOverlay,
|
||||
closeColorPressed: closeColorOverlay,
|
||||
headerTextColor: textColor1Overlay,
|
||||
contentTextColor: textColor2Overlay,
|
||||
descriptionTextColor: textColor3Overlay,
|
||||
|
@ -35,7 +35,7 @@ export default create({
|
||||
textColor: textColor2,
|
||||
closeColor: closeColor,
|
||||
closeColorHover: closeColorHover,
|
||||
closeColorActive: closeColor,
|
||||
closeColorPressed: closeColor,
|
||||
headerTextColor: textColor1Overlay,
|
||||
contentTextColor: textColor2,
|
||||
descriptionTextColor: textColor3Overlay,
|
||||
|
@ -7,8 +7,8 @@ export default c([
|
||||
const {
|
||||
railColor,
|
||||
railColorHover,
|
||||
railFillColor,
|
||||
railFillColorHover,
|
||||
fillColor,
|
||||
fillColorHover,
|
||||
handleColor,
|
||||
dotColor,
|
||||
dotColorModal,
|
||||
@ -71,7 +71,7 @@ export default c([
|
||||
backgroundColor: railColorHover
|
||||
}, [
|
||||
cE('fill', {
|
||||
backgroundColor: railFillColorHover
|
||||
backgroundColor: fillColorHover
|
||||
})
|
||||
]),
|
||||
cB('slider-handle', {
|
||||
@ -83,7 +83,7 @@ export default c([
|
||||
backgroundColor: railColorHover
|
||||
}, [
|
||||
cE('fill', {
|
||||
backgroundColor: railFillColorHover
|
||||
backgroundColor: fillColorHover
|
||||
})
|
||||
]),
|
||||
cB('slider-handle', {
|
||||
@ -106,7 +106,7 @@ export default c([
|
||||
border-radius: ${pxfy(depx(railHeight) / 2)};
|
||||
transition: background-color .3s ${cubicBezierEaseInOut};
|
||||
`,
|
||||
backgroundColor: railFillColor
|
||||
backgroundColor: fillColor
|
||||
})
|
||||
]),
|
||||
cB('slider-handle', {
|
||||
|
@ -21,8 +21,8 @@ export default create({
|
||||
...sizeVariables,
|
||||
railColor: railColorOverlay,
|
||||
railColorHover: railColorOverlay,
|
||||
railFillColor: primaryColorSuppl,
|
||||
railFillColorHover: primaryColorSuppl,
|
||||
fillColor: primaryColorSuppl,
|
||||
fillColorHover: primaryColorSuppl,
|
||||
handleColor: '#FFF',
|
||||
dotColor: cardColor,
|
||||
dotColorModal: modalColor,
|
||||
|
@ -21,8 +21,8 @@ export default create({
|
||||
...sizeVariables,
|
||||
railColor: railColorOverlay,
|
||||
railColorHover: railColorOverlay,
|
||||
railFillColor: primaryColor,
|
||||
railFillColorHover: primaryColor,
|
||||
fillColor: primaryColor,
|
||||
fillColorHover: primaryColor,
|
||||
handleColor: '#FFF',
|
||||
dotColor: cardColor,
|
||||
dotColorModal: baseColor,
|
||||
|
@ -9,7 +9,7 @@ export default c([
|
||||
} = props.$base
|
||||
const {
|
||||
nodeColorHover,
|
||||
nodeColorActive,
|
||||
nodeColorPressed,
|
||||
nodeColorSelected,
|
||||
arrowColor,
|
||||
nodeTextColor,
|
||||
@ -173,7 +173,7 @@ export default c([
|
||||
}),
|
||||
c('&:active', {
|
||||
raw: `
|
||||
background-color: ${nodeColorActive};
|
||||
background-color: ${nodeColorPressed};
|
||||
`
|
||||
}),
|
||||
cM('hightlight', [
|
||||
|
@ -19,7 +19,7 @@ export default create({
|
||||
return {
|
||||
borderRadiusSmall,
|
||||
nodeColorHover: hoverColorOverlay,
|
||||
nodeColorActive: activeColorOverlay,
|
||||
nodeColorPressed: activeColorOverlay,
|
||||
nodeColorSelected: changeColor(primaryColor, { alpha: 0.15 }),
|
||||
arrowColor: textColor3Overlay,
|
||||
nodeTextColor: textColor2Overlay,
|
||||
|
@ -19,7 +19,7 @@ export default create({
|
||||
return {
|
||||
borderRadiusSmall,
|
||||
nodeColorHover: hoverColorOverlay,
|
||||
nodeColorActive: activeColorOverlay,
|
||||
nodeColorPressed: activeColorOverlay,
|
||||
nodeColorSelected: changeColor(primaryColor, { alpha: 0.1 }),
|
||||
arrowColor: textColor3,
|
||||
nodeTextColor: textColor2,
|
||||
|
@ -10,15 +10,15 @@ export default c([
|
||||
} = props.$base
|
||||
const {
|
||||
draggerColor,
|
||||
draggerBorderColorHover,
|
||||
draggerBorder,
|
||||
draggerBorderHover,
|
||||
itemColorHover,
|
||||
itemColorHoverError,
|
||||
itemTextColorError,
|
||||
itemTextColorSuccess,
|
||||
itemTextColor,
|
||||
itemIconColor,
|
||||
itemDisabledOpacity,
|
||||
draggerBorderColor
|
||||
itemDisabledOpacity
|
||||
} = props.$local
|
||||
const iconSwitchTransition = createIconSwitchTransition()
|
||||
|
||||
@ -55,13 +55,11 @@ export default c([
|
||||
border-color .3s ${cubicBezierEaseInOut},
|
||||
background-color .3s ${cubicBezierEaseInOut};
|
||||
background-color: ${draggerColor};
|
||||
border: 1px dashed ${draggerBorderColor};
|
||||
border: ${draggerBorder};
|
||||
`
|
||||
}, [
|
||||
c('&:hover', {
|
||||
raw: `
|
||||
border-color:${draggerBorderColorHover};
|
||||
`
|
||||
border: draggerBorderHover
|
||||
})
|
||||
]),
|
||||
cB('upload-file-list', {
|
||||
@ -211,9 +209,7 @@ export default c([
|
||||
]),
|
||||
cM('drag-over', [
|
||||
cB('upload-dragger', {
|
||||
raw: `
|
||||
border-color: ${draggerBorderColorHover};
|
||||
`
|
||||
border: draggerBorderHover
|
||||
})
|
||||
])
|
||||
])
|
||||
|
@ -19,8 +19,8 @@ export default create({
|
||||
|
||||
return {
|
||||
draggerColor: actionColorOverlay,
|
||||
draggerBorderColor: borderColor,
|
||||
draggerBorderColorHover: primaryColor,
|
||||
draggerBorder: `1px dashed ${borderColor}`,
|
||||
draggerBorderHover: `1px dashed ${primaryColor}`,
|
||||
itemColorHover: hoverColorOverlay,
|
||||
itemColorHoverError: changeColor(errorColor, {
|
||||
alpha: 0.09
|
||||
|
@ -19,8 +19,8 @@ export default create({
|
||||
|
||||
return {
|
||||
draggerColor: actionColorOverlay,
|
||||
draggerBorderColor: borderColor,
|
||||
draggerBorderColorHover: primaryColor,
|
||||
draggerBorder: `1px dashed ${borderColor}`,
|
||||
draggerBorderHover: `1px dashed ${primaryColor}`,
|
||||
itemColorHover: hoverColorOverlay,
|
||||
itemColorHoverError: changeColor(errorColor, {
|
||||
alpha: 0.06
|
||||
|
@ -184,11 +184,11 @@ function tusimpleTheme (naive) {
|
||||
color: 'rgba(153,153,153,0.10)',
|
||||
closeColor: derived.closeColorOverlay,
|
||||
closeColorHover: derived.closeColorOverlay,
|
||||
closeColorActive: derived.closeColorOverlay,
|
||||
closeColorPressed: derived.closeColorOverlay,
|
||||
borderColorPrimary: 'transparent',
|
||||
closeColorPrimary: derived.closeColorOverlay,
|
||||
closeColorHoverPrimary: derived.closeColorOverlay,
|
||||
closeColorActivePrimary: derived.closeColorOverlay,
|
||||
closeColorPressedPrimary: derived.closeColorOverlay,
|
||||
borderColorInfo: 'transparent',
|
||||
borderColorSuccess: 'transparent',
|
||||
borderColorWarning: 'transparent',
|
||||
|
Loading…
Reference in New Issue
Block a user