@sarasanalytics-com/design-system 0.0.3 → 0.0.5

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 +168 -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 +759 -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,505 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { RouterOutlet } from '@angular/router';
3
- import { ButtonComponent } from '../../projects/component-library/src/lib/button/button.component';
4
- import { KitchenSinkComponent } from './kitchen-sink/kitchen-sink.component';
5
- import { ChipsComponent } from '../../projects/component-library/src/lib/chips/chips.component';
6
- import { AvatarComponent } from '../../projects/component-library/src/lib/avatar/avatar.component';
7
- import { GridCellComponent } from '../../projects/component-library/src/lib/grid-cell/grid-cell.component';
8
- import { ColDef, GridReadyEvent } from 'ag-grid-community';
9
- import { AgGridAngular } from 'ag-grid-angular';
10
- import { FormlyFieldConfig } from '@ngx-formly/core';
11
- import rawData from './data';
12
- import { GridInterface } from '../../projects/component-library/src/interfaces/grid-interface';
13
- import { FormsModule } from '@angular/forms';
14
- import { ReactiveFormsModule } from '@angular/forms';
15
- import { FormlyModule } from '@ngx-formly/core';
16
- import { CommonModule } from '@angular/common';
17
- import { NgSelectModule } from '@ng-select/ng-select';
18
- import { ToolTipComponent } from '../../projects/component-library/src/lib/tool-tip/tool-tip.component';
19
- import { ToastComponent } from '../../projects/component-library/src/lib/toast/toast.component';
20
- import { HeaderComponent } from '../../projects/component-library/src/lib/header/header.component';
21
- import { TabsComponent } from '../../projects/component-library/src/lib/tabs/tabs.component';
22
- import { TabInterface } from '../../projects/component-library/src/interfaces/tab-interface';
23
- import { DatepickerComponent } from '../../projects/component-library/src/lib/datepicker/datepicker.component';
24
- import { Renderer2 } from '@angular/core';
25
- import { SelectInterface } from '../../projects/component-library/src/interfaces/select-interface';
26
- import { FormControl, FormGroup } from '@angular/forms';
27
- import { StepperComponent } from '../../projects/component-library/src/public-api';
28
- @Component({
29
- selector: 'app-root',
30
- standalone: true,
31
- imports: [
32
- CommonModule,
33
- RouterOutlet,
34
-
35
- ButtonComponent,
36
-
37
- KitchenSinkComponent,
38
-
39
- ChipsComponent,
40
-
41
- AvatarComponent,
42
-
43
- GridCellComponent,
44
- AgGridAngular,
45
- //imports for grid
46
-
47
- ReactiveFormsModule,
48
- FormlyModule,
49
- ReactiveFormsModule,
50
- NgSelectModule,
51
- FormsModule,
52
- //imports for sa-select and sa-stepper
53
- ToolTipComponent,
54
- ToastComponent,
55
- HeaderComponent,
56
- TabsComponent,
57
- DatepickerComponent,
58
- StepperComponent
59
- ],
60
- templateUrl: './app.component.html',
61
- styleUrl: './app.component.css'
62
- })
63
- export class AppComponent {
64
- global_theme: string = 'saras-theme';
65
-
66
- constructor(private renderer: Renderer2) {
67
- this.renderer.addClass(document.body, this.global_theme);
68
- }
69
-
70
- testComp = ButtonComponent;
71
- testInputs = [
72
- ["primary", "outline", "transparent"], // type
73
- ["default", "error", "disabled"], // state
74
- ["small", "medium", "large"], // size
75
- ["Button"], // text
76
- ["../assets/Sources.svg"], // ImagePath
77
- ["both"], // iconPosition
78
- ["https://sarasanalytics.com"], // href
79
- ["self"], // hrefTarget
80
- ]
81
- testParams = [
82
- "type",
83
- "state",
84
- "size",
85
- "text",
86
- "ImagePath",
87
- "iconPosition",
88
- "href",
89
- "hrefTarget",
90
- ]
91
-
92
- testCompChip = ChipsComponent;
93
- testInputsChip = [
94
- ["regular", "small", "large"], // type
95
- ["primary", "secondary", "neutral", "success", "error", "warning"], // state
96
- ["filled", "outline"], // filling
97
- ["Chip text"], // text
98
- ["../assets/Frame.svg"], // iconPath
99
- ["both"], // iconPosition
100
- ["../assets/dot.svg"], // largeStateIcon
101
- ["Good"], // largeStateText
102
- ];
103
- testParamsChip = [
104
- "type",
105
- "state",
106
- "filling",
107
- "text",
108
- "iconPath",
109
- "iconPosition",
110
- "largeStateIcon",
111
- "largeStateText",
112
- ]
113
-
114
- testCompAvatar = AvatarComponent;
115
- testInputsAvatar = [
116
- ["../assets/avatar.svg", ""],
117
- ["extra-small", "small", "medium", "large", "extra-large"],
118
- ["AB"]
119
- ];
120
- testParamsAvatar = ["imagePath", "size", "altText"];
121
-
122
- params: GridInterface = {
123
- cellType: '',
124
- viewText: false,
125
- viewLeadingIcon: false,
126
- viewTrailingIcon: false,
127
- viewButton: false,
128
- viewChip: false,
129
- viewAvatar: false,
130
- }
131
-
132
- handleChipClick(evt: any) {
133
- let prevData = this.rowData[evt.rowId]["Chip"].chipConfig;
134
- if (prevData == undefined) return;
135
- for (let i = 0; i < prevData.length; i++) {
136
- if (prevData[i].id == evt.id) {
137
- this.rowData[evt.rowId]["Chip"].chipConfig?.splice(i, 1);
138
- break;
139
- }
140
- }
141
- }
142
-
143
- // for every in cell in a row, returning a grid-interface object to specify how it should be rendered.
144
- rowData = rawData.map((current): { [key: string]: GridInterface } => {
145
- return {
146
- "Text": {
147
- ...this.params,
148
- viewText: true,
149
- cellType: 'row',
150
- text: current.rowNo,
151
- },
152
- "Numeric": {
153
- ...this.params,
154
- viewText: true,
155
- cellType: 'numeric',
156
- text: Math.floor(((current.rowNo * 23) / 77) * 75),
157
- },
158
- "Leading Icon": {
159
- ...this.params,
160
- viewText: true,
161
- cellType: 'interactive',
162
- text: current.name,
163
- iconPath: '../assets/Scan.svg',
164
- viewLeadingIcon: true,
165
- interactiveLinkTarget: 'blank',
166
- linkClicked: (evt: Event) => {
167
- console.log(evt);
168
- }
169
- },
170
- "Chip": {
171
- ...this.params,
172
- cellType: 'row',
173
- viewChip: true,
174
- chipConfig: [
175
- {
176
- id: 0,
177
- text: current.chip,
178
- type: 'primary',
179
- state: 'regular',
180
- filling: 'filled',
181
- iconPath: '../assets/Frame.svg',
182
- iconPosition: 'left',
183
- largeStateIcon: '',
184
- largeStateText: '',
185
- },
186
- {
187
- id: 1,
188
- text: current.chip2,
189
- type: 'secondary',
190
- state: 'regular',
191
- filling: 'filled',
192
- iconPath: '../assets/Frame.svg',
193
- iconPosition: 'left',
194
- largeStateIcon: '',
195
- largeStateText: '',
196
- },
197
- {
198
- id: 2,
199
- text: current.chip3,
200
- type: 'error',
201
- state: 'regular',
202
- filling: 'filled',
203
- iconPath: '../assets/Frame.svg',
204
- iconPosition: 'left',
205
- largeStateIcon: '',
206
- largeStateText: '',
207
- },
208
- ],
209
- chipClicked: (evt: Event) => {
210
- console.log(evt);
211
- this.handleChipClick(evt);
212
- }
213
- },
214
- "Button": {
215
- ...this.params,
216
- cellType: "row",
217
- viewButton: true,
218
- buttonConfig: {
219
- id: 0,
220
- type: 'outline',
221
- state: current.buttonState,
222
- size: 'small',
223
- text: 'Button',
224
- href: current.link,
225
- imagePath: '../assets/Sources.svg',
226
- iconPosition: 'both',
227
- hrefTarget: 'blank',
228
- },
229
- buttonClicked: (evt: Event) => {
230
- console.log(evt);
231
- }
232
- },
233
- "Avatar": {
234
- ...this.params,
235
- viewText: true,
236
- cellType: "row",
237
- avatarConfig: {
238
- id: 0,
239
- size: 'small',
240
- imagePath: current.personPhoto,
241
- altText: 'AB'
242
- },
243
- viewAvatar: true,
244
- text: current.personName,
245
- subText: current.personDesignation,
246
- avatarClicked: (evt: Event) => {
247
- console.log(evt);
248
- }
249
- },
250
- "Subtext": {
251
- ...this.params,
252
- viewText: true,
253
- cellType: "row",
254
- text: "Text",
255
- subText: "Subtext"
256
- },
257
- "All": {
258
- cellType: 'row',
259
- viewText: true,
260
- viewLeadingIcon: true,
261
- viewTrailingIcon: true,
262
- viewButton: true,
263
- viewChip: true,
264
- viewAvatar: true,
265
- iconPath: '../assets/Scan.svg',
266
- chipConfig: [
267
- {
268
- id: 2,
269
- text: current.chip3,
270
- type: 'error',
271
- state: 'regular',
272
- filling: 'filled',
273
- iconPath: '../assets/Sources.svg',
274
- iconPosition: 'left',
275
- largeStateIcon: '',
276
- largeStateText: '',
277
- }
278
- ],
279
- buttonConfig: {
280
- id: 0,
281
- type: 'outline',
282
- state: current.buttonState,
283
- size: 'small',
284
- text: 'Button',
285
- href: current.link,
286
- imagePath: '../assets/Sources.svg',
287
- iconPosition: 'both',
288
- hrefTarget: 'blank',
289
- },
290
- avatarConfig: {
291
- id: 0,
292
- size: 'small',
293
- imagePath: '../assets/avatar.svg',
294
- altText: 'AB'
295
- },
296
- text: "Text",
297
- subText: "subText",
298
- }
299
- }
300
- }
301
- );
302
- colDefs: ColDef[] = [
303
- {
304
- field: "Text",
305
- comparator: (_valueA, _valueB, nodeA, nodeB) => {
306
- return Number(nodeA.data.Text.text) - Number(nodeB.data.Text.text)
307
- },
308
- resizable: false,
309
- cellRenderer: GridCellComponent,
310
- },
311
- {
312
- field: "Numeric",
313
- comparator: (_valueA, _valueB, nodeA, nodeB) => {
314
- return Number(nodeA.data.Numeric.text) - Number(nodeB.data.Numeric.text)
315
- },
316
- resizable: false,
317
- filter: 'agNumberColumnFilter',
318
- valueFormatter: p => p.data.Numeric.text,
319
- cellRenderer: GridCellComponent,
320
- },
321
- {
322
- field: "Leading Icon",
323
- headerCheckboxSelection: true,
324
- resizable: false,
325
- cellRenderer: GridCellComponent,
326
- },
327
- {
328
- field: "Chip",
329
- resizable: false,
330
- cellRenderer: GridCellComponent,
331
- },
332
- {
333
- field: "Button",
334
- resizable: false,
335
- cellRenderer: GridCellComponent,
336
- },
337
- {
338
- field: "Avatar",
339
- resizable: false,
340
- cellRenderer: GridCellComponent,
341
- },
342
- {
343
- field: "Subtext",
344
- resizable: false,
345
- cellRenderer: GridCellComponent,
346
- },
347
- {
348
- field: "All",
349
- resizable: false,
350
- cellRenderer: GridCellComponent,
351
- }
352
- ]
353
- onGridReady(evt: GridReadyEvent) {
354
- evt.api.autoSizeAllColumns();
355
- }
356
-
357
- model: any = {
358
- "Test-select": [{
359
- "id": 0,
360
- "name": "One"
361
- }],
362
- "Test-stepper": {
363
- "id": 2,
364
- }
365
- };
366
-
367
- selectProps: SelectInterface = {
368
- options: [
369
- { id: 0, name: 'Zero' },
370
- { id: 1, name: 'One' },
371
- { id: 2, name: 'Two' },
372
- { id: 3, name: 'Three' },
373
- ],
374
- disabled: false,
375
- change: () => {
376
- console.log(this.model);
377
- },
378
- params: {
379
- label: 'Label',
380
- supportText: "Supporting text",
381
- dropIcon: '../assets/Chevron.svg',
382
- dropIconPosition: 'both',
383
- multiple: true,
384
- iconPath: "../assets/Frame.svg",
385
- type: "regular",
386
- state: "primary",
387
- filling: "filled",
388
- iconPosition: "left",
389
- }
390
- };
391
-
392
- fields: FormlyFieldConfig[] = [
393
- {
394
- key: 'Test-select',
395
- type: 'sa-select',
396
- props: this.selectProps
397
- },
398
- {
399
- key: 'Test-stepper',
400
- type: 'sa-stepper',
401
- props: {
402
- disabled: false,
403
- options: [
404
- { id: 0, name: 'Zero' },
405
- { id: 1, name: 'One' },
406
- { id: 2, name: 'Two' },
407
- { id: 3, name: 'Three' },
408
- ],
409
- params: {
410
- editable: true,
411
- doneIcon: "../assets/tick-icon.svg"
412
- }
413
- }
414
- }
415
- ];
416
-
417
- submit(model: any) {
418
- console.log(model);
419
- }
420
-
421
- stepLabels = [
422
- { id: 0, name: 'Zero' },
423
- { id: 1, name: 'One' },
424
- { id: 2, name: 'Two' },
425
- { id: 3, name: 'Three' },
426
- ];
427
- editable = true;
428
- doneIcon = "../assets/tick-icon.svg";
429
- stepped(evt: any) {
430
- console.log(evt);
431
- }
432
-
433
- skip = () => { console.log("skipped") };
434
- seen = () => { console.log("seen") };
435
-
436
- messages: string[] = [
437
- "This first line can act as the subheading of this onboarding tooltip",
438
- "This second line can act as the subheading of this onboarding tooltip",
439
- "This third line can act as the subheading of this onboarding tooltip",
440
- "This fourth line can act as the subheading of this onboarding tooltip",
441
- ]
442
-
443
- heading: string = "Heading";
444
- subHeading: string = "Subheading text"
445
- percent = 30
446
- statusIcon = "../assets/warningmark.svg"
447
- clicked(num: number) { num ? this.percent += 5 : this.percent -= 5 }
448
-
449
- info = [
450
- ["Info Text 1", "../assets/Person.svg"],
451
- ["Info Text 2", "../assets/Location.svg"],
452
- ["Info Text 3", "../assets/Mail.svg"]
453
- ]
454
- chipConfig = [
455
- ["Chip 1", "success"],
456
- ["Chip 2", "warning"],
457
- ["Chip 3", "error"],
458
- ]
459
- mainButton = "+ Button"
460
- helperButton = "Helper"
461
- header = "Header"
462
-
463
- tabs: TabInterface[] = [
464
- {
465
- tabName: "Tab 1",
466
- tabIcon: "../assets/Sources.svg",
467
- iconPosition: "left",
468
- badgeContent: "3 new",
469
- },
470
- {
471
- tabName: "Tab 2",
472
- tabIcon: "../assets/Grid.svg",
473
- iconPosition: "right",
474
- badgeContent: "9 new",
475
- },
476
- {
477
- tabName: "Tab 3",
478
- tabIcon: "../assets/warningmark.svg",
479
- iconPosition: "left",
480
- badgeContent: "17 new",
481
- },
482
- {
483
- tabName: "Tab 4",
484
- tabIcon: "../assets/Person.svg",
485
- iconPosition: "right",
486
- },
487
- {
488
- tabName: "Tab 5",
489
- tabIcon: "../assets/Mail.svg",
490
- badgeContent: "6 new",
491
- iconPosition: "both",
492
- }
493
- ]
494
-
495
- defaultTab = 2;
496
- tabSwitch(evt: any) {
497
- console.log(evt);
498
- }
499
-
500
- range = new FormGroup({
501
- start: new FormControl(),
502
- end: new FormControl(),
503
- });
504
-
505
- }
@@ -1,27 +0,0 @@
1
- import { ApplicationConfig, importProvidersFrom } from '@angular/core';
2
- import { provideRouter } from '@angular/router';
3
- import { FormlyModule } from '@ngx-formly/core';
4
- import { FormSelectComponent } from '../../projects/component-library/src/lib/form-select/form-select.component';
5
- import { routes } from './app.routes';
6
- import { StepperComponent } from '../../projects/component-library/src/lib/stepper/stepper.component';
7
- import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
8
-
9
- export const appConfig: ApplicationConfig = {
10
- providers: [
11
- provideRouter(routes),
12
- importProvidersFrom([
13
- FormlyModule.forRoot({
14
- types: [
15
- {
16
- name: 'sa-select',
17
- component: FormSelectComponent,
18
- },
19
- {
20
- name: 'sa-stepper',
21
- component: StepperComponent,
22
- }
23
- ]
24
- })
25
- ]), provideAnimationsAsync(), provideAnimationsAsync()
26
- ]
27
- };
@@ -1,3 +0,0 @@
1
- import { Routes } from '@angular/router';
2
-
3
- export const routes: Routes = [];
package/src/app/data.ts DELETED
@@ -1,52 +0,0 @@
1
- const rawData = [
2
- {
3
- rowNo: 1,
4
- name: 'Cell Name 1',
5
- chip: 'Chip 1',
6
- chip2: 'Chip 2',
7
- chip3: 'Chip 3',
8
- personPhoto: '../assets/avatar.svg',
9
- personName: 'Nithish',
10
- personDesignation: 'Developer',
11
- buttonState: 'default',
12
- link: 'https://google.com'
13
- },
14
- {
15
- rowNo: 2,
16
- name: 'Cell Name 2',
17
- chip: 'Chip 1',
18
- chip2: 'Chip 2',
19
- chip3: 'Chip 3',
20
- personPhoto: '../assets/avatar.svg',
21
- personName: 'Shoaib',
22
- personDesignation: 'Data Engineer',
23
- buttonState: 'error',
24
- link: 'https://adobe.com'
25
- },
26
- {
27
- rowNo: 3,
28
- name: 'Cell Name 3',
29
- chip: 'Chip 1',
30
- chip2: 'Chip 2',
31
- chip3: 'Chip 3',
32
- personPhoto: '../assets/avatar.svg',
33
- personName: 'Rithwik',
34
- personDesignation: 'Consultant',
35
- buttonState: 'default',
36
- link: 'https://sarasanalytics.com'
37
- },
38
- {
39
- rowNo: 4,
40
- name: 'Cell Name 4',
41
- chip: 'Chip 1',
42
- chip2: 'Chip 2',
43
- chip3: 'Chip 3',
44
- personPhoto: '../assets/avatar.svg',
45
- personName: 'Siddartha',
46
- personDesignation: 'Consultant',
47
- buttonState: 'error',
48
- link: 'https://youtube.com'
49
- },
50
- ];
51
-
52
- export default rawData;
@@ -1,29 +0,0 @@
1
- .all-variants {
2
- display: grid;
3
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
4
- }
5
-
6
- .variant {
7
- display: flex;
8
- position: relative;
9
- justify-content: center;
10
- text-align: center;
11
- padding: 10px;
12
- border: 0.5px solid gray;
13
- }
14
-
15
- .variant:hover>.copy-icon {
16
- display: block;
17
- }
18
-
19
- .copy-area {
20
- transform: scale(0.6);
21
- position: absolute;
22
- right: 0;
23
- bottom: 0;
24
- cursor: pointer;
25
- }
26
-
27
- .copy-icon {
28
- display: none;
29
- }
@@ -1,7 +0,0 @@
1
- <div class="all-variants">
2
- <div class="variant" *ngFor="let variant of paramCombinations; let i = index">
3
- <ng-container *ngComponentOutlet="inputComponent; inputs: variant;" />
4
- <mat-icon (click)="copy(i)" class="copy-area copy-icon">filter_none</mat-icon>
5
- <p [style.display]="displayCopiedText[i] ? 'block': 'none'" class="copy-area copied-text">Copied!</p>
6
- </div>
7
- </div>
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { KitchenSinkComponent } from './kitchen-sink.component';
4
-
5
- describe('KitchenSinkComponent', () => {
6
- let component: KitchenSinkComponent;
7
- let fixture: ComponentFixture<KitchenSinkComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [KitchenSinkComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(KitchenSinkComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });