This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
95 changed files
with
4,317 additions
and
1,277 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
apps/docs/src/app/components/copy-button/copy-button.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
:host { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
top: 4px; | ||
right: 4px; | ||
} |
2 changes: 1 addition & 1 deletion
2
apps/docs/src/app/components/inputs-table/inputs-table.component.html
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
25 changes: 25 additions & 0 deletions
25
apps/docs/src/app/examples/autocomplete/access-value/access-value.component.html
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,25 @@ | ||
<div class="objects"> | ||
<anglify-autocomplete | ||
[(value)]="selection1" | ||
[items]="top10Movies" | ||
itemTextKey="label" | ||
itemValueKey="id" | ||
appearance="outlined" | ||
[multiple]="true" | ||
label="Your favourite movies" | ||
> | ||
</anglify-autocomplete> | ||
Selected IDs: {{ selection1 }} | ||
</div> | ||
|
||
<div class="primitives"> | ||
<anglify-autocomplete | ||
[(value)]="selection2" | ||
[items]="top10MovieNames" | ||
appearance="outlined" | ||
[multiple]="true" | ||
label="Your favourite movies" | ||
> | ||
</anglify-autocomplete> | ||
Selected Names: {{ selection2 }} | ||
</div> |
6 changes: 6 additions & 0 deletions
6
apps/docs/src/app/examples/autocomplete/access-value/access-value.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,6 @@ | ||
:host { | ||
display: flex; | ||
width: 100%; | ||
flex-direction: column; | ||
gap: 48px; | ||
} |
36 changes: 36 additions & 0 deletions
36
apps/docs/src/app/examples/autocomplete/access-value/access-value.component.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { | ||
AutocompleteComponent, | ||
SlotDirective, | ||
ListItemComponent, | ||
ListItemTitleComponent, | ||
ListItemDescriptionComponent, | ||
CheckboxComponent, | ||
} from '@anglify/components'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { top10MovieNames, top10Movies } from '../../examples'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [ | ||
CommonModule, | ||
AutocompleteComponent, | ||
SlotDirective, | ||
ListItemComponent, | ||
ListItemTitleComponent, | ||
ListItemDescriptionComponent, | ||
CheckboxComponent, | ||
], | ||
templateUrl: './access-value.component.html', | ||
styleUrls: ['./access-value.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export default class AccessValueComponent { | ||
protected top10Movies = top10Movies; | ||
|
||
protected selection1 = ['1010', '1004']; | ||
|
||
protected top10MovieNames = top10MovieNames; | ||
|
||
protected selection2 = ['The Godfather']; | ||
} |
5 changes: 5 additions & 0 deletions
5
apps/docs/src/app/examples/autocomplete/chips/chips.component.html
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,5 @@ | ||
<anglify-autocomplete appearance="outlined" label="Your favourite movies" [multiple]="true" [items]="top10Movies" itemTextKey="label"> | ||
<ng-template slot="selection" let-context> | ||
<anglify-chip *ngFor="let item of context.selectedItems">{{ item.label }}</anglify-chip> | ||
</ng-template> | ||
</anglify-autocomplete> |
8 changes: 8 additions & 0 deletions
8
apps/docs/src/app/examples/autocomplete/chips/chips.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,8 @@ | ||
:host { | ||
width: 100%; | ||
|
||
anglify-chip { | ||
--anglify-chip-height: 14px; | ||
--anglify-chip-padding: 5px 10px; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
apps/docs/src/app/examples/autocomplete/chips/chips.component.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { AutocompleteComponent, ChipComponent, SlotDirective } from '@anglify/components'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { top10Movies } from '../../examples'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [CommonModule, AutocompleteComponent, SlotDirective, ChipComponent], | ||
templateUrl: './chips.component.html', | ||
styleUrls: ['./chips.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export default class ChipsComponent { | ||
protected top10Movies = top10Movies; | ||
} |
12 changes: 12 additions & 0 deletions
12
.../app/examples/autocomplete/control-values-manually/control-values-manually.component.html
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,12 @@ | ||
<anglify-autocomplete | ||
[(value)]="selection" | ||
[items]="top10Movies" | ||
itemTextKey="label" | ||
itemValueKey="id" | ||
appearance="outlined" | ||
[multiple]="true" | ||
label="Your favourite movies" | ||
> | ||
</anglify-autocomplete> | ||
Selected IDs: {{ selection }} | ||
<button anglifyButton type="button" (click)="toggleFightClub()">Toggle Fight Club</button> |
11 changes: 11 additions & 0 deletions
11
.../app/examples/autocomplete/control-values-manually/control-values-manually.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,11 @@ | ||
:host { | ||
display: flex; | ||
width: 100%; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 24px; | ||
|
||
anglify-autocomplete { | ||
min-width: 100%; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...rc/app/examples/autocomplete/control-values-manually/control-values-manually.component.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { AutocompleteComponent, ButtonComponent, SlotDirective } from '@anglify/components'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { top10Movies } from '../../examples'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [CommonModule, AutocompleteComponent, SlotDirective, ButtonComponent], | ||
templateUrl: './control-values-manually.component.html', | ||
styleUrls: ['./control-values-manually.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export default class ControlValuesManuallyComponent { | ||
protected top10Movies = top10Movies; | ||
|
||
protected selection = ['1010', '1004']; | ||
|
||
protected toggleFightClub() { | ||
if (this.selection.includes('1010')) { | ||
this.selection = this.selection.filter(id => id !== '1010'); | ||
} else { | ||
this.selection = [...this.selection, '1010']; | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
apps/docs/src/app/examples/autocomplete/items-slot/items-slot.component.html
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,20 @@ | ||
<anglify-autocomplete [items]="top10Movies" itemTextKey="label" appearance="outlined" [multiple]="true" label="Your favourite movies"> | ||
<ng-template slot="items" let-context let-onItemClick="onItemClick"> | ||
<anglify-list-item | ||
*ngFor="let item of context.filteredItems; let i = index" | ||
[focusable]="false" | ||
[state]="!item.disabled" | ||
[ripple]="!item.disabled" | ||
[disabled]="item.disabled" | ||
[active]="context.selectedItems.includes(item)" | ||
[highlight]="context.highlightedIndex === i" | ||
(click)="onItemClick(item)" | ||
> | ||
<anglify-list-item-title>{{ item.label }}</anglify-list-item-title> | ||
<anglify-list-item-description>{{ item.year }}</anglify-list-item-description> | ||
<ng-template slot="prepend"> | ||
<anglify-checkbox [readonly]="true" [checked]="context.selectedItems.includes(item)"></anglify-checkbox> | ||
</ng-template> | ||
</anglify-list-item> | ||
</ng-template> | ||
</anglify-autocomplete> |
3 changes: 3 additions & 0 deletions
3
apps/docs/src/app/examples/autocomplete/items-slot/items-slot.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,3 @@ | ||
:host { | ||
width: 100%; | ||
} |
30 changes: 30 additions & 0 deletions
30
apps/docs/src/app/examples/autocomplete/items-slot/items-slot.component.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { | ||
AutocompleteComponent, | ||
CheckboxComponent, | ||
ListItemComponent, | ||
ListItemDescriptionComponent, | ||
ListItemTitleComponent, | ||
SlotDirective, | ||
} from '@anglify/components'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { top10Movies } from '../../examples'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [ | ||
CommonModule, | ||
AutocompleteComponent, | ||
SlotDirective, | ||
ListItemComponent, | ||
ListItemTitleComponent, | ||
ListItemDescriptionComponent, | ||
CheckboxComponent, | ||
], | ||
templateUrl: './items-slot.component.html', | ||
styleUrls: ['./items-slot.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export default class ItemsSlotComponent { | ||
protected top10Movies = top10Movies; | ||
} |
16 changes: 16 additions & 0 deletions
16
apps/docs/src/app/examples/autocomplete/no-data-with-chips/no-data-with-chips.component.html
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,16 @@ | ||
<anglify-autocomplete [items]="top10Movies" itemTextKey="label" appearance="outlined" [multiple]="true" label="Your favourite movies"> | ||
<ng-template slot="selection" let-context> | ||
<anglify-chip *ngFor="let item of context.selectedItems">{{ item.label }}</anglify-chip> | ||
</ng-template> | ||
<ng-template slot="no-data"> | ||
<anglify-list-item [state]="false" [ripple]="false" [disabled]="true"> | ||
<ng-template slot="prepend"> | ||
<anglify-icon icon="mdi-alert-circle-outline"></anglify-icon> | ||
</ng-template> | ||
<anglify-list-item-title>No data available</anglify-list-item-title> | ||
<ng-template slot="append"> | ||
<button type="button" anglifyButton appearance="text" (click)="openDocs()">View Docs</button> | ||
</ng-template> | ||
</anglify-list-item> | ||
</ng-template> | ||
</anglify-autocomplete> |
3 changes: 3 additions & 0 deletions
3
apps/docs/src/app/examples/autocomplete/no-data-with-chips/no-data-with-chips.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,3 @@ | ||
:host { | ||
width: 100%; | ||
} |
41 changes: 41 additions & 0 deletions
41
apps/docs/src/app/examples/autocomplete/no-data-with-chips/no-data-with-chips.component.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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { | ||
AutocompleteComponent, | ||
ButtonComponent, | ||
ChipComponent, | ||
ClickStopPropagationDirective, | ||
IconComponent, | ||
ListItemComponent, | ||
ListItemTitleComponent, | ||
SlotDirective, | ||
SnackbarService, | ||
} from '@anglify/components'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { top10Movies } from '../../examples'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [ | ||
CommonModule, | ||
AutocompleteComponent, | ||
SlotDirective, | ||
ListItemComponent, | ||
ListItemTitleComponent, | ||
ChipComponent, | ||
IconComponent, | ||
ButtonComponent, | ||
ClickStopPropagationDirective, | ||
], | ||
templateUrl: './no-data-with-chips.component.html', | ||
styleUrls: ['./no-data-with-chips.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export default class NoDataWithChipsComponent { | ||
protected top10Movies = top10Movies; | ||
|
||
public constructor(private readonly snackbar: SnackbarService) {} | ||
|
||
protected openDocs() { | ||
this.snackbar.open({ data: { label: 'Open docs clicked' } }); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
apps/docs/src/app/examples/combobox/access-value/access-value.component.html
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,19 @@ | ||
<div class="objects"> | ||
<anglify-combobox | ||
[(value)]="selection1" | ||
[items]="top10Movies" | ||
itemTextKey="label" | ||
itemValueKey="id" | ||
appearance="outlined" | ||
[multiple]="true" | ||
label="Your favourite movies" | ||
> | ||
</anglify-combobox> | ||
Selected IDs: {{ selection1 }} | ||
</div> | ||
|
||
<div class="primitives"> | ||
<anglify-combobox [(value)]="selection2" [items]="top10MovieNames" appearance="outlined" [multiple]="true" label="Your favourite movies"> | ||
</anglify-combobox> | ||
Selected Names: {{ selection2 }} | ||
</div> |
6 changes: 6 additions & 0 deletions
6
apps/docs/src/app/examples/combobox/access-value/access-value.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,6 @@ | ||
:host { | ||
display: flex; | ||
width: 100%; | ||
flex-direction: column; | ||
gap: 48px; | ||
} |
36 changes: 36 additions & 0 deletions
36
apps/docs/src/app/examples/combobox/access-value/access-value.component.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { | ||
CheckboxComponent, | ||
ComboboxComponent, | ||
ListItemComponent, | ||
ListItemDescriptionComponent, | ||
ListItemTitleComponent, | ||
SlotDirective, | ||
} from '@anglify/components'; | ||
import { CommonModule } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { top10MovieNames, top10Movies } from '../../examples'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [ | ||
CommonModule, | ||
ComboboxComponent, | ||
SlotDirective, | ||
ListItemComponent, | ||
ListItemTitleComponent, | ||
ListItemDescriptionComponent, | ||
CheckboxComponent, | ||
], | ||
templateUrl: './access-value.component.html', | ||
styleUrls: ['./access-value.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export default class AccessValueComponent { | ||
protected top10Movies = top10Movies; | ||
|
||
protected selection1 = ['1010', '1004']; | ||
|
||
protected top10MovieNames = top10MovieNames; | ||
|
||
protected selection2 = ['The Godfather']; | ||
} |
5 changes: 5 additions & 0 deletions
5
apps/docs/src/app/examples/combobox/chips/chips.component.html
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,5 @@ | ||
<anglify-combobox appearance="outlined" label="Your favourite movies" [multiple]="true" [items]="top10Movies" itemTextKey="label"> | ||
<ng-template slot="selection" let-context> | ||
<anglify-chip *ngFor="let item of context.selectedItems">{{ item.label }}</anglify-chip> | ||
</ng-template> | ||
</anglify-combobox> |
8 changes: 8 additions & 0 deletions
8
apps/docs/src/app/examples/combobox/chips/chips.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,8 @@ | ||
:host { | ||
width: 100%; | ||
|
||
anglify-chip { | ||
--anglify-chip-height: 14px; | ||
--anglify-chip-padding: 5px 10px; | ||
} | ||
} |
Oops, something went wrong.