-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mkirova/fix-7091
- Loading branch information
Showing
38 changed files
with
1,715 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
projects/igniteui-angular/src/lib/core/i18n/paginator-resources.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
export interface IPaginatorResourceStrings { | ||
igx_paginator_label?: string; | ||
igx_paginator_pager_text?: string; | ||
} | ||
|
||
export const PaginatorResourceStringsEN: IPaginatorResourceStrings = { | ||
igx_paginator_label: 'Items per page' | ||
igx_paginator_label: 'Items per page', | ||
igx_paginator_pager_text: 'of' | ||
}; |
52 changes: 52 additions & 0 deletions
52
projects/igniteui-angular/src/lib/core/styles/components/splitter/_splitter-component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/// @group components | ||
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a> | ||
/// @author <a href="https://github.com/simeonoff" target="_blank">Maya Kirova</a> | ||
/// @requires {mixin} bem-block | ||
/// @requires {mixin} bem-elem | ||
/// @requires {mixin} bem-mod | ||
//// | ||
|
||
@include b(igx-splitter) { | ||
// Register the component in the component registry | ||
$this: str-slice(bem--selector-to-string(&), 2, -1); | ||
@include register-component($this); | ||
|
||
@include b(#{$this}-bar) { | ||
@extend %igx-splitter-bar !optional; | ||
|
||
@include e(handle) { | ||
@extend %igx-splitter-handle !optional; | ||
@extend %igx-splitter-handle--horizontal !optional; | ||
} | ||
|
||
@include e(expander, 'start') { | ||
@extend %igx-splitter-expander !optional; | ||
@extend %igx-splitter-expander--start !optional; | ||
} | ||
|
||
@include e(expander, 'end') { | ||
@extend %igx-splitter-expander !optional; | ||
@extend %igx-splitter-expander--end !optional; | ||
} | ||
|
||
@include m('vertical') { | ||
@extend %igx-splitter-bar--vertical !optional; | ||
|
||
@include e(handle) { | ||
@extend %igx-splitter-handle !optional; | ||
@extend %igx-splitter-handle--vertical !optional; | ||
} | ||
|
||
@include e(expander, 'start') { | ||
@extend %igx-splitter-expander !optional; | ||
@extend %igx-splitter-expander--start-vertical !optional; | ||
} | ||
|
||
@include e(expander, 'end') { | ||
@extend %igx-splitter-expander !optional; | ||
@extend %igx-splitter-expander--end-vertical !optional; | ||
} | ||
} | ||
} | ||
} | ||
|
206 changes: 206 additions & 0 deletions
206
projects/igniteui-angular/src/lib/core/styles/components/splitter/_splitter-theme.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
//// | ||
/// @group themes | ||
@function igx-splitter-theme( | ||
$palette: $default-palette, | ||
$schema: $light-schema, | ||
$elevations: $elevations, | ||
$bar-color: null, | ||
$handle-color: null, | ||
$expander-color: null, | ||
$border-radius: null, | ||
$size: null | ||
) { | ||
$name: 'igx-splitter'; | ||
$splitter-schema: (); | ||
|
||
@if map-has-key($schema, $name) { | ||
$splitter-schema: map-get($schema, $name); | ||
} @else { | ||
$splitter-schema: $schema; | ||
} | ||
|
||
$border-radius-handle: round-borders( | ||
if($border-radius, $border-radius, map-get($splitter-schema, 'border-radius')), 0, 2px | ||
); | ||
|
||
$theme: apply-palette($splitter-schema, $palette); | ||
|
||
@if not($handle-color) and $bar-color { | ||
$handle-color: text-contrast($bar-color); | ||
} | ||
|
||
@if not($expander-color) and $bar-color { | ||
$expander-color: text-contrast($bar-color); | ||
} | ||
|
||
@return extend($theme, ( | ||
name: $name, | ||
palette: $palette, | ||
bar-color: $bar-color, | ||
handle-color: $handle-color, | ||
expander-color: $expander-color, | ||
border-radius: $border-radius-handle, | ||
size: $size | ||
)); | ||
} | ||
|
||
/// @param {Map} $theme - The theme used to style the component. | ||
/// @requires {mixin} igx-root-css-vars | ||
/// @requires rem | ||
/// @requires --var | ||
@mixin igx-splitter($theme) { | ||
@include igx-root-css-vars($theme); | ||
$splitter-color: --var($theme, 'bar-color'); | ||
$hitbox-size: 4px; | ||
$debug-hitbox: false; | ||
$hitbox-debug-color: rgba(coral, .24); | ||
|
||
%handle-area { | ||
position: absolute; | ||
content: ''; | ||
width: 100%; | ||
height: $hitbox-size; | ||
background: if($debug-hitbox, $hitbox-debug-color, transparent); | ||
} | ||
|
||
%handle-area--vertical { | ||
width: $hitbox-size; | ||
height: 100%; | ||
} | ||
|
||
%igx-splitter-bar { | ||
position: relative; | ||
display: flex; | ||
flex-grow: 1; | ||
justify-content: center; | ||
align-items: center; | ||
background: $splitter-color; | ||
border: 1px solid $splitter-color; | ||
cursor: row-resize; | ||
z-index: 99; | ||
opacity: .68; | ||
transition: opacity .15s $ease-out-quad !important; | ||
|
||
&::before { | ||
@extend %handle-area; | ||
top: 100%; | ||
} | ||
|
||
&::after { | ||
@extend %handle-area; | ||
bottom: 100%; | ||
} | ||
|
||
&:hover { | ||
transition: all .25s ease-out; | ||
opacity: 1; | ||
} | ||
} | ||
|
||
%igx-splitter-bar--vertical { | ||
flex-direction: column; | ||
height: 100%; | ||
cursor: col-resize; | ||
|
||
&::before { | ||
@extend %handle-area--vertical; | ||
top: 0; | ||
right: 100%; | ||
} | ||
|
||
&::after { | ||
@extend %handle-area--vertical; | ||
top: 0; | ||
left: 100%; | ||
} | ||
} | ||
|
||
%igx-splitter-handle { | ||
background: --var($theme, 'handle-color'); | ||
border-radius: --var($theme, 'border-radius'); | ||
} | ||
|
||
%igx-splitter-handle--horizontal { | ||
width: 25%; | ||
height: --var($theme, 'size'); | ||
margin: 0 rem(48px); | ||
} | ||
|
||
%igx-splitter-handle--vertical { | ||
width: --var($theme, 'size'); | ||
height: 25%; | ||
margin: rem(48px) 0; | ||
} | ||
|
||
%igx-splitter-hitbox { | ||
position: absolute; | ||
content: ''; | ||
background: if($debug-hitbox, $hitbox-debug-color, transparent); | ||
} | ||
|
||
%igx-splitter-expander { | ||
position: relative; | ||
width: 0; | ||
height: 0; | ||
border-right: --var($theme, 'size') solid transparent; | ||
border-left: --var($theme, 'size') solid transparent; | ||
cursor: pointer; | ||
z-index: 1; | ||
} | ||
|
||
%igx-splitter-expander--start { | ||
border-bottom: --var($theme, 'size') solid --var($theme, 'expander-color'); | ||
|
||
&::before { | ||
@extend %igx-splitter-hitbox; | ||
top: calc(100% - #{map-get($theme, 'size')}); | ||
left: calc(100% - #{map-get($theme, 'size') * 2}); | ||
width: #{map-get($theme, 'size') * 4}; | ||
height: #{map-get($theme, 'size') * 3}; | ||
} | ||
} | ||
|
||
%igx-splitter-expander--end { | ||
border-bottom: unset; | ||
border-top: --var($theme, 'size') solid --var($theme, 'expander-color'); | ||
|
||
&::before { | ||
@extend %igx-splitter-hitbox; | ||
top: calc(100% - #{map-get($theme, 'size') * 2}); | ||
left: calc(100% - #{map-get($theme, 'size') * 2}); | ||
width: #{map-get($theme, 'size') * 4}; | ||
height: #{map-get($theme, 'size') * 3}; | ||
} | ||
} | ||
|
||
%igx-splitter-expander--start-vertical { | ||
border-top: --var($theme, 'size') solid transparent; | ||
border-right: --var($theme, 'size') solid --var($theme, 'expander-color'); | ||
border-bottom: --var($theme, 'size') solid transparent; | ||
border-left: unset; | ||
|
||
&::before { | ||
@extend %igx-splitter-hitbox; | ||
top: calc(100% - #{map-get($theme, 'size') * 2}); | ||
left: calc(100% - #{map-get($theme, 'size')}); | ||
width: #{map-get($theme, 'size') * 3}; | ||
height: #{map-get($theme, 'size') * 4}; | ||
} | ||
} | ||
|
||
%igx-splitter-expander--end-vertical { | ||
border-top: --var($theme, 'size') solid transparent; | ||
border-right: unset; | ||
border-bottom: --var($theme, 'size') solid transparent; | ||
border-left: --var($theme, 'size') solid --var($theme, 'expander-color'); | ||
|
||
&::before { | ||
@extend %igx-splitter-hitbox; | ||
left: calc(100% - #{map-get($theme, 'size') * 2}); | ||
top: calc(100% - #{map-get($theme, 'size') * 2}); | ||
height: #{map-get($theme, 'size') * 4}; | ||
width: #{map-get($theme, 'size') * 3}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.