@sarasanalytics-com/design-system 0.0.9 → 0.0.11
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/esm2022/interfaces/avatar-interface.mjs +2 -0
- package/esm2022/interfaces/button-interface.mjs +2 -0
- package/esm2022/interfaces/chip-interface.mjs +2 -0
- package/esm2022/interfaces/grid-interface.mjs +2 -0
- package/esm2022/interfaces/select-interface.mjs +2 -0
- package/esm2022/interfaces/tab-interface.mjs +2 -0
- package/esm2022/lib/avatar/avatar.component.mjs +56 -0
- package/esm2022/lib/button/button.component.mjs +84 -0
- package/esm2022/lib/calendar-header/calendar-header.component.mjs +168 -0
- package/esm2022/lib/card/card-footer-actions/card-footer-actions.component.mjs +11 -0
- package/esm2022/lib/card/card-icon/card-icon.component.mjs +11 -0
- package/esm2022/lib/card/card-title-actions/card-title-actions.component.mjs +11 -0
- package/esm2022/lib/card/card.component.mjs +53 -0
- package/esm2022/lib/chips/chips.component.mjs +62 -0
- package/esm2022/lib/component-library.component.mjs +19 -0
- package/esm2022/lib/component-library.service.mjs +14 -0
- package/esm2022/lib/datepicker/datepicker.component.mjs +40 -0
- package/esm2022/lib/form-input/form-input.component.mjs +152 -0
- package/esm2022/lib/form-select/form-select.component.mjs +59 -0
- package/esm2022/lib/grid-cell/grid-cell.component.mjs +84 -0
- package/esm2022/lib/header/header.component.mjs +37 -0
- package/esm2022/lib/icon/icon.component.mjs +53 -0
- package/esm2022/lib/icon/icon.service.mjs +25 -0
- package/esm2022/lib/left-nav/left-nav.component.mjs +117 -0
- package/esm2022/lib/stepper/stepper.component.mjs +64 -0
- package/esm2022/lib/tabs/tabs.component.mjs +38 -0
- package/esm2022/lib/toast/toast.component.mjs +100 -0
- package/esm2022/lib/tool-tip/tool-tip.component.mjs +41 -0
- package/esm2022/public-api.mjs +30 -0
- package/esm2022/sarasanalytics-com-design-system.mjs +5 -0
- package/esm2022/utils/validators.mjs +70 -0
- package/fesm2022/sarasanalytics-com-design-system.mjs +1273 -0
- package/fesm2022/sarasanalytics-com-design-system.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/interfaces/avatar-interface.d.ts +6 -0
- package/interfaces/button-interface.d.ts +12 -0
- package/interfaces/chip-interface.d.ts +11 -0
- package/interfaces/grid-interface.d.ts +24 -0
- package/interfaces/select-interface.d.ts +20 -0
- package/interfaces/tab-interface.d.ts +6 -0
- package/lib/avatar/avatar.component.d.ts +18 -0
- package/lib/button/button.component.d.ts +26 -0
- package/lib/calendar-header/calendar-header.component.d.ts +31 -0
- package/lib/card/card-footer-actions/card-footer-actions.component.d.ts +5 -0
- package/lib/card/card-icon/card-icon.component.d.ts +5 -0
- package/lib/card/card-title-actions/card-title-actions.component.d.ts +5 -0
- package/lib/card/card.component.d.ts +17 -0
- package/lib/chips/chips.component.d.ts +22 -0
- package/lib/component-library.component.d.ts +5 -0
- package/lib/component-library.service.d.ts +6 -0
- package/lib/datepicker/datepicker.component.d.ts +9 -0
- package/lib/form-input/form-input.component.d.ts +62 -0
- package/lib/form-select/form-select.component.d.ts +17 -0
- package/lib/grid-cell/grid-cell.component.d.ts +20 -0
- package/lib/header/header.component.d.ts +14 -0
- package/lib/icon/icon.component.d.ts +18 -0
- package/lib/icon/icon.service.d.ts +12 -0
- package/lib/left-nav/left-nav.component.d.ts +38 -0
- package/lib/stepper/stepper.component.d.ts +17 -0
- package/lib/tabs/tabs.component.d.ts +15 -0
- package/lib/toast/toast.component.d.ts +33 -0
- package/lib/tool-tip/tool-tip.component.d.ts +15 -0
- package/package.json +15 -2
- package/{src/public-api.ts → public-api.d.ts} +1 -8
- package/utils/validators.d.ts +3 -0
- package/ng-package.json +0 -8
- package/src/interfaces/avatar-interface.ts +0 -6
- package/src/interfaces/button-interface.ts +0 -12
- package/src/interfaces/chip-interface.ts +0 -11
- package/src/interfaces/grid-interface.ts +0 -24
- package/src/interfaces/select-interface.ts +0 -20
- package/src/interfaces/tab-interface.ts +0 -6
- package/src/lib/avatar/avatar.component.css +0 -48
- package/src/lib/avatar/avatar.component.html +0 -5
- package/src/lib/avatar/avatar.component.spec.ts +0 -23
- package/src/lib/avatar/avatar.component.ts +0 -50
- package/src/lib/button/button.component.css +0 -145
- package/src/lib/button/button.component.html +0 -11
- package/src/lib/button/button.component.spec.ts +0 -23
- package/src/lib/button/button.component.ts +0 -68
- package/src/lib/calendar-header/calendar-header.component.css +0 -67
- package/src/lib/calendar-header/calendar-header.component.html +0 -20
- package/src/lib/calendar-header/calendar-header.component.spec.ts +0 -23
- package/src/lib/calendar-header/calendar-header.component.ts +0 -191
- package/src/lib/card/card-body/card-body.component.css +0 -0
- package/src/lib/card/card-body/card-body.component.html +0 -1
- package/src/lib/card/card-body/card-body.component.spec.ts +0 -23
- package/src/lib/card/card-body/card-body.component.ts +0 -12
- package/src/lib/card/card-footer-actions/card-footer-actions.component.css +0 -4
- package/src/lib/card/card-footer-actions/card-footer-actions.component.html +0 -3
- package/src/lib/card/card-footer-actions/card-footer-actions.component.spec.ts +0 -23
- package/src/lib/card/card-footer-actions/card-footer-actions.component.ts +0 -12
- package/src/lib/card/card-icon/card-icon.component.css +0 -0
- package/src/lib/card/card-icon/card-icon.component.html +0 -1
- package/src/lib/card/card-icon/card-icon.component.spec.ts +0 -23
- package/src/lib/card/card-icon/card-icon.component.ts +0 -12
- package/src/lib/card/card-title-actions/card-title-actions.component.css +0 -3
- package/src/lib/card/card-title-actions/card-title-actions.component.html +0 -1
- package/src/lib/card/card-title-actions/card-title-actions.component.spec.ts +0 -23
- package/src/lib/card/card-title-actions/card-title-actions.component.ts +0 -12
- package/src/lib/card/card.component.css +0 -84
- package/src/lib/card/card.component.html +0 -34
- package/src/lib/card/card.component.spec.ts +0 -23
- package/src/lib/card/card.component.ts +0 -33
- package/src/lib/chips/chips.component.css +0 -129
- package/src/lib/chips/chips.component.html +0 -17
- package/src/lib/chips/chips.component.spec.ts +0 -23
- package/src/lib/chips/chips.component.ts +0 -54
- package/src/lib/component-library.component.spec.ts +0 -23
- package/src/lib/component-library.component.ts +0 -16
- package/src/lib/component-library.service.spec.ts +0 -16
- package/src/lib/component-library.service.ts +0 -9
- package/src/lib/datepicker/datepicker.component.css +0 -33
- package/src/lib/datepicker/datepicker.component.html +0 -11
- package/src/lib/datepicker/datepicker.component.spec.ts +0 -23
- package/src/lib/datepicker/datepicker.component.ts +0 -36
- package/src/lib/form-input/form-input.component.css +0 -109
- package/src/lib/form-input/form-input.component.html +0 -27
- package/src/lib/form-input/form-input.component.spec.ts +0 -23
- package/src/lib/form-input/form-input.component.ts +0 -196
- package/src/lib/form-select/form-select.component.css +0 -157
- package/src/lib/form-select/form-select.component.html +0 -38
- package/src/lib/form-select/form-select.component.spec.ts +0 -23
- package/src/lib/form-select/form-select.component.ts +0 -54
- package/src/lib/grid-cell/grid-cell.component.css +0 -78
- package/src/lib/grid-cell/grid-cell.component.html +0 -31
- package/src/lib/grid-cell/grid-cell.component.spec.ts +0 -23
- package/src/lib/grid-cell/grid-cell.component.ts +0 -89
- package/src/lib/header/header.component.css +0 -62
- package/src/lib/header/header.component.html +0 -23
- package/src/lib/header/header.component.spec.ts +0 -23
- package/src/lib/header/header.component.ts +0 -28
- package/src/lib/icon/icon.component.css +0 -21
- package/src/lib/icon/icon.component.html +0 -5
- package/src/lib/icon/icon.component.ts +0 -49
- package/src/lib/icon/icon.service.ts +0 -27
- package/src/lib/left-nav/left-nav.component.css +0 -106
- package/src/lib/left-nav/left-nav.component.html +0 -48
- package/src/lib/left-nav/left-nav.component.spec.ts +0 -23
- package/src/lib/left-nav/left-nav.component.ts +0 -146
- package/src/lib/stepper/stepper.component.css +0 -96
- package/src/lib/stepper/stepper.component.html +0 -14
- package/src/lib/stepper/stepper.component.spec.ts +0 -23
- package/src/lib/stepper/stepper.component.ts +0 -61
- package/src/lib/tabs/tabs.component.css +0 -100
- package/src/lib/tabs/tabs.component.html +0 -16
- package/src/lib/tabs/tabs.component.spec.ts +0 -23
- package/src/lib/tabs/tabs.component.ts +0 -37
- package/src/lib/toast/toast.component.css +0 -107
- package/src/lib/toast/toast.component.html +0 -29
- package/src/lib/toast/toast.component.spec.ts +0 -23
- package/src/lib/toast/toast.component.ts +0 -87
- package/src/lib/tool-tip/tool-tip.component.css +0 -139
- package/src/lib/tool-tip/tool-tip.component.html +0 -31
- package/src/lib/tool-tip/tool-tip.component.spec.ts +0 -23
- package/src/lib/tool-tip/tool-tip.component.ts +0 -37
- package/src/utils/validators.ts +0 -68
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="sa-card-title-actions"><ng-content></ng-content></div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { CardTitleActionsComponent } from './card-title-actions.component';
|
|
4
|
-
|
|
5
|
-
describe('CardTitleActionsComponent', () => {
|
|
6
|
-
let component: CardTitleActionsComponent;
|
|
7
|
-
let fixture: ComponentFixture<CardTitleActionsComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [CardTitleActionsComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(CardTitleActionsComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'sa-card-title-actions',
|
|
5
|
-
standalone: true,
|
|
6
|
-
imports: [],
|
|
7
|
-
templateUrl: './card-title-actions.component.html',
|
|
8
|
-
styleUrl: './card-title-actions.component.css'
|
|
9
|
-
})
|
|
10
|
-
export class CardTitleActionsComponent {
|
|
11
|
-
|
|
12
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
* {
|
|
2
|
-
font-family: var(--font);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.sa-card-wrapper {
|
|
6
|
-
display: flex;
|
|
7
|
-
border: 1px solid var(--grey-50);
|
|
8
|
-
border-radius: 6px;
|
|
9
|
-
/* width: inherit; */
|
|
10
|
-
padding: 12px;
|
|
11
|
-
background: var(--structural-white);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.sa-card-wrapper.column {
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.sa-card-img,
|
|
19
|
-
.sa-card-icon {
|
|
20
|
-
margin-right: 12px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.sa-card-img.column,
|
|
24
|
-
.sa-card-icon.column {}
|
|
25
|
-
|
|
26
|
-
.column .sa-card-img,
|
|
27
|
-
.column .sa-card-icon {
|
|
28
|
-
margin: 0 0 12px 0;
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: space-between;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.sa-card-img img {
|
|
34
|
-
height: auto;
|
|
35
|
-
width: 200px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.sa-card-icon span {
|
|
39
|
-
background-repeat: no-repeat;
|
|
40
|
-
background-size: cover;
|
|
41
|
-
background-position: center;
|
|
42
|
-
display: block;
|
|
43
|
-
height: 24px;
|
|
44
|
-
width: 24px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.sa-card-container {
|
|
48
|
-
/* margin-left: 12px; */
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
justify-content: space-between;
|
|
52
|
-
width: -webkit-fill-available;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.sa-card-title-container {
|
|
56
|
-
display: flex;
|
|
57
|
-
justify-content: space-between;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.column .sa-card-title-container {
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
margin-bottom: 8px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.sa-card-title {
|
|
66
|
-
/* font-family: var(--font-family); */
|
|
67
|
-
font-size: 16px;
|
|
68
|
-
font-weight: 600;
|
|
69
|
-
line-height: 24px;
|
|
70
|
-
margin-bottom: 4px;
|
|
71
|
-
/* letter-spacing: 0.15000000596046448px;
|
|
72
|
-
text-align: left; */
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.sa-card-body {
|
|
76
|
-
/* font-family: var(--font-family); */
|
|
77
|
-
font-size: 14px;
|
|
78
|
-
font-weight: 400;
|
|
79
|
-
line-height: 20px;
|
|
80
|
-
letter-spacing: 0.25px;
|
|
81
|
-
text-align: left;
|
|
82
|
-
color: var(--grey-300);
|
|
83
|
-
flex: 1;
|
|
84
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<div class="sa-card" [ngStyle]="cardStyles">
|
|
2
|
-
<div class="sa-card-wrapper" [ngClass]="column ? 'column' : ''">
|
|
3
|
-
<div class="" [ngClass]="avatar ? 'sa-card-img' : 'sa-card-icon'">
|
|
4
|
-
@if(avatar){
|
|
5
|
-
<img [src]="avatar" />
|
|
6
|
-
}@else if(icon){
|
|
7
|
-
<sa-icon [icon]="icon" [size]="iconSize"></sa-icon>
|
|
8
|
-
}@else{
|
|
9
|
-
<ng-content select="sa-card-icon"></ng-content>
|
|
10
|
-
}
|
|
11
|
-
@if(column){
|
|
12
|
-
<ng-content select="sa-card-title-actions"></ng-content>
|
|
13
|
-
}
|
|
14
|
-
</div>
|
|
15
|
-
<div class="sa-card-container">
|
|
16
|
-
@if(title){
|
|
17
|
-
<div class="sa-card-title-container">
|
|
18
|
-
<div class="sa-card-title">{{title}}</div>
|
|
19
|
-
@if(chip){
|
|
20
|
-
<sa-chip [text]="chip.text" [type]="chip.type" [state]="chip.state"></sa-chip>
|
|
21
|
-
}
|
|
22
|
-
<ng-content select="sa-card-title-actions"></ng-content>
|
|
23
|
-
|
|
24
|
-
</div>
|
|
25
|
-
}
|
|
26
|
-
@if(body){
|
|
27
|
-
<div class="sa-card-body">
|
|
28
|
-
{{body}}
|
|
29
|
-
</div>
|
|
30
|
-
}
|
|
31
|
-
<ng-content select="sa-card-footer-actions"></ng-content>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { CardComponent } from './card.component';
|
|
4
|
-
|
|
5
|
-
describe('CardComponent', () => {
|
|
6
|
-
let component: CardComponent;
|
|
7
|
-
let fixture: ComponentFixture<CardComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [CardComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(CardComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, Input, SimpleChanges } from '@angular/core';
|
|
3
|
-
import { ChipsComponent } from '../chips/chips.component';
|
|
4
|
-
import { ChipInterface } from '../../interfaces/chip-interface';
|
|
5
|
-
import { IconComponent } from '../icon/icon.component';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'sa-card',
|
|
9
|
-
standalone: true,
|
|
10
|
-
imports: [CommonModule, ChipsComponent, IconComponent],
|
|
11
|
-
templateUrl: './card.component.html',
|
|
12
|
-
styleUrl: './card.component.css'
|
|
13
|
-
})
|
|
14
|
-
export class CardComponent {
|
|
15
|
-
@Input('title') title: string = '';
|
|
16
|
-
@Input('chip') chip: ChipInterface | null = null;
|
|
17
|
-
@Input('body') body: string = '';
|
|
18
|
-
@Input('avatar') avatar: string = '';
|
|
19
|
-
|
|
20
|
-
@Input('icon') icon: string = '';
|
|
21
|
-
@Input('iconSize') iconSize: string;
|
|
22
|
-
|
|
23
|
-
@Input('width') width: string | number;
|
|
24
|
-
@Input('column') column: boolean = false;
|
|
25
|
-
|
|
26
|
-
cardStyles: any = {};
|
|
27
|
-
|
|
28
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
29
|
-
if (changes['width']?.currentValue) {
|
|
30
|
-
this.cardStyles['width'] = typeof changes['width']?.currentValue === 'string' ? changes['width']?.currentValue : changes['width']?.currentValue + '%';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
.regular {
|
|
2
|
-
--chip-height: var(--medium-24px);
|
|
3
|
-
--chip-padding: var(--small-4px) var(--small-8px);
|
|
4
|
-
--chip-gap: var(--small-4px);
|
|
5
|
-
--border-radius: var(--small-16px);
|
|
6
|
-
--font-weight: 500;
|
|
7
|
-
--line-height: 16px;
|
|
8
|
-
--font-size: 12px
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.small {
|
|
12
|
-
--chip-height: var(--small-18px);
|
|
13
|
-
--chip-padding: var(--small-4px) var(--small-8px);
|
|
14
|
-
--chip-gap: var(--small-4px);
|
|
15
|
-
--border-radius: var(--small-4px);
|
|
16
|
-
--font-weight: 500;
|
|
17
|
-
--line-height: 16px;
|
|
18
|
-
--font-size: 11px
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.large {
|
|
22
|
-
--chip-height: 40px;
|
|
23
|
-
--chip-padding: var(--small-12px) var(--medium-24px) var(--small-12px) var(--small-16px);
|
|
24
|
-
--chip-gap: var(--small-8px);
|
|
25
|
-
--border-radius: var(--small-16px) 0px;
|
|
26
|
-
--font-weight: 600;
|
|
27
|
-
--line-height: 20px;
|
|
28
|
-
--font-size: 14px;
|
|
29
|
-
background-color: var(--light-color) !important;
|
|
30
|
-
color: var(--dark-color) !important;
|
|
31
|
-
border: 1px solid transparent !important;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.primary {
|
|
35
|
-
--light-color: var(--primary-50);
|
|
36
|
-
--dark-color: var(--primary-500);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.secondary {
|
|
40
|
-
--light-color: var(--secondary-50);
|
|
41
|
-
--dark-color: var(--secondary-500);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.neutral {
|
|
45
|
-
--light-color: var(--grey-50);
|
|
46
|
-
--dark-color: var(--text-mediumemphasis);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.success {
|
|
50
|
-
--light-color: var(--semantic-success-50);
|
|
51
|
-
--dark-color: var(--semantic-success-500);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.error {
|
|
55
|
-
--light-color: var(--semantic-error-50);
|
|
56
|
-
--dark-color: var(--semantic-error-500);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.warning {
|
|
60
|
-
--light-color: var(--semantic-yellow-50);
|
|
61
|
-
--dark-color: var(--semantic-yellow-500);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.filled {
|
|
65
|
-
--background-color: var(--light-color);
|
|
66
|
-
--color: var(--dark-color);
|
|
67
|
-
--border: 1px solid transparent;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.outline {
|
|
71
|
-
--background-color: none;
|
|
72
|
-
--color: var(--dark-color);
|
|
73
|
-
--border: 1px solid var(--dark-color);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.chip {
|
|
77
|
-
display: flex;
|
|
78
|
-
width: max-content;
|
|
79
|
-
height: var(--chip-height);
|
|
80
|
-
padding: var(--chip-padding);
|
|
81
|
-
|
|
82
|
-
justify-content: center;
|
|
83
|
-
align-items: center;
|
|
84
|
-
|
|
85
|
-
gap: var(--chip-gap);
|
|
86
|
-
flex-shrink: 0;
|
|
87
|
-
letter-spacing: 0.5px;
|
|
88
|
-
box-sizing: border-box;
|
|
89
|
-
|
|
90
|
-
font-family: var(--font);
|
|
91
|
-
font-size: var(--font-size);
|
|
92
|
-
font-weight: var(--font-weight);
|
|
93
|
-
line-height: var(--line-height);
|
|
94
|
-
|
|
95
|
-
background-color: var(--background-color);
|
|
96
|
-
color: var(--color);
|
|
97
|
-
border-radius: var(--border-radius);
|
|
98
|
-
border: var(--border);
|
|
99
|
-
|
|
100
|
-
-webkit-user-select: none;
|
|
101
|
-
-khtml-user-select: none;
|
|
102
|
-
-moz-user-select: none;
|
|
103
|
-
-o-user-select: none;
|
|
104
|
-
user-select: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.svg-icon {
|
|
108
|
-
width: 16px;
|
|
109
|
-
height: 16px;
|
|
110
|
-
mask-size: contain;
|
|
111
|
-
background-color: var(--dark-color);
|
|
112
|
-
mask-repeat: no-repeat;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.svg-icon:hover {
|
|
116
|
-
cursor: pointer;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.second-svg-icon {
|
|
120
|
-
width: 18px;
|
|
121
|
-
height: 18px;
|
|
122
|
-
mask-size: contain;
|
|
123
|
-
background-color: var(--dark-color);
|
|
124
|
-
mask-repeat: no-repeat;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.btn_hide {
|
|
128
|
-
display: none;
|
|
129
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<div class="chip {{type}} {{state}} {{filling}}">
|
|
2
|
-
<button type="button" (click)="buttonClicked($event)" id="icon-button_{{uuid}}" class="btn_hide"></button>
|
|
3
|
-
<!-- (click)="buttonClicked()" on button instead of label breaks whole thing -->
|
|
4
|
-
<label for="icon-button_{{uuid}}" class="svg-icon" [style]="svgStyle"
|
|
5
|
-
[style.display]="((iconPosition == 'left' || iconPosition == 'both') && type != 'large') ? 'block' : 'none'">
|
|
6
|
-
</label>
|
|
7
|
-
|
|
8
|
-
{{text}}
|
|
9
|
-
|
|
10
|
-
<div class="second-svg-icon" [style]="secondSvgStyle" [style.display]="(type == 'large') ? 'block' : 'none'"></div>
|
|
11
|
-
|
|
12
|
-
{{type == 'large' ? largeStateText : ""}}
|
|
13
|
-
|
|
14
|
-
<label for="icon-button_{{uuid}}" class="svg-icon" [style]="svgStyle"
|
|
15
|
-
[style.display]="((iconPosition == 'right' || iconPosition == 'both') && type != 'large') ? 'block' : 'none'">
|
|
16
|
-
</label>
|
|
17
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ChipsComponent } from './chips.component';
|
|
4
|
-
|
|
5
|
-
describe('ChipsComponent', () => {
|
|
6
|
-
let component: ChipsComponent;
|
|
7
|
-
let fixture: ComponentFixture<ChipsComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [ChipsComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(ChipsComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
|
-
import { Input } from '@angular/core';
|
|
4
|
-
import { Output } from '@angular/core';
|
|
5
|
-
import { EventEmitter } from '@angular/core';
|
|
6
|
-
|
|
7
|
-
let nextId = 0; // used to give unique ids to inputs used in html
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'sa-chip',
|
|
11
|
-
standalone: true,
|
|
12
|
-
imports: [CommonModule],
|
|
13
|
-
templateUrl: './chips.component.html',
|
|
14
|
-
styleUrl: './chips.component.css'
|
|
15
|
-
})
|
|
16
|
-
export class ChipsComponent {
|
|
17
|
-
@Input() id: string | number;
|
|
18
|
-
@Input() iconPath: string;
|
|
19
|
-
@Input() text: string | number;
|
|
20
|
-
@Input() type: string;
|
|
21
|
-
@Input() state: string;
|
|
22
|
-
@Input() filling: string;
|
|
23
|
-
@Input() iconPosition: string;
|
|
24
|
-
@Input() largeStateIcon: string;
|
|
25
|
-
@Input() largeStateText: string;
|
|
26
|
-
|
|
27
|
-
@Output() onClickEvent = new EventEmitter();
|
|
28
|
-
|
|
29
|
-
svgStyle = {}
|
|
30
|
-
secondSvgStyle = {}
|
|
31
|
-
eventEmitObject = {}
|
|
32
|
-
uuid: number = nextId++;
|
|
33
|
-
|
|
34
|
-
ngOnChanges(): void {
|
|
35
|
-
this.svgStyle = {
|
|
36
|
-
'-webkit-mask-image': `url(${this.iconPath})`,
|
|
37
|
-
'mask-image': `url(${this.iconPath})`,
|
|
38
|
-
}
|
|
39
|
-
this.secondSvgStyle = {
|
|
40
|
-
'-webkit-mask-image': `url(${this.largeStateIcon})`,
|
|
41
|
-
'mask-image': `url(${this.largeStateIcon})`,
|
|
42
|
-
}
|
|
43
|
-
this.eventEmitObject = {
|
|
44
|
-
id: this.id
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
buttonClicked(evt: Event) {
|
|
49
|
-
this.onClickEvent.emit({
|
|
50
|
-
...this.eventEmitObject,
|
|
51
|
-
evt
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { TestLibraryComponent } from './component-library.component';
|
|
4
|
-
|
|
5
|
-
describe('TestLibraryComponent', () => {
|
|
6
|
-
let component: TestLibraryComponent;
|
|
7
|
-
let fixture: ComponentFixture<TestLibraryComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [TestLibraryComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(TestLibraryComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'lib-component-library',
|
|
5
|
-
standalone: true,
|
|
6
|
-
imports: [],
|
|
7
|
-
template: `
|
|
8
|
-
<p>
|
|
9
|
-
component-library works!
|
|
10
|
-
</p>
|
|
11
|
-
`,
|
|
12
|
-
styles: ``
|
|
13
|
-
})
|
|
14
|
-
export class TestLibraryComponent {
|
|
15
|
-
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { TestLibraryService } from './component-library.service';
|
|
4
|
-
|
|
5
|
-
describe('TestLibraryService', () => {
|
|
6
|
-
let service: TestLibraryService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(TestLibraryService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
::ng-deep .cdk-overlay-container {
|
|
2
|
-
--mat-datepicker-calendar-container-elevation-shadow: none;
|
|
3
|
-
--mat-datepicker-calendar-container-shape: 0px;
|
|
4
|
-
--mat-datepicker-calendar-date-selected-state-background-color: var(--primary-500);
|
|
5
|
-
--mat-datepicker-calendar-date-hover-state-background-color: var(--grey-50);
|
|
6
|
-
--mat-datepicker-calendar-date-in-range-state-background-color: var(--grey-50);
|
|
7
|
-
--mat-datepicker-calendar-date-focus-state-background-color: var(--grey-50);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
::ng-deep .cdk-overlay-container .mat-datepicker-popup {
|
|
11
|
-
border-top: 1px solid var(--grey-50);
|
|
12
|
-
border-right: 1px solid var(--grey-50);
|
|
13
|
-
border-bottom: 1px solid var(--grey-50);
|
|
14
|
-
border-radius: var(--small-8px, 8px);
|
|
15
|
-
height: 356px;
|
|
16
|
-
padding: 12px;
|
|
17
|
-
margin-top: 0px;
|
|
18
|
-
margin-left: 180px;
|
|
19
|
-
background-color: white;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
::ng-deep .cdk-overlay-container .mat-datepicker-content .mat-calendar {
|
|
23
|
-
box-shadow: none;
|
|
24
|
-
height: 300px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
::ng-deep .mat-calendar-content .mat-calendar-table-header-divider {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.date-picker {
|
|
32
|
-
margin: 30px
|
|
33
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<mat-form-field class="date-picker">
|
|
2
|
-
<mat-label>Choose a date</mat-label>
|
|
3
|
-
<mat-date-range-input [rangePicker]="picker" [formGroup]="range">
|
|
4
|
-
<input formControlName="start" matStartDate placeholder="Start date">
|
|
5
|
-
<input formControlName="end" matEndDate placeholder="End date">
|
|
6
|
-
</mat-date-range-input>
|
|
7
|
-
<mat-hint>MM/DD/YYYY</mat-hint>
|
|
8
|
-
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
|
9
|
-
<mat-date-range-picker [calendarHeaderComponent]="CalendarHeaderComponent" #picker>
|
|
10
|
-
</mat-date-range-picker>
|
|
11
|
-
</mat-form-field>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { DatepickerComponent } from './datepicker.component';
|
|
4
|
-
|
|
5
|
-
describe('DatepickerComponent', () => {
|
|
6
|
-
let component: DatepickerComponent;
|
|
7
|
-
let fixture: ComponentFixture<DatepickerComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [DatepickerComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(DatepickerComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
3
|
-
import { MatInputModule } from '@angular/material/input';
|
|
4
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
|
-
import { MatNativeDateModule } from '@angular/material/core';
|
|
6
|
-
import { NgFor } from '@angular/common';
|
|
7
|
-
import { NgIf } from '@angular/common';
|
|
8
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
-
import { FieldType, FieldTypeConfig } from '@ngx-formly/core';
|
|
10
|
-
import { CalendarHeaderComponent } from '../calendar-header/calendar-header.component';
|
|
11
|
-
import { CommonModule } from '@angular/common';
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'sa-datepicker',
|
|
15
|
-
standalone: true,
|
|
16
|
-
providers: [],
|
|
17
|
-
imports: [
|
|
18
|
-
MatFormFieldModule,
|
|
19
|
-
MatInputModule,
|
|
20
|
-
MatDatepickerModule,
|
|
21
|
-
NgFor,
|
|
22
|
-
NgIf,
|
|
23
|
-
ReactiveFormsModule,
|
|
24
|
-
CalendarHeaderComponent,
|
|
25
|
-
CommonModule,
|
|
26
|
-
MatNativeDateModule
|
|
27
|
-
],
|
|
28
|
-
templateUrl: './datepicker.component.html',
|
|
29
|
-
styleUrl: './datepicker.component.css'
|
|
30
|
-
})
|
|
31
|
-
export class DatepickerComponent extends FieldType<FieldTypeConfig> {
|
|
32
|
-
@Input() range: any;
|
|
33
|
-
|
|
34
|
-
readonly CalendarHeaderComponent = CalendarHeaderComponent;
|
|
35
|
-
|
|
36
|
-
}
|