123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663 |
- /**
- * @class Ext.field.Text
- */
- /**
- * @var {color}
- * Text Field input color
- */
- $textfield-input-color: dynamic($color);
- /**
- * @var {color}
- * Text Field input color when focused
- */
- $textfield-focused-input-color: dynamic(null);
- /**
- * @var {color}
- * Text Field input color when invalid
- */
- $textfield-invalid-input-color: dynamic(null);
- /**
- * @var {color}
- * Text Field input color when disabled
- */
- $textfield-disabled-input-color: dynamic(null);
- /**
- * @var {number/list}
- * Text Field input border width
- */
- $textfield-input-border-width: dynamic(1px);
- /**
- * @var {string/list}
- * Text Field input border style
- */
- $textfield-input-border-style: dynamic(solid);
- /**
- * @var {string/list}
- * Text Field input border style when focused
- */
- $textfield-focused-input-border-style: dynamic(null);
- /**
- * @var {string/list}
- * Text Field input border style when invalid
- */
- $textfield-invalid-input-border-style: dynamic(null);
- //# fashion replaces $field-border-color
- /**
- * @var {color/list}
- * Text Field input border color
- */
- $textfield-input-border-color: dynamic($neutral-color);
- /**
- * @var {string/list}
- * Text Field input border color when focused
- */
- $textfield-focused-input-border-color: dynamic(mix(#fff, #157fcc, 15%));
- /**
- * @var {string/list}
- * Text Field input border color when invalid
- */
- $textfield-invalid-input-border-color: dynamic($alert-color);
- /**
- * @var {string/list}
- * Text Field input border color when disabled
- */
- $textfield-disabled-input-border-color: dynamic(null);
- /**
- * @var {number}
- * Text field input underline width
- */
- $textfield-input-underline-width: dynamic(null);
- /**
- * @var {number}
- * Text field input underline width when focused
- */
- $textfield-focused-input-underline-width: dynamic(null);
- /**
- * @var {number}
- * Text field input underline width when invalid
- */
- $textfield-invalid-input-underline-width: dynamic(null);
- /**
- * @var {color}
- * Text field input underline color
- */
- $textfield-input-underline-color: dynamic(null);
- /**
- * @var {color}
- * Text field input underline color when focused
- */
- $textfield-focused-input-underline-color: dynamic(null);
- /**
- * @var {color}
- * Text field input underline color when invalid
- */
- $textfield-invalid-input-underline-color: dynamic(null);
- /**
- * @var {color}
- * Text Field input background-color
- */
- $textfield-input-background-color: dynamic($background-color);
- /**
- * @var {color}
- * Text Field input background-color when focused
- */
- $textfield-focused-input-background-color: dynamic(null);
- /**
- * @var {color}
- * Text Field input background-color when invalid
- */
- $textfield-invalid-input-background-color: dynamic(null);
- /**
- * @var {color}
- * Text Field input background-color when disabled
- */
- $textfield-disabled-input-background-color: dynamic(null);
- /**
- * @var {number/list}
- * Text Field input padding
- */
- $textfield-input-padding: dynamic(3px 6px 2px);
- /**
- * @var {number/list}
- * Text Field input padding in the {@link Global_CSS#$enable-big big} sizing scheme
- */
- $textfield-input-padding-big: dynamic(5px 6px);
- /**
- * @var {string/number}
- * Text Field input font-weight
- */
- $textfield-input-font-weight: dynamic($font-weight-normal);
- /**
- * @var {number}
- * Text Field input font-size
- */
- $textfield-input-font-size: dynamic($font-size);
- /**
- * @var {number}
- * Text Field input font-size in the {@link Global_CSS#$enable-big big} sizing scheme
- */
- $textfield-input-font-size-big: dynamic($font-size-big);
- /**
- * @var {number}
- * Text Field input line-height
- */
- $textfield-input-line-height: dynamic(17px);
- /**
- * @var {number}
- * Text Field input line-height in the {@link Global_CSS#$enable-big big} sizing scheme
- */
- $textfield-input-line-height-big: dynamic(20px);
- /**
- * @var {string}
- * Text Field input font-family
- */
- $textfield-input-font-family: dynamic($font-family);
- /**
- * @var {color}
- * Text Field {@link #placeholder} color
- */
- $textfield-placeholder-color: dynamic($neutral-medium-dark-color);
- /**
- * @var {color}
- * Text Field {@link #placeholder} color when focused
- */
- $textfield-focused-placeholder-color: dynamic(null);
- /**
- * @var {color}
- * Text Field {@link #placeholder} color when invalid
- */
- $textfield-invalid-placeholder-color: dynamic(null);
- /**
- * @var {color}
- * Text Field {@link #placeholder} color when disabled
- */
- $textfield-disabled-placeholder-color: dynamic(null);
- /**
- * @var {number}
- * Text Field body width
- */
- $textfield-body-width: dynamic(170px);
- /**
- * @var {number}
- * Text Field body width in the {@link Global_CSS#$enable-big big} sizing scheme
- */
- $textfield-body-width-big: dynamic(200px);
- /**
- * @var {map}
- * Parameters for the "celleditor" textfield UI.
- * Set to `null` to eliminate the UI from the CSS output.
- */
- $textfield-celleditor-ui: dynamic((
- input-padding:
- top($gridcell-padding or 0) - top($textfield-input-border-width or 0)
- right($gridcell-padding or 0) - right($textfield-input-border-width or 0)
- bottom($gridcell-padding or 0) - bottom($textfield-input-border-width or 0)
- left($gridcell-padding or 0) - left($textfield-input-border-width or 0),
- input-padding-big:
- top($gridcell-padding-big or 0) - top($textfield-input-border-width or 0)
- right($gridcell-padding-big or 0) - right($textfield-input-border-width or 0)
- bottom($gridcell-padding-big or 0) - bottom($textfield-input-border-width or 0)
- left($gridcell-padding-big or 0) - left($textfield-input-border-width or 0),
- input-line-height: $gridcell-line-height,
- input-line-height-big: $gridcell-line-height-big,
- input-font-size: $gridcell-font-size,
- input-font-size-big: $gridcell-font-size-big
- ));
- /**
- * @var {number}
- * The duration for the focus {@link #animateUnderline underline animation}
- */
- $textfield-animate-underline-duration: dynamic(.45s);
- /**
- * @var {map}
- * Parameters for the "alt" textfield UI.
- * Set to `null` to eliminate the UI from the CSS output.
- */
- $textfield-alt-ui: dynamic((
- input-background-color: rgba(255, 255, 255, .2),
- focused-input-background-color: rgba(255, 255, 255, .15),
- input-color: rgba(255, 255, 255, .6),
- focused-input-color: rgba(255, 255, 255, .6),
- input-padding: 7px 7px 7px 0,
- input-padding-big: 7px 7px 7px 0,
- input-border-width: 0,
- placeholder-color: rgba(255, 255, 255, .6),
- focused-placeholder-color: rgb(255, 255, 255),
- border-radius: 3px
- ));
- /**
- * @var {map}
- * Parameters for the "faded" textfield UI.
- * Set to `null` to eliminate the UI from the CSS output.
- */
- $textfield-faded-ui: dynamic((
- input-background-color: rgba(0, 0, 0, .1),
- focused-input-background-color: rgba(0, 0, 0, .15),
- input-color: rgba(0, 0, 0, .4),
- focused-input-color: rgba(0, 0, 0, .4),
- input-padding: 7px 7px 7px 0,
- input-padding-big: 7px 7px 7px 0,
- input-border-width: 0,
- placeholder-color: rgba(0, 0, 0, .4),
- focused-placeholder-color: #333,
- border-radius: 3px
- ));
- /**
- * @var {map}
- * Parameters for the "solo" textfield UI.
- * Set to `null` to eliminate the UI from the CSS output.
- */
- $textfield-solo-ui: dynamic((
- input-background-color: #FFFFFF,
- input-color: rgba(0, 0, 0, .4),
- focused-input-color: rgba(0, 0, 0, .4),
- input-padding: 10px 10px 10px 0,
- input-padding-big: 10px 10px 10px 0,
- input-border-width: 0,
- placeholder-color: rgba(0, 0, 0, .4),
- border-radius: 3px
- ));
- /**
- * Creates a visual theme for a Text Field
- *
- * @param {string} $ui
- * The name of the UI being created. Can not included spaces or special punctuation
- * (used in CSS class names).
- *
- * @param {String} [$xtype=textfield] (protected) The {@link Ext.Class#xtype} to use
- * in CSS selectors. For use by UI mixins of derived classes.
- *
- * @param {color} $background-color
- * Text Field input background color
- *
- * @param {color} $focused-background-color
- * Focused Text Field background color
- *
- * @param {color} $invalid-background-color
- * Invalid Text Field background color
- *
- * @param {color} $disabled-background-color
- * Disabled Text Field background color
- *
- * @param {Number} $disabled-opacity
- * Text Field disabled opacity
- *
- * @param {Number} $required-indicator-font-weight
- * Required indicator font weight
- *
- * @param {Number} $required-indicator-font-size
- * Required indicator font size
- *
- * @param {Number} $required-indicator-line-height
- * Required indicator line height
- *
- * @param {String} $required-indicator-font-family
- * Required indicator font family
- *
- * @param {String} $required-indicator-margin
- * Required indicator margin
- *
- * @param {String} $required-indicator-margin-big
- * Required indicator margin in the {@link Global_CSS#$enable-big big} sizing scheme
- *
- * @param {color} $input-color
- * Text field input color
- *
- * @param {color} $focused-input-color
- * Text Field input color when focused
- *
- * @param {color} $invalid-input-color
- * Text Field input color when invalid
- *
- * @param {color} $disabled-input-color
- * Text Field input color when disabled
- *
- * @param {number/list} $input-border-width
- * Text Field input border width
- *
- * @param {string/list} $input-border-style
- * Text Field input border style
- *
- * @param {string/list} $focused-input-border-style
- * Text Field input border style when focused
- *
- * @param {string/list} $invalid-input-border-style
- * Text Field input border style when invalid
- *
- * @param {color/list} $input-border-color
- * Text Field input border color
- *
- * @param {string/list} $focused-input-border-color
- * Text Field input border color when focused
- *
- * @param {string/list} $invalid-input-border-color
- * Text Field input border color when invalid
- *
- * @param {string/list} $disabled-input-border-color
- * Text Field input border color when disabled
- *
- * @param {number} $input-underline-width
- * Text field input underline width
- *
- * @param {number} $focused-input-underline-width
- * Text field input underline width when focused
- *
- * @param {number} $invalid-input-underline-width
- * Text field input underline width when invalid
- *
- * @param {color} $input-underline-color
- * Text field input underline color
- *
- * @param {color} $focused-input-underline-color
- * Text field input underline color when focused
- *
- * @param {color} $invalid-input-underline-color
- * Text field input underline color when invalid
- *
- * @param {color} $input-background-color
- * Text Field input background-color
- *
- * @param {color} $focused-input-background-color
- * Text Field input background-color when focused
- *
- * @param {color} $invalid-input-background-color
- * Text Field input background-color when invalid
- *
- * @param {color} $disabled-input-background-color
- * Text Field input background-color when disabled
- *
- * @param {color} $input-padding
- * Text Field input padding
- *
- * @param {color} $input-padding-big
- * Text Field input padding in the {@link Global_CSS#$enable-big big} sizing scheme
- *
- * @param {string/number} $input-font-weight
- * Text Field input font-weight
- *
- * @param {number} $input-font-size
- * Text Field input font-size
- *
- * @param {number} $input-font-size-big
- * Text Field input font-size in the {@link Global_CSS#$enable-big big} sizing scheme
- *
- * @param {number} $input-line-height
- * Text Field input line-height
- *
- * @param {number} $input-line-height-big
- * Text Field input line-height in the {@link Global_CSS#$enable-big big} sizing scheme
- *
- * @param {string} $input-font-family
- * Text Field input font-family
- *
- * @param {color} $placeholder-color
- * Text Field {@link #placeholder} color
- *
- * @param {color} $focused-placeholder-color
- * Text Field {@link #placeholder} color when focused
- *
- * @param {color} $invalid-placeholder-color
- * Text Field {@link #placeholder} color when invalid
- *
- * @param {color} $disabled-placeholder-color
- * Text Field {@link #placeholder} color when disabled
- *
- * @param {number} $border-radius
- * The border radius of the text field
- *
- * @param {number} $body-width
- * Text Field body width
- *
- * @param {number} $body-width-big
- * Text Field body width in the {@link Global_CSS#$enable-big big} sizing scheme
- *
- * @param {number} $animate-underline-duration
- * The duration, in seconds, for the focus {@link #animateUnderline underline animation}
- */
- @mixin textfield-ui(
- $ui: null,
- $xtype: textfield,
- $background-color: null,
- $focused-background-color: null,
- $invalid-background-color: null,
- $disabled-background-color: null,
- $disabled-opacity: null,
- $required-indicator-font-weight: null,
- $required-indicator-font-size: null,
- $required-indicator-line-height: null,
- $required-indicator-font-family: null,
- $required-indicator-margin: null,
- $required-indicator-margin-big: null,
- $input-color: null,
- $focused-input-color: null,
- $invalid-input-color: null,
- $disabled-input-color: null,
- $input-border-width: null,
- $input-border-style: null,
- $focused-input-border-style: null,
- $invalid-input-border-style: null,
- $input-border-color: null,
- $focused-input-border-color: null,
- $invalid-input-border-color: null,
- $disabled-input-border-color: null,
- $input-underline-width: null,
- $focused-input-underline-width: null,
- $invalid-input-underline-width: null,
- $input-underline-color: null,
- $focused-input-underline-color: null,
- $invalid-input-underline-color: null,
- $input-background-color: null,
- $focused-input-background-color: null,
- $invalid-input-background-color: null,
- $disabled-input-background-color: null,
- $input-padding: null,
- $input-padding-big: null,
- $input-font-weight: null,
- $input-font-size: null,
- $input-font-size-big: null,
- $input-line-height: null,
- $input-line-height-big: null,
- $input-font-family: null,
- $placeholder-color: null,
- $focused-placeholder-color: null,
- $invalid-placeholder-color: null,
- $disabled-placeholder-color: null,
- $border-radius: null,
- $body-width: null,
- $body-width-big: null,
- $animate-underline-duration: null
- ) {
- $ui-suffix: ui-suffix($ui);
- .#{$prefix}#{$xtype}#{$ui-suffix} {
- background-color: $background-color;
- @include border-radius($border-radius);
- .#{$prefix}body-wrap-el {
- width: $body-width;
- @if $enable-big {
- .#{$prefix}big & {
- width: $body-width-big;
- }
- }
- }
- // keep the background-color, color and border rules at the x-input-wrap-el
- // level to make triggers visually inside the text field input.
- .#{$prefix}input-wrap-el {
- @include border($input-border-width, $input-border-style, $input-border-color);
- background-color: $input-background-color;
- color: $input-color;
- }
- .#{$prefix}input-el {
- @include font($input-font-weight, $input-font-size, $input-line-height, $input-font-family);
- @include padding($input-padding);
- // IE11 does not respect line-height on input elements. To workaround the issue
- // we use content-box model and set min-height in addition to line-height
- min-height: $input-line-height;
- @if $enable-big {
- .#{$prefix}big & {
- padding: $input-padding-big;
- font-size: $input-font-size-big;
- line-height: $input-line-height-big;
- }
- }
- // when using vendor prefixes, the selectors need to be separated into their own
- // rule for each prefix because when encountering an unsupported vendor prefix,
- // CSS parsing engines will consider the entire rule invalid.
- &::-webkit-input-placeholder {
- color: $placeholder-color;
- }
- &::-moz-placeholder {
- color: $placeholder-color;
- }
- &:-ms-input-placeholder {
- color: $placeholder-color;
- }
- }
- .#{$prefix}underline-el {
- height: $input-underline-width;
- background-color: $input-underline-color;
- }
- &.#{$prefix}animate-underline .#{$prefix}underline-el:before {
- transition: transform $animate-underline-duration cubic-bezier(0.23, 1, 0.32, 1);
- }
- &.#{$prefix}focused {
- background-color: $focused-background-color;
- .#{$prefix}underline-el:before {
- height: $focused-input-underline-width;
- background-color: $focused-input-underline-color;
- }
- .#{$prefix}input-wrap-el {
- border-style: $focused-input-border-style;
- border-color: $focused-input-border-color;
- background-color: $focused-input-background-color;
- color: $focused-input-color;
- }
- .#{$prefix}input-el {
- // when using vendor prefixes, the selectors need to be separated into their own
- // rule for each prefix because when encountering an unsupported vendor prefix,
- // CSS parsing engines will consider the entire rule invalid.
- &::-webkit-input-placeholder {
- color: $focused-placeholder-color;
- }
- &::-moz-placeholder {
- color: $focused-placeholder-color;
- }
- &:-ms-input-placeholder {
- color: $focused-placeholder-color;
- }
- }
- }
- &.#{$prefix}invalid {
- background-color: $invalid-background-color;
- .#{$prefix}underline-el:after {
- height: $invalid-input-underline-width;
- background-color: $invalid-input-underline-color;
- }
- .#{$prefix}input-wrap-el {
- border-style: $invalid-input-border-style;
- border-color: $invalid-input-border-color;
- background-color: $invalid-input-background-color;
- color: $invalid-input-color;
- }
- .#{$prefix}input-el {
- // when using vendor prefixes, the selectors need to be separated into their own
- // rule for each prefix because when encountering an unsupported vendor prefix,
- // CSS parsing engines will consider the entire rule invalid.
- &::-webkit-input-placeholder {
- color: $invalid-placeholder-color;
- }
- &::-moz-placeholder {
- color: $invalid-placeholder-color;
- }
- &:-ms-input-placeholder {
- color: $invalid-placeholder-color;
- }
- }
- }
- &.#{$prefix}disabled {
- background-color: $disabled-background-color;
- .#{$prefix}input-wrap-el {
- background-color: $disabled-input-background-color;
- border-color: $disabled-input-border-color;
- color: $disabled-input-color;
- }
- .#{$prefix}input-el {
- // when using vendor prefixes, the selectors need to be separated into their own
- // rule for each prefix because when encountering an unsupported vendor prefix,
- // CSS parsing engines will consider the entire rule invalid.
- &::-webkit-input-placeholder {
- color: $disabled-placeholder-color;
- }
- &::-moz-placeholder {
- color: $disabled-placeholder-color;
- }
- &:-ms-input-placeholder {
- color: $disabled-placeholder-color;
- }
- }
- }
- }
- }
|