@aaamb/ngx-design-system 1.3.9 → 1.4.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/.editorconfig +17 -0
- package/.nvmrc +1 -0
- package/.postcssrc.json +5 -0
- package/.storybook/main.ts +20 -0
- package/.storybook/preview.ts +23 -0
- package/.storybook/storybook.css +1 -0
- package/.storybook/tsconfig.json +19 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/CHANGELOG.md +10 -0
- package/LOCAL_DEVELOPMENT.md +129 -0
- package/angular.json +74 -0
- package/bitbucket-pipelines.yml +41 -0
- package/iac/bin/app.ts +42 -0
- package/iac/cdk.json +82 -0
- package/iac/lib/config/environments.ts +19 -0
- package/iac/lib/config/types.ts +13 -0
- package/iac/lib/stacks/certificate-stack.ts +34 -0
- package/iac/lib/stacks/frontend-stack.ts +120 -0
- package/iac/lib/stacks/index.ts +2 -0
- package/iac/package-lock.json +726 -0
- package/iac/package.json +25 -0
- package/iac/tsconfig.json +24 -0
- package/ng-package.json +8 -0
- package/package.json +58 -14
- package/src/components/button/button-green.stories.ts +101 -0
- package/src/components/button/button-text.stories.ts +105 -0
- package/src/components/button/button-white.stories.ts +105 -0
- package/src/components/button/button.component.stories.ts +91 -0
- package/src/components/button/button.component.ts +93 -0
- package/src/components/checkbox/checkbox.component.html +30 -0
- package/src/components/checkbox/checkbox.component.stories.ts +183 -0
- package/src/components/checkbox/checkbox.component.ts +211 -0
- package/src/components/datepicker-selector/datepicker-selector.component.html +103 -0
- package/src/components/datepicker-selector/datepicker-selector.component.stories.ts +123 -0
- package/src/components/datepicker-selector/datepicker-selector.component.ts +337 -0
- package/src/components/error-message/error-message.component.html +3 -0
- package/src/components/error-message/error-message.component.ts +13 -0
- package/src/components/filter-button/filter-button.component.html +286 -0
- package/src/components/filter-button/filter-button.component.stories.ts +123 -0
- package/src/components/filter-button/filter-button.component.ts +582 -0
- package/src/components/icon/icon.component.ts +20 -0
- package/src/components/icon/icon.html +1424 -0
- package/src/components/icon/icon.stories.ts +49 -0
- package/src/components/icon/icons-list.stories.ts +42 -0
- package/src/components/input/input.component.stories.ts +101 -0
- package/src/components/input/input.component.ts +317 -0
- package/src/components/input/input.html +160 -0
- package/src/components/input-datepicker/input-datepicker.component.ts +356 -0
- package/src/components/input-datepicker/input-datepicker.html +69 -0
- package/src/components/input-datepicker/input-datepicker.stories.ts +99 -0
- package/src/components/input-rangepicker/input-rangepicker.component.ts +365 -0
- package/src/components/input-rangepicker/input-rangepicker.html +54 -0
- package/src/components/input-rangepicker/input-rangepicker.stories.ts +88 -0
- package/src/components/input-weekpicker/input-weekpicker.component.ts +417 -0
- package/src/components/input-weekpicker/input-weekpicker.html +54 -0
- package/src/components/input-weekpicker/input-weekpicker.stories.ts +103 -0
- package/src/components/label/label.component.html +20 -0
- package/src/components/label/label.component.ts +22 -0
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.html +32 -0
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.stories.ts +57 -0
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.ts +48 -0
- package/src/components/modals/feedback-modal/feedback-modal.component.html +118 -0
- package/src/components/modals/feedback-modal/feedback-modal.component.stories.ts +93 -0
- package/src/components/modals/feedback-modal/feedback-modal.component.ts +187 -0
- package/src/components/modals/help-modal/help-modal.component.html +32 -0
- package/src/components/modals/help-modal/help-modal.component.stories.ts +76 -0
- package/src/components/modals/help-modal/help-modal.component.ts +54 -0
- package/src/components/modals/information-modal/information-modal.component.html +24 -0
- package/src/components/modals/information-modal/information-modal.component.stories.ts +62 -0
- package/src/components/modals/information-modal/information-modal.component.ts +35 -0
- package/src/components/modals/main-modal/main-modal.component.html +85 -0
- package/src/components/modals/main-modal/main-modal.component.stories.ts +127 -0
- package/src/components/modals/main-modal/main-modal.component.ts +85 -0
- package/src/components/modals/notification-modal/notification-modal.component.html +22 -0
- package/src/components/modals/notification-modal/notification-modal.component.stories.ts +59 -0
- package/src/components/modals/notification-modal/notification-modal.component.ts +37 -0
- package/src/components/selectors/multiple-selector/multiple-selector.component.html +51 -0
- package/src/components/selectors/multiple-selector/multiple-selector.component.stories.ts +306 -0
- package/src/components/selectors/multiple-selector/multiple-selector.component.ts +308 -0
- package/src/components/selectors/single-selector/single-selector.component.html +46 -0
- package/src/components/selectors/single-selector/single-selector.component.stories.ts +294 -0
- package/src/components/selectors/single-selector/single-selector.component.ts +239 -0
- package/src/components/side-nav/side-nav.component.stories.ts +176 -0
- package/src/components/side-nav/side-nav.component.ts +325 -0
- package/src/components/snackbar/snackbar.component.ts +150 -0
- package/src/components/snackbar/snackbar.html +21 -0
- package/src/components/snackbar/snackbar.stories.ts +51 -0
- package/src/components/state/state.component.ts +30 -0
- package/src/components/state/state.html +13 -0
- package/src/components/state/state.stories.ts +74 -0
- package/src/components/table/table.component.html +466 -0
- package/src/components/table/table.component.scss +28 -0
- package/src/components/table/table.component.stories.ts +655 -0
- package/src/components/table/table.component.ts +475 -0
- package/src/components/tabs/tabs.component.stories.ts +114 -0
- package/src/components/tabs/tabs.component.ts +69 -0
- package/src/core/types.ts +494 -0
- package/src/public-api.ts +23 -0
- package/tsconfig.json +37 -0
- package/tsconfig.lib.json +17 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +13 -0
- package/fesm2022/aaamb-ngx-design-system.mjs +0 -4075
- package/fesm2022/aaamb-ngx-design-system.mjs.map +0 -1
- package/styles/compiled.css +0 -2
- package/types/aaamb-ngx-design-system.d.ts +0 -1142
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import type { Observable } from 'rxjs';
|
|
2
|
+
|
|
3
|
+
// =========================
|
|
4
|
+
// Button Component
|
|
5
|
+
// =========================
|
|
6
|
+
export type AdsButtonVariant = 'primary' | 'secondary';
|
|
7
|
+
export type AdsButtonColor = 'green' | 'white' | 'text';
|
|
8
|
+
export type AdsButtonType = 'button' | 'submit' | 'reset';
|
|
9
|
+
|
|
10
|
+
// =========================
|
|
11
|
+
// Input Component
|
|
12
|
+
// =========================
|
|
13
|
+
export type AdsInputType =
|
|
14
|
+
| 'text'
|
|
15
|
+
| 'text_area'
|
|
16
|
+
| 'number'
|
|
17
|
+
| 'cellphone'
|
|
18
|
+
| 'password'
|
|
19
|
+
| 'rate'
|
|
20
|
+
| 'search'
|
|
21
|
+
| 'payment_card';
|
|
22
|
+
|
|
23
|
+
// =========================
|
|
24
|
+
// Icon Component
|
|
25
|
+
// =========================
|
|
26
|
+
export const ICONS = {
|
|
27
|
+
add_square: 'add_square',
|
|
28
|
+
administrator_solid: 'administrator_solid',
|
|
29
|
+
ambulance: 'ambulance',
|
|
30
|
+
arrow_right: 'arrow_right',
|
|
31
|
+
blood_type: 'blood_type',
|
|
32
|
+
chart_bars: 'chart_bars',
|
|
33
|
+
chart_grid: 'chart_grid',
|
|
34
|
+
book: 'book',
|
|
35
|
+
bookmark: 'bookmark',
|
|
36
|
+
branchs: 'branchs',
|
|
37
|
+
building: 'building',
|
|
38
|
+
calendar: 'calendar',
|
|
39
|
+
calendar_check: 'calendar_check',
|
|
40
|
+
chat: 'chat',
|
|
41
|
+
error: 'error',
|
|
42
|
+
check: 'check',
|
|
43
|
+
check_list: 'check_list',
|
|
44
|
+
clipboard: 'clipboard',
|
|
45
|
+
controller_frame: 'controller_frame',
|
|
46
|
+
copy: 'copy',
|
|
47
|
+
delete: 'delete',
|
|
48
|
+
delete_trash: 'delete_trash',
|
|
49
|
+
device_add: 'device_add',
|
|
50
|
+
document: 'document',
|
|
51
|
+
document_upload: 'document_upload',
|
|
52
|
+
download_rounded: 'download_rounded',
|
|
53
|
+
edit: 'edit',
|
|
54
|
+
edit_calendar: 'edit_calendar',
|
|
55
|
+
eye: 'eye',
|
|
56
|
+
folder: 'folder',
|
|
57
|
+
folder_management: 'folder_management',
|
|
58
|
+
group: 'group',
|
|
59
|
+
hamburger: 'hamburger',
|
|
60
|
+
hide: 'hide',
|
|
61
|
+
history_rounded: 'history_rounded',
|
|
62
|
+
home: 'home',
|
|
63
|
+
home_solid: 'home_solid',
|
|
64
|
+
ia_agent: 'ia_agent',
|
|
65
|
+
info: 'info',
|
|
66
|
+
lightbulb: 'lightbulb',
|
|
67
|
+
mail: 'mail',
|
|
68
|
+
medical_user: 'medical_user',
|
|
69
|
+
menu_list: 'menu_list',
|
|
70
|
+
microphone: 'microphone',
|
|
71
|
+
minus: 'minus',
|
|
72
|
+
move_down: 'move_down',
|
|
73
|
+
open: 'open',
|
|
74
|
+
paper_edit: 'paper_edit',
|
|
75
|
+
pause: 'pause',
|
|
76
|
+
people: 'people',
|
|
77
|
+
phone: 'phone',
|
|
78
|
+
play: 'play',
|
|
79
|
+
play_filled: 'play_filled',
|
|
80
|
+
plus: 'plus',
|
|
81
|
+
queue_play: 'queue_play',
|
|
82
|
+
receipt: 'receipt',
|
|
83
|
+
replay: 'replay',
|
|
84
|
+
reset_settings: 'reset_settings',
|
|
85
|
+
scanner: 'scanner',
|
|
86
|
+
search: 'search',
|
|
87
|
+
settings: 'settings',
|
|
88
|
+
sharp: 'sharp',
|
|
89
|
+
sorting: 'sorting',
|
|
90
|
+
stop: 'stop',
|
|
91
|
+
table: 'table',
|
|
92
|
+
tune: 'tune',
|
|
93
|
+
upload_file: 'upload_file',
|
|
94
|
+
upload_rounded: 'upload_rounded',
|
|
95
|
+
user: 'user',
|
|
96
|
+
user_key: 'user_key',
|
|
97
|
+
users: 'users',
|
|
98
|
+
vital_sign: 'vital_sign',
|
|
99
|
+
warning: 'warning',
|
|
100
|
+
dolar_sign: 'dollar_sign',
|
|
101
|
+
icon_card: 'icon_card',
|
|
102
|
+
mastercard: 'mastercard',
|
|
103
|
+
visa: 'visa',
|
|
104
|
+
amex: 'amex',
|
|
105
|
+
discover: 'discover',
|
|
106
|
+
toggle_active: 'toggle_active',
|
|
107
|
+
toggle_inactive: 'toggle_inactive',
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type AdsIconName = keyof typeof ICONS;
|
|
111
|
+
|
|
112
|
+
// =========================
|
|
113
|
+
// Shared Visual State Tokens
|
|
114
|
+
// =========================
|
|
115
|
+
export enum containerShapes {
|
|
116
|
+
ROUNDED = 'rounded',
|
|
117
|
+
SQUARE = 'square',
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export enum stateBorderColors {
|
|
121
|
+
NEUTRAL = 'border-neutral-disabled-bg',
|
|
122
|
+
BORDER_AQUA1 = 'border-aqua-1',
|
|
123
|
+
BORDER_AQUA2 = 'border-aqua-2',
|
|
124
|
+
BORDER_AQUA3 = 'border-aqua-3',
|
|
125
|
+
BORDER_AQUA4 = 'border-aqua-4',
|
|
126
|
+
BORDER_AQUA5 = 'border-aqua-5',
|
|
127
|
+
BORDER_AQUA6 = 'border-aqua-6',
|
|
128
|
+
BORDER_AQUA7 = 'border-aqua-7',
|
|
129
|
+
BORDER_RED1 = 'border-red-1',
|
|
130
|
+
BORDER_RED2 = 'border-red-2',
|
|
131
|
+
BORDER_RED3 = 'border-red-3',
|
|
132
|
+
BORDER_RED4 = 'border-red-4',
|
|
133
|
+
BORDER_RED5 = 'border-red-5',
|
|
134
|
+
BORDER_RED6 = 'border-red-6',
|
|
135
|
+
BORDER_GREEN1 = 'border-green-1',
|
|
136
|
+
BORDER_GREEN2 = 'border-green-2',
|
|
137
|
+
BORDER_GREEN3 = 'border-green-3',
|
|
138
|
+
BORDER_GREEN4 = 'border-green-4',
|
|
139
|
+
BORDER_GREEN5 = 'border-green-5',
|
|
140
|
+
BORDER_GREEN6 = 'border-green-6',
|
|
141
|
+
BORDER_YELLOW1 = 'border-yellow-1',
|
|
142
|
+
BORDER_YELLOW2 = 'border-yellow-2',
|
|
143
|
+
BORDER_PURPLE1 = 'border-purple-1',
|
|
144
|
+
BORDER_PURPLE2 = 'border-purple-2',
|
|
145
|
+
BORDER_PURPLE3 = 'border-purple-3',
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export enum stateBackgroundColors {
|
|
149
|
+
NEUTRAL = 'bg-neutral-disabled-bg',
|
|
150
|
+
BG_AQUA1 = 'bg-aqua-1',
|
|
151
|
+
BG_AQUA2 = 'bg-aqua-2',
|
|
152
|
+
BG_AQUA3 = 'bg-aqua-3',
|
|
153
|
+
BG_AQUA4 = 'bg-aqua-4',
|
|
154
|
+
BG_AQUA5 = 'bg-aqua-5',
|
|
155
|
+
BG_AQUA6 = 'bg-aqua-6',
|
|
156
|
+
BG_AQUA7 = 'bg-aqua-7',
|
|
157
|
+
BG_RED1 = 'bg-red-1',
|
|
158
|
+
BG_RED2 = 'bg-red-2',
|
|
159
|
+
BG_RED3 = 'bg-red-3',
|
|
160
|
+
BG_RED4 = 'bg-red-4',
|
|
161
|
+
BG_RED5 = 'bg-red-5',
|
|
162
|
+
BG_RED6 = 'bg-red-6',
|
|
163
|
+
BG_GREEN1 = 'bg-green-1',
|
|
164
|
+
BG_GREEN2 = 'bg-green-2',
|
|
165
|
+
BG_GREEN3 = 'bg-green-3',
|
|
166
|
+
BG_GREEN4 = 'bg-green-4',
|
|
167
|
+
BG_GREEN5 = 'bg-green-5',
|
|
168
|
+
BG_GREEN6 = 'bg-green-6',
|
|
169
|
+
BG_YELLOW1 = 'bg-yellow-1',
|
|
170
|
+
BG_YELLOW2 = 'bg-yellow-2',
|
|
171
|
+
BG_PURPLE1 = 'bg-purple-1',
|
|
172
|
+
BG_PURPLE2 = 'bg-purple-2',
|
|
173
|
+
BG_PURPLE3 = 'bg-purple-3',
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export enum stateTextColors {
|
|
177
|
+
WHITE = 'text-white-base',
|
|
178
|
+
BLACK = 'text-aqua-base',
|
|
179
|
+
TEXT_AQUA1 = 'text-aqua-1',
|
|
180
|
+
TEXT_AQUA2 = 'text-aqua-2',
|
|
181
|
+
TEXT_AQUA3 = 'text-aqua-3',
|
|
182
|
+
TEXT_AQUA4 = 'text-aqua-4',
|
|
183
|
+
TEXT_AQUA5 = 'text-aqua-5',
|
|
184
|
+
TEXT_AQUA6 = 'text-aqua-6',
|
|
185
|
+
TEXT_AQUA7 = 'text-aqua-7',
|
|
186
|
+
TEXT_RED1 = 'text-red-1',
|
|
187
|
+
TEXT_RED2 = 'text-red-2',
|
|
188
|
+
TEXT_RED3 = 'text-red-3',
|
|
189
|
+
TEXT_RED4 = 'text-red-4',
|
|
190
|
+
TEXT_RED5 = 'text-red-5',
|
|
191
|
+
TEXT_RED6 = 'text-red-6',
|
|
192
|
+
TEXT_GREEN1 = 'text-green-1',
|
|
193
|
+
TEXT_GREEN2 = 'text-green-2',
|
|
194
|
+
TEXT_GREEN3 = 'text-green-3',
|
|
195
|
+
TEXT_GREEN4 = 'text-green-4',
|
|
196
|
+
TEXT_GREEN5 = 'text-green-5',
|
|
197
|
+
TEXT_GREEN6 = 'text-green-6',
|
|
198
|
+
TEXT_YELLOW1 = 'text-yellow-1',
|
|
199
|
+
TEXT_YELLOW2 = 'text-yellow-2',
|
|
200
|
+
TEXT_PURPLE1 = 'text-purple-1',
|
|
201
|
+
TEXT_PURPLE2 = 'text-purple-2',
|
|
202
|
+
TEXT_PURPLE3 = 'text-purple-3',
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// =========================
|
|
206
|
+
// Snackbar Component
|
|
207
|
+
// =========================
|
|
208
|
+
export type SnackbarAlertType = 'error' | 'info' | 'warning' | 'success';
|
|
209
|
+
|
|
210
|
+
export type SnackbarAlert = {
|
|
211
|
+
id: number;
|
|
212
|
+
type: SnackbarAlertType;
|
|
213
|
+
message: string;
|
|
214
|
+
icon?: AdsIconName;
|
|
215
|
+
remainingMs: number;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
// =========================
|
|
219
|
+
// Main Modal Component
|
|
220
|
+
// =========================
|
|
221
|
+
export type AdsMainModalAction = {
|
|
222
|
+
id?: string;
|
|
223
|
+
text: string;
|
|
224
|
+
variant?: AdsButtonVariant;
|
|
225
|
+
color?: AdsButtonColor;
|
|
226
|
+
buttonType?: AdsButtonType;
|
|
227
|
+
disabled?: boolean;
|
|
228
|
+
callback?: () => void;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
export type AdsMainModalActionsAlign = 'start' | 'center' | 'end';
|
|
232
|
+
|
|
233
|
+
// =========================
|
|
234
|
+
// Checkbox Component
|
|
235
|
+
// =========================
|
|
236
|
+
export type AdsCheckboxAppearance = 'square' | 'toggle' | 'radio';
|
|
237
|
+
export type AdsCheckboxLabelPosition = 'left' | 'right';
|
|
238
|
+
export type AdsCheckboxLabelColor = 'green' | 'white';
|
|
239
|
+
|
|
240
|
+
// =========================
|
|
241
|
+
// Input Payment Card Component
|
|
242
|
+
// =========================
|
|
243
|
+
export type PaymentCardBrand =
|
|
244
|
+
| 'visa'
|
|
245
|
+
| 'mastercard'
|
|
246
|
+
| 'amex'
|
|
247
|
+
| 'discover'
|
|
248
|
+
| 'icon_card';
|
|
249
|
+
|
|
250
|
+
// =========================
|
|
251
|
+
// Datepicker Selector Component
|
|
252
|
+
// =========================
|
|
253
|
+
export type PickerMode =
|
|
254
|
+
| 'annually'
|
|
255
|
+
| 'monthly'
|
|
256
|
+
| 'weekly'
|
|
257
|
+
| 'quarterly'
|
|
258
|
+
| 'daily';
|
|
259
|
+
|
|
260
|
+
export type DatepickerSelectorButtonLabelMode = 'option' | 'selection';
|
|
261
|
+
|
|
262
|
+
export type PickerOption = {
|
|
263
|
+
mode: PickerMode;
|
|
264
|
+
label: string;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// =========================
|
|
268
|
+
// Feedback Modal Component
|
|
269
|
+
// =========================
|
|
270
|
+
export type FeedbackPayload = {
|
|
271
|
+
subject: string;
|
|
272
|
+
category: string;
|
|
273
|
+
description: string;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
export type FeedbackResponseType = 'success' | 'error';
|
|
277
|
+
|
|
278
|
+
// =========================
|
|
279
|
+
// Single Selector Component
|
|
280
|
+
// =========================
|
|
281
|
+
export type AdsSingleSelectorValue = string | number | boolean | null;
|
|
282
|
+
|
|
283
|
+
export type AdsSingleSelectorOption = {
|
|
284
|
+
label: string;
|
|
285
|
+
value: AdsSingleSelectorValue;
|
|
286
|
+
disabled?: boolean;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export type AdsSingleSelectorOptionGroup = {
|
|
290
|
+
label: string;
|
|
291
|
+
children: AdsSingleSelectorOption[];
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export type AdsSingleSelectorOptionOrGroup =
|
|
295
|
+
| AdsSingleSelectorOption
|
|
296
|
+
| AdsSingleSelectorOptionGroup;
|
|
297
|
+
|
|
298
|
+
export type AdsSingleSelectorAsyncOptions =
|
|
299
|
+
| Promise<AdsSingleSelectorOptionOrGroup[]>
|
|
300
|
+
| Observable<AdsSingleSelectorOptionOrGroup[]>;
|
|
301
|
+
|
|
302
|
+
// =========================
|
|
303
|
+
// Multiple Selector Component
|
|
304
|
+
// =========================
|
|
305
|
+
export type AdsMultipleSelectorValue = string | number;
|
|
306
|
+
|
|
307
|
+
export type AdsMultipleSelectorOption = {
|
|
308
|
+
label: string;
|
|
309
|
+
value: AdsMultipleSelectorValue;
|
|
310
|
+
disabled?: boolean;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export type AdsMultipleSelectorOptionGroup = {
|
|
314
|
+
label: string;
|
|
315
|
+
children: AdsMultipleSelectorOption[];
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export type AdsMultipleSelectorOptionOrGroup =
|
|
319
|
+
| AdsMultipleSelectorOption
|
|
320
|
+
| AdsMultipleSelectorOptionGroup;
|
|
321
|
+
|
|
322
|
+
export type AdsMultipleSelectorAsyncOptions =
|
|
323
|
+
| Promise<AdsMultipleSelectorOptionOrGroup[]>
|
|
324
|
+
| Observable<AdsMultipleSelectorOptionOrGroup[]>;
|
|
325
|
+
|
|
326
|
+
// =========================
|
|
327
|
+
// Side Nav Component
|
|
328
|
+
// =========================
|
|
329
|
+
export type AdsSideNavFooterButton = {
|
|
330
|
+
icon: AdsIconName;
|
|
331
|
+
text: string;
|
|
332
|
+
callback: () => void;
|
|
333
|
+
disabled?: boolean;
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
export type AdsSideNavRoute = string | string[] | readonly string[];
|
|
337
|
+
|
|
338
|
+
export type AdsSideNavChildOption = {
|
|
339
|
+
name: string;
|
|
340
|
+
url: string;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
export type AdsSideNavOption = {
|
|
344
|
+
icon?: AdsIconName;
|
|
345
|
+
name: string;
|
|
346
|
+
url?: AdsSideNavRoute;
|
|
347
|
+
children?: AdsSideNavChildOption[];
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// =========================
|
|
351
|
+
// Filter Button Component
|
|
352
|
+
// =========================
|
|
353
|
+
export type AdsFilterButtonValueType =
|
|
354
|
+
| 'text'
|
|
355
|
+
| 'number'
|
|
356
|
+
| 'date'
|
|
357
|
+
| 'boolean'
|
|
358
|
+
| 'status'
|
|
359
|
+
| 'codes'
|
|
360
|
+
| 'custom';
|
|
361
|
+
|
|
362
|
+
export type AdsFilterButtonOption = AdsSingleSelectorOption & {
|
|
363
|
+
valueType?: AdsFilterButtonValueType;
|
|
364
|
+
customOptions?: AdsSingleSelectorOption[];
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
export type AdsFilterButtonRow = {
|
|
368
|
+
column: AdsSingleSelectorValue | null;
|
|
369
|
+
value: string;
|
|
370
|
+
valueType: AdsFilterButtonValueType;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
export type AdsFilterButtonSortDirection = 'ASC' | 'DESC';
|
|
374
|
+
|
|
375
|
+
export type AdsFilterButtonSortRow = {
|
|
376
|
+
column: AdsSingleSelectorValue | null;
|
|
377
|
+
direction: AdsFilterButtonSortDirection;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
// =========================
|
|
381
|
+
// Tabs Component
|
|
382
|
+
// =========================
|
|
383
|
+
export interface Tab {
|
|
384
|
+
id: string;
|
|
385
|
+
name: string;
|
|
386
|
+
description?: string;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// =========================
|
|
390
|
+
// Table Component
|
|
391
|
+
// =========================
|
|
392
|
+
export type TableDragDropEvent = {
|
|
393
|
+
previousIndex: number;
|
|
394
|
+
currentIndex: number;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
export type TableActionButton<T = any> = {
|
|
398
|
+
icon: string;
|
|
399
|
+
tooltip: string | ((row: T) => string);
|
|
400
|
+
callback: (row: T) => void;
|
|
401
|
+
condition?: (row: T) => boolean;
|
|
402
|
+
disabled?: (row: T) => boolean;
|
|
403
|
+
type?: 'icon' | 'image';
|
|
404
|
+
imagePath?: string;
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
export type TableSortDirection = 'ASC' | 'DESC';
|
|
408
|
+
|
|
409
|
+
export type TableSortCriterion = {
|
|
410
|
+
field: string;
|
|
411
|
+
direction: TableSortDirection;
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
export type TablePropertyType =
|
|
415
|
+
| 'text'
|
|
416
|
+
| 'number'
|
|
417
|
+
| 'currency'
|
|
418
|
+
| 'date'
|
|
419
|
+
| 'boolean'
|
|
420
|
+
| 'status';
|
|
421
|
+
|
|
422
|
+
export type TableStateStyle = {
|
|
423
|
+
text?: string;
|
|
424
|
+
borderColor: stateBorderColors;
|
|
425
|
+
bgColor: stateBackgroundColors;
|
|
426
|
+
textColor: stateTextColors;
|
|
427
|
+
shape?: containerShapes;
|
|
428
|
+
boldText?: boolean;
|
|
429
|
+
fullWidth?: boolean;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
export type TableStateStylesMap = Record<string, TableStateStyle>;
|
|
433
|
+
|
|
434
|
+
// =========================
|
|
435
|
+
// Table Storybook Types
|
|
436
|
+
// =========================
|
|
437
|
+
export type StoryTableRowData = {
|
|
438
|
+
id: number;
|
|
439
|
+
patient: string;
|
|
440
|
+
encounter: string;
|
|
441
|
+
amount: string;
|
|
442
|
+
status: string;
|
|
443
|
+
active: boolean;
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
export type StoryTableColumn = {
|
|
447
|
+
id: string;
|
|
448
|
+
header: string;
|
|
449
|
+
size: number;
|
|
450
|
+
meta: {
|
|
451
|
+
originalProperty: string;
|
|
452
|
+
isSortable: boolean;
|
|
453
|
+
propertyType: TablePropertyType;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
export type StoryTableCellContext = {
|
|
458
|
+
getValue: () => unknown;
|
|
459
|
+
row: StoryTableRow;
|
|
460
|
+
column: StoryTableColumn;
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
export type StoryTableCell = {
|
|
464
|
+
id: string;
|
|
465
|
+
column: {
|
|
466
|
+
columnDef: {
|
|
467
|
+
cell: (context: StoryTableCellContext) => string;
|
|
468
|
+
meta: StoryTableColumn['meta'];
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
getContext: () => StoryTableCellContext;
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
export type StoryTableRow = {
|
|
475
|
+
original: StoryTableRowData;
|
|
476
|
+
getVisibleCells: () => StoryTableCell[];
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
export type StoryTableHeader = {
|
|
480
|
+
id: string;
|
|
481
|
+
getSize: () => number;
|
|
482
|
+
column: {
|
|
483
|
+
columnDef: {
|
|
484
|
+
header: string;
|
|
485
|
+
meta: StoryTableColumn['meta'];
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
export type StoryTable = {
|
|
491
|
+
getHeaderGroups: () => Array<{ headers: StoryTableHeader[] }>;
|
|
492
|
+
getRowModel: () => { rows: StoryTableRow[] };
|
|
493
|
+
getState: () => { columnSizing: Record<string, number> };
|
|
494
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './core/types';
|
|
2
|
+
export * from './components/button/button.component';
|
|
3
|
+
export * from './components/icon/icon.component';
|
|
4
|
+
export * from './components/checkbox/checkbox.component';
|
|
5
|
+
export * from './components/input/input.component';
|
|
6
|
+
export * from './components/state/state.component';
|
|
7
|
+
export * from './components/snackbar/snackbar.component';
|
|
8
|
+
export * from './components/input-datepicker/input-datepicker.component';
|
|
9
|
+
export * from './components/input-rangepicker/input-rangepicker.component';
|
|
10
|
+
export * from './components/input-weekpicker/input-weekpicker.component';
|
|
11
|
+
export * from './components/datepicker-selector/datepicker-selector.component';
|
|
12
|
+
export * from './components/filter-button/filter-button.component';
|
|
13
|
+
export * from './components/tabs/tabs.component';
|
|
14
|
+
export * from './components/side-nav/side-nav.component';
|
|
15
|
+
export * from './components/selectors/single-selector/single-selector.component';
|
|
16
|
+
export * from './components/selectors/multiple-selector/multiple-selector.component';
|
|
17
|
+
export * from './components/modals/main-modal/main-modal.component';
|
|
18
|
+
export * from './components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component';
|
|
19
|
+
export * from './components/modals/information-modal/information-modal.component';
|
|
20
|
+
export * from './components/modals/notification-modal/notification-modal.component';
|
|
21
|
+
export * from './components/modals/help-modal/help-modal.component';
|
|
22
|
+
export * from './components/modals/feedback-modal/feedback-modal.component';
|
|
23
|
+
export * from './components/table/table.component';
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"strict": true,
|
|
5
|
+
"noImplicitOverride": true,
|
|
6
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
7
|
+
"noImplicitReturns": true,
|
|
8
|
+
"paths": {
|
|
9
|
+
"ngx-aaamb-design-system": [
|
|
10
|
+
"./dist/ngx-aaamb-design-system"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"noFallthroughCasesInSwitch": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"experimentalDecorators": true,
|
|
17
|
+
"importHelpers": true,
|
|
18
|
+
"target": "ES2022",
|
|
19
|
+
"module": "preserve"
|
|
20
|
+
},
|
|
21
|
+
"angularCompilerOptions": {
|
|
22
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
23
|
+
"strictInjectionParameters": true,
|
|
24
|
+
"strictInputAccessModifiers": true,
|
|
25
|
+
"typeCheckHostBindings": true,
|
|
26
|
+
"strictTemplates": true
|
|
27
|
+
},
|
|
28
|
+
"files": [],
|
|
29
|
+
"references": [
|
|
30
|
+
{
|
|
31
|
+
"path": "./tsconfig.lib.json"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "./tsconfig.spec.json"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/lib",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"declarationMap": true,
|
|
7
|
+
"inlineSources": true,
|
|
8
|
+
"types": []
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"src/**/*.ts"
|
|
12
|
+
],
|
|
13
|
+
"exclude": [
|
|
14
|
+
"**/*.spec.ts",
|
|
15
|
+
"**/*.stories.ts"
|
|
16
|
+
]
|
|
17
|
+
}
|