Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/UIM-396-fixing-navbar-disabled-item…
Browse files Browse the repository at this point in the history
…-opacity
  • Loading branch information
myakovleva committed Mar 23, 2020
2 parents 071a308 + f69e972 commit 23fe28a
Show file tree
Hide file tree
Showing 11 changed files with 634 additions and 438 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 8.4.4 "Walk Up Candlemas" (2020-03-19)

### Mosaic

* bug fix **datepicker:** fixing datapicker toggle button opacity ([#437](https://github.com/positive-js/mosaic/issues/437)) ([d4a28e4](https://github.com/positive-js/mosaic/commit/d4a28e45b94b6982fb7ebd62e18407320c12f7be))
* bug fix **select:** error when use custom trigger (#UIM-398) ([#439](https://github.com/positive-js/mosaic/issues/439)) ([b278ccf](https://github.com/positive-js/mosaic/commit/b278ccf7d6428730b77fdd7b892dc8e8ab163cc7)), closes [#UIM-398](https://github.com/positive-js/mosaic/issues/UIM-398)
* bug fix **tags:** fixed error "Expression has changed after it was checked" (#UIM-376) ([#432](https://github.com/positive-js/mosaic/issues/432)) ([7cb3f34](https://github.com/positive-js/mosaic/commit/7cb3f342d23c28ced87d64c5fe72f133b077fadb)), closes [#UIM-376](https://github.com/positive-js/mosaic/issues/UIM-376)
* bug fix **tags:** validation in tag-input (#UIM-368) ([#430](https://github.com/positive-js/mosaic/issues/430)) ([e1b3971](https://github.com/positive-js/mosaic/commit/e1b397118ae5f2c8735b2f493a453f46267c6109)), closes [#UIM-368](https://github.com/positive-js/mosaic/issues/UIM-368)
* bug fix **tree:** moved checkbox (#UIM-400) ([#438](https://github.com/positive-js/mosaic/issues/438)) ([5633950](https://github.com/positive-js/mosaic/commit/563395077d0a9ccd63855cf06d2b7e728086a7ae)), closes [#UIM-400](https://github.com/positive-js/mosaic/issues/UIM-400)

## 8.4.3 "Wistful" (2020-03-12)

### Mosaic
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mosaic",
"version": "8.4.3",
"version": "8.4.4",
"description": "Components for Angular",
"homepage": "https://github.com/positive-js/mosaic",
"bugs": "https://github.com/positive-js/mosaic/issues",
Expand Down
24 changes: 12 additions & 12 deletions packages/docs/src/styles/_theme-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ $dark-warning: mc-palette($mc-yellow, 200, 400, 700);
$dark-theme: mc-dark-theme($dark-primary, $dark-second, $dark-error, $dark-info, $dark-success, $dark-warning);
$dark-theme-red: mc-dark-theme($dark-primary-red, $dark-second, $dark-error, $dark-info, $dark-success, $dark-warning);
$dark-theme-green: mc-dark-theme(
$dark-primary-green,
$dark-second,
$dark-error,
$dark-info,
$dark-success,
$dark-warning
$dark-primary-green,
$dark-second,
$dark-error,
$dark-info,
$dark-success,
$dark-warning
);
$dark-theme-yellow: mc-dark-theme(
$dark-primary-yellow,
$dark-second,
$dark-error,
$dark-info,
$dark-success,
$dark-warning
$dark-primary-yellow,
$dark-second,
$dark-error,
$dark-info,
$dark-success,
$dark-warning
);
22 changes: 12 additions & 10 deletions packages/mosaic/core/styles/common/_groups.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
display: flex;
flex-direction: row;

.mc-group_justified {
> .mc-group-item {
width: 100%;
}
}

.mc-group-item + .mc-group-item {
margin-left: -$mc-button-border-size;
}

& > .mc-group-item:first-child:not(:last-child) {
@include border-right-radius(0);

Expand All @@ -57,22 +67,13 @@
border-radius: 0;
}
}

.mc-group-item + .mc-group-item {
margin-left: -$mc-button-border-size;
}
}

.mc-group_justified {
> .mc-group-item {
width: 100%;
}
}

.mc-vertical-group {
display: flex;
flex-direction: column;

/* stylelint-disable no-descending-specificity */
> .mc-group-item {
&:first-child:not(:last-child) {
@include border-bottom-radius(0);
Expand Down Expand Up @@ -106,5 +107,6 @@
.mc-group-item + .mc-group-item {
margin-top: -$mc-button-border-size;
}
/* stylelint-enable no-descending-specificity */
}

19 changes: 15 additions & 4 deletions packages/mosaic/core/visual/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
@if $s != '' { $suffix : '#{$s}-#{$i * 5}'; }
@else { $suffix : '#{$i * 5}'; }

$offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}, .layout-margin .flex-offset-#{$suffix}, .layout-margin .offset-#{$suffix}';
$offsets :
'.offset-#{$suffix}, ' +
'.flex-offset-#{$suffix}, ' +
'.layout-margin .flex-offset-#{$suffix}, ' +
'.layout-margin .offset-#{$suffix}';
}

#{$offsets} {
Expand All @@ -75,7 +79,11 @@
@if $s != '' { $suffix : '#{$s}-#{$i}'; }
@else { $suffix : '#{$i}'; }

$offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}, .layout-margin .flex-offset-#{$suffix}, .layout-margin .offset-#{$suffix}';
$offsets :
'.offset-#{$suffix}, ' +
'.flex-offset-#{$suffix}, ' +
'.layout-margin .flex-offset-#{$suffix}, ' +
'.layout-margin .offset-#{$suffix}';
}

#{$offsets} {
Expand All @@ -91,7 +99,11 @@
@if $s != '' { $suffix : '#{$s}-#{$i}'; }
@else { $suffix : '#{$i}'; }

$offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}, .layout-margin .flex-offset-#{$suffix}, .layout-margin .offset-#{$suffix}';
$offsets :
'.offset-#{$suffix}, ' +
'.flex-offset-#{$suffix}, ' +
'.layout-margin .flex-offset-#{$suffix}, ' +
'.layout-margin .offset-#{$suffix}';
}

#{$offsets} {
Expand Down Expand Up @@ -403,7 +415,6 @@

.layout-padding > .flex-gt-md,
.layout-padding > .flex-lg,
.layout-padding > .flex-lg,
.layout-padding > .flex-gt-lg
{
padding: $layout-gutter-width / 1;
Expand Down
1 change: 1 addition & 0 deletions packages/mosaic/datepicker/_datepicker-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ $mc-datepicker-today-fade-amount: 0.2;
border-color: transparent;
border-radius: 0;
background: transparent;
opacity: 1;

.mc-icon {
color: map-get($foreground, icon);
Expand Down
2 changes: 1 addition & 1 deletion packages/mosaic/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ export class McSelect extends McSelectMixinBase implements
}

calculateHiddenItems(): void {
if (this.empty || !this.multiple) { return; }
if (this.customTrigger || this.empty || !this.multiple) { return; }

let visibleItems: number = 0;
const totalItemsWidth = this.getTotalItemsWidthInMatcher();
Expand Down
2 changes: 1 addition & 1 deletion packages/mosaic/tree-select/tree-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ export class McTreeSelect extends McTreeSelectMixinBase implements
}

calculateHiddenItems() {
if (this.empty || !this.multiple) { return; }
if (this.customTrigger || this.empty || !this.multiple) { return; }

let visibleItems: number = 0;
const totalItemsWidth = this.getTotalItemsWidthInMatcher();
Expand Down
2 changes: 2 additions & 0 deletions packages/mosaic/tree/tree-option.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<ng-content select="[mc-icon]"></ng-content>

<ng-content select="mc-tree-node-toggle"></ng-content>

<mc-pseudo-checkbox
*ngIf="showCheckbox"
[state]="selected ? 'checked' : 'unchecked'"
Expand Down
12 changes: 9 additions & 3 deletions packages/mosaic/tree/tree-selection.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ interface SelectionModelOption {

'[attr.tabindex]': 'tabIndex',

'(focus)': 'focus()',
'(blur)': 'blur()',
'(focus)': 'focus($event)',

'(keydown)': 'onKeyDown($event)',
'(window:resize)': 'updateScrollSize()'
Expand Down Expand Up @@ -265,8 +265,8 @@ export class McTreeSelection<T extends McTreeOption> extends CdkTree<T>
this.destroy.complete();
}

focus(): void {
if (this.renderedOptions.length === 0) { return; }
focus($event): void {
if (this.renderedOptions.length === 0 || this.isFocusReceivedFromNestedOption($event)) { return; }

this.keyManager.setFirstItemActive();
}
Expand Down Expand Up @@ -614,5 +614,11 @@ export class McTreeSelection<T extends McTreeOption> extends CdkTree<T>
private canDeselectLast(option: McTreeOption): boolean {
return !(this.noUnselectLast && this.selectionModel.selected.length === 1 && option.selected);
}

private isFocusReceivedFromNestedOption($event: FocusEvent) {
if (!$event || !$event.relatedTarget) { return false; }

return ($event.relatedTarget as HTMLElement).classList.contains('mc-tree-option');
}
}

Loading

0 comments on commit 23fe28a

Please sign in to comment.