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
<div class="input-field"> | |
<input placeholder=" Search" (keyup)="onKeyUp($event)" #input /> | |
</div> | |
<section style="display:flex; flex-direction:column" class="collection"> | |
<app-product | |
class="collection-item" | |
*ngFor="let product of productArray | filter: input.value; index as index" | |
[product]="product" | |
> |
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
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y/'; | |
import { ENTER } from '@angular/cdk/keycodes'; | |
import { Component, QueryList, ViewChildren } from '@angular/core'; | |
import { ProductComponent } from './components/product.component'; | |
@Component({ | |
selector: 'my-app', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
}) |
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
import { Component, HostBinding, Input } from '@angular/core'; | |
import { Highlightable, ListKeyManagerOption } from '@angular/cdk/a11y'; | |
@Component({ | |
selector: 'app-product', | |
templateUrl: './product.component.html', | |
styleUrls: ['./product.component.css'], | |
}) | |
export class ProductComponent implements Highlightable, ListKeyManagerOption { | |
@Input() product: string; |
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
/* You can add global styles to this file, and also import other style files */ | |
@use '@angular/material' as mat; | |
@use '../../big/src/lib/theming' as theme; | |
// ===================================== | |
// always include only once per project | |
// ===================================== | |
@include mat.core(); | |
// ===================================== |
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
{ | |
"name": "@fireflysemantics/big-component-example", | |
"version": "0.0.1", | |
"exports": { | |
".": { | |
"sass": "./src/lib/theming/index.scss" | |
} | |
}, | |
"peerDependencies": { | |
"@angular/common": "^13.3.0", |
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
{ | |
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json", | |
"dest": "../../dist/big", | |
"assets": [ | |
"./src/CHANGELOG.md", | |
"./src/lib/theming/index.scss" | |
], | |
"lib": { | |
"entryFile": "src/public-api.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
<body [class]="s.OS.S.theme.obs | async"> | |
<h2>Theme Demo</h2> | |
<mat-form-field appearance="fill"> | |
<mat-label>Theme Selection</mat-label> | |
<mat-select [formControl]="themeSelect"> | |
<mat-option *ngFor="let theme of themes" [value]="theme">{{theme}}</mat-option> | |
</mat-select> | |
</mat-form-field> | |
<section> |
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
import { OverlayContainer } from '@angular/cdk/overlay'; | |
import { Component, OnInit } from '@angular/core'; | |
import { FormControl } from '@angular/forms'; | |
import { StateService } from './services/state.service'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.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
import { Injectable } from "@angular/core"; | |
import { KeyObsValueReset, ObsValueReset, OStore, OStoreStart } from '@fireflysemantics/slice' | |
import { Observable } from "rxjs"; | |
const START: OStoreStart = { | |
theme: { value: 'dark-theme' } | |
} | |
interface ISTART extends KeyObsValueReset { |
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
@import '~@angular/material/theming'; | |
// ===================================== | |
// always include only once per project | |
// ===================================== | |
@include mat-core(); | |
// ===================================== | |
// import our custom themes | |
// ===================================== |