Skip to content

fix(dropdown): mc-link and mc-dropdown-item do not work together (#UIM-139) #221

Merged
merged 2 commits into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions packages/dev-app/button/button-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,39 @@
<br>
<br>

<span class="mc-button-group">
<button mc-button>default</button>
<button mc-button><i mc-icon="mc-angle-down-L_16"></i></button>&nbsp;
<span class="mc-group">
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item"><i mc-icon="mc-angle-down-L_16"></i></button>&nbsp;
</span>

<br>
<br>

<span class="mc-button-group">
<button mc-button>default</button>
<button mc-button>default</button>
<button mc-button>default</button>
<button mc-button><i mc-icon="mc-angle-down-L_16"></i></button>
<span class="mc-group">
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item"><i mc-icon="mc-angle-down-L_16"></i></button>
</span>

<br>
<br>

<span class="mc-button-group mc-button-group_justified">
<button mc-button>default</button>
<button mc-button color="primary">default</button>
<button mc-button color="error">default</button>
<button mc-button><i mc-icon="mc-angle-down-L_16"></i></button>
<span class="mc-group mc-group_justified">
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item" color="primary">default</button>
<button mc-button class="mc-group-item" color="error">default</button>
<button mc-button class="mc-group-item"><i mc-icon="mc-angle-down-L_16"></i></button>
</span>

<br>
<br>

<span class="mc-button-group_vertical">
<button mc-button>default</button>
<button mc-button color="primary">default</button>
<button mc-button color="error">default</button>
<button mc-button><i mc-icon="mc-angle-down-L_16"></i></button>
<span class="mc-vertical-group">
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item" color="primary">default</button>
<button mc-button class="mc-group-item" color="error">default</button>
<button mc-button class="mc-group-item"><i mc-icon="mc-angle-down-L_16"></i></button>
</span>

<br>
Expand Down
122 changes: 119 additions & 3 deletions packages/mosaic-dev/all/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ <h1>Checkbox</h1>
<div class="dev-box">
<h1>Dropdown</h1>

<span class="mc-button-group">
<button mc-button>dropdown</button>
<span class="mc-group">
<button mc-button class="mc-group-item">dropdown</button>

<button mc-button [mcDropdownTriggerFor]="appDropdown">
<button mc-button class="mc-group-item" [mcDropdownTriggerFor]="appDropdown">
<i mc-icon="mc-angle-down-L_16"></i>
</button>
</span>
Expand Down Expand Up @@ -1206,6 +1206,122 @@ <h1>Tree</h1>
</mc-tree-option>
</mc-tree-selection>
</div>

<div class="dev-box">
<h1>Groups</h1>

<div class="mc-group">
<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<button mc-button class="mc-group-item">
<i mc-icon="mc-angle-down-L_16"></i>
</button>
</div>

<br>

<div class="mc-group">
<button mc-button class="mc-group-item">
<i mc-icon="mc-angle-down-L_16"></i>
</button>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>
</div>

<br>

<div class="mc-vertical-group">
<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<button mc-button class="mc-group-item">
<i mc-icon="mc-angle-down-L_16"></i>
</button>
</div>

<br>

<div class="mc-vertical-group">
<button mc-button class="mc-group-item">
<i mc-icon="mc-angle-down-L_16"></i>
</button>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>

<mc-form-field class="mc-group-item">
<input mcInput type="text" placeholder="text">
</mc-form-field>
</div>

<br>

<div class="mc-group">
<mc-form-field class="mc-group-item">
<mc-select multiple [formControl]="multiSelectSelectFormControl">
<mc-option value="Normal">Normal</mc-option>
<mc-option value="Hovered">Hovered</mc-option>
<mc-option value="Selected">Selected</mc-option>
<mc-option value="Selected1">Selected1</mc-option>
</mc-select>
</mc-form-field>

<button mc-button class="mc-group-item">
<i mc-icon="mc-angle-down-L_16"></i>
</button>
</div>

<br>

<div class="mc-group">
<button mc-button class="mc-group-item">
<i mc-icon="mc-angle-down-L_16"></i>
</button>

<mc-form-field class="mc-group-item">
<mc-select multiple [formControl]="multiSelectSelectFormControl">
<mc-option value="Normal">Normal</mc-option>
<mc-option value="Hovered">Hovered</mc-option>
<mc-option value="Selected">Selected</mc-option>
<mc-option value="Selected1">Selected1</mc-option>
</mc-select>
</mc-form-field>
</div>
</div>
</div>


Expand Down
32 changes: 16 additions & 16 deletions packages/mosaic-dev/button/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,39 @@
<br>
<br>

<span class="mc-button-group">
<span class="mc-group">
<button mc-button>default</button>
<button mc-button><i mc-icon="mc-angle-down-L_16"></i></button>&nbsp;
</span>

<br>
<br>

<span class="mc-button-group">
<button mc-button>default</button>
<button mc-button>default</button>
<button mc-button>default</button>
<button mc-button><i mc-icon="mc-angle-down-L_16"></i></button>
<span class="mc-group">
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item"><i mc-icon="mc-angle-down-L_16"></i></button>
</span>

<br>
<br>

<span class="mc-button-group mc-button-group_justified">
<button mc-button>default</button>
<button mc-button color="primary">default</button>
<button mc-button color="error">default</button>
<button mc-button><i mc-icon="mc-angle-down-L_16"></i></button>
<span class="mc-group mc-group_justified">
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item" color="primary">default</button>
<button mc-button class="mc-group-item" color="error">default</button>
<button mc-button class="mc-group-item"><i mc-icon="mc-angle-down-L_16"></i></button>
</span>

<br>
<br>

<span class="mc-button-group_vertical">
<button mc-button>default</button>
<button mc-button color="primary">default</button>
<button mc-button color="error">default</button>
<button mc-button><i mc-icon="mc-angle-down-L_16"></i></button>
<span class="mc-vertical-group">
<button mc-button class="mc-group-item">default</button>
<button mc-button class="mc-group-item" color="primary">default</button>
<button mc-button class="mc-group-item" color="error">default</button>
<button mc-button class="mc-group-item"><i mc-icon="mc-angle-down-L_16"></i></button>
</span>

<br>
Expand Down
3 changes: 2 additions & 1 deletion packages/mosaic-dev/dropdown/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { McButtonModule } from '@ptsecurity/mosaic/button';
import { McDropdownModule } from '@ptsecurity/mosaic/dropdown';
import { McIconModule } from '@ptsecurity/mosaic/icon';
import { McLinkModule } from '@ptsecurity/mosaic/link';


@Component({
Expand All @@ -28,6 +28,7 @@ export class DemoComponent {
BrowserAnimationsModule,
BrowserModule,
FormsModule,
McLinkModule,
McIconModule,
McButtonModule,
McDropdownModule
Expand Down
10 changes: 6 additions & 4 deletions packages/mosaic-dev/dropdown/template.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div>
<span class="mc-button-group">
<button mc-button>dropdown</button>
<span class="mc-group">
<button mc-button class="mc-group-item">dropdown</button>

<button mc-button [mcDropdownTriggerFor]="appDropdown">
<button mc-button class="mc-group-item" [mcDropdownTriggerFor]="appDropdown">
<i mc-icon="mc-angle-down-L_16"></i>
</button>
</span>
Expand All @@ -29,7 +29,9 @@
<h5>Additional info</h5>
<button mc-dropdown-item disabled>Disabled</button>
<button mc-dropdown-item>Point 2</button>
<a href="https://google.com" class="mc-link mc-link_underlined" mc-dropdown-item>Link</a>
<a href="https://google.com" class="mc-link mc-link_underlined" mc-dropdown-item>
<span class="mc-link__text">Link</span>
</a>
<button mc-dropdown-item>Point 3</button>
</mc-dropdown>

Expand Down
8 changes: 1 addition & 7 deletions packages/mosaic-dev/input/template.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
<div class="container">

<header>Number Value: {{ numberValue }}</header>
<br>

<button mc-button>
<i mc-icon="mc-angle-down-L_16"></i>
</button>

<br>
<br>

<mc-form-field>
<mc-form-field class="mc-group-item">
<input mcInput [(ngModel)]="numberValue" type="number" placeholder="Number MaxMin Step"
[min]="min" max="7" step="0.5" big-step="1.5">
<mc-stepper></mc-stepper>
Expand Down
2 changes: 1 addition & 1 deletion packages/mosaic-dev/link/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<td>Normal</td>
</tr>
<tr>
<td><a class="mc-link" [disabled]="true" href=""><span class="mc-link__text">Сохранить</span></a></td>
<td><a class="mc-link" [disabled]="true" href="" tabindex="10"><span class="mc-link__text">Сохранить</span></a></td>
<td><a class="mc-link"><span class="mc-link__text">Сохранить</span></a></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion packages/mosaic/button-toggle/button-toggle.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../core/styles/common/vendor-prefixes';
@import '../core/styles/common/layout';
@import '../../cdk/a11y/a11y';
@import '../core/styles/common/button';
@import '../core/styles/common/groups';

$mc-button-toggle-standard-padding: 0 12px !default;
$mc-button-toggle-standard-height: 20px !default;
Expand Down
3 changes: 0 additions & 3 deletions packages/mosaic/button/_button-base.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
@import '../core/styles/common/button';

$mc-button-border-size: 1px;

$mc-button-margin: 0 !default;
$mc-button-border-radius: 3px;

// TODO: convert it to common values from typography
$mc-button-padding: 5px 15px;
Expand Down
Loading