Skip to content

Commit e61d9c3

Browse files
authored
Merge branch 'master' into bpenkov/date-time-editor
2 parents 4c10f6b + 4f3bc1c commit e61d9c3

File tree

4 files changed

+48
-8
lines changed

4 files changed

+48
-8
lines changed

projects/igniteui-angular/src/lib/core/styles/components/splitter/_splitter-component.scss

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
$this: str-slice(bem--selector-to-string(&), 2, -1);
1212
@include register-component($this);
1313

14+
@include b(#{$this}-bar-host) {
15+
&:focus {
16+
@extend %igx-splitter-bar--focus !optional;
17+
}
18+
}
19+
1420
@include b(#{$this}-bar) {
1521
@extend %igx-splitter-bar !optional;
1622

projects/igniteui-angular/src/lib/core/styles/components/splitter/_splitter-theme.scss

+22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
////
22
/// @group themes
3+
/// @access public
4+
/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a>
5+
///
6+
/// @param {Map} $palette [$default-palette] - The palette used as basis for styling the component.
7+
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
8+
/// @param {Map} $elevations [$elevations] - The elevations (shadows) map to be used.
9+
///
10+
/// @param {color} $bar-color [null] - The background color of the bar.
11+
/// @param {color} $handle-color [null] - The color for the bar drag handle.
12+
/// @param {color} $expander-color [null] - The color for the arrow expander's.
13+
/// @param {number} $border-radius [null] - the border radios of the splitter bar drag handle
14+
/// @param {color} $focus-color [null] - The color used for focused splitter bar.
15+
/// @param {number} $size [null] - The size of the splitter, its width for vertical and height for horizontal splitter.
16+
///
317
@function igx-splitter-theme(
418
$palette: $default-palette,
519
$schema: $light-schema,
@@ -9,6 +23,7 @@
923
$handle-color: null,
1024
$expander-color: null,
1125
$border-radius: null,
26+
$focus-color: null,
1227
$size: null
1328
) {
1429
$name: 'igx-splitter';
@@ -41,6 +56,7 @@
4156
handle-color: $handle-color,
4257
expander-color: $expander-color,
4358
border-radius: $border-radius-handle,
59+
focus-color: $focus-color,
4460
size: $size
4561
));
4662
}
@@ -98,6 +114,12 @@
98114
}
99115
}
100116

117+
%igx-splitter-bar--focus {
118+
// Remove the default browser outline styles
119+
outline: transparent solid 1px;
120+
box-shadow: inset 0 0 0 1px --var($theme, 'focus-color');
121+
}
122+
101123
%igx-splitter-bar--vertical {
102124
flex-direction: column;
103125
height: 100%;

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_splitter.scss

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
/// @group schemas
55
/// @access private
66
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
7+
/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a>
78
////
89

910
/// Generates a light splitter schema.
1011
/// @type {Map}
1112
/// @property {Map} icon-background [igx-color: ('grays', 400)]- The background color used for splitters of type icon.
12-
/// @property {Map} icon-color [igx-color: ('grays', 800)] - The icon color used for splitters of type icon.
13-
/// @property {Map} initials-background [igx-color: ('grays', 400)] - The background color used for splitters of type initials.
14-
/// @property {Map} initials-color [igx-color: ('grays', 800)] - The text color used for splitters of type initials.
15-
/// @property {Color} image-background [transparent] - The background color used for splitters of type image.
13+
/// @property {Map} $bar-color [igx-color: 'surface', darken: 5%] - The background color of the bar.
14+
/// @property {Map} $handle-color [igx-color: 'surface', darken: 20%] - The color for the bar drag handle.
15+
/// @property {Map} $expander-color [igx-color: 'surface', darken: 20%] - The color for the arrow expander's.
16+
/// @property {Map} $border-radius [1] - The border radius fraction, between 0-1 to be used for the splitter component
17+
/// @property {Map} $focus-color [igx-color: ('secondary', 500)] - The color used for focused splitter bar.
18+
/// @property {Number} $size [4px] - The size of the splitter, it's width for vertical and height for horizontal splitter.
1619
/// @see $default-palette
1720
$_light-splitter: extend(
1821
$_default-shape-splitter,
@@ -22,6 +25,10 @@ $_light-splitter: extend(
2225
darken: 5%
2326
),
2427

28+
focus-color: (
29+
igx-color: ('secondary', 500)
30+
),
31+
2532
handle-color: (
2633
igx-color: 'surface',
2734
darken: 20%

projects/igniteui-angular/src/lib/splitter/splitter-bar/splitter-bar.component.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Component, Input, HostBinding, EventEmitter, Output, HostListener } from '@angular/core';
2-
import { SplitterType } from '../splitter.component';
3-
import { IgxSplitterPaneComponent } from '../splitter-pane/splitter-pane.component';
4-
import { IDragMoveEventArgs, IDragStartEventArgs, DragDirection } from '../../directives/drag-drop/drag-drop.directive';
1+
import {Component, EventEmitter, HostBinding, HostListener, Input, Output} from '@angular/core';
2+
import {SplitterType} from '../splitter.component';
3+
import {IgxSplitterPaneComponent} from '../splitter-pane/splitter-pane.component';
4+
import {DragDirection, IDragMoveEventArgs, IDragStartEventArgs} from '../../directives/drag-drop/drag-drop.directive';
55

66

77
export const SPLITTER_INTERACTION_KEYS = new Set('right down left up arrowright arrowdown arrowleft arrowup'.split(' '));
@@ -17,6 +17,11 @@ export const SPLITTER_INTERACTION_KEYS = new Set('right down left up arrowright
1717
templateUrl: './splitter-bar.component.html'
1818
})
1919
export class IgxSplitBarComponent {
20+
/**
21+
* Set css class to the host element.
22+
*/
23+
@HostBinding('class.igx-splitter-bar-host')
24+
public cssClass = 'igx-splitter-bar-host';
2025

2126
/**
2227
* Sets/gets `IgxSplitBarComponent` orientation.

0 commit comments

Comments
 (0)