platformcommons-web-lib 1.0.0
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/commons-shared-web-ui-1.0.0.tgz +0 -0
- package/documentation/alert.md +123 -0
- package/documentation/button-dropdown.md +126 -0
- package/documentation/button.md +184 -0
- package/documentation/cards-usage-guidelines.md +131 -0
- package/documentation/configurable-form.md +605 -0
- package/documentation/confirmation-modal.md +250 -0
- package/documentation/filter-sidebar.md +178 -0
- package/documentation/filter-table-selector.md +228 -0
- package/documentation/form-builder.md +597 -0
- package/documentation/form-components.md +384 -0
- package/documentation/nav.md +427 -0
- package/documentation/pagination.md +181 -0
- package/documentation/side-nav-documentation.md +169 -0
- package/documentation/smart-form.md +2177 -0
- package/documentation/smart-table.md +1198 -0
- package/documentation/snackbar.md +118 -0
- package/documentation/style-externalization.md +88 -0
- package/documentation/summary-card.md +279 -0
- package/ng-package.json +28 -0
- package/package.json +54 -0
- package/src/lib/modules/alert/alert.models.ts +6 -0
- package/src/lib/modules/alert/alert.module.ts +16 -0
- package/src/lib/modules/alert/alert.theme.scss +85 -0
- package/src/lib/modules/alert/components/alert/alert.component.html +27 -0
- package/src/lib/modules/alert/components/alert/alert.component.scss +92 -0
- package/src/lib/modules/alert/components/alert/alert.component.ts +81 -0
- package/src/lib/modules/button/button.models.ts +13 -0
- package/src/lib/modules/button/button.module.ts +16 -0
- package/src/lib/modules/button/button.theme.scss +121 -0
- package/src/lib/modules/button/components/button/button.component.html +22 -0
- package/src/lib/modules/button/components/button/button.component.scss +88 -0
- package/src/lib/modules/button/components/button/button.component.ts +67 -0
- package/src/lib/modules/button-dropdown/button-dropdown.models.ts +26 -0
- package/src/lib/modules/button-dropdown/button-dropdown.module.ts +22 -0
- package/src/lib/modules/button-dropdown/button-dropdown.theme.scss +87 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html +41 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.scss +135 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts +160 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.html +294 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.scss +503 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.ts +628 -0
- package/src/lib/modules/configurable-form/configurable-form.examples.ts +154 -0
- package/src/lib/modules/configurable-form/configurable-form.model.ts +131 -0
- package/src/lib/modules/configurable-form/configurable-form.module.ts +19 -0
- package/src/lib/modules/configurable-form/configurable-form.theme.scss +78 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html +77 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.scss +395 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts +266 -0
- package/src/lib/modules/confirmation-modal/confirmation-modal.models.ts +71 -0
- package/src/lib/modules/confirmation-modal/confirmation-modal.module.ts +20 -0
- package/src/lib/modules/confirmation-modal/confirmation-modal.theme.scss +87 -0
- package/src/lib/modules/filter/components/filter/filter.component.html +131 -0
- package/src/lib/modules/filter/components/filter/filter.component.scss +245 -0
- package/src/lib/modules/filter/components/filter/filter.component.ts +216 -0
- package/src/lib/modules/filter/filter.models.ts +88 -0
- package/src/lib/modules/filter/filter.module.ts +24 -0
- package/src/lib/modules/filter/filter.theme.scss +92 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html +112 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.scss +186 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts +163 -0
- package/src/lib/modules/filter-sidebar/filter-sidebar.models.ts +95 -0
- package/src/lib/modules/filter-sidebar/filter-sidebar.module.ts +24 -0
- package/src/lib/modules/filter-sidebar/filter-sidebar.theme.scss +38 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.html +73 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.scss +321 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.ts +361 -0
- package/src/lib/modules/filter-table-selector/filter-table-selector.models.ts +91 -0
- package/src/lib/modules/filter-table-selector/filter-table-selector.module.ts +22 -0
- package/src/lib/modules/filter-table-selector/filter-table-selector.theme.scss +36 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.html +63 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.scss +496 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.ts +445 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.html +75 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.scss +210 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.ts +55 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.html +25 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.scss +82 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.ts +95 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.html +20 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.scss +37 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.ts +94 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.html +46 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.scss +102 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.ts +50 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.html +35 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.scss +67 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.ts +34 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.html +68 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.scss +113 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.ts +74 -0
- package/src/lib/modules/form-builder/configs/field-type-schema.map.ts +533 -0
- package/src/lib/modules/form-builder/form-builder.module.ts +36 -0
- package/src/lib/modules/form-builder/form-builder.theme.scss +212 -0
- package/src/lib/modules/form-builder/index.ts +9 -0
- package/src/lib/modules/form-builder/models/builder.models.ts +7 -0
- package/src/lib/modules/form-builder/models/field-configurator.models.ts +38 -0
- package/src/lib/modules/form-builder/models/field-selection.models.ts +51 -0
- package/src/lib/modules/form-builder/services/field-configurator.service.ts +258 -0
- package/src/lib/modules/form-builder/services/field-selection.service.ts +300 -0
- package/src/lib/modules/form-builder/services/form-schema-tree.service.ts +652 -0
- package/src/lib/modules/form-builder/tokens/builder.tokens.ts +10 -0
- package/src/lib/modules/form-builder/utils/constants.ts +43 -0
- package/src/lib/modules/form-components/components/checkbox/_theme.scss +63 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.html +29 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.scss +111 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.ts +207 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.models.ts +35 -0
- package/src/lib/modules/form-components/components/datepicker/_theme.scss +82 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.html +42 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.scss +115 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.ts +267 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.models.ts +45 -0
- package/src/lib/modules/form-components/components/dropdown/_theme.scss +91 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.html +74 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.scss +252 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.ts +377 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.models.ts +53 -0
- package/src/lib/modules/form-components/components/input/_theme.scss +77 -0
- package/src/lib/modules/form-components/components/input/input.component.html +51 -0
- package/src/lib/modules/form-components/components/input/input.component.scss +128 -0
- package/src/lib/modules/form-components/components/input/input.component.ts +250 -0
- package/src/lib/modules/form-components/components/input/input.models.ts +55 -0
- package/src/lib/modules/form-components/components/radio/_theme.scss +61 -0
- package/src/lib/modules/form-components/components/radio/radio.component.html +22 -0
- package/src/lib/modules/form-components/components/radio/radio.component.scss +107 -0
- package/src/lib/modules/form-components/components/radio/radio.component.ts +181 -0
- package/src/lib/modules/form-components/components/radio/radio.models.ts +39 -0
- package/src/lib/modules/form-components/components/search/_theme.scss +73 -0
- package/src/lib/modules/form-components/components/search/search.component.html +15 -0
- package/src/lib/modules/form-components/components/search/search.component.scss +87 -0
- package/src/lib/modules/form-components/components/search/search.component.ts +213 -0
- package/src/lib/modules/form-components/components/search/search.models.ts +40 -0
- package/src/lib/modules/form-components/components/toggle/_theme.scss +45 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.html +15 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.scss +81 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.ts +166 -0
- package/src/lib/modules/form-components/components/toggle/toggle.models.ts +27 -0
- package/src/lib/modules/form-components/directives/click-outside.directive.ts +22 -0
- package/src/lib/modules/form-components/form-components.module.ts +41 -0
- package/src/lib/modules/form-components/form-components.theme.scss +25 -0
- package/src/lib/modules/material/material.module.ts +94 -0
- package/src/lib/modules/nav/components/nav/nav.component.html +34 -0
- package/src/lib/modules/nav/components/nav/nav.component.scss +171 -0
- package/src/lib/modules/nav/components/nav/nav.component.ts +82 -0
- package/src/lib/modules/nav/nav.models.ts +31 -0
- package/src/lib/modules/nav/nav.module.ts +17 -0
- package/src/lib/modules/nav/nav.theme.scss +86 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.html +52 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.scss +155 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.ts +109 -0
- package/src/lib/modules/pagination/pagination.module.ts +17 -0
- package/src/lib/modules/pagination/pagination.theme.scss +66 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.html +56 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +342 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.ts +135 -0
- package/src/lib/modules/side-nav/side-nav.models.ts +38 -0
- package/src/lib/modules/side-nav/side-nav.module.ts +16 -0
- package/src/lib/modules/side-nav/side-nav.theme.scss +111 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.html +1109 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +1860 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +2232 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.html +64 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +209 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.ts +119 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.html +253 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +689 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.ts +1087 -0
- package/src/lib/modules/smart-form/index.ts +10 -0
- package/src/lib/modules/smart-form/models/form-schema.model.ts +700 -0
- package/src/lib/modules/smart-form/models/hierarchy-config.model.ts +21 -0
- package/src/lib/modules/smart-form/services/expression.service.ts +75 -0
- package/src/lib/modules/smart-form/services/smart-form-controller.service.ts +65 -0
- package/src/lib/modules/smart-form/smart-form.examples.ts +1324 -0
- package/src/lib/modules/smart-form/smart-form.module.ts +36 -0
- package/src/lib/modules/smart-form/smart-form.theme.scss +890 -0
- package/src/lib/modules/smart-form/utils/translation.utils.ts +82 -0
- package/src/lib/modules/smart-form/utils/trusted-url.pipe.ts +25 -0
- package/src/lib/modules/smart-form/utils/validation.utils.ts +98 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.html +283 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.scss +685 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.ts +1118 -0
- package/src/lib/modules/smart-table/models/table-config.model.ts +202 -0
- package/src/lib/modules/smart-table/smart-table.module.ts +30 -0
- package/src/lib/modules/smart-table/smart-table.theme.scss +335 -0
- package/src/lib/modules/smart-table/utils/safe-html.pipe.ts +22 -0
- package/src/lib/modules/smart-table/utils/smart-table.utils.ts +18 -0
- package/src/lib/modules/snackbar/components/snackbar.component.html +41 -0
- package/src/lib/modules/snackbar/components/snackbar.component.scss +99 -0
- package/src/lib/modules/snackbar/components/snackbar.component.ts +18 -0
- package/src/lib/modules/snackbar/models/snackbar.models.ts +10 -0
- package/src/lib/modules/snackbar/services/snackbar.service.ts +40 -0
- package/src/lib/modules/snackbar/snackbar.module.ts +11 -0
- package/src/lib/modules/snackbar/snackbar.theme.scss +93 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.html +47 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.scss +199 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.ts +126 -0
- package/src/lib/modules/summary-card/summary-card.module.ts +18 -0
- package/src/lib/modules/summary-card/summary-card.theme.scss +176 -0
- package/src/lib/shared-ui.module.ts +44 -0
- package/src/lib/styles/global.scss +152 -0
- package/src/lib/styles/utilities.scss +250 -0
- package/src/lib/utils/constants.ts +11 -0
- package/src/lib/utils/storage.utils.ts +37 -0
- package/src/lib/utils/string.utils.ts +23 -0
- package/src/lib/utils/translation.utils.ts +87 -0
- package/src/public-api.ts +104 -0
- package/tsconfig.lib.json +15 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<div class="cc-alert" [ngClass]="'cc-alert-' + variant" [style.width]="width" [style.height]="height"
|
|
2
|
+
[style.border-radius]="borderRadius" [style.border-top-left-radius]="borderTopLeftRadius"
|
|
3
|
+
[style.border-top-right-radius]="borderTopRightRadius" [style.border-bottom-left-radius]="borderBottomLeftRadius"
|
|
4
|
+
[style.border-bottom-right-radius]="borderBottomRightRadius" [style.padding]="padding" [style.gap]="gap"
|
|
5
|
+
[style.background-color]="backgroundColor" [style.color]="color" [style.border-color]="borderColor"
|
|
6
|
+
[style.font-size]="fontSize" [style.font-weight]="fontWeight" [style.box-shadow]="boxShadow">
|
|
7
|
+
|
|
8
|
+
<div class="cc-alert-icon" *ngIf="icon">
|
|
9
|
+
<i *ngIf="customIcon" [ngClass]="customIcon"></i>
|
|
10
|
+
<i *ngIf="!customIcon && isDefaultIcon" [ngClass]="defaultIconClass"></i>
|
|
11
|
+
<i *ngIf="!customIcon && isStringIcon && !isImgIcon" [ngClass]="iconString"></i>
|
|
12
|
+
<img *ngIf="!customIcon && isStringIcon && isImgIcon" [src]="iconString"
|
|
13
|
+
[attr.alt]="labels?.iconAltText || 'alert icon'" />
|
|
14
|
+
<ng-container *ngIf="isObjectIcon">
|
|
15
|
+
<i *ngIf="iconObject.type === 'fontawesome'" [ngClass]="iconObject.value"></i>
|
|
16
|
+
<span *ngIf="iconObject.type === 'material'" class="material-icons">{{ iconObject.value }}</span>
|
|
17
|
+
<img *ngIf="iconObject.type === 'img'" [src]="iconObject.value"
|
|
18
|
+
[attr.alt]="labels?.iconAltText || 'alert icon'" />
|
|
19
|
+
</ng-container>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="cc-alert-content">
|
|
23
|
+
<div class="cc-alert-title" *ngIf="title">{{ title }}</div>
|
|
24
|
+
<div class="cc-alert-message" *ngIf="message">{{ message }}</div>
|
|
25
|
+
<ng-content></ng-content>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.cc-alert {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: flex-start;
|
|
4
|
+
width: 100%;
|
|
5
|
+
padding: var(--cc-alert-padding, 1rem 2rem);
|
|
6
|
+
border-radius: var(--cc-alert-radius, 0.75rem);
|
|
7
|
+
gap: var(--cc-alert-gap, 1rem);
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
font-family: var(--cc-alert-font-family, inherit);
|
|
10
|
+
|
|
11
|
+
.cc-alert-icon {
|
|
12
|
+
font-size: var(--cc-alert-icon-size, 1.25rem);
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
margin-top: var(--cc-alert-icon-margin-top, 0.125rem);
|
|
15
|
+
|
|
16
|
+
img {
|
|
17
|
+
width: var(--cc-alert-icon-size, 1.25rem);
|
|
18
|
+
height: var(--cc-alert-icon-size, 1.25rem);
|
|
19
|
+
object-fit: contain;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cc-alert-content {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: 0.25rem; // Keeping small internal gap as is, or could be a var
|
|
27
|
+
flex-grow: 1;
|
|
28
|
+
|
|
29
|
+
.cc-alert-title {
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
font-size: var(--cc-alert-title-size, 1rem);
|
|
32
|
+
line-height: var(--cc-alert-title-line-height, 1.5rem);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cc-alert-message {
|
|
36
|
+
font-size: var(--cc-alert-message-size, 0.875rem);
|
|
37
|
+
line-height: 200%; // Relative unit is fine
|
|
38
|
+
opacity: 0.9;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Variants
|
|
43
|
+
&.cc-alert-info {
|
|
44
|
+
background-color: var(--cc-alert-info-bg);
|
|
45
|
+
color: var(--cc-alert-info-color);
|
|
46
|
+
|
|
47
|
+
.cc-alert-icon {
|
|
48
|
+
color: #5F6368;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.cc-alert-warning {
|
|
53
|
+
background-color: var(--cc-alert-warning-bg);
|
|
54
|
+
color: var(--cc-alert-warning-color);
|
|
55
|
+
|
|
56
|
+
.cc-alert-title {
|
|
57
|
+
color: var(--cc-alert-warning-title-color);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.cc-alert-icon {
|
|
61
|
+
color: var(--cc-alert-warning-title-color);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.cc-alert-warning-shadow {
|
|
66
|
+
background-color: var(--cc-alert-warning-bg);
|
|
67
|
+
color: var(--cc-alert-warning-color);
|
|
68
|
+
box-shadow: var(--cc-alert-warning-shadow);
|
|
69
|
+
|
|
70
|
+
.cc-alert-title {
|
|
71
|
+
color: var(--cc-alert-warning-title-color);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.cc-alert-icon {
|
|
75
|
+
color: var(--cc-alert-warning-title-color);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.cc-alert-success {
|
|
80
|
+
background-color: var(--cc-alert-success-bg);
|
|
81
|
+
color: var(--cc-alert-success-color);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.cc-alert-error {
|
|
85
|
+
background-color: var(--cc-alert-error-bg);
|
|
86
|
+
color: var(--cc-alert-error-color);
|
|
87
|
+
|
|
88
|
+
.cc-alert-icon {
|
|
89
|
+
color: var(--cc-alert-error-color);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { AlertLabels, AlertVariant, IconInput } from '../../alert.models';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'lib-alert',
|
|
7
|
+
templateUrl: './alert.component.html',
|
|
8
|
+
styleUrls: ['./alert.component.scss'],
|
|
9
|
+
standalone: false
|
|
10
|
+
})
|
|
11
|
+
export class AlertComponent implements OnInit {
|
|
12
|
+
@Input() variant: AlertVariant = 'info';
|
|
13
|
+
@Input() title: string = '';
|
|
14
|
+
@Input() message: string = '';
|
|
15
|
+
@Input() icon: IconInput = true;
|
|
16
|
+
@Input() customIcon: string = ''; // New input for custom class
|
|
17
|
+
@Input() labels?: AlertLabels;
|
|
18
|
+
|
|
19
|
+
// Customization Inputs
|
|
20
|
+
@Input() width?: string;
|
|
21
|
+
@Input() height?: string;
|
|
22
|
+
@Input() borderRadius?: string;
|
|
23
|
+
@Input() padding?: string;
|
|
24
|
+
@Input() gap?: string;
|
|
25
|
+
@Input() backgroundColor?: string;
|
|
26
|
+
@Input() color?: string; // New input for custom text color
|
|
27
|
+
@Input() borderColor?: string;
|
|
28
|
+
@Input() fontSize?: string;
|
|
29
|
+
@Input() fontWeight?: string;
|
|
30
|
+
@Input() boxShadow?: string;
|
|
31
|
+
|
|
32
|
+
// Granular Border Radius Customization
|
|
33
|
+
@Input() borderTopLeftRadius?: string;
|
|
34
|
+
@Input() borderTopRightRadius?: string;
|
|
35
|
+
@Input() borderBottomLeftRadius?: string;
|
|
36
|
+
@Input() borderBottomRightRadius?: string;
|
|
37
|
+
|
|
38
|
+
constructor() { }
|
|
39
|
+
|
|
40
|
+
ngOnInit(): void {
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
get isDefaultIcon(): boolean {
|
|
44
|
+
return this.icon === true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
get isStringIcon(): boolean {
|
|
48
|
+
return typeof this.icon === 'string';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
get isObjectIcon(): boolean {
|
|
52
|
+
return typeof this.icon === 'object' && this.icon !== null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
get iconString(): string {
|
|
56
|
+
return typeof this.icon === 'string' ? this.icon : '';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
get isImgIcon(): boolean {
|
|
60
|
+
const icon = this.icon;
|
|
61
|
+
if (typeof icon === 'string') {
|
|
62
|
+
return icon.includes('/') || icon.includes('.') || icon.startsWith('http');
|
|
63
|
+
}
|
|
64
|
+
return typeof icon === 'object' && icon !== null && icon.type === 'img';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
get iconObject(): { type: string; value: string } {
|
|
68
|
+
return typeof this.icon === 'object' ? this.icon as any : { type: '', value: '' };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
get defaultIconClass(): string {
|
|
72
|
+
switch (this.variant) {
|
|
73
|
+
case 'success': return 'fa-solid fa-circle-check';
|
|
74
|
+
case 'warning':
|
|
75
|
+
case 'warning-shadow': return 'fa-solid fa-triangle-exclamation';
|
|
76
|
+
case 'error': return 'fa-solid fa-triangle-exclamation';
|
|
77
|
+
case 'info':
|
|
78
|
+
default: return 'fa-solid fa-circle-info';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ButtonComponent } from './components/button/button.component';
|
|
4
|
+
|
|
5
|
+
@NgModule({
|
|
6
|
+
declarations: [
|
|
7
|
+
ButtonComponent
|
|
8
|
+
],
|
|
9
|
+
imports: [
|
|
10
|
+
CommonModule
|
|
11
|
+
],
|
|
12
|
+
exports: [
|
|
13
|
+
ButtonComponent
|
|
14
|
+
]
|
|
15
|
+
})
|
|
16
|
+
export class ButtonModule { }
|
|
@@ -0,0 +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)};
|
|
121
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<button [type]="type" [disabled]="disabled" class="cc-btn" [ngClass]="'cc-btn-' + variant" [style.width]="width"
|
|
2
|
+
[style.height]="height" [style.border-radius]="borderRadius" [style.font-size]="fontSize"
|
|
3
|
+
[style.font-weight]="fontWeight" [style.background-color]="backgroundColor" [style.color]="color"
|
|
4
|
+
[style.border]="border">
|
|
5
|
+
<div class="cc-btn-icon-wrapper" *ngIf="icon">
|
|
6
|
+
<!-- String Icons -->
|
|
7
|
+
<ng-container *ngIf="isStringIcon">
|
|
8
|
+
<i *ngIf="!isImgIcon" [ngClass]="iconString" class="cc-btn-icon"></i>
|
|
9
|
+
<img *ngIf="isImgIcon" [src]="iconString" [attr.alt]="labels?.iconAltText || 'button icon'"
|
|
10
|
+
class="cc-btn-icon cc-btn-img-icon" />
|
|
11
|
+
</ng-container>
|
|
12
|
+
|
|
13
|
+
<!-- Object Icons -->
|
|
14
|
+
<ng-container *ngIf="isObjectIcon">
|
|
15
|
+
<i *ngIf="iconObject.type === 'fontawesome'" [ngClass]="iconObject.value" class="cc-btn-icon"></i>
|
|
16
|
+
<span *ngIf="iconObject.type === 'material'" class="material-icons cc-btn-icon">{{ iconObject.value }}</span>
|
|
17
|
+
<img *ngIf="iconObject.type === 'img'" [src]="iconObject.value" [attr.alt]="labels?.iconAltText || 'button icon'"
|
|
18
|
+
class="cc-btn-icon cc-btn-img-icon" />
|
|
19
|
+
</ng-container>
|
|
20
|
+
</div>
|
|
21
|
+
<ng-content></ng-content>
|
|
22
|
+
</button>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.cc-btn {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
transition: all 0.2s ease-in-out;
|
|
8
|
+
|
|
9
|
+
// Common styles from variables
|
|
10
|
+
font-family: var(--cc-btn-font-family);
|
|
11
|
+
font-weight: var(--cc-btn-font-weight);
|
|
12
|
+
font-size: var(--cc-btn-font-size);
|
|
13
|
+
padding: var(--cc-btn-padding);
|
|
14
|
+
|
|
15
|
+
// Disabled State
|
|
16
|
+
&:disabled {
|
|
17
|
+
opacity: var(--cc-btn-disabled-opacity);
|
|
18
|
+
cursor: var(--cc-btn-disabled-cursor);
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Variants
|
|
23
|
+
&.cc-btn-primary {
|
|
24
|
+
background-color: var(--cc-btn-primary-bg);
|
|
25
|
+
color: var(--cc-btn-primary-color);
|
|
26
|
+
border-radius: var(--cc-btn-primary-radius);
|
|
27
|
+
border: var(--cc-btn-primary-border);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.cc-btn-warning {
|
|
31
|
+
background-color: var(--cc-btn-warning-bg);
|
|
32
|
+
color: var(--cc-btn-warning-color);
|
|
33
|
+
border-radius: var(--cc-btn-warning-radius);
|
|
34
|
+
border: var(--cc-btn-warning-border);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.cc-btn-outline {
|
|
38
|
+
background-color: var(--cc-btn-outline-bg);
|
|
39
|
+
color: var(--cc-btn-outline-color);
|
|
40
|
+
border-radius: var(--cc-btn-outline-radius);
|
|
41
|
+
border: var(--cc-btn-outline-border);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.cc-btn-secondary {
|
|
45
|
+
background-color: var(--cc-btn-secondary-bg);
|
|
46
|
+
color: var(--cc-btn-secondary-color);
|
|
47
|
+
border-radius: var(--cc-btn-secondary-radius);
|
|
48
|
+
border: var(--cc-btn-secondary-border);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.cc-btn-success {
|
|
52
|
+
background-color: var(--cc-btn-success-bg);
|
|
53
|
+
color: var(--cc-btn-success-color);
|
|
54
|
+
border-radius: var(--cc-btn-success-radius);
|
|
55
|
+
border: var(--cc-btn-success-border);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.cc-btn-danger {
|
|
59
|
+
background-color: var(--cc-btn-danger-bg);
|
|
60
|
+
color: var(--cc-btn-danger-color);
|
|
61
|
+
border-radius: var(--cc-btn-danger-radius);
|
|
62
|
+
border: var(--cc-btn-danger-border);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.cc-btn-danger-outline {
|
|
66
|
+
background-color: var(--cc-btn-danger-outline-bg);
|
|
67
|
+
color: var(--cc-btn-danger-outline-color);
|
|
68
|
+
border-radius: var(--cc-btn-danger-outline-radius);
|
|
69
|
+
border: var(--cc-btn-danger-outline-border);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.cc-btn-icon-wrapper {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
margin-right: 0.5rem; // 8px
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.cc-btn-icon {
|
|
79
|
+
font-size: 1.1em;
|
|
80
|
+
line-height: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.cc-btn-img-icon {
|
|
84
|
+
width: 1.25rem;
|
|
85
|
+
height: 1.25rem;
|
|
86
|
+
object-fit: contain;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Component, Input, OnInit, HostBinding } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { ButtonLabels, ButtonVariant } from '../../button.models';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'lib-button',
|
|
7
|
+
templateUrl: './button.component.html',
|
|
8
|
+
styleUrls: ['./button.component.scss'],
|
|
9
|
+
standalone: false
|
|
10
|
+
})
|
|
11
|
+
export class ButtonComponent implements OnInit {
|
|
12
|
+
|
|
13
|
+
@Input() variant: ButtonVariant = 'primary';
|
|
14
|
+
@Input() type: 'button' | 'submit' | 'reset' = 'button';
|
|
15
|
+
@Input() disabled: boolean = false;
|
|
16
|
+
|
|
17
|
+
@HostBinding('style.pointer-events')
|
|
18
|
+
get pointerEvents(): string {
|
|
19
|
+
return this.disabled ? 'none' : 'auto';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Customization Inputs
|
|
23
|
+
@Input() width?: string;
|
|
24
|
+
@Input() height?: string;
|
|
25
|
+
@Input() borderRadius?: string;
|
|
26
|
+
@Input() fontSize?: string;
|
|
27
|
+
@Input() fontWeight?: string;
|
|
28
|
+
@Input() backgroundColor?: string;
|
|
29
|
+
@Input() color?: string;
|
|
30
|
+
@Input() border?: string;
|
|
31
|
+
@Input() icon: boolean | string | { type: 'material' | 'fontawesome' | 'img'; value: string } = '';
|
|
32
|
+
@Input() labels?: ButtonLabels;
|
|
33
|
+
|
|
34
|
+
constructor() { }
|
|
35
|
+
|
|
36
|
+
ngOnInit(): void {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
get isDefaultIcon(): boolean {
|
|
40
|
+
return this.icon === true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
get isStringIcon(): boolean {
|
|
44
|
+
return typeof this.icon === 'string' && this.icon !== '';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
get isImgIcon(): boolean {
|
|
48
|
+
const icon = this.icon;
|
|
49
|
+
if (typeof icon === 'string') {
|
|
50
|
+
return icon.includes('/') || icon.includes('.') || icon.startsWith('http');
|
|
51
|
+
}
|
|
52
|
+
return typeof icon === 'object' && icon !== null && !!icon.value && (icon.type === 'img' || icon.value.includes('/') || icon.value.includes('.') || icon.value.startsWith('http'));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
get isObjectIcon(): boolean {
|
|
56
|
+
return typeof this.icon === 'object' && this.icon !== null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
get iconString(): string {
|
|
60
|
+
return typeof this.icon === 'string' ? this.icon : '';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
get iconObject(): { type: string; value: string } {
|
|
64
|
+
return typeof this.icon === 'object' ? this.icon as any : { type: '', value: '' };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ButtonVariant } from '../button/button.models';
|
|
2
|
+
|
|
3
|
+
export interface DropdownAction {
|
|
4
|
+
label: string;
|
|
5
|
+
type: 'api' | 'route' | 'callback';
|
|
6
|
+
icon?: string;
|
|
7
|
+
color?: string; // Generic override
|
|
8
|
+
variant?: ButtonVariant; // Explict variant (primary, warning, danger, etc)
|
|
9
|
+
|
|
10
|
+
// For 'route' type
|
|
11
|
+
route?: string;
|
|
12
|
+
|
|
13
|
+
// For 'api' type
|
|
14
|
+
apiUrl?: string;
|
|
15
|
+
apiMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
16
|
+
apiPayload?: any;
|
|
17
|
+
|
|
18
|
+
// For 'callback' type
|
|
19
|
+
callback?: (data: any) => void;
|
|
20
|
+
|
|
21
|
+
// Universal options
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
confirmationNeeded?: boolean;
|
|
24
|
+
confirmationMessage?: string;
|
|
25
|
+
confirmationTitle?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { RouterModule } from '@angular/router';
|
|
4
|
+
import { ButtonDropdownComponent } from './components/button-dropdown/button-dropdown.component';
|
|
5
|
+
import { ButtonModule } from '../button/button.module';
|
|
6
|
+
import { ConfirmationModalModule } from '../confirmation-modal/confirmation-modal.module';
|
|
7
|
+
|
|
8
|
+
@NgModule({
|
|
9
|
+
declarations: [
|
|
10
|
+
ButtonDropdownComponent
|
|
11
|
+
],
|
|
12
|
+
imports: [
|
|
13
|
+
CommonModule,
|
|
14
|
+
RouterModule,
|
|
15
|
+
ButtonModule,
|
|
16
|
+
ConfirmationModalModule
|
|
17
|
+
],
|
|
18
|
+
exports: [
|
|
19
|
+
ButtonDropdownComponent
|
|
20
|
+
]
|
|
21
|
+
})
|
|
22
|
+
export class ButtonDropdownModule { }
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$default-button-dropdown-config: (
|
|
4
|
+
// General Structure
|
|
5
|
+
menu-radius: 4px,
|
|
6
|
+
menu-border-light: 1px solid #e0e0e0,
|
|
7
|
+
menu-border-dark: 1px solid #444444,
|
|
8
|
+
menu-shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1),
|
|
9
|
+
menu-shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.5),
|
|
10
|
+
|
|
11
|
+
// Light Theme Map
|
|
12
|
+
light-bg: #ffffff,
|
|
13
|
+
light-item-color: #333333,
|
|
14
|
+
light-item-hover-bg: #f5f5f5,
|
|
15
|
+
|
|
16
|
+
// Dark Theme Map
|
|
17
|
+
dark-bg: #1a1a1a,
|
|
18
|
+
dark-item-color: #ffffff,
|
|
19
|
+
dark-item-hover-bg: #2d2d2d,
|
|
20
|
+
|
|
21
|
+
// Button Variants (For Explicit Actions)
|
|
22
|
+
primary-bg: #262125,
|
|
23
|
+
primary-color: #ffffff,
|
|
24
|
+
primary-hover: #3d353b,
|
|
25
|
+
|
|
26
|
+
warning-bg: #F9C80E,
|
|
27
|
+
warning-color: #000000,
|
|
28
|
+
warning-hover: #ebd573,
|
|
29
|
+
|
|
30
|
+
success-bg: #16A34A,
|
|
31
|
+
success-color: #ffffff,
|
|
32
|
+
success-hover: #148f41,
|
|
33
|
+
|
|
34
|
+
danger-bg: #E63E30,
|
|
35
|
+
danger-color: #ffffff,
|
|
36
|
+
danger-hover: #c93528,
|
|
37
|
+
|
|
38
|
+
secondary-bg: #E8EAED,
|
|
39
|
+
secondary-color: #000000,
|
|
40
|
+
secondary-hover: #d1d5db,
|
|
41
|
+
|
|
42
|
+
outline-bg: transparent,
|
|
43
|
+
outline-color: #000000,
|
|
44
|
+
outline-hover: rgba(0,0,0,0.05)
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
@mixin button-dropdown-theme($user-config: ()) {
|
|
48
|
+
$config: map.merge($default-button-dropdown-config, $user-config);
|
|
49
|
+
|
|
50
|
+
--cc-btn-dropdown-radius: #{map.get($config, menu-radius)};
|
|
51
|
+
--cc-btn-dropdown-border-light: #{map.get($config, menu-border-light)};
|
|
52
|
+
--cc-btn-dropdown-border-dark: #{map.get($config, menu-border-dark)};
|
|
53
|
+
--cc-btn-dropdown-shadow-light: #{map.get($config, menu-shadow-light)};
|
|
54
|
+
--cc-btn-dropdown-shadow-dark: #{map.get($config, menu-shadow-dark)};
|
|
55
|
+
|
|
56
|
+
--cc-btn-dropdown-light-bg: #{map.get($config, light-bg)};
|
|
57
|
+
--cc-btn-dropdown-light-item-color: #{map.get($config, light-item-color)};
|
|
58
|
+
--cc-btn-dropdown-light-item-hover-bg: #{map.get($config, light-item-hover-bg)};
|
|
59
|
+
|
|
60
|
+
--cc-btn-dropdown-dark-bg: #{map.get($config, dark-bg)};
|
|
61
|
+
--cc-btn-dropdown-dark-item-color: #{map.get($config, dark-item-color)};
|
|
62
|
+
--cc-btn-dropdown-dark-item-hover-bg: #{map.get($config, dark-item-hover-bg)};
|
|
63
|
+
|
|
64
|
+
--cc-btn-dropdown-primary-bg: #{map.get($config, primary-bg)};
|
|
65
|
+
--cc-btn-dropdown-primary-color: #{map.get($config, primary-color)};
|
|
66
|
+
--cc-btn-dropdown-primary-hover: #{map.get($config, primary-hover)};
|
|
67
|
+
|
|
68
|
+
--cc-btn-dropdown-warning-bg: #{map.get($config, warning-bg)};
|
|
69
|
+
--cc-btn-dropdown-warning-color: #{map.get($config, warning-color)};
|
|
70
|
+
--cc-btn-dropdown-warning-hover: #{map.get($config, warning-hover)};
|
|
71
|
+
|
|
72
|
+
--cc-btn-dropdown-success-bg: #{map.get($config, success-bg)};
|
|
73
|
+
--cc-btn-dropdown-success-color: #{map.get($config, success-color)};
|
|
74
|
+
--cc-btn-dropdown-success-hover: #{map.get($config, success-hover)};
|
|
75
|
+
|
|
76
|
+
--cc-btn-dropdown-danger-bg: #{map.get($config, danger-bg)};
|
|
77
|
+
--cc-btn-dropdown-danger-color: #{map.get($config, danger-color)};
|
|
78
|
+
--cc-btn-dropdown-danger-hover: #{map.get($config, danger-hover)};
|
|
79
|
+
|
|
80
|
+
--cc-btn-dropdown-secondary-bg: #{map.get($config, secondary-bg)};
|
|
81
|
+
--cc-btn-dropdown-secondary-color: #{map.get($config, secondary-color)};
|
|
82
|
+
--cc-btn-dropdown-secondary-hover: #{map.get($config, secondary-hover)};
|
|
83
|
+
|
|
84
|
+
--cc-btn-dropdown-outline-bg: #{map.get($config, outline-bg)};
|
|
85
|
+
--cc-btn-dropdown-outline-color: #{map.get($config, outline-color)};
|
|
86
|
+
--cc-btn-dropdown-outline-hover: #{map.get($config, outline-hover)};
|
|
87
|
+
}
|