Skip to content

Commit

Permalink
feat(masked-textbox): add size, rounded and fill customization to mas…
Browse files Browse the repository at this point in the history
…ked textbox

BREAKING CHANGE: Use high-level input for masked textbox base

Masked textbox reuses the input base component size, rounded and fill
component options.
  • Loading branch information
joneff committed Jan 18, 2022
1 parent 8e16cd2 commit 995dc3f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 103 deletions.
1 change: 0 additions & 1 deletion packages/default/scss/forms/_layout.scss
Expand Up @@ -148,7 +148,6 @@
.k-datepicker,
.k-datetimepicker,
.k-timepicker,
.k-maskedtextbox,
.k-floating-label-container {
display: inline-flex;
width: 100%;
Expand Down
39 changes: 1 addition & 38 deletions packages/default/scss/maskedtextbox/_layout.scss
@@ -1,43 +1,6 @@
@include exports( "maskedtextbox/layout" ) {

// Masked textbox
.k-maskedtextbox {
@include border-radius( $kendo-input-border-radius );
width: $kendo-input-default-width;
border-width: $kendo-input-border-width;
border-style: solid;
box-sizing: border-box;
outline: 0;
font-family: $kendo-input-font-family;
font-size: $kendo-input-font-size;
line-height: $kendo-input-line-height;
text-align: start;
white-space: nowrap;
display: inline-flex;
flex-flow: row nowrap;
vertical-align: middle;
position: relative;
overflow: hidden;
transition: all .1s ease; // sass-lint:disable-line no-transition-all
-webkit-touch-callout: none;
-webkit-tap-highlight-color: $rgba-transparent;

*,
*::before,
*::after {
box-sizing: border-box;
}


// Input
.k-input {}


// Loading icon
.k-i-loading {
// width: $kendo-input-icon-width;
// height: $kendo-input-icon-height;
}
}
.k-maskedtextbox {}

}
54 changes: 1 addition & 53 deletions packages/default/scss/maskedtextbox/_theme.scss
@@ -1,58 +1,6 @@
@include exports( "maskedtextbox/theme" ) {

// Masked textbox
.k-maskedtextbox {
@include fill(
$kendo-input-text,
$kendo-input-bg,
$kendo-input-border
);

// Hover state
&:hover,
&.k-state-hover {
@include fill(
$kendo-input-hover-text,
$kendo-input-hover-bg,
$kendo-input-hover-border
);
}

// Focus state
&:focus,
&.k-state-focus {
@include fill(
$kendo-input-focus-text,
$kendo-input-focus-bg,
$kendo-input-focus-border
);
@include box-shadow( $kendo-input-focus-shadow );
}
&:focus-within {
@include fill(
$kendo-input-focus-text,
$kendo-input-focus-bg,
$kendo-input-focus-border
);
@include box-shadow( $kendo-input-focus-shadow );
}


// Invalid state
&.k-invalid,
&.ng-invalid,
&.k-state-invalid {
border-color: $invalid-border;

.k-input-validation-icon {
color: $invalid-text;
}

&:focus-within,
&.k-state-focus {
@include box-shadow($invalid-shadow);
}
}
}
.k-maskedtextbox {}

}
11 changes: 0 additions & 11 deletions packages/material/scss/maskedtextbox/_layout.scss
@@ -1,12 +1 @@
@import "~@progress/kendo-theme-default/scss/maskedtextbox/_layout.scss";

@include exports( "maskedtextbox/layout/material" ) {

// Masked textbox
.k-maskedtextbox {
@include border-bottom-radius( 0 !important ); // sass-lint:disable-line no-important
border-width: $kendo-input-border-width 0;
border-top-color: transparent !important; // sass-lint:disable-line no-important
}

}
1 change: 1 addition & 0 deletions packages/nouvelle/scss/maskedtextbox/_variables.scss
@@ -0,0 +1 @@
// Masked textbox

0 comments on commit 995dc3f

Please sign in to comment.