commons-shared-web-ui 0.0.38 → 0.0.40
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/fesm2022/commons-shared-web-ui.mjs +1582 -1346
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +76 -8
- package/package.json +1 -1
- package/src/lib/modules/alert/alert.theme.scss +84 -84
- package/src/lib/modules/button/button.theme.scss +120 -120
- package/src/lib/modules/configurable-form/configurable-form.theme.scss +77 -77
- package/src/lib/modules/confirmation-modal/confirmation-modal.theme.scss +86 -86
- package/src/lib/modules/filter/filter.theme.scss +91 -91
- package/src/lib/modules/filter-sidebar/filter-sidebar.theme.scss +37 -37
- package/src/lib/modules/filter-table-selector/filter-table-selector.theme.scss +36 -36
- package/src/lib/modules/form-builder/form-builder.theme.scss +212 -212
- package/src/lib/modules/form-components/components/checkbox/_theme.scss +62 -62
- package/src/lib/modules/form-components/components/datepicker/_theme.scss +81 -81
- package/src/lib/modules/form-components/components/dropdown/_theme.scss +90 -90
- package/src/lib/modules/form-components/components/input/_theme.scss +76 -76
- package/src/lib/modules/form-components/components/radio/_theme.scss +60 -60
- package/src/lib/modules/form-components/components/search/_theme.scss +72 -72
- package/src/lib/modules/form-components/components/toggle/_theme.scss +44 -44
- package/src/lib/modules/form-components/form-components.theme.scss +24 -24
- package/src/lib/modules/nav/nav.theme.scss +86 -86
- package/src/lib/modules/pagination/pagination.theme.scss +66 -66
- package/src/lib/modules/side-nav/side-nav.theme.scss +111 -111
- package/src/lib/modules/smart-form/smart-form.theme.scss +889 -889
- package/src/lib/modules/smart-table/smart-table.theme.scss +335 -323
- package/src/lib/modules/snackbar/snackbar.theme.scss +93 -93
- package/src/lib/modules/summary-card/summary-card.theme.scss +175 -175
- package/src/lib/styles/global.scss +151 -134
- package/src/lib/styles/utilities.scss +250 -250
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
|
9
9
|
import * as i3$2 from '@angular/router';
|
|
10
10
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
11
11
|
import { BehaviorSubject, Subject, Observable } from 'rxjs';
|
|
12
|
-
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
12
|
+
import { DomSanitizer, SafeResourceUrl, SafeHtml } from '@angular/platform-browser';
|
|
13
13
|
import * as i1 from '@angular/material/card';
|
|
14
14
|
import * as i3 from '@angular/material/checkbox';
|
|
15
15
|
import * as i4 from '@angular/material/divider';
|
|
@@ -1388,6 +1388,7 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1388
1388
|
value: any;
|
|
1389
1389
|
isVisible: boolean;
|
|
1390
1390
|
showPassword: boolean;
|
|
1391
|
+
isMultiDropdownOpen: boolean;
|
|
1391
1392
|
isDragOver: boolean;
|
|
1392
1393
|
fileUploadError: string;
|
|
1393
1394
|
multiSaveError: string;
|
|
@@ -1462,6 +1463,14 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1462
1463
|
constructor(fb: FormBuilder, expressionService: ExpressionService, http: HttpClient);
|
|
1463
1464
|
ngOnInit(): void;
|
|
1464
1465
|
get addMultiLabel(): string;
|
|
1466
|
+
/** Getter for Select placeholder label */
|
|
1467
|
+
get selectPlaceholderLabel(): string;
|
|
1468
|
+
/** Getter for No options available label */
|
|
1469
|
+
get noOptionsAvailableLabel(): string;
|
|
1470
|
+
/** Getter for expand less icon name */
|
|
1471
|
+
get expandLessLabel(): string;
|
|
1472
|
+
/** Getter for expand more icon name */
|
|
1473
|
+
get expandMoreLabel(): string;
|
|
1465
1474
|
private initGroupField;
|
|
1466
1475
|
/**
|
|
1467
1476
|
* Sets up cross-field validation based on the `onValidate` formula.
|
|
@@ -1515,6 +1524,10 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1515
1524
|
get errorMessage(): string;
|
|
1516
1525
|
get showCharCount(): boolean;
|
|
1517
1526
|
get remainingCharacters(): number | null;
|
|
1527
|
+
toggleMultiDropdown(event: MouseEvent): void;
|
|
1528
|
+
onDocumentClick(): void;
|
|
1529
|
+
onEscapeKey(): void;
|
|
1530
|
+
get multiSelectedCount(): number;
|
|
1518
1531
|
get isTextField(): boolean;
|
|
1519
1532
|
get isNumberField(): boolean;
|
|
1520
1533
|
get isDateField(): boolean;
|
|
@@ -1975,10 +1988,13 @@ declare class DropdownComponent implements ControlValueAccessor, OnInit, OnChang
|
|
|
1975
1988
|
private get validOptions();
|
|
1976
1989
|
private updateFromConfig;
|
|
1977
1990
|
private updateFromLabels;
|
|
1978
|
-
get
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1991
|
+
get resolvedLabels(): {
|
|
1992
|
+
requiredMarker: string;
|
|
1993
|
+
searchPlaceholder: string;
|
|
1994
|
+
selectedSuffix: string;
|
|
1995
|
+
clearAriaLabel: string;
|
|
1996
|
+
noResultsFound: string;
|
|
1997
|
+
};
|
|
1982
1998
|
writeValue(value: any): void;
|
|
1983
1999
|
registerOnChange(fn: any): void;
|
|
1984
2000
|
registerOnTouched(fn: any): void;
|
|
@@ -3166,6 +3182,18 @@ interface TableOption {
|
|
|
3166
3182
|
label: string;
|
|
3167
3183
|
value: any;
|
|
3168
3184
|
}
|
|
3185
|
+
interface TableColumnSubField {
|
|
3186
|
+
key: string;
|
|
3187
|
+
label?: string;
|
|
3188
|
+
dataType: 'text' | 'number' | 'email' | 'select' | 'date';
|
|
3189
|
+
placeholder?: string;
|
|
3190
|
+
editable?: boolean;
|
|
3191
|
+
options?: TableOption[];
|
|
3192
|
+
editConfig?: {
|
|
3193
|
+
disabled?: boolean;
|
|
3194
|
+
defaultValue?: any;
|
|
3195
|
+
};
|
|
3196
|
+
}
|
|
3169
3197
|
interface TableColumn {
|
|
3170
3198
|
key: string;
|
|
3171
3199
|
label: string;
|
|
@@ -3185,6 +3213,11 @@ interface TableColumn {
|
|
|
3185
3213
|
dateFormat?: string;
|
|
3186
3214
|
clickAction?: 'route' | 'callback';
|
|
3187
3215
|
clickRoute?: string;
|
|
3216
|
+
subFields?: TableColumnSubField[];
|
|
3217
|
+
editConfig?: {
|
|
3218
|
+
disabled?: boolean;
|
|
3219
|
+
defaultValue?: any;
|
|
3220
|
+
};
|
|
3188
3221
|
}
|
|
3189
3222
|
interface TableFilter {
|
|
3190
3223
|
key: string;
|
|
@@ -3292,6 +3325,7 @@ interface TableConfig {
|
|
|
3292
3325
|
stickyColumnCount?: number;
|
|
3293
3326
|
token?: string;
|
|
3294
3327
|
tokenHeader?: string;
|
|
3328
|
+
editingRowClass?: string;
|
|
3295
3329
|
}
|
|
3296
3330
|
interface SearchConfig {
|
|
3297
3331
|
enabled: boolean;
|
|
@@ -3305,6 +3339,13 @@ interface TableLabels {
|
|
|
3305
3339
|
noDataMessage?: string;
|
|
3306
3340
|
itemsPerPageLabel?: string;
|
|
3307
3341
|
defaultConfirmationMessage?: string;
|
|
3342
|
+
saveLabel?: string;
|
|
3343
|
+
cancelLabel?: string;
|
|
3344
|
+
addLabel?: string;
|
|
3345
|
+
/** Variant for the Add button (new row). Defaults to 'danger'. */
|
|
3346
|
+
addButtonVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
|
|
3347
|
+
/** Variant for the Save button (edit row). Defaults to 'primary'. */
|
|
3348
|
+
saveButtonVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
|
|
3308
3349
|
}
|
|
3309
3350
|
/**
|
|
3310
3351
|
* Emitted by the SmartTableComponent when operating in external-data mode
|
|
@@ -3322,6 +3363,10 @@ interface TableDataChangeEvent {
|
|
|
3322
3363
|
[key: string]: any;
|
|
3323
3364
|
};
|
|
3324
3365
|
}
|
|
3366
|
+
interface TableRowSaveEvent {
|
|
3367
|
+
row: any;
|
|
3368
|
+
isNew: boolean;
|
|
3369
|
+
}
|
|
3325
3370
|
|
|
3326
3371
|
/**
|
|
3327
3372
|
* Maps a SmartForm field name to its corresponding API query-param key.
|
|
@@ -3563,10 +3608,13 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3563
3608
|
pageChange: EventEmitter<TableDataChangeEvent>;
|
|
3564
3609
|
/** Emitted in external-data mode when the user types in the search box. */
|
|
3565
3610
|
searchChange: EventEmitter<TableDataChangeEvent>;
|
|
3611
|
+
/** Emitted when an inline-edited or inline-added row is saved. */
|
|
3612
|
+
rowSave: EventEmitter<TableRowSaveEvent>;
|
|
3566
3613
|
data: any[];
|
|
3567
3614
|
totalItems: number;
|
|
3568
3615
|
currentPage: number;
|
|
3569
3616
|
loading: boolean;
|
|
3617
|
+
originalRowsCache: Map<any, any>;
|
|
3570
3618
|
activeSort: {
|
|
3571
3619
|
key: string;
|
|
3572
3620
|
direction: 'ASC' | 'DESC';
|
|
@@ -3666,8 +3714,28 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
3666
3714
|
private getHeaders;
|
|
3667
3715
|
toggleDropdown(id: string, event: Event, items: any[], row: any): void;
|
|
3668
3716
|
closeDropdown(): void;
|
|
3717
|
+
onCancelRow(row: any, index: number): void;
|
|
3718
|
+
onSaveRow(row: any): void;
|
|
3719
|
+
/** Convert any parseable date value to a native Date object for mat-datepicker binding. */
|
|
3720
|
+
private toDateObject;
|
|
3721
|
+
/** Pre-process all date columns on a row before entering edit mode. */
|
|
3722
|
+
private prepareDateFieldsForEdit;
|
|
3723
|
+
/** Normalize Date objects back to ISO strings before sending payloads. */
|
|
3724
|
+
private normalizeDateFieldsForSave;
|
|
3669
3725
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableComponent, never>;
|
|
3670
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableComponent, "lib-smart-table", never, { "config": { "alias": "config"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "totalItemsCount": { "alias": "totalItemsCount"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; }, { "action": "action"; "topAction": "topAction"; "filterChange": "filterChange"; "rowSelect": "rowSelect"; "columnClick": "columnClick"; "sortChange": "sortChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; }, never, never, false, never>;
|
|
3726
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableComponent, "lib-smart-table", never, { "config": { "alias": "config"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "totalItemsCount": { "alias": "totalItemsCount"; "required": false; }; "selectedRows": { "alias": "selectedRows"; "required": false; }; }, { "action": "action"; "topAction": "topAction"; "filterChange": "filterChange"; "rowSelect": "rowSelect"; "columnClick": "columnClick"; "sortChange": "sortChange"; "pageChange": "pageChange"; "searchChange": "searchChange"; "rowSave": "rowSave"; }, never, never, false, never>;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
/**
|
|
3730
|
+
* Sanitizes and bypasses Angular's DomSanitizer security for HTML content.
|
|
3731
|
+
* Prevents execution of unsafe scripts/attributes while allowing safe rendering of formatting tags in [innerHTML].
|
|
3732
|
+
*/
|
|
3733
|
+
declare class SafeHtmlPipe implements PipeTransform {
|
|
3734
|
+
private sanitizer;
|
|
3735
|
+
constructor(sanitizer: DomSanitizer);
|
|
3736
|
+
transform(value: string): SafeHtml | null;
|
|
3737
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
|
|
3738
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", false>;
|
|
3671
3739
|
}
|
|
3672
3740
|
|
|
3673
3741
|
interface PaginationLabels {
|
|
@@ -3709,7 +3777,7 @@ declare class PaginationModule {
|
|
|
3709
3777
|
|
|
3710
3778
|
declare class SmartTableModule {
|
|
3711
3779
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableModule, never>;
|
|
3712
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SmartTableModule, [typeof SmartTableComponent], [typeof i2$1.CommonModule, typeof i3$1.FormsModule, typeof PaginationModule, typeof ButtonModule, typeof MaterialModule, typeof ConfirmationModalModule], [typeof SmartTableComponent]>;
|
|
3780
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SmartTableModule, [typeof SmartTableComponent, typeof SafeHtmlPipe], [typeof i2$1.CommonModule, typeof i3$1.FormsModule, typeof PaginationModule, typeof ButtonModule, typeof MaterialModule, typeof ConfirmationModalModule], [typeof SmartTableComponent]>;
|
|
3713
3781
|
static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
|
|
3714
3782
|
}
|
|
3715
3783
|
|
|
@@ -3898,4 +3966,4 @@ declare class SnackbarModule {
|
|
|
3898
3966
|
}
|
|
3899
3967
|
|
|
3900
3968
|
export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FieldConfiguratorComponent, FieldSelectionComponent, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FilterTableSelectorComponent, FilterTableSelectorModule, FormBuilderModule, FormComponentsModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
|
|
3901
|
-
export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
|
|
3969
|
+
export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableColumnSubField, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableRowSaveEvent, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
|
package/package.json
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
$default-alert-config: (
|
|
4
|
-
font-family: ('Roboto', sans-serif),
|
|
5
|
-
|
|
6
|
-
// Structure (Default values in rem, assuming 16px root)
|
|
7
|
-
padding: 1rem 2rem,
|
|
8
|
-
// 16px 32px
|
|
9
|
-
radius: 0.75rem,
|
|
10
|
-
// 12px
|
|
11
|
-
gap: 1rem,
|
|
12
|
-
// 16px
|
|
13
|
-
|
|
14
|
-
// Icon
|
|
15
|
-
icon-size: 1.25rem,
|
|
16
|
-
// 20px
|
|
17
|
-
icon-margin-top: 0.125rem,
|
|
18
|
-
// 2px
|
|
19
|
-
|
|
20
|
-
// Text
|
|
21
|
-
title-size: 1rem,
|
|
22
|
-
// 16px
|
|
23
|
-
title-line-height: 1.5rem,
|
|
24
|
-
// 24px
|
|
25
|
-
message-size: 0.875rem,
|
|
26
|
-
// 14px
|
|
27
|
-
|
|
28
|
-
// Info
|
|
29
|
-
info-bg: #F1F3F4,
|
|
30
|
-
info-color: #3C4043,
|
|
31
|
-
|
|
32
|
-
// Warning
|
|
33
|
-
warning-bg: #F9C80E1F,
|
|
34
|
-
warning-color: #3C4043,
|
|
35
|
-
// Default text color for warning usually dark
|
|
36
|
-
warning-title-color: #3C4043,
|
|
37
|
-
// Making title dark for better contrast with light yellow bg
|
|
38
|
-
warning-shadow: none,
|
|
39
|
-
// Removing shadow as per clean flat design, or keeping if specified. User said "warning-shadow" variant exists.
|
|
40
|
-
|
|
41
|
-
// Success
|
|
42
|
-
success-bg: #E6F4EA,
|
|
43
|
-
// Light green similar to Info/Error pattern
|
|
44
|
-
success-color: #16A34A,
|
|
45
|
-
|
|
46
|
-
// Error
|
|
47
|
-
error-bg: #FCE8E6,
|
|
48
|
-
// Light red
|
|
49
|
-
error-color: #D93025
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
@mixin alert-theme($user-config: ()) {
|
|
53
|
-
$config: map.merge($default-alert-config, $user-config);
|
|
54
|
-
|
|
55
|
-
--cc-alert-font-family: #{map.get($config, font-family)};
|
|
56
|
-
|
|
57
|
-
// Structure
|
|
58
|
-
--cc-alert-padding: #{map.get($config, padding)};
|
|
59
|
-
--cc-alert-radius: #{map.get($config, radius)};
|
|
60
|
-
--cc-alert-gap: #{map.get($config, gap)};
|
|
61
|
-
|
|
62
|
-
// Icon
|
|
63
|
-
--cc-alert-icon-size: #{map.get($config, icon-size)};
|
|
64
|
-
--cc-alert-icon-margin-top: #{map.get($config, icon-margin-top)};
|
|
65
|
-
|
|
66
|
-
// Text
|
|
67
|
-
--cc-alert-title-size: #{map.get($config, title-size)};
|
|
68
|
-
--cc-alert-title-line-height: #{map.get($config, title-line-height)};
|
|
69
|
-
--cc-alert-message-size: #{map.get($config, message-size)};
|
|
70
|
-
|
|
71
|
-
// Colors
|
|
72
|
-
--cc-alert-info-bg: #{map.get($config, info-bg)};
|
|
73
|
-
--cc-alert-info-color: #{map.get($config, info-color)};
|
|
74
|
-
|
|
75
|
-
--cc-alert-warning-bg: #{map.get($config, warning-bg)};
|
|
76
|
-
--cc-alert-warning-color: #{map.get($config, warning-color)};
|
|
77
|
-
--cc-alert-warning-title-color: #{map.get($config, warning-title-color)};
|
|
78
|
-
--cc-alert-warning-shadow: #{map.get($config, warning-shadow)};
|
|
79
|
-
--cc-alert-success-bg: #{map.get($config, success-bg)};
|
|
80
|
-
--cc-alert-success-color: #{map.get($config, success-color)};
|
|
81
|
-
|
|
82
|
-
--cc-alert-error-bg: #{map.get($config, error-bg)};
|
|
83
|
-
--cc-alert-error-color: #{map.get($config, error-color)};
|
|
84
|
-
--cc-alert-warning-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.25); // 0px 4px 4px
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$default-alert-config: (
|
|
4
|
+
font-family: ('Roboto', sans-serif),
|
|
5
|
+
|
|
6
|
+
// Structure (Default values in rem, assuming 16px root)
|
|
7
|
+
padding: 1rem 2rem,
|
|
8
|
+
// 16px 32px
|
|
9
|
+
radius: 0.75rem,
|
|
10
|
+
// 12px
|
|
11
|
+
gap: 1rem,
|
|
12
|
+
// 16px
|
|
13
|
+
|
|
14
|
+
// Icon
|
|
15
|
+
icon-size: 1.25rem,
|
|
16
|
+
// 20px
|
|
17
|
+
icon-margin-top: 0.125rem,
|
|
18
|
+
// 2px
|
|
19
|
+
|
|
20
|
+
// Text
|
|
21
|
+
title-size: 1rem,
|
|
22
|
+
// 16px
|
|
23
|
+
title-line-height: 1.5rem,
|
|
24
|
+
// 24px
|
|
25
|
+
message-size: 0.875rem,
|
|
26
|
+
// 14px
|
|
27
|
+
|
|
28
|
+
// Info
|
|
29
|
+
info-bg: #F1F3F4,
|
|
30
|
+
info-color: #3C4043,
|
|
31
|
+
|
|
32
|
+
// Warning
|
|
33
|
+
warning-bg: #F9C80E1F,
|
|
34
|
+
warning-color: #3C4043,
|
|
35
|
+
// Default text color for warning usually dark
|
|
36
|
+
warning-title-color: #3C4043,
|
|
37
|
+
// Making title dark for better contrast with light yellow bg
|
|
38
|
+
warning-shadow: none,
|
|
39
|
+
// Removing shadow as per clean flat design, or keeping if specified. User said "warning-shadow" variant exists.
|
|
40
|
+
|
|
41
|
+
// Success
|
|
42
|
+
success-bg: #E6F4EA,
|
|
43
|
+
// Light green similar to Info/Error pattern
|
|
44
|
+
success-color: #16A34A,
|
|
45
|
+
|
|
46
|
+
// Error
|
|
47
|
+
error-bg: #FCE8E6,
|
|
48
|
+
// Light red
|
|
49
|
+
error-color: #D93025
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
@mixin alert-theme($user-config: ()) {
|
|
53
|
+
$config: map.merge($default-alert-config, $user-config);
|
|
54
|
+
|
|
55
|
+
--cc-alert-font-family: #{map.get($config, font-family)};
|
|
56
|
+
|
|
57
|
+
// Structure
|
|
58
|
+
--cc-alert-padding: #{map.get($config, padding)};
|
|
59
|
+
--cc-alert-radius: #{map.get($config, radius)};
|
|
60
|
+
--cc-alert-gap: #{map.get($config, gap)};
|
|
61
|
+
|
|
62
|
+
// Icon
|
|
63
|
+
--cc-alert-icon-size: #{map.get($config, icon-size)};
|
|
64
|
+
--cc-alert-icon-margin-top: #{map.get($config, icon-margin-top)};
|
|
65
|
+
|
|
66
|
+
// Text
|
|
67
|
+
--cc-alert-title-size: #{map.get($config, title-size)};
|
|
68
|
+
--cc-alert-title-line-height: #{map.get($config, title-line-height)};
|
|
69
|
+
--cc-alert-message-size: #{map.get($config, message-size)};
|
|
70
|
+
|
|
71
|
+
// Colors
|
|
72
|
+
--cc-alert-info-bg: #{map.get($config, info-bg)};
|
|
73
|
+
--cc-alert-info-color: #{map.get($config, info-color)};
|
|
74
|
+
|
|
75
|
+
--cc-alert-warning-bg: #{map.get($config, warning-bg)};
|
|
76
|
+
--cc-alert-warning-color: #{map.get($config, warning-color)};
|
|
77
|
+
--cc-alert-warning-title-color: #{map.get($config, warning-title-color)};
|
|
78
|
+
--cc-alert-warning-shadow: #{map.get($config, warning-shadow)};
|
|
79
|
+
--cc-alert-success-bg: #{map.get($config, success-bg)};
|
|
80
|
+
--cc-alert-success-color: #{map.get($config, success-color)};
|
|
81
|
+
|
|
82
|
+
--cc-alert-error-bg: #{map.get($config, error-bg)};
|
|
83
|
+
--cc-alert-error-color: #{map.get($config, error-color)};
|
|
84
|
+
--cc-alert-warning-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.25); // 0px 4px 4px
|
|
85
85
|
}
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
// Default Button Configuration
|
|
4
|
-
$default-button-config: (
|
|
5
|
-
// Common
|
|
6
|
-
font-family: ('Roboto', sans-serif),
|
|
7
|
-
font-weight: 500,
|
|
8
|
-
font-size: 1rem,
|
|
9
|
-
// 16px
|
|
10
|
-
padding: 0.5rem 1rem,
|
|
11
|
-
// 8px 16px
|
|
12
|
-
|
|
13
|
-
// Primary (Dark)
|
|
14
|
-
primary-bg: #262125,
|
|
15
|
-
primary-color: #FFFFFF,
|
|
16
|
-
primary-radius: 0.5rem,
|
|
17
|
-
// 8px
|
|
18
|
-
primary-border: none,
|
|
19
|
-
|
|
20
|
-
// Warning (Yellow)
|
|
21
|
-
warning-bg: #F9C80E,
|
|
22
|
-
warning-color: #000000,
|
|
23
|
-
warning-radius: 0.25rem,
|
|
24
|
-
// 4px
|
|
25
|
-
warning-border: none,
|
|
26
|
-
|
|
27
|
-
// Outline (Grey Outline)
|
|
28
|
-
outline-bg: transparent,
|
|
29
|
-
outline-color: #000000,
|
|
30
|
-
outline-radius: 0.25rem,
|
|
31
|
-
// 4px
|
|
32
|
-
outline-border: 0.0625rem solid #BDC1C6,
|
|
33
|
-
// 1px solid
|
|
34
|
-
|
|
35
|
-
// Secondary (Light Grey)
|
|
36
|
-
secondary-bg: #E8EAED,
|
|
37
|
-
secondary-color: #000000,
|
|
38
|
-
secondary-radius: 0.25rem,
|
|
39
|
-
// 4px
|
|
40
|
-
secondary-border: none,
|
|
41
|
-
|
|
42
|
-
// Success (Green)
|
|
43
|
-
success-bg: #16A34A,
|
|
44
|
-
success-color: #FFFFFF,
|
|
45
|
-
success-radius: 0.5rem,
|
|
46
|
-
// 8px
|
|
47
|
-
success-border: none,
|
|
48
|
-
|
|
49
|
-
// Danger (Red)
|
|
50
|
-
danger-bg: #E63E30,
|
|
51
|
-
danger-color: #FFFFFF,
|
|
52
|
-
danger-radius: 0.25rem,
|
|
53
|
-
// 4px
|
|
54
|
-
danger-border: none,
|
|
55
|
-
|
|
56
|
-
// Danger Outline (Red Outline)
|
|
57
|
-
danger-outline-bg: transparent,
|
|
58
|
-
danger-outline-color: #E63E30,
|
|
59
|
-
danger-outline-radius: 0.5rem,
|
|
60
|
-
// 8px
|
|
61
|
-
danger-outline-border: 0.0625rem solid #E63E30,
|
|
62
|
-
// 1px solid
|
|
63
|
-
|
|
64
|
-
// Disabled State
|
|
65
|
-
disabled-opacity: 0.6,
|
|
66
|
-
disabled-cursor: not-allowed
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
@mixin button-theme($user-config: ()) {
|
|
70
|
-
$config: map.merge($default-button-config, $user-config);
|
|
71
|
-
|
|
72
|
-
// Common
|
|
73
|
-
--cc-btn-font-family: #{map.get($config, font-family)};
|
|
74
|
-
--cc-btn-font-weight: #{map.get($config, font-weight)};
|
|
75
|
-
--cc-btn-font-size: #{map.get($config, font-size)};
|
|
76
|
-
--cc-btn-padding: #{map.get($config, padding)};
|
|
77
|
-
--cc-btn-disabled-opacity: #{map.get($config, disabled-opacity)};
|
|
78
|
-
--cc-btn-disabled-cursor: #{map.get($config, disabled-cursor)};
|
|
79
|
-
|
|
80
|
-
// Primary
|
|
81
|
-
--cc-btn-primary-bg: #{map.get($config, primary-bg)};
|
|
82
|
-
--cc-btn-primary-color: #{map.get($config, primary-color)};
|
|
83
|
-
--cc-btn-primary-radius: #{map.get($config, primary-radius)};
|
|
84
|
-
--cc-btn-primary-border: #{map.get($config, primary-border)};
|
|
85
|
-
|
|
86
|
-
// Warning
|
|
87
|
-
--cc-btn-warning-bg: #{map.get($config, warning-bg)};
|
|
88
|
-
--cc-btn-warning-color: #{map.get($config, warning-color)};
|
|
89
|
-
--cc-btn-warning-radius: #{map.get($config, warning-radius)};
|
|
90
|
-
--cc-btn-warning-border: #{map.get($config, warning-border)};
|
|
91
|
-
|
|
92
|
-
// Outline
|
|
93
|
-
--cc-btn-outline-bg: #{map.get($config, outline-bg)};
|
|
94
|
-
--cc-btn-outline-color: #{map.get($config, outline-color)};
|
|
95
|
-
--cc-btn-outline-radius: #{map.get($config, outline-radius)};
|
|
96
|
-
--cc-btn-outline-border: #{map.get($config, outline-border)};
|
|
97
|
-
|
|
98
|
-
// Secondary
|
|
99
|
-
--cc-btn-secondary-bg: #{map.get($config, secondary-bg)};
|
|
100
|
-
--cc-btn-secondary-color: #{map.get($config, secondary-color)};
|
|
101
|
-
--cc-btn-secondary-radius: #{map.get($config, secondary-radius)};
|
|
102
|
-
--cc-btn-secondary-border: #{map.get($config, secondary-border)};
|
|
103
|
-
|
|
104
|
-
// Success
|
|
105
|
-
--cc-btn-success-bg: #{map.get($config, success-bg)};
|
|
106
|
-
--cc-btn-success-color: #{map.get($config, success-color)};
|
|
107
|
-
--cc-btn-success-radius: #{map.get($config, success-radius)};
|
|
108
|
-
--cc-btn-success-border: #{map.get($config, success-border)};
|
|
109
|
-
|
|
110
|
-
// Danger
|
|
111
|
-
--cc-btn-danger-bg: #{map.get($config, danger-bg)};
|
|
112
|
-
--cc-btn-danger-color: #{map.get($config, danger-color)};
|
|
113
|
-
--cc-btn-danger-radius: #{map.get($config, danger-radius)};
|
|
114
|
-
--cc-btn-danger-border: #{map.get($config, danger-border)};
|
|
115
|
-
|
|
116
|
-
// Danger Outline
|
|
117
|
-
--cc-btn-danger-outline-bg: #{map.get($config, danger-outline-bg)};
|
|
118
|
-
--cc-btn-danger-outline-color: #{map.get($config, danger-outline-color)};
|
|
119
|
-
--cc-btn-danger-outline-radius: #{map.get($config, danger-outline-radius)};
|
|
120
|
-
--cc-btn-danger-outline-border: #{map.get($config, danger-outline-border)};
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
// Default Button Configuration
|
|
4
|
+
$default-button-config: (
|
|
5
|
+
// Common
|
|
6
|
+
font-family: ('Roboto', sans-serif),
|
|
7
|
+
font-weight: 500,
|
|
8
|
+
font-size: 1rem,
|
|
9
|
+
// 16px
|
|
10
|
+
padding: 0.5rem 1rem,
|
|
11
|
+
// 8px 16px
|
|
12
|
+
|
|
13
|
+
// Primary (Dark)
|
|
14
|
+
primary-bg: #262125,
|
|
15
|
+
primary-color: #FFFFFF,
|
|
16
|
+
primary-radius: 0.5rem,
|
|
17
|
+
// 8px
|
|
18
|
+
primary-border: none,
|
|
19
|
+
|
|
20
|
+
// Warning (Yellow)
|
|
21
|
+
warning-bg: #F9C80E,
|
|
22
|
+
warning-color: #000000,
|
|
23
|
+
warning-radius: 0.25rem,
|
|
24
|
+
// 4px
|
|
25
|
+
warning-border: none,
|
|
26
|
+
|
|
27
|
+
// Outline (Grey Outline)
|
|
28
|
+
outline-bg: transparent,
|
|
29
|
+
outline-color: #000000,
|
|
30
|
+
outline-radius: 0.25rem,
|
|
31
|
+
// 4px
|
|
32
|
+
outline-border: 0.0625rem solid #BDC1C6,
|
|
33
|
+
// 1px solid
|
|
34
|
+
|
|
35
|
+
// Secondary (Light Grey)
|
|
36
|
+
secondary-bg: #E8EAED,
|
|
37
|
+
secondary-color: #000000,
|
|
38
|
+
secondary-radius: 0.25rem,
|
|
39
|
+
// 4px
|
|
40
|
+
secondary-border: none,
|
|
41
|
+
|
|
42
|
+
// Success (Green)
|
|
43
|
+
success-bg: #16A34A,
|
|
44
|
+
success-color: #FFFFFF,
|
|
45
|
+
success-radius: 0.5rem,
|
|
46
|
+
// 8px
|
|
47
|
+
success-border: none,
|
|
48
|
+
|
|
49
|
+
// Danger (Red)
|
|
50
|
+
danger-bg: #E63E30,
|
|
51
|
+
danger-color: #FFFFFF,
|
|
52
|
+
danger-radius: 0.25rem,
|
|
53
|
+
// 4px
|
|
54
|
+
danger-border: none,
|
|
55
|
+
|
|
56
|
+
// Danger Outline (Red Outline)
|
|
57
|
+
danger-outline-bg: transparent,
|
|
58
|
+
danger-outline-color: #E63E30,
|
|
59
|
+
danger-outline-radius: 0.5rem,
|
|
60
|
+
// 8px
|
|
61
|
+
danger-outline-border: 0.0625rem solid #E63E30,
|
|
62
|
+
// 1px solid
|
|
63
|
+
|
|
64
|
+
// Disabled State
|
|
65
|
+
disabled-opacity: 0.6,
|
|
66
|
+
disabled-cursor: not-allowed
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
@mixin button-theme($user-config: ()) {
|
|
70
|
+
$config: map.merge($default-button-config, $user-config);
|
|
71
|
+
|
|
72
|
+
// Common
|
|
73
|
+
--cc-btn-font-family: #{map.get($config, font-family)};
|
|
74
|
+
--cc-btn-font-weight: #{map.get($config, font-weight)};
|
|
75
|
+
--cc-btn-font-size: #{map.get($config, font-size)};
|
|
76
|
+
--cc-btn-padding: #{map.get($config, padding)};
|
|
77
|
+
--cc-btn-disabled-opacity: #{map.get($config, disabled-opacity)};
|
|
78
|
+
--cc-btn-disabled-cursor: #{map.get($config, disabled-cursor)};
|
|
79
|
+
|
|
80
|
+
// Primary
|
|
81
|
+
--cc-btn-primary-bg: #{map.get($config, primary-bg)};
|
|
82
|
+
--cc-btn-primary-color: #{map.get($config, primary-color)};
|
|
83
|
+
--cc-btn-primary-radius: #{map.get($config, primary-radius)};
|
|
84
|
+
--cc-btn-primary-border: #{map.get($config, primary-border)};
|
|
85
|
+
|
|
86
|
+
// Warning
|
|
87
|
+
--cc-btn-warning-bg: #{map.get($config, warning-bg)};
|
|
88
|
+
--cc-btn-warning-color: #{map.get($config, warning-color)};
|
|
89
|
+
--cc-btn-warning-radius: #{map.get($config, warning-radius)};
|
|
90
|
+
--cc-btn-warning-border: #{map.get($config, warning-border)};
|
|
91
|
+
|
|
92
|
+
// Outline
|
|
93
|
+
--cc-btn-outline-bg: #{map.get($config, outline-bg)};
|
|
94
|
+
--cc-btn-outline-color: #{map.get($config, outline-color)};
|
|
95
|
+
--cc-btn-outline-radius: #{map.get($config, outline-radius)};
|
|
96
|
+
--cc-btn-outline-border: #{map.get($config, outline-border)};
|
|
97
|
+
|
|
98
|
+
// Secondary
|
|
99
|
+
--cc-btn-secondary-bg: #{map.get($config, secondary-bg)};
|
|
100
|
+
--cc-btn-secondary-color: #{map.get($config, secondary-color)};
|
|
101
|
+
--cc-btn-secondary-radius: #{map.get($config, secondary-radius)};
|
|
102
|
+
--cc-btn-secondary-border: #{map.get($config, secondary-border)};
|
|
103
|
+
|
|
104
|
+
// Success
|
|
105
|
+
--cc-btn-success-bg: #{map.get($config, success-bg)};
|
|
106
|
+
--cc-btn-success-color: #{map.get($config, success-color)};
|
|
107
|
+
--cc-btn-success-radius: #{map.get($config, success-radius)};
|
|
108
|
+
--cc-btn-success-border: #{map.get($config, success-border)};
|
|
109
|
+
|
|
110
|
+
// Danger
|
|
111
|
+
--cc-btn-danger-bg: #{map.get($config, danger-bg)};
|
|
112
|
+
--cc-btn-danger-color: #{map.get($config, danger-color)};
|
|
113
|
+
--cc-btn-danger-radius: #{map.get($config, danger-radius)};
|
|
114
|
+
--cc-btn-danger-border: #{map.get($config, danger-border)};
|
|
115
|
+
|
|
116
|
+
// Danger Outline
|
|
117
|
+
--cc-btn-danger-outline-bg: #{map.get($config, danger-outline-bg)};
|
|
118
|
+
--cc-btn-danger-outline-color: #{map.get($config, danger-outline-color)};
|
|
119
|
+
--cc-btn-danger-outline-radius: #{map.get($config, danger-outline-radius)};
|
|
120
|
+
--cc-btn-danger-outline-border: #{map.get($config, danger-outline-border)};
|
|
121
121
|
}
|