@sarasanalytics-com/design-system 0.0.3 → 0.0.4

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.
Files changed (181) hide show
  1. package/README.md +9 -12
  2. package/esm2022/interfaces/avatar-interface.mjs +2 -0
  3. package/esm2022/interfaces/button-interface.mjs +2 -0
  4. package/esm2022/interfaces/chip-interface.mjs +2 -0
  5. package/esm2022/interfaces/grid-interface.mjs +2 -0
  6. package/esm2022/interfaces/select-interface.mjs +2 -0
  7. package/esm2022/interfaces/tab-interface.mjs +2 -0
  8. package/esm2022/lib/avatar/avatar.component.mjs +56 -0
  9. package/esm2022/lib/button/button.component.mjs +84 -0
  10. package/esm2022/lib/calendar-header/calendar-header.component.mjs +170 -0
  11. package/esm2022/lib/chips/chips.component.mjs +62 -0
  12. package/esm2022/lib/component-library.component.mjs +19 -0
  13. package/esm2022/lib/component-library.service.mjs +14 -0
  14. package/esm2022/lib/datepicker/datepicker.component.mjs +39 -0
  15. package/esm2022/lib/form-select/form-select.component.mjs +59 -0
  16. package/esm2022/lib/grid-cell/grid-cell.component.mjs +84 -0
  17. package/esm2022/lib/header/header.component.mjs +37 -0
  18. package/esm2022/lib/stepper/stepper.component.mjs +64 -0
  19. package/esm2022/lib/tabs/tabs.component.mjs +38 -0
  20. package/esm2022/lib/toast/toast.component.mjs +54 -0
  21. package/esm2022/lib/tool-tip/tool-tip.component.mjs +41 -0
  22. package/esm2022/public-api.mjs +23 -0
  23. package/esm2022/sarasanalytics-com-design-system.mjs +5 -0
  24. package/fesm2022/sarasanalytics-com-design-system.mjs +760 -0
  25. package/fesm2022/sarasanalytics-com-design-system.mjs.map +1 -0
  26. package/index.d.ts +5 -0
  27. package/interfaces/avatar-interface.d.ts +6 -0
  28. package/interfaces/button-interface.d.ts +12 -0
  29. package/interfaces/chip-interface.d.ts +11 -0
  30. package/interfaces/grid-interface.d.ts +24 -0
  31. package/interfaces/select-interface.d.ts +19 -0
  32. package/interfaces/tab-interface.d.ts +6 -0
  33. package/lib/avatar/avatar.component.d.ts +18 -0
  34. package/lib/button/button.component.d.ts +26 -0
  35. package/lib/calendar-header/calendar-header.component.d.ts +31 -0
  36. package/lib/chips/chips.component.d.ts +22 -0
  37. package/lib/component-library.component.d.ts +5 -0
  38. package/lib/component-library.service.d.ts +6 -0
  39. package/lib/datepicker/datepicker.component.d.ts +9 -0
  40. package/lib/form-select/form-select.component.d.ts +17 -0
  41. package/lib/grid-cell/grid-cell.component.d.ts +20 -0
  42. package/lib/header/header.component.d.ts +14 -0
  43. package/lib/stepper/stepper.component.d.ts +17 -0
  44. package/lib/tabs/tabs.component.d.ts +15 -0
  45. package/lib/toast/toast.component.d.ts +18 -0
  46. package/lib/tool-tip/tool-tip.component.d.ts +15 -0
  47. package/package.json +19 -68
  48. package/{projects/component-library/src/public-api.ts → public-api.d.ts} +1 -7
  49. package/.editorconfig +0 -16
  50. package/.eslintrc.json +0 -22
  51. package/.storybook/main.ts +0 -21
  52. package/.storybook/manager.ts +0 -17
  53. package/.storybook/preview-head.html +0 -5
  54. package/.storybook/preview.ts +0 -65
  55. package/.storybook/tsconfig.doc.json +0 -10
  56. package/.storybook/tsconfig.json +0 -11
  57. package/.storybook/typings.d.ts +0 -4
  58. package/.vscode/extensions.json +0 -7
  59. package/.vscode/launch.json +0 -20
  60. package/.vscode/settings.json +0 -13
  61. package/.vscode/tasks.json +0 -42
  62. package/angular.json +0 -189
  63. package/build-storybook.log +0 -39
  64. package/documentation.json +0 -0
  65. package/projects/component-library/README.md +0 -24
  66. package/projects/component-library/ng-package.json +0 -8
  67. package/projects/component-library/package.json +0 -12
  68. package/projects/component-library/src/interfaces/avatar-interface.ts +0 -6
  69. package/projects/component-library/src/interfaces/button-interface.ts +0 -12
  70. package/projects/component-library/src/interfaces/chip-interface.ts +0 -11
  71. package/projects/component-library/src/interfaces/grid-interface.ts +0 -24
  72. package/projects/component-library/src/interfaces/select-interface.ts +0 -19
  73. package/projects/component-library/src/interfaces/tab-interface.ts +0 -6
  74. package/projects/component-library/src/lib/avatar/avatar.component.css +0 -48
  75. package/projects/component-library/src/lib/avatar/avatar.component.html +0 -5
  76. package/projects/component-library/src/lib/avatar/avatar.component.spec.ts +0 -23
  77. package/projects/component-library/src/lib/avatar/avatar.component.ts +0 -50
  78. package/projects/component-library/src/lib/button/button.component.css +0 -145
  79. package/projects/component-library/src/lib/button/button.component.html +0 -11
  80. package/projects/component-library/src/lib/button/button.component.spec.ts +0 -23
  81. package/projects/component-library/src/lib/button/button.component.ts +0 -68
  82. package/projects/component-library/src/lib/calendar-header/calendar-header.component.css +0 -67
  83. package/projects/component-library/src/lib/calendar-header/calendar-header.component.html +0 -20
  84. package/projects/component-library/src/lib/calendar-header/calendar-header.component.spec.ts +0 -23
  85. package/projects/component-library/src/lib/calendar-header/calendar-header.component.ts +0 -196
  86. package/projects/component-library/src/lib/chips/chips.component.css +0 -129
  87. package/projects/component-library/src/lib/chips/chips.component.html +0 -17
  88. package/projects/component-library/src/lib/chips/chips.component.spec.ts +0 -23
  89. package/projects/component-library/src/lib/chips/chips.component.ts +0 -55
  90. package/projects/component-library/src/lib/component-library.component.spec.ts +0 -23
  91. package/projects/component-library/src/lib/component-library.component.ts +0 -16
  92. package/projects/component-library/src/lib/component-library.service.spec.ts +0 -16
  93. package/projects/component-library/src/lib/component-library.service.ts +0 -9
  94. package/projects/component-library/src/lib/datepicker/datepicker.component.css +0 -33
  95. package/projects/component-library/src/lib/datepicker/datepicker.component.html +0 -11
  96. package/projects/component-library/src/lib/datepicker/datepicker.component.spec.ts +0 -23
  97. package/projects/component-library/src/lib/datepicker/datepicker.component.ts +0 -37
  98. package/projects/component-library/src/lib/form-select/form-select.component.css +0 -156
  99. package/projects/component-library/src/lib/form-select/form-select.component.html +0 -38
  100. package/projects/component-library/src/lib/form-select/form-select.component.spec.ts +0 -23
  101. package/projects/component-library/src/lib/form-select/form-select.component.ts +0 -54
  102. package/projects/component-library/src/lib/grid-cell/grid-cell.component.css +0 -78
  103. package/projects/component-library/src/lib/grid-cell/grid-cell.component.html +0 -31
  104. package/projects/component-library/src/lib/grid-cell/grid-cell.component.spec.ts +0 -23
  105. package/projects/component-library/src/lib/grid-cell/grid-cell.component.ts +0 -89
  106. package/projects/component-library/src/lib/header/header.component.css +0 -62
  107. package/projects/component-library/src/lib/header/header.component.html +0 -23
  108. package/projects/component-library/src/lib/header/header.component.spec.ts +0 -23
  109. package/projects/component-library/src/lib/header/header.component.ts +0 -28
  110. package/projects/component-library/src/lib/stepper/stepper.component.css +0 -96
  111. package/projects/component-library/src/lib/stepper/stepper.component.html +0 -14
  112. package/projects/component-library/src/lib/stepper/stepper.component.spec.ts +0 -23
  113. package/projects/component-library/src/lib/stepper/stepper.component.ts +0 -61
  114. package/projects/component-library/src/lib/tabs/tabs.component.css +0 -100
  115. package/projects/component-library/src/lib/tabs/tabs.component.html +0 -16
  116. package/projects/component-library/src/lib/tabs/tabs.component.spec.ts +0 -23
  117. package/projects/component-library/src/lib/tabs/tabs.component.ts +0 -37
  118. package/projects/component-library/src/lib/toast/toast.component.css +0 -108
  119. package/projects/component-library/src/lib/toast/toast.component.html +0 -25
  120. package/projects/component-library/src/lib/toast/toast.component.spec.ts +0 -23
  121. package/projects/component-library/src/lib/toast/toast.component.ts +0 -37
  122. package/projects/component-library/src/lib/tool-tip/tool-tip.component.css +0 -139
  123. package/projects/component-library/src/lib/tool-tip/tool-tip.component.html +0 -31
  124. package/projects/component-library/src/lib/tool-tip/tool-tip.component.spec.ts +0 -23
  125. package/projects/component-library/src/lib/tool-tip/tool-tip.component.ts +0 -37
  126. package/projects/component-library/tsconfig.lib.json +0 -14
  127. package/projects/component-library/tsconfig.lib.prod.json +0 -10
  128. package/projects/component-library/tsconfig.spec.json +0 -14
  129. package/src/Saras-logo.svg +0 -15
  130. package/src/app/app.component.css +0 -13
  131. package/src/app/app.component.html +0 -77
  132. package/src/app/app.component.spec.ts +0 -29
  133. package/src/app/app.component.ts +0 -505
  134. package/src/app/app.config.ts +0 -27
  135. package/src/app/app.routes.ts +0 -3
  136. package/src/app/data.ts +0 -52
  137. package/src/app/kitchen-sink/kitchen-sink.component.css +0 -29
  138. package/src/app/kitchen-sink/kitchen-sink.component.html +0 -7
  139. package/src/app/kitchen-sink/kitchen-sink.component.spec.ts +0 -23
  140. package/src/app/kitchen-sink/kitchen-sink.component.ts +0 -92
  141. package/src/assets/.gitkeep +0 -0
  142. package/src/assets/Chevron.svg +0 -5
  143. package/src/assets/Frame.svg +0 -5
  144. package/src/assets/Grid.svg +0 -5
  145. package/src/assets/Location.svg +0 -5
  146. package/src/assets/Mail.svg +0 -5
  147. package/src/assets/Person.svg +0 -5
  148. package/src/assets/Scan.svg +0 -5
  149. package/src/assets/Sources.svg +0 -5
  150. package/src/assets/arrow.svg +0 -5
  151. package/src/assets/avatar.svg +0 -12
  152. package/src/assets/checkmark.svg +0 -5
  153. package/src/assets/crossmark.svg +0 -5
  154. package/src/assets/dot.svg +0 -5
  155. package/src/assets/negativemark.svg +0 -5
  156. package/src/assets/pointer-polygon.svg +0 -3
  157. package/src/assets/tick-icon.svg +0 -5
  158. package/src/assets/tick.svg +0 -8
  159. package/src/assets/warningmark.svg +0 -5
  160. package/src/custom-theme.scss +0 -37
  161. package/src/favicon.ico +0 -0
  162. package/src/index.html +0 -23
  163. package/src/main.ts +0 -6
  164. package/src/stories/GettingStarted.mdx +0 -233
  165. package/src/stories/KitchenSink.stories.ts +0 -86
  166. package/src/stories/avatar.stories.ts +0 -45
  167. package/src/stories/chips.stories.ts +0 -61
  168. package/src/stories/custom-button.stories.ts +0 -74
  169. package/src/stories/datepicker.stories.ts +0 -78
  170. package/src/stories/gridCell.stories.ts +0 -234
  171. package/src/stories/header.stories.ts +0 -61
  172. package/src/stories/selectInput.stories.ts +0 -158
  173. package/src/stories/stepper.stories.ts +0 -92
  174. package/src/stories/tabs.stories.ts +0 -97
  175. package/src/stories/toast.stories.ts +0 -54
  176. package/src/stories/tool-tip.stories.ts +0 -45
  177. package/src/styles.css +0 -204
  178. package/src/svg.d.ts +0 -1
  179. package/tsconfig.app.json +0 -14
  180. package/tsconfig.json +0 -42
  181. package/tsconfig.spec.json +0 -14
@@ -1,6 +0,0 @@
1
- export interface AvatarInterface {
2
- id: string | number,
3
- size: string,
4
- imagePath: string,
5
- altText: string
6
- }
@@ -1,12 +0,0 @@
1
- export interface ButtonInterface {
2
- id: string | number,
3
- text: string,
4
- type: string,
5
- size: string,
6
- state: string,
7
- imagePath?: string,
8
- iconPosition?: string,
9
- href?: string,
10
- hrefTarget?: string,
11
- isSubmit?: boolean,
12
- }
@@ -1,11 +0,0 @@
1
- export interface ChipInterface {
2
- id: string | number,
3
- text: string,
4
- type: string,
5
- state: string,
6
- filling: string,
7
- iconPosition?: string,
8
- iconPath?: string,
9
- largeStateIcon?: string,
10
- largeStateText?: string
11
- }
@@ -1,24 +0,0 @@
1
- import { ButtonInterface } from "./button-interface";
2
- import { ChipInterface } from "./chip-interface";
3
- import { AvatarInterface } from "./avatar-interface";
4
- export interface GridInterface {
5
- cellType: string,
6
- viewText: boolean,
7
- viewLeadingIcon: boolean,
8
- viewTrailingIcon: boolean,
9
- viewButton: boolean,
10
- viewChip: boolean,
11
- viewAvatar: boolean,
12
- iconPath?: string,
13
- chipConfig?: ChipInterface[],
14
- buttonConfig?: ButtonInterface,
15
- avatarConfig?: AvatarInterface,
16
- text?: string | number,
17
- subText?: string | number,
18
- interactiveLink?: string,
19
- interactiveLinkTarget?: string,
20
- chipClicked?(evt: any): any,
21
- linkClicked?(evt: any): any,
22
- buttonClicked?(evt: any): any,
23
- avatarClicked?(evt: any): any
24
- }
@@ -1,19 +0,0 @@
1
- import { FormlyFieldProps } from "@ngx-formly/core"
2
- interface SelectSubInterface {
3
- label: string,
4
- supportText: string,
5
- dropIcon: string,
6
- dropIconPosition: string,
7
- multiple: boolean,
8
- iconPath: string,
9
- type: string,
10
- state: string,
11
- filling: string,
12
- iconPosition: string,
13
- }
14
-
15
- export interface SelectInterface extends FormlyFieldProps {
16
- options: any,
17
- disabled: boolean,
18
- params: SelectSubInterface
19
- }
@@ -1,6 +0,0 @@
1
- export interface TabInterface {
2
- tabName: string,
3
- tabIcon?: string,
4
- iconPosition?: string,
5
- badgeContent?: string,
6
- }
@@ -1,48 +0,0 @@
1
- .extra-small {
2
- --width: var(--medium-24px);
3
- --height: var(--medium-24px);
4
- }
5
-
6
- .small {
7
- --width: 28px;
8
- --height: 28px;
9
- }
10
-
11
- .medium {
12
- --width: 32px;
13
- --height: 32px;
14
- }
15
-
16
- .large {
17
- --width: 36px;
18
- --height: 36px;
19
- }
20
-
21
- .extra-large {
22
- --width: 40px;
23
- --height: 40px;
24
- }
25
-
26
- .avatar {
27
- display: flex;
28
- }
29
-
30
- .avatar-img {
31
- background-color: var(--primary-50);
32
- height: var(--height);
33
- width: var(--width);
34
- border-radius: var(--height);
35
- object-fit: cover;
36
-
37
- font-family: var(--font);
38
- font-size: 11px;
39
- font-weight: 500;
40
- line-height: var(--height);
41
- letter-spacing: 0.5px;
42
- text-align: center;
43
- overflow: none;
44
- }
45
-
46
- .avatar:hover {
47
- cursor: pointer;
48
- }
@@ -1,5 +0,0 @@
1
- <div class="avatar {{size}}" (click)="avatarClicked($event)" (mouseenter)="mouseEnter($event)"
2
- (mouseleave)="mouseLeave($event)">
3
- <img *ngIf="imagePath" class="avatar-img" alt="{{altText}}" src="{{imagePath}}">
4
- <p *ngIf="!imagePath" class="avatar-img">{{altText}}</p>
5
- </div>
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { AvatarComponent } from './avatar.component';
4
-
5
- describe('AvatarComponent', () => {
6
- let component: AvatarComponent;
7
- let fixture: ComponentFixture<AvatarComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [AvatarComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(AvatarComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,50 +0,0 @@
1
- import { Component, EventEmitter } from '@angular/core';
2
- import { Input, Output } from '@angular/core';
3
- import { NgIf } from '@angular/common';
4
-
5
- @Component({
6
- selector: 'sa-avatar',
7
- standalone: true,
8
- imports: [NgIf],
9
- templateUrl: './avatar.component.html',
10
- styleUrl: './avatar.component.css'
11
- })
12
- export class AvatarComponent {
13
- @Input() id: string | number;
14
- @Input() imagePath: string;
15
- @Input() altText: string;
16
- @Input() size: string;
17
-
18
- @Output() onClickEvent = new EventEmitter
19
- @Output() onMouseInEvent = new EventEmitter
20
- @Output() onMouseOutEvent = new EventEmitter
21
-
22
- eventEmitObject = {}
23
-
24
- ngOnChanges(): void {
25
- this.eventEmitObject = {
26
- id: this.id
27
- }
28
- }
29
-
30
- avatarClicked(evt: Event) {
31
- this.onClickEvent.emit({
32
- ...this.eventEmitObject,
33
- evt
34
- })
35
- }
36
-
37
- mouseEnter(evt: Event) {
38
- this.onMouseInEvent.emit({
39
- ...this.eventEmitObject,
40
- evt
41
- })
42
- }
43
-
44
- mouseLeave(evt: Event) {
45
- this.onMouseOutEvent.emit({
46
- ...this.eventEmitObject,
47
- evt
48
- })
49
- }
50
- }
@@ -1,145 +0,0 @@
1
- .primary {
2
- --default-bg: var(--primary-500);
3
- --default-color: var(--text-white);
4
- --default-border: transparent;
5
- --hover-bg: var(--primary-700);
6
- --hover-color: var(--text-white);
7
- --hover-border: transparent;
8
- --disabled-bg: var(--grey-100);
9
- --disabled-color: var(--text-white);
10
- --disabled-border: transparent;
11
- --error-default-bg: var(--semantic-error-500);
12
- --error-hover-bg: var(--semantic-error-600);
13
- --error-default-color: var(--text-white);
14
- --error-hover-color: var(--text-white);
15
- --error-default-border: var(--semantic-error-500);
16
- --error-hover-border: var(--semantic-error-500);
17
- --svg-icon-color: var(--default-color);
18
- }
19
-
20
- .outline {
21
- --default-bg: none;
22
- --default-color: var(--primary-500);
23
- --default-border: var(--primary-500);
24
- --hover-bg: var(--primary-50);
25
- --hover-color: var(--primary-700);
26
- --hover-border: var(--primary-700);
27
- --disabled-bg: none;
28
- --disabled-color: var(--grey-100);
29
- --disabled-border: var(--grey-100);
30
- --error-default-bg: none;
31
- --error-hover-bg: var(--semantic-error-50);
32
- --error-default-color: var(--semantic-error-500);
33
- --error-hover-color: var(--semantic-error-600);
34
- --error-default-border: var(--semantic-error-500);
35
- --error-hover-border: var(--semantic-error-600);
36
- --svg-icon-color: var(--default-color);
37
- }
38
-
39
- .transparent {
40
- --default-bg: none;
41
- --default-color: var(--primary-500);
42
- --default-border: transparent;
43
- --hover-bg: var(--primary-50);
44
- --hover-color: var(--primary-700);
45
- --hover-border: transparent;
46
- --disabled-bg: none;
47
- --disabled-color: var(--grey-100);
48
- --disabled-border: transparent;
49
- --error-default-bg: none;
50
- --error-hover-bg: var(--semantic-error-50);
51
- --error-default-color: var(--semantic-error-500);
52
- --error-hover-color: var(--semantic-error-600);
53
- --error-default-border: transparent;
54
- --error-hover-border: transparent;
55
- --svg-icon-color: var(--default-color);
56
- }
57
-
58
- .large {
59
- --sizing-1: var(--small-8px);
60
- --sizing-2: var(--small-16px);
61
- --sizing-3: var(--small-8px);
62
- --height: var(--medium-36px);
63
- --font-size: var(--small-14px);
64
- }
65
-
66
- .medium {
67
- --sizing-1: var(--small-6px);
68
- --sizing-2: var(--small-12px);
69
- --sizing-3: var(--small-8px);
70
- --height: var(--medium-32px);
71
- --font-size: var(--small-14px);
72
- }
73
-
74
- .small {
75
- --sizing-1: var(--small-4px);
76
- --sizing-2: var(--small-8px);
77
- --sizing-3: var(--small-8px);
78
- --height: var(--medium-24px);
79
- --font-size: var(--small-12px);
80
- }
81
-
82
- .disabled {
83
- background-color: var(--disabled-bg) !important;
84
- color: var(--disabled-color) !important;
85
- border: 1px solid var(--disabled-border) !important;
86
- cursor: default !important;
87
- --svg-icon-color: var(--disabled-color) !important;
88
- }
89
-
90
- .error {
91
- background-color: var(--error-default-bg) !important;
92
- color: var(--error-default-color) !important;
93
- border: 1px solid var(--error-default-border) !important;
94
- --svg-icon-color: var(--error-default-color) !important;
95
- }
96
-
97
- .error:hover {
98
- background-color: var(--error-hover-bg) !important;
99
- color: var(--error-hover-color) !important;
100
- --svg-icon-color: var(--error-hover-color) !important;
101
- }
102
-
103
- .sa-button {
104
- display: flex;
105
- width: max-content;
106
- padding: var(--sizing-1) var(--sizing-2);
107
- justify-content: center;
108
- align-items: center;
109
- gap: var(--sizing-3);
110
- box-sizing: border-box;
111
- height: var(--height);
112
-
113
- border-radius: 4px;
114
- font-family: var(--font);
115
- font-size: var(--font-size);
116
- cursor: pointer;
117
-
118
- background-color: var(--default-bg);
119
- border: 1px solid var(--default-border);
120
- color: var(--default-color);
121
-
122
- -webkit-user-select: none;
123
- -khtml-user-select: none;
124
- -moz-user-select: none;
125
- -o-user-select: none;
126
- user-select: none;
127
- }
128
-
129
- .sa-button:hover {
130
- background-color: var(--hover-bg);
131
- border: 1px solid var(--hover-border);
132
- color: var(--hover-color);
133
- --svg-icon-color: var(--hover-color);
134
- }
135
-
136
- .svg-icon {
137
- mask-size: contain;
138
- width: 16px;
139
- height: 16px;
140
- background-color: var(--svg-icon-color);
141
- }
142
-
143
- .btn-hide {
144
- display: none;
145
- }
@@ -1,11 +0,0 @@
1
- <button (click)="buttonClicked($event)" id="sa-button-{{uuid}}" class="btn-hide"
2
- [type]="isSubmit ? 'submit' : 'button'"></button>
3
- <!-- (click)="buttonClicked()" on button instead of label breaks whole thing -->
4
- <label for="sa-button-{{uuid}}" role="button" tabindex="0" (mouseenter)="mouseIn()" (mouseleave)="mouseOut()"
5
- (keydown.enter)="buttonClicked($event)" for="sa-button" class="sa-button {{state}} {{type}} {{size}}">
6
- <div class="svg-icon" [style]="svgStyle"
7
- [style.display]="(iconPosition == 'left' || iconPosition == 'both') ? 'block' : 'none'"></div>
8
- {{text}}
9
- <div class="svg-icon" [style]="svgStyle"
10
- [style.display]="(iconPosition == 'right' || iconPosition == 'both') ? 'block' : 'none'"></div>
11
- </label>
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ButtonComponent } from './button.component';
4
-
5
- describe('ButtonComponent', () => {
6
- let component: ButtonComponent;
7
- let fixture: ComponentFixture<ButtonComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [ButtonComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(ButtonComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,68 +0,0 @@
1
- import { Component, Output } from '@angular/core';
2
- import { Input } from '@angular/core';
3
- import { EventEmitter } from '@angular/core';
4
- import { NgIf } from '@angular/common';
5
- import { NgStyle } from '@angular/common';
6
-
7
- let nextId = 0; // used to give unique ids to inputs used in html
8
-
9
- @Component({
10
- selector: 'sa-button',
11
- standalone: true,
12
- imports: [NgIf, NgStyle],
13
- templateUrl: './button.component.html',
14
- styleUrl: './button.component.css'
15
- })
16
-
17
- export class ButtonComponent {
18
- @Input() id: string | number;
19
- @Input() type: string;
20
- @Input() state: string;
21
- @Input() size: string;
22
- @Input() text: string | number;
23
- @Input() ImagePath: string;
24
- @Input() iconPosition: string;
25
- @Input() href: string;
26
- @Input() hrefTarget: string;
27
- @Input() isSubmit: boolean = false;
28
-
29
- @Output() onClickEvent = new EventEmitter();
30
- @Output() onMouseInEvent = new EventEmitter();
31
- @Output() onMouseOutEvent = new EventEmitter();
32
-
33
- svgStyle = {}
34
- eventEmitObject = {}
35
- uuid: number = nextId++;
36
-
37
- ngOnChanges(): void {
38
- this.svgStyle = {
39
- '-webkit-mask-image': `url(${this.ImagePath})`,
40
- 'mask-image': `url(${this.ImagePath})`,
41
- }
42
- this.eventEmitObject = {
43
- id: this.id
44
- }
45
- }
46
-
47
- buttonClicked(evt: Event) {
48
- if (this.state == "disabled") return;
49
- this.onClickEvent.emit({
50
- ...this.eventEmitObject,
51
- evt
52
- });
53
- if (this.href != "") {
54
- if (this.hrefTarget == "blank") window.open(this.href);
55
- else if (this.hrefTarget == "self") location.href = this.href;
56
- }
57
- }
58
-
59
- mouseIn() {
60
- if (this.state == "disabled") return;
61
- this.onMouseInEvent.emit();
62
- }
63
-
64
- mouseOut() {
65
- if (this.state == "disabled") return;
66
- this.onMouseOutEvent.emit();
67
- }
68
- }
@@ -1,67 +0,0 @@
1
- .header {
2
- display: flex;
3
- justify-content: space-between;
4
- align-items: center;
5
- border-bottom: 1px solid var(--grey-50);
6
- margin-top: -4px;
7
- margin-bottom: var(--small-8px, 8px);
8
- }
9
-
10
- .header-label {
11
- font-family: Roboto;
12
- font-size: 14px;
13
- font-style: normal;
14
- font-weight: 400;
15
- line-height: 20px;
16
- letter-spacing: 0.25px;
17
- }
18
-
19
- .range-preset {
20
- width: 180px;
21
- position: absolute;
22
-
23
- padding: var(--small-12px, 12px) 0 0 var(--medium-24px, 24px);
24
- box-sizing: border-box;
25
-
26
-
27
- margin-top: -9px;
28
- margin-left: -180px;
29
-
30
- height: 356px;
31
- background-color: white;
32
- border-top: 1px solid var(--grey-50);
33
- border-left: 1px solid var(--grey-50);
34
- border-bottom: 1px solid var(--grey-50);
35
- border-bottom-left-radius: var(--small-8px, 8px);
36
- border-top-left-radius: var(--small-8px, 8px);
37
-
38
- gap: var(--small-8px, 8px);
39
-
40
- display: flex;
41
- flex-direction: column;
42
- }
43
-
44
- .preset {
45
- padding: var(--small-8px, 8px);
46
- display: flex;
47
- gap: var(--small-4px, 4px);
48
- font-size: 14px;
49
- font-style: normal;
50
- font-weight: 400;
51
- line-height: 20px;
52
- letter-spacing: 0.25px;
53
- color: var(--text-mediumemphasis);
54
- margin-bottom: -5px;
55
- }
56
-
57
- .preset-radio {
58
- cursor: pointer;
59
- }
60
-
61
- .preset-label {
62
- cursor: pointer;
63
- }
64
-
65
- .preset-selected {
66
- color: var(--primary-500);
67
- }
@@ -1,20 +0,0 @@
1
- <div class="range-preset">
2
- <div class="preset" *ngFor="let preset of presets, let i = index">
3
- <label class="preset-label {{preset == selectedPreset ? 'preset-selected' : ''}}"
4
- for="preset-radio-{{i}}">{{preset}}</label>
5
- <input class="preset-radio" (change)="presetChanged($event)" [checked]="preset == selectedPreset"
6
- id="preset-radio-{{i}}" type="radio" name="preset-radios-{{uuid}}" value="{{preset}}">
7
- </div>
8
- </div>
9
-
10
- <div class="header">
11
- <button mat-icon-button (click)="previousClicked('month')">
12
- <mat-icon>keyboard_arrow_left</mat-icon>
13
- </button>
14
-
15
- <button mat-button class="header-label" (click)="changeView()">{{ periodLabel }}</button>
16
-
17
- <button mat-icon-button (click)="nextClicked('month')">
18
- <mat-icon>keyboard_arrow_right</mat-icon>
19
- </button>
20
- </div>
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { CalendarHeaderComponent } from './calendar-header.component';
4
-
5
- describe('CalendarHeaderComponent', () => {
6
- let component: CalendarHeaderComponent;
7
- let fixture: ComponentFixture<CalendarHeaderComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [CalendarHeaderComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(CalendarHeaderComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });