UNPKG

weex-nuke

Version:

基于 Rax 、Weex 的高性能组件体系 ~~

537 lines (534 loc) 12.3 kB
'use strict'; function VariableMix(theme) { var core = theme.Core; var ComponentCustomStyle = theme.Input || {}; /** * 输入框 * @namespace component * @property module input * @property tag Input * @property category component */ var inputVariables = { /** * background * @property namespace statement/normal */ 'bg-color': core['color-white'], /** * background * @property namespace statement/disabled */ 'disabled-bg-color': core['color-fill1-3'], /** * border * @property namespace statement/disabled */ 'disabled-line-color': core['color-line1-1'], /** * text * @property namespace statement/disabled */ 'disabled-color': core['color-text1-1'], /** * border * @property namespace statement/normal */ 'border-color': core['color-line1-2'], /** * border-style * @property namespace statement/normal */ 'border-style': core['line-solid'], /** * border * @property namespace size/border */ 'line-width': core['line-1'], /** * height * @property namespace size/bounding/input-ele */ 'single-height': core['s-10'], /** * text * @property namespace size/text/input-ele */ 'single-font-size': core['font-size-body-3'], /** * text * @property namespace statement/readonly/input-ele */ 'single-readonly-color': core['color-text1-2'], /** * text * @property namespace statement/placeholder-large */ 'placeholder-color': core['color-text1-2'], /** * text * @property namespace size/bounding/placeholder-large */ 'placeholder-font-size': core['font-size-subhead'], /** * height * @property namespace size/bounding/placeholder-large */ 'placeholder-height': core['s-6'], /** * min-width * @property namespace size/bounding/placeholder-large */ 'placeholder-min-width': 200, /** * top * @property namespace size/bounding/placeholder-large */ 'placeholder-top': 10, /** * padding(l, r) * @property namespace size/bounding */ 'single-padding-left-right': 20, /** * corner * @property namespace statement/normal */ 'single-radius': core['corner-1'], /** * text * @property namespace statement/normal */ 'single-color': core['color-text1-4'], /** * border * @property namespace statement/normal */ 'single-line-color': core['color-line1-2'], /** * height * @property namespace size/bounding */ 'multiple-height': core['s-20'], /** * line-height * @property namespace size/text/input-ele */ 'multiple-line-height': core['s-4'], /** * text * @property namespace size/text */ 'multiple-font-size': core['font-size-body-3'], /** * padding * @property namespace size/bounding */ 'multiple-inset-padding': core['s-1'], /** * text * @property namespace statement */ 'multiple-inset-color': core['color-text1-4'], /** * padding(l, r) * @property namespace size/bounding */ 'multiple-padding': core['s-1'], /** * corner * @property namespace statement/normal */ 'multiple-radius': core['corner-0'], /** * text * @property namespace statement */ 'multiple-color': core['color-text1-4'], /** * border * @property namespace statement */ 'multiple-border-color': core['color-line1-2'], /** * bottom * @property namespace size/count */ 'single-count-bottom': 14, /** * right * @property namespace size/count */ 'single-count-right': 10, /** * min-width * @property namespace size/count */ 'single-count-min-width': 200, /** * text * @property namespace statement/count */ 'count-color': core['color-text1-1'], /** * text * @property namespace statement/count */ 'count-font-size': core['font-size-caption'], /** * text * @property namespace statement/count */ 'count-error-color': core['color-error-3'], /** * bottom * @property namespace size/count */ 'multiple-count-bottom': 16, /** * right * @property namespace size/count */ 'multiple-count-right': 10, /** * min-width * @property namespace size/count */ 'multiple-count-min-width': 200, /** * height * @property namespace size/error */ 'error-height': core['s-6'], /** * text * @property namespace statement/error */ 'error-text-color': core['color-error-3'], /** * lineHeight * @property namespace size/text/error */ 'error-text-line-height': core['s-6'], /** * text * @property namespace size/error */ 'error-text-font-size': core['font-size-caption'], /** * padding(t) * @property namespace size/error */ 'error-text-padding-top': 6, /** * border * @property namespace statement/error */ 'error-border-color': core['color-error-3'], /** * border * @property namespace statement/focus */ 'focus-border-color': core['color-brand1-6'], /** * width * @property namespace size/clear */ 'clear-width': 34, /** * height * @property namespace size/clear */ 'clear-height': 34, /** * top * @property namespace size/clear */ 'clear-top': 26, /** * right * @property namespace size/clear */ 'clear-right': 20, /** * width * @property namespace size/icon */ 'icon-width': 34, /** * height * @property namespace size/icon */ 'icon-height': 34, /** * top * @property namespace size/icon */ 'icon-top': 26, /** * right * @property namespace size/icon */ 'icon-right': 20, /** * width * @property namespace size/warning */ 'warning-width': 38, /** * height * @property namespace size/warning */ 'warning-height': 38, /** * bottom * @property namespace size/warning */ 'warning-bottom': 6, /** * right * @property namespace size/warning */ 'warning-right': 4, /** * text * @property namespace statement/focus/placeholder-large */ 'md-focus-placeholder-color': core['color-brand1-6'], /** * text * @property namespace statement/empty/placeholder-large */ 'md-empty-placeholder-color': core['color-text1-2'], /** * text * @property namespace statement/error/placeholder-large */ 'md-error-placeholder-color': core['color-error-3'], /** * text * @property namespace statement/disabled/placeholder */ 'md-disabled-placeholder-color': core['color-text1-1'], /** * border * @property namespace statement/normal/placeholder-large */ 'md-border-color': core['color-line1-2'], /** * corner * @property namespace statement/normal */ 'md-border-radius': core['corner-0'], /** * border * @property namespace statement/focus/bottom-line */ 'md-focus-border-color': core['color-brand1-6'], /** * border * @property namespace statement/error/bottom-line */ 'md-error-border-color': core['color-error-3'], /** * border-top * @property namespace statement/normal */ 'md-border-top-width': 0, /** * height * @property namespace size/bounding/bottom-line */ 'md-line-height': core['line-2'], /** * margin(t,b) * @property namespace size/bounding/bottom-line */ 'md-line-margin-tb': core['line-1'], /** * height * @property namespace size/bounding/bottom-line */ 'md-line-focus-height': core['line-3'], /** * height * @property namespace size/bounding/bottom-line */ 'md-line-error-height': core['line-3'], /** * border-left * @property namespace size/bounding */ 'md-border-left-width': 0, /** * border-right * @property namespace size/bounding */ 'md-border-right-width': 0, /** * height * @property namespace size/bounding/placeholder-large */ 'md-placeholder-height': core['s-5'], /** * height * @property namespace size/bounding/placeholder-small */ 'md-placeholder-small-height': 36, /** * padding(t) * @property namespace size/bounding/placeholder-small */ 'md-placeholder-small-padding-top': 6, /** * text * @property namespace size/text/placeholder-large */ 'md-placeholder-font-size': core['font-size-body-3'], /** * text * @property namespace statement/placeholder-large */ 'md-placeholder-color': core['color-text1-1'], /** * text * @property namespace size/text/placeholder-small */ 'md-placeholder-small-font-size': core['font-size-caption'], /** * height * @property namespace size/bounding/input-ele */ 'md-input-height': 40, /** * margin(t) * @property namespace size/bounding/input-ele */ 'md-input-margin-top': 6, /** * text * @property namespace size/text/input-ele */ 'md-input-font-size': core['font-size-body-3'], /** * margin(b) * @property namespace size/bounding/input-ele */ 'md-input-margin-bottom': 6, /** * height * @property namespace size/bounding/help */ 'md-help-height': 28, /** * margin(t) * @property namespace size/bounding/help */ 'md-help-margin-top': core['s-1'], /** * height * @property namespace size/error */ 'md-error-height': 28, /** * text * @property namespace statement/error */ 'md-error-text-color': core['color-error-3'], /** * text * @property namespace size/text/error */ 'md-error-text-font-size': core['font-size-caption'], /** * bottom * @property namespace size/count */ 'md-single-count-bottom': 10, /** * right * @property namespace size/count */ 'md-single-count-right': 10, /** * width * @property namespace size/clear */ 'md-clear-width': 32, /** * height * @property namespace size/clear */ 'md-clear-height': 32, /** * top * @property namespace size/clear */ 'md-clear-top': 40, /** * right * @property namespace size/clear */ 'md-clear-right': 10, /** * width * @property namespace size/icon */ 'md-icon-width': 32, /** * height * @property namespace size/icon */ 'md-icon-height': 32, /** * top * @property namespace size/icon */ 'md-icon-top': 40, /** * right * @property namespace size/icon */ 'md-icon-right': 10, /** * width * @property namespace size/warning */ 'md-warning-width': 36, /** * height * @property namespace size/warning */ 'md-warning-height': 36, /** * bottom * @property namespace size/warning */ 'md-warning-bottom': 6, /** * right * @property namespace size/warning */ 'md-warning-right': 10, /** * height * @property namespace size/bouding */ 'md-multiple-height': 160, /** * top * @property namespace size/bounding/placeholder-small */ 'md-placeholder-small-top': 0, /** * top * @property namespace size/bounding/placeholder-large */ 'multiple-md-placeholder-top': 10 }; inputVariables['md-placeholder-top'] = inputVariables['md-placeholder-small-height'] + inputVariables['md-input-margin-top']; // should alway use var statement to carray a assigngg var variable = Object.assign(inputVariables, ComponentCustomStyle); return variable; } module.exports = VariableMix;