@tekus/design-system 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/esm2022/design-system.mjs +5 -0
- package/esm2022/lib/components/button/button.component.mjs +62 -0
- package/esm2022/lib/components/search-bar/search-bar.component.mjs +75 -0
- package/esm2022/lib/design-system.module.mjs +17 -0
- package/esm2022/public-api.mjs +7 -0
- package/fesm2022/design-system.mjs +159 -0
- package/fesm2022/design-system.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/button/button.component.d.ts +29 -0
- package/lib/components/search-bar/search-bar.component.d.ts +23 -0
- package/lib/design-system.module.d.ts +7 -0
- package/package.json +25 -0
- package/public-api.d.ts +3 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DesignSystem
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project design-system` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project design-system`.
|
|
8
|
+
> Note: Don't forget to add `--project design-system` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build design-system` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build design-system`, go to the dist folder `cd dist/design-system` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test design-system` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLXN5c3RlbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2Rlc2lnbi1zeXN0ZW0vc3JjL2Rlc2lnbi1zeXN0ZW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { NgStyle, NgClass } from '@angular/common';
|
|
2
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export default class ButtonComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
/**
|
|
7
|
+
* Is this the principal call to action on the page?
|
|
8
|
+
*/
|
|
9
|
+
this.primary = false;
|
|
10
|
+
/**
|
|
11
|
+
* How large should the button be?
|
|
12
|
+
*/
|
|
13
|
+
this.size = 'medium';
|
|
14
|
+
/**
|
|
15
|
+
* Button contents
|
|
16
|
+
*
|
|
17
|
+
* @required
|
|
18
|
+
*/
|
|
19
|
+
this.label = 'Button';
|
|
20
|
+
/**
|
|
21
|
+
* Optional click handler
|
|
22
|
+
*/
|
|
23
|
+
this.onClick = new EventEmitter();
|
|
24
|
+
}
|
|
25
|
+
get classes() {
|
|
26
|
+
const mode = this.primary
|
|
27
|
+
? 'storybook-button--primary'
|
|
28
|
+
: 'storybook-button--secondary';
|
|
29
|
+
return ['storybook-button', `storybook-button--${this.size}`, mode];
|
|
30
|
+
}
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonComponent, isStandalone: true, selector: "storybook-button", inputs: { primary: "primary", backgroundColor: "backgroundColor", size: "size", label: "label" }, outputs: { onClick: "onClick" }, ngImport: i0, template: ` <button
|
|
33
|
+
type="button"
|
|
34
|
+
(click)="onClick.emit($event)"
|
|
35
|
+
[ngClass]="classes"
|
|
36
|
+
[ngStyle]="{ 'background-color': backgroundColor }"
|
|
37
|
+
>
|
|
38
|
+
{{ label }}
|
|
39
|
+
</button>`, isInline: true, styles: [".storybook-button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;border-radius:3em;cursor:pointer;display:inline-block;line-height:1}.storybook-button--primary{color:#fff;background-color:#1ea7fd}.storybook-button--secondary{color:#333;background-color:transparent;box-shadow:#00000026 0 0 0 1px inset}.storybook-button--small{font-size:12px;padding:10px 16px}.storybook-button--medium{font-size:14px;padding:11px 20px}.storybook-button--large{font-size:16px;padding:12px 24px}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
40
|
+
}
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
42
|
+
type: Component,
|
|
43
|
+
args: [{ standalone: true, selector: 'storybook-button', imports: [NgStyle, NgClass], template: ` <button
|
|
44
|
+
type="button"
|
|
45
|
+
(click)="onClick.emit($event)"
|
|
46
|
+
[ngClass]="classes"
|
|
47
|
+
[ngStyle]="{ 'background-color': backgroundColor }"
|
|
48
|
+
>
|
|
49
|
+
{{ label }}
|
|
50
|
+
</button>`, styles: [".storybook-button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;border-radius:3em;cursor:pointer;display:inline-block;line-height:1}.storybook-button--primary{color:#fff;background-color:#1ea7fd}.storybook-button--secondary{color:#333;background-color:transparent;box-shadow:#00000026 0 0 0 1px inset}.storybook-button--small{font-size:12px;padding:10px 16px}.storybook-button--medium{font-size:14px;padding:11px 20px}.storybook-button--large{font-size:16px;padding:12px 24px}\n"] }]
|
|
51
|
+
}], propDecorators: { primary: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], backgroundColor: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], size: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], label: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], onClick: [{
|
|
60
|
+
type: Output
|
|
61
|
+
}] } });
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Rlc2lnbi1zeXN0ZW0vc3JjL2xpYi9jb21wb25lbnRzL2J1dHRvbi9idXR0b24uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDbkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFnQnZFLE1BQU0sQ0FBQyxPQUFPLE9BQU8sZUFBZTtJQWRwQztRQWVFOztXQUVHO1FBRUgsWUFBTyxHQUFHLEtBQUssQ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PigpO1xuXG4gIHB1YmxpYyBnZXQgY2xhc3NlcygpOiBzdHJpbmdbXSB7XG4gICAgY29uc3QgbW9kZSA9IHRoaXMucHJpbWFyeVxuICAgICAgPyAnc3Rvcnlib29rLWJ1dHRvbi0tcHJpbWFyeSdcbiAgICAgIDogJ3N0b3J5Ym9vay1idXR0b24tLXNlY29uZGFyeSc7XG5cbiAgICByZXR1cm4gWydzdG9yeWJvb2stYnV0dG9uJywgYHN0b3J5Ym9vay1idXR0b24tLSR7dGhpcy5zaXplfWAsIG1vZGVdO1xuICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
3
|
+
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
4
|
+
import { Input, Output, Component, EventEmitter } from '@angular/core';
|
|
5
|
+
import { faMagnifyingGlass, faXmark } from '@fortawesome/pro-solid-svg-icons';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/common";
|
|
8
|
+
import * as i2 from "@fortawesome/angular-fontawesome";
|
|
9
|
+
import * as i3 from "@angular/forms";
|
|
10
|
+
export class SearchBarComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.inputValue = '';
|
|
13
|
+
this.faXmark = faXmark;
|
|
14
|
+
this.faMagnifyingGlass = faMagnifyingGlass;
|
|
15
|
+
/**
|
|
16
|
+
* Search bar hint label
|
|
17
|
+
*
|
|
18
|
+
* @required
|
|
19
|
+
*/
|
|
20
|
+
this.hintLabel = '';
|
|
21
|
+
/**
|
|
22
|
+
* Input changes handler
|
|
23
|
+
*/
|
|
24
|
+
this.inputChange = new EventEmitter();
|
|
25
|
+
}
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SearchBarComponent, isStandalone: true, selector: "lib-tks-search-bar", inputs: { hintLabel: "hintLabel", backgroundColor: "backgroundColor" }, outputs: { inputChange: "inputChange" }, ngImport: i0, template: `<div
|
|
28
|
+
class="search__bar"
|
|
29
|
+
[ngStyle]="{ 'background-color': backgroundColor }"
|
|
30
|
+
>
|
|
31
|
+
<input
|
|
32
|
+
class="search__bar__input"
|
|
33
|
+
type="text"
|
|
34
|
+
[(ngModel)]="inputValue"
|
|
35
|
+
[placeholder]="hintLabel"
|
|
36
|
+
(ngModelChange)="inputChange.emit($event)"
|
|
37
|
+
/>
|
|
38
|
+
<fa-icon
|
|
39
|
+
class="search__bar__clear__mark__icon"
|
|
40
|
+
[icon]="faXmark"
|
|
41
|
+
*ngIf="inputValue !== ''"
|
|
42
|
+
(click)="inputValue = ''"
|
|
43
|
+
></fa-icon>
|
|
44
|
+
<fa-icon [icon]="faMagnifyingGlass"></fa-icon>
|
|
45
|
+
</div>`, isInline: true, styles: ["*{margin:0;padding:0;box-sizing:border-box}.search__bar{width:-moz-fit-content;width:fit-content;height:2.5rem;display:flex;cursor:pointer;align-items:center;background-color:#fff}.search__bar:hover{border-bottom:2px solid black}.search__bar:hover .search__bar__input{width:18rem}.search__bar__input{width:0;border:none;outline:none;font-weight:500;background:transparent;transition:all ease-in-out .8s;font-size:clamp(.8rem,.675rem + .333vw,.975rem)}.search__bar__clear__mark__icon{margin:0 .5rem}.search__bar__clear__mark__icon:hover{scale:1.3;transition:all ease-in-out .1s}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchBarComponent, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ selector: 'lib-tks-search-bar', standalone: true, imports: [CommonModule, FontAwesomeModule, FormsModule, ReactiveFormsModule], template: `<div
|
|
50
|
+
class="search__bar"
|
|
51
|
+
[ngStyle]="{ 'background-color': backgroundColor }"
|
|
52
|
+
>
|
|
53
|
+
<input
|
|
54
|
+
class="search__bar__input"
|
|
55
|
+
type="text"
|
|
56
|
+
[(ngModel)]="inputValue"
|
|
57
|
+
[placeholder]="hintLabel"
|
|
58
|
+
(ngModelChange)="inputChange.emit($event)"
|
|
59
|
+
/>
|
|
60
|
+
<fa-icon
|
|
61
|
+
class="search__bar__clear__mark__icon"
|
|
62
|
+
[icon]="faXmark"
|
|
63
|
+
*ngIf="inputValue !== ''"
|
|
64
|
+
(click)="inputValue = ''"
|
|
65
|
+
></fa-icon>
|
|
66
|
+
<fa-icon [icon]="faMagnifyingGlass"></fa-icon>
|
|
67
|
+
</div>`, styles: ["*{margin:0;padding:0;box-sizing:border-box}.search__bar{width:-moz-fit-content;width:fit-content;height:2.5rem;display:flex;cursor:pointer;align-items:center;background-color:#fff}.search__bar:hover{border-bottom:2px solid black}.search__bar:hover .search__bar__input{width:18rem}.search__bar__input{width:0;border:none;outline:none;font-weight:500;background:transparent;transition:all ease-in-out .8s;font-size:clamp(.8rem,.675rem + .333vw,.975rem)}.search__bar__clear__mark__icon{margin:0 .5rem}.search__bar__clear__mark__icon:hover{scale:1.3;transition:all ease-in-out .1s}\n"] }]
|
|
68
|
+
}], propDecorators: { hintLabel: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], backgroundColor: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], inputChange: [{
|
|
73
|
+
type: Output
|
|
74
|
+
}] } });
|
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhcmNoLWJhci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kZXNpZ24tc3lzdGVtL3NyYy9saWIvY29tcG9uZW50cy9zZWFyY2gtYmFyL3NlYXJjaC1iYXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsV0FBVyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDbEUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sa0NBQWtDLENBQUM7QUFDckUsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN2RSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsT0FBTyxFQUFFLE1BQU0sa0NBQWtDLENBQUM7Ozs7O0FBMkI5RSxNQUFNLE9BQU8sa0JBQWtCO0lB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LmNzcyddLFxufSlcbmV4cG9ydCBjbGFzcyBTZWFyY2hCYXJDb21wb25lbnQge1xuICBwdWJsaWMgaW5wdXRWYWx1ZSA9ICcnO1xuICBwdWJsaWMgcmVhZG9ubHkgZmFYbWFyayA9IGZhWG1hcms7XG4gIHB1YmxpYyByZWFkb25seSBmYU1hZ25pZnlpbmdHbGFzcyA9IGZhTWFnbmlmeWluZ0dsYXNzO1xuXG4gIC8qKlxuICAgKiBTZWFyY2ggYmFyIGhpbnQgbGFiZWxcbiAgICpcbiAgICogQHJlcXVpcmVkXG4gICAqL1xuICBASW5wdXQoKVxuICBoaW50TGFiZWwgPSAnJztcblxuICAvKipcbiAgICogV2hhdCBiYWNrZ3JvdW5kIGNvbG9yIHRvIHVzZVxuICAgKi9cbiAgQElucHV0KClcbiAgYmFja2dyb3VuZENvbG9yPzogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBJbnB1dCBjaGFuZ2VzIGhhbmRsZXJcbiAgICovXG4gIEBPdXRwdXQoKVxuICBpbnB1dENoYW5nZSA9IG5ldyBFdmVudEVtaXR0ZXI8RXZlbnQ+KCk7XG59XG4iXX0=
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import ButtonComponent from './components/button/button.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class DesignSystemModule {
|
|
5
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DesignSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DesignSystemModule, imports: [ButtonComponent], exports: [ButtonComponent] }); }
|
|
7
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DesignSystemModule }); }
|
|
8
|
+
}
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DesignSystemModule, decorators: [{
|
|
10
|
+
type: NgModule,
|
|
11
|
+
args: [{
|
|
12
|
+
declarations: [],
|
|
13
|
+
imports: [ButtonComponent],
|
|
14
|
+
exports: [ButtonComponent],
|
|
15
|
+
}]
|
|
16
|
+
}] });
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzaWduLXN5c3RlbS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9kZXNpZ24tc3lzdGVtL3NyYy9saWIvZGVzaWduLXN5c3RlbS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLGVBQWUsTUFBTSxzQ0FBc0MsQ0FBQzs7QUFPbkUsTUFBTSxPQUFPLGtCQUFrQjsrR0FBbEIsa0JBQWtCO2dIQUFsQixrQkFBa0IsWUFIbkIsZUFBZSxhQUNmLGVBQWU7Z0hBRWQsa0JBQWtCOzs0RkFBbEIsa0JBQWtCO2tCQUw5QixRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRSxFQUFFO29CQUNoQixPQUFPLEVBQUUsQ0FBQyxlQUFlLENBQUM7b0JBQzFCLE9BQU8sRUFBRSxDQUFDLGVBQWUsQ0FBQztpQkFDM0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IEJ1dHRvbkNvbXBvbmVudCBmcm9tICcuL2NvbXBvbmVudHMvYnV0dG9uL2J1dHRvbi5jb21wb25lbnQnO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtdLFxuICBpbXBvcnRzOiBbQnV0dG9uQ29tcG9uZW50XSxcbiAgZXhwb3J0czogW0J1dHRvbkNvbXBvbmVudF0sXG59KVxuZXhwb3J0IGNsYXNzIERlc2lnblN5c3RlbU1vZHVsZSB7fVxuIl19
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of design-system
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/design-system.module';
|
|
5
|
+
export { default as ButtonComponent } from './lib/components/button/button.component';
|
|
6
|
+
export * from './lib/components/search-bar/search-bar.component';
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2Rlc2lnbi1zeXN0ZW0vc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLE9BQU8sRUFBRSxPQUFPLElBQUksZUFBZSxFQUFFLE1BQU0sMENBQTBDLENBQUM7QUFDdEYsY0FBYyxrREFBa0QsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgZGVzaWduLXN5c3RlbVxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2Rlc2lnbi1zeXN0ZW0ubW9kdWxlJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgQnV0dG9uQ29tcG9uZW50IH0gZnJvbSAnLi9saWIvY29tcG9uZW50cy9idXR0b24vYnV0dG9uLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL3NlYXJjaC1iYXIvc2VhcmNoLWJhci5jb21wb25lbnQnO1xuIl19
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { NgStyle, NgClass, CommonModule } from '@angular/common';
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i2 from '@fortawesome/angular-fontawesome';
|
|
8
|
+
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
9
|
+
import { faXmark, faMagnifyingGlass } from '@fortawesome/pro-solid-svg-icons';
|
|
10
|
+
|
|
11
|
+
class ButtonComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
/**
|
|
14
|
+
* Is this the principal call to action on the page?
|
|
15
|
+
*/
|
|
16
|
+
this.primary = false;
|
|
17
|
+
/**
|
|
18
|
+
* How large should the button be?
|
|
19
|
+
*/
|
|
20
|
+
this.size = 'medium';
|
|
21
|
+
/**
|
|
22
|
+
* Button contents
|
|
23
|
+
*
|
|
24
|
+
* @required
|
|
25
|
+
*/
|
|
26
|
+
this.label = 'Button';
|
|
27
|
+
/**
|
|
28
|
+
* Optional click handler
|
|
29
|
+
*/
|
|
30
|
+
this.onClick = new EventEmitter();
|
|
31
|
+
}
|
|
32
|
+
get classes() {
|
|
33
|
+
const mode = this.primary
|
|
34
|
+
? 'storybook-button--primary'
|
|
35
|
+
: 'storybook-button--secondary';
|
|
36
|
+
return ['storybook-button', `storybook-button--${this.size}`, mode];
|
|
37
|
+
}
|
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonComponent, isStandalone: true, selector: "storybook-button", inputs: { primary: "primary", backgroundColor: "backgroundColor", size: "size", label: "label" }, outputs: { onClick: "onClick" }, ngImport: i0, template: ` <button
|
|
40
|
+
type="button"
|
|
41
|
+
(click)="onClick.emit($event)"
|
|
42
|
+
[ngClass]="classes"
|
|
43
|
+
[ngStyle]="{ 'background-color': backgroundColor }"
|
|
44
|
+
>
|
|
45
|
+
{{ label }}
|
|
46
|
+
</button>`, isInline: true, styles: [".storybook-button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;border-radius:3em;cursor:pointer;display:inline-block;line-height:1}.storybook-button--primary{color:#fff;background-color:#1ea7fd}.storybook-button--secondary{color:#333;background-color:transparent;box-shadow:#00000026 0 0 0 1px inset}.storybook-button--small{font-size:12px;padding:10px 16px}.storybook-button--medium{font-size:14px;padding:11px 20px}.storybook-button--large{font-size:16px;padding:12px 24px}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ standalone: true, selector: 'storybook-button', imports: [NgStyle, NgClass], template: ` <button
|
|
51
|
+
type="button"
|
|
52
|
+
(click)="onClick.emit($event)"
|
|
53
|
+
[ngClass]="classes"
|
|
54
|
+
[ngStyle]="{ 'background-color': backgroundColor }"
|
|
55
|
+
>
|
|
56
|
+
{{ label }}
|
|
57
|
+
</button>`, styles: [".storybook-button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;border-radius:3em;cursor:pointer;display:inline-block;line-height:1}.storybook-button--primary{color:#fff;background-color:#1ea7fd}.storybook-button--secondary{color:#333;background-color:transparent;box-shadow:#00000026 0 0 0 1px inset}.storybook-button--small{font-size:12px;padding:10px 16px}.storybook-button--medium{font-size:14px;padding:11px 20px}.storybook-button--large{font-size:16px;padding:12px 24px}\n"] }]
|
|
58
|
+
}], propDecorators: { primary: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], backgroundColor: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], size: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], label: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], onClick: [{
|
|
67
|
+
type: Output
|
|
68
|
+
}] } });
|
|
69
|
+
|
|
70
|
+
class DesignSystemModule {
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DesignSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
72
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DesignSystemModule, imports: [ButtonComponent], exports: [ButtonComponent] }); }
|
|
73
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DesignSystemModule }); }
|
|
74
|
+
}
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DesignSystemModule, decorators: [{
|
|
76
|
+
type: NgModule,
|
|
77
|
+
args: [{
|
|
78
|
+
declarations: [],
|
|
79
|
+
imports: [ButtonComponent],
|
|
80
|
+
exports: [ButtonComponent],
|
|
81
|
+
}]
|
|
82
|
+
}] });
|
|
83
|
+
|
|
84
|
+
class SearchBarComponent {
|
|
85
|
+
constructor() {
|
|
86
|
+
this.inputValue = '';
|
|
87
|
+
this.faXmark = faXmark;
|
|
88
|
+
this.faMagnifyingGlass = faMagnifyingGlass;
|
|
89
|
+
/**
|
|
90
|
+
* Search bar hint label
|
|
91
|
+
*
|
|
92
|
+
* @required
|
|
93
|
+
*/
|
|
94
|
+
this.hintLabel = '';
|
|
95
|
+
/**
|
|
96
|
+
* Input changes handler
|
|
97
|
+
*/
|
|
98
|
+
this.inputChange = new EventEmitter();
|
|
99
|
+
}
|
|
100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
101
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SearchBarComponent, isStandalone: true, selector: "lib-tks-search-bar", inputs: { hintLabel: "hintLabel", backgroundColor: "backgroundColor" }, outputs: { inputChange: "inputChange" }, ngImport: i0, template: `<div
|
|
102
|
+
class="search__bar"
|
|
103
|
+
[ngStyle]="{ 'background-color': backgroundColor }"
|
|
104
|
+
>
|
|
105
|
+
<input
|
|
106
|
+
class="search__bar__input"
|
|
107
|
+
type="text"
|
|
108
|
+
[(ngModel)]="inputValue"
|
|
109
|
+
[placeholder]="hintLabel"
|
|
110
|
+
(ngModelChange)="inputChange.emit($event)"
|
|
111
|
+
/>
|
|
112
|
+
<fa-icon
|
|
113
|
+
class="search__bar__clear__mark__icon"
|
|
114
|
+
[icon]="faXmark"
|
|
115
|
+
*ngIf="inputValue !== ''"
|
|
116
|
+
(click)="inputValue = ''"
|
|
117
|
+
></fa-icon>
|
|
118
|
+
<fa-icon [icon]="faMagnifyingGlass"></fa-icon>
|
|
119
|
+
</div>`, isInline: true, styles: ["*{margin:0;padding:0;box-sizing:border-box}.search__bar{width:-moz-fit-content;width:fit-content;height:2.5rem;display:flex;cursor:pointer;align-items:center;background-color:#fff}.search__bar:hover{border-bottom:2px solid black}.search__bar:hover .search__bar__input{width:18rem}.search__bar__input{width:0;border:none;outline:none;font-weight:500;background:transparent;transition:all ease-in-out .8s;font-size:clamp(.8rem,.675rem + .333vw,.975rem)}.search__bar__clear__mark__icon{margin:0 .5rem}.search__bar__clear__mark__icon:hover{scale:1.3;transition:all ease-in-out .1s}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchBarComponent, decorators: [{
|
|
122
|
+
type: Component,
|
|
123
|
+
args: [{ selector: 'lib-tks-search-bar', standalone: true, imports: [CommonModule, FontAwesomeModule, FormsModule, ReactiveFormsModule], template: `<div
|
|
124
|
+
class="search__bar"
|
|
125
|
+
[ngStyle]="{ 'background-color': backgroundColor }"
|
|
126
|
+
>
|
|
127
|
+
<input
|
|
128
|
+
class="search__bar__input"
|
|
129
|
+
type="text"
|
|
130
|
+
[(ngModel)]="inputValue"
|
|
131
|
+
[placeholder]="hintLabel"
|
|
132
|
+
(ngModelChange)="inputChange.emit($event)"
|
|
133
|
+
/>
|
|
134
|
+
<fa-icon
|
|
135
|
+
class="search__bar__clear__mark__icon"
|
|
136
|
+
[icon]="faXmark"
|
|
137
|
+
*ngIf="inputValue !== ''"
|
|
138
|
+
(click)="inputValue = ''"
|
|
139
|
+
></fa-icon>
|
|
140
|
+
<fa-icon [icon]="faMagnifyingGlass"></fa-icon>
|
|
141
|
+
</div>`, styles: ["*{margin:0;padding:0;box-sizing:border-box}.search__bar{width:-moz-fit-content;width:fit-content;height:2.5rem;display:flex;cursor:pointer;align-items:center;background-color:#fff}.search__bar:hover{border-bottom:2px solid black}.search__bar:hover .search__bar__input{width:18rem}.search__bar__input{width:0;border:none;outline:none;font-weight:500;background:transparent;transition:all ease-in-out .8s;font-size:clamp(.8rem,.675rem + .333vw,.975rem)}.search__bar__clear__mark__icon{margin:0 .5rem}.search__bar__clear__mark__icon:hover{scale:1.3;transition:all ease-in-out .1s}\n"] }]
|
|
142
|
+
}], propDecorators: { hintLabel: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], backgroundColor: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], inputChange: [{
|
|
147
|
+
type: Output
|
|
148
|
+
}] } });
|
|
149
|
+
|
|
150
|
+
/*
|
|
151
|
+
* Public API Surface of design-system
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Generated bundle index. Do not edit.
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
export { ButtonComponent, DesignSystemModule, SearchBarComponent };
|
|
159
|
+
//# sourceMappingURL=design-system.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-system.mjs","sources":["../../../projects/design-system/src/lib/components/button/button.component.ts","../../../projects/design-system/src/lib/design-system.module.ts","../../../projects/design-system/src/lib/components/search-bar/search-bar.component.ts","../../../projects/design-system/src/public-api.ts","../../../projects/design-system/src/design-system.ts"],"sourcesContent":["import { NgStyle, NgClass } from '@angular/common';\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n standalone: true,\n selector: 'storybook-button',\n imports: [NgStyle, NgClass],\n template: ` <button\n type=\"button\"\n (click)=\"onClick.emit($event)\"\n [ngClass]=\"classes\"\n [ngStyle]=\"{ 'background-color': backgroundColor }\"\n >\n {{ label }}\n </button>`,\n styleUrls: ['./button.css'],\n})\nexport default class ButtonComponent {\n /**\n * Is this the principal call to action on the page?\n */\n @Input()\n primary = false;\n\n /**\n * What background color to use\n */\n @Input()\n backgroundColor?: string;\n\n /**\n * How large should the button be?\n */\n @Input()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Button contents\n *\n * @required\n */\n @Input()\n label = 'Button';\n\n /**\n * Optional click handler\n */\n @Output()\n onClick = new EventEmitter<Event>();\n\n public get classes(): string[] {\n const mode = this.primary\n ? 'storybook-button--primary'\n : 'storybook-button--secondary';\n\n return ['storybook-button', `storybook-button--${this.size}`, mode];\n }\n}\n","import { NgModule } from '@angular/core';\nimport ButtonComponent from './components/button/button.component';\n\n@NgModule({\n declarations: [],\n imports: [ButtonComponent],\n exports: [ButtonComponent],\n})\nexport class DesignSystemModule {}\n","import { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { Input, Output, Component, EventEmitter } from '@angular/core';\nimport { faMagnifyingGlass, faXmark } from '@fortawesome/pro-solid-svg-icons';\n\n@Component({\n selector: 'lib-tks-search-bar',\n standalone: true,\n imports: [CommonModule, FontAwesomeModule, FormsModule, ReactiveFormsModule],\n template: `<div\n class=\"search__bar\"\n [ngStyle]=\"{ 'background-color': backgroundColor }\"\n >\n <input\n class=\"search__bar__input\"\n type=\"text\"\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"hintLabel\"\n (ngModelChange)=\"inputChange.emit($event)\"\n />\n <fa-icon\n class=\"search__bar__clear__mark__icon\"\n [icon]=\"faXmark\"\n *ngIf=\"inputValue !== ''\"\n (click)=\"inputValue = ''\"\n ></fa-icon>\n <fa-icon [icon]=\"faMagnifyingGlass\"></fa-icon>\n </div>`,\n styleUrls: ['./search-bar.component.css'],\n})\nexport class SearchBarComponent {\n public inputValue = '';\n public readonly faXmark = faXmark;\n public readonly faMagnifyingGlass = faMagnifyingGlass;\n\n /**\n * Search bar hint label\n *\n * @required\n */\n @Input()\n hintLabel = '';\n\n /**\n * What background color to use\n */\n @Input()\n backgroundColor?: string;\n\n /**\n * Input changes handler\n */\n @Output()\n inputChange = new EventEmitter<Event>();\n}\n","/*\n * Public API Surface of design-system\n */\n\nexport * from './lib/design-system.module';\nexport { default as ButtonComponent } from './lib/components/button/button.component';\nexport * from './lib/components/search-bar/search-bar.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAiBc,MAAO,eAAe,CAAA;AAdpC,IAAA,WAAA,GAAA;AAeE;;AAEG;QAEH,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAQhB;;AAEG;QAEH,IAAI,CAAA,IAAA,GAAiC,QAAQ,CAAC;AAE9C;;;;AAIG;QAEH,IAAK,CAAA,KAAA,GAAG,QAAQ,CAAC;AAEjB;;AAEG;AAEH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAS,CAAC;AASrC,KAAA;AAPC,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;AACvB,cAAE,2BAA2B;cAC3B,6BAA6B,CAAC;QAElC,OAAO,CAAC,kBAAkB,EAAE,CAAqB,kBAAA,EAAA,IAAI,CAAC,IAAI,CAAE,CAAA,EAAE,IAAI,CAAC,CAAC;KACrE;+GAvCkB,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,EAVxB,YAAA,EAAA,IAAA,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/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export default class ButtonComponent {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the principal call to action on the page?
|
|
6
|
+
*/
|
|
7
|
+
primary: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* What background color to use
|
|
10
|
+
*/
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
/**
|
|
13
|
+
* How large should the button be?
|
|
14
|
+
*/
|
|
15
|
+
size: 'small' | 'medium' | 'large';
|
|
16
|
+
/**
|
|
17
|
+
* Button contents
|
|
18
|
+
*
|
|
19
|
+
* @required
|
|
20
|
+
*/
|
|
21
|
+
label: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional click handler
|
|
24
|
+
*/
|
|
25
|
+
onClick: EventEmitter<Event>;
|
|
26
|
+
get classes(): string[];
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "storybook-button", never, { "primary": { "alias": "primary"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SearchBarComponent {
|
|
4
|
+
inputValue: string;
|
|
5
|
+
readonly faXmark: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
6
|
+
readonly faMagnifyingGlass: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
7
|
+
/**
|
|
8
|
+
* Search bar hint label
|
|
9
|
+
*
|
|
10
|
+
* @required
|
|
11
|
+
*/
|
|
12
|
+
hintLabel: string;
|
|
13
|
+
/**
|
|
14
|
+
* What background color to use
|
|
15
|
+
*/
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Input changes handler
|
|
19
|
+
*/
|
|
20
|
+
inputChange: EventEmitter<Event>;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchBarComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchBarComponent, "lib-tks-search-bar", never, { "hintLabel": { "alias": "hintLabel"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; }, { "inputChange": "inputChange"; }, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./components/button/button.component";
|
|
3
|
+
export declare class DesignSystemModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DesignSystemModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DesignSystemModule, never, [typeof i1.default], [typeof i1.default]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DesignSystemModule>;
|
|
7
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tekus/design-system",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^16.2.0",
|
|
6
|
+
"@angular/core": "^16.2.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/design-system.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"esm2022": "./esm2022/design-system.mjs",
|
|
21
|
+
"esm": "./esm2022/design-system.mjs",
|
|
22
|
+
"default": "./fesm2022/design-system.mjs"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/public-api.d.ts
ADDED