Skip to content

Instantly share code, notes, and snippets.

View fireflysemantics's full-sized avatar

Firefly Semantics Corporation fireflysemantics

View GitHub Profile
<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"
>
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'],
})
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;
/* 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();
// =====================================
{
"name": "@fireflysemantics/big-component-example",
"version": "0.0.1",
"exports": {
".": {
"sass": "./src/lib/theming/index.scss"
}
},
"peerDependencies": {
"@angular/common": "^13.3.0",
{
"$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"
}
<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>
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']
})
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 {
@import '~@angular/material/theming';
// =====================================
// always include only once per project
// =====================================
@include mat-core();
// =====================================
// import our custom themes
// =====================================