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,342 @@
|
|
|
1
|
+
@use "../../side-nav.theme" as side-nav;
|
|
2
|
+
|
|
3
|
+
// ─── Host ──────────────────────────────────────────────────────────────────────
|
|
4
|
+
|
|
5
|
+
:host {
|
|
6
|
+
display: block;
|
|
7
|
+
height: 100%;
|
|
8
|
+
overflow: visible; // Critical: allows toggle pill to float outside :host bounds
|
|
9
|
+
position: relative;
|
|
10
|
+
width: var(--cc-side-nav-width, 220px);
|
|
11
|
+
transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
12
|
+
|
|
13
|
+
&.cc-side-nav-host-collapsed {
|
|
14
|
+
width: var(--cc-side-nav-collapsed-width, 56px);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@include side-nav.side-nav-theme();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// ─── Edge Rail (hover affordance) ─────────────────────────────────────────────
|
|
21
|
+
// A thin accent line on the right edge that appears on hover, hinting at the
|
|
22
|
+
// interactive collapse zone (Linear/Notion-style spatial affordance).
|
|
23
|
+
|
|
24
|
+
:host::after {
|
|
25
|
+
content: '';
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 10%;
|
|
28
|
+
right: 0;
|
|
29
|
+
width: 2px;
|
|
30
|
+
height: 80%;
|
|
31
|
+
background: var(--cc-side-nav-active-bg, #1e1e2d);
|
|
32
|
+
border-radius: 2px;
|
|
33
|
+
opacity: 0;
|
|
34
|
+
transition: opacity 0.25s ease;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
z-index: 4;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host:hover::after {
|
|
40
|
+
opacity: 0.18;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host.cc-side-nav-host-collapsed::after {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ─── Toggle Pill ──────────────────────────────────────────────────────────────
|
|
48
|
+
// Circular button straddling the right edge (right: -12px keeps it half inside,
|
|
49
|
+
// half outside). Hidden by default; spring-bounces in on :host hover.
|
|
50
|
+
// When collapsed, always visible so the user can find it to re-expand.
|
|
51
|
+
|
|
52
|
+
.cc-sn-toggle {
|
|
53
|
+
position: absolute;
|
|
54
|
+
bottom: 20px;
|
|
55
|
+
right: -12px;
|
|
56
|
+
width: 24px;
|
|
57
|
+
height: 24px;
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
border: 1.5px solid var(--cc-side-nav-toggle-border-color, rgba(0, 0, 0, 0.1));
|
|
60
|
+
background: var(--cc-side-nav-toggle-bg, #ffffff);
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
z-index: 20;
|
|
66
|
+
padding: 0;
|
|
67
|
+
color: var(--cc-side-nav-item-color, #5F6368);
|
|
68
|
+
box-shadow:
|
|
69
|
+
0 1px 4px rgba(0, 0, 0, 0.1),
|
|
70
|
+
0 0 0 1px rgba(0, 0, 0, 0.04);
|
|
71
|
+
|
|
72
|
+
// Hidden by default; spring easing gives a satisfying pop on reveal
|
|
73
|
+
opacity: 0;
|
|
74
|
+
transform: scale(0.65);
|
|
75
|
+
transition:
|
|
76
|
+
opacity 0.2s ease,
|
|
77
|
+
transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
78
|
+
background 0.15s ease,
|
|
79
|
+
color 0.15s ease,
|
|
80
|
+
border-color 0.15s ease,
|
|
81
|
+
box-shadow 0.2s ease;
|
|
82
|
+
|
|
83
|
+
&:focus-visible {
|
|
84
|
+
outline: 2px solid var(--cc-side-nav-active-bg, #E63E30);
|
|
85
|
+
outline-offset: 2px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Chevron: single path, rotates 180° via :host class — no SVG swap
|
|
89
|
+
.cc-sn-chevron {
|
|
90
|
+
width: 12px;
|
|
91
|
+
height: 12px;
|
|
92
|
+
flex-shrink: 0;
|
|
93
|
+
display: block;
|
|
94
|
+
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Reveal pill when hovering anywhere on :host
|
|
99
|
+
:host:hover .cc-sn-toggle {
|
|
100
|
+
opacity: 1;
|
|
101
|
+
transform: scale(1);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Brand-colored hover state — only applies when the pill is actually visible
|
|
105
|
+
:host:hover .cc-sn-toggle:hover,
|
|
106
|
+
:host.cc-side-nav-host-collapsed .cc-sn-toggle:hover {
|
|
107
|
+
background: var(--cc-side-nav-active-bg, #E63E30);
|
|
108
|
+
color: var(--cc-side-nav-active-color, #ffffff);
|
|
109
|
+
border-color: transparent;
|
|
110
|
+
box-shadow:
|
|
111
|
+
0 4px 14px rgba(0, 0, 0, 0.1),
|
|
112
|
+
0 1px 4px rgba(0, 0, 0, 0.1);
|
|
113
|
+
transform: scale(1.12);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Collapsed: always show so user can expand; slightly elevated shadow
|
|
117
|
+
:host.cc-side-nav-host-collapsed .cc-sn-toggle {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
transform: scale(1);
|
|
120
|
+
box-shadow:
|
|
121
|
+
0 2px 8px rgba(0, 0, 0, 0.13),
|
|
122
|
+
0 0 0 1.5px rgba(0, 0, 0, 0.08);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Chevron points right (→) when collapsed = expand action
|
|
126
|
+
:host.cc-side-nav-host-collapsed .cc-sn-chevron {
|
|
127
|
+
transform: rotate(180deg);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// ─── Nav Container ────────────────────────────────────────────────────────────
|
|
131
|
+
|
|
132
|
+
.cc-side-nav {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
gap: var(--cc-side-nav-gap-sections, 24px);
|
|
136
|
+
padding: var(--cc-side-nav-padding, 16px);
|
|
137
|
+
width: var(--cc-side-nav-width, 220px);
|
|
138
|
+
min-width: var(--cc-side-nav-width, 220px);
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
background-color: var(--cc-side-nav-bg, #ffffff);
|
|
141
|
+
border-right: 1px solid var(--cc-side-nav-border-color, rgba(0, 0, 0, 0.08));
|
|
142
|
+
height: 100%;
|
|
143
|
+
overflow-y: auto;
|
|
144
|
+
overflow-x: hidden;
|
|
145
|
+
transition:
|
|
146
|
+
width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
|
147
|
+
min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
|
148
|
+
padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
149
|
+
|
|
150
|
+
&::-webkit-scrollbar { width: 3px; }
|
|
151
|
+
&::-webkit-scrollbar-track { background: transparent; }
|
|
152
|
+
&::-webkit-scrollbar-thumb {
|
|
153
|
+
background: rgba(0, 0, 0, 0.15);
|
|
154
|
+
border-radius: 2px;
|
|
155
|
+
}
|
|
156
|
+
&::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.3); }
|
|
157
|
+
|
|
158
|
+
&.collapsed {
|
|
159
|
+
width: var(--cc-side-nav-collapsed-width, 56px);
|
|
160
|
+
min-width: var(--cc-side-nav-collapsed-width, 56px);
|
|
161
|
+
padding: var(--cc-side-nav-padding, 16px) 8px;
|
|
162
|
+
|
|
163
|
+
.cc-side-nav-link {
|
|
164
|
+
justify-content: center;
|
|
165
|
+
gap: 0;
|
|
166
|
+
padding: 10px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.cc-side-nav-icon {
|
|
170
|
+
font-size: 20px;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// ─── Section & Heading ────────────────────────────────────────────────────────
|
|
176
|
+
|
|
177
|
+
.cc-side-nav-section {
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
gap: 12px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.cc-side-nav-heading-row {
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
justify-content: space-between;
|
|
187
|
+
min-height: 28px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.cc-side-nav-heading {
|
|
191
|
+
margin: 0;
|
|
192
|
+
padding: 0 16px;
|
|
193
|
+
font-family: var(--cc-side-nav-font-family, 'Poppins', sans-serif);
|
|
194
|
+
font-weight: var(--cc-side-nav-heading-font-weight, 500);
|
|
195
|
+
font-style: normal;
|
|
196
|
+
font-size: var(--cc-side-nav-heading-font-size, 16px);
|
|
197
|
+
text-transform: uppercase;
|
|
198
|
+
color: var(--cc-side-nav-heading-color, #3C4043);
|
|
199
|
+
flex: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// ─── Nav List ─────────────────────────────────────────────────────────────────
|
|
203
|
+
|
|
204
|
+
.cc-side-nav-list {
|
|
205
|
+
list-style: none;
|
|
206
|
+
margin: 0;
|
|
207
|
+
padding: 0;
|
|
208
|
+
display: flex;
|
|
209
|
+
flex-direction: column;
|
|
210
|
+
gap: var(--cc-side-nav-item-gap, 4px);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.cc-side-nav-list-item {
|
|
214
|
+
margin: 0;
|
|
215
|
+
padding: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.cc-side-nav-link {
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
gap: 12px;
|
|
222
|
+
padding: var(--cc-side-nav-item-padding, 12px 16px);
|
|
223
|
+
text-decoration: none;
|
|
224
|
+
cursor: pointer;
|
|
225
|
+
border-radius: var(--cc-side-nav-item-border-radius, 8px);
|
|
226
|
+
transition: background-color 0.2s ease, opacity 0.2s ease;
|
|
227
|
+
font-family: var(--cc-side-nav-font-family, 'Poppins', sans-serif);
|
|
228
|
+
font-weight: var(--cc-side-nav-item-font-weight, 400);
|
|
229
|
+
font-style: normal;
|
|
230
|
+
font-size: var(--cc-side-nav-item-font-size, 14px);
|
|
231
|
+
color: var(--cc-side-nav-item-color, #5F6368);
|
|
232
|
+
|
|
233
|
+
&:hover:not(.disabled) {
|
|
234
|
+
background-color: var(--cc-side-nav-item-hover-bg, rgba(30, 30, 45, 0.08));
|
|
235
|
+
color: var(--cc-side-nav-item-hover-color, #1e1e2d);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&.active {
|
|
239
|
+
background: var(--cc-side-nav-active-bg, #1e1e2d);
|
|
240
|
+
opacity: 1;
|
|
241
|
+
border-radius: var(--cc-side-nav-item-border-radius, 8px);
|
|
242
|
+
font-weight: var(--cc-side-nav-active-font-weight, 500);
|
|
243
|
+
color: var(--cc-side-nav-active-color, #ffffff);
|
|
244
|
+
|
|
245
|
+
&:hover {
|
|
246
|
+
background-color: var(--cc-side-nav-active-hover-bg, #2a2a3d);
|
|
247
|
+
color: var(--cc-side-nav-active-color, #ffffff);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&.disabled {
|
|
252
|
+
cursor: not-allowed;
|
|
253
|
+
opacity: var(--cc-side-nav-disabled-opacity, 0.5);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.cc-side-nav-icon {
|
|
258
|
+
display: flex;
|
|
259
|
+
align-items: center;
|
|
260
|
+
justify-content: center;
|
|
261
|
+
font-size: 16px;
|
|
262
|
+
flex-shrink: 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// ─── Label Slide-fade on Collapse ─────────────────────────────────────────────
|
|
266
|
+
// max-width collapses the layout space; opacity fades the text simultaneously.
|
|
267
|
+
// Keeping the element in DOM (no *ngIf) allows smooth transition in both directions.
|
|
268
|
+
|
|
269
|
+
.cc-side-nav-label {
|
|
270
|
+
flex: 1;
|
|
271
|
+
white-space: nowrap;
|
|
272
|
+
overflow: hidden;
|
|
273
|
+
max-width: 200px;
|
|
274
|
+
opacity: 1;
|
|
275
|
+
transition:
|
|
276
|
+
opacity 0.15s ease,
|
|
277
|
+
max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.collapsed .cc-side-nav-label {
|
|
281
|
+
opacity: 0;
|
|
282
|
+
max-width: 0;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// ─── Arrow Slide-fade on Collapse ─────────────────────────────────────────────
|
|
286
|
+
|
|
287
|
+
.cc-side-nav-arrow {
|
|
288
|
+
margin-left: auto;
|
|
289
|
+
font-size: 18px;
|
|
290
|
+
opacity: 0.7;
|
|
291
|
+
overflow: hidden;
|
|
292
|
+
max-width: 30px;
|
|
293
|
+
flex-shrink: 0;
|
|
294
|
+
white-space: nowrap;
|
|
295
|
+
transition:
|
|
296
|
+
opacity 0.15s ease,
|
|
297
|
+
max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.collapsed .cc-side-nav-arrow {
|
|
301
|
+
opacity: 0;
|
|
302
|
+
max-width: 0;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.cc-side-nav-link.active .cc-side-nav-arrow {
|
|
306
|
+
color: var(--cc-side-nav-active-color, #FFFFFF);
|
|
307
|
+
opacity: 1;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// ─── Tooltip ──────────────────────────────────────────────────────────────────
|
|
311
|
+
|
|
312
|
+
::ng-deep .mat-mdc-tooltip.cc-side-nav-tooltip {
|
|
313
|
+
margin-left: var(--cc-side-nav-tooltip-offset, 20px) !important;
|
|
314
|
+
overflow: visible !important;
|
|
315
|
+
|
|
316
|
+
.mdc-tooltip__surface {
|
|
317
|
+
background-color: var(--cc-side-nav-tooltip-bg, #1e1e2d) !important;
|
|
318
|
+
color: var(--cc-side-nav-tooltip-color, #FFFFFF) !important;
|
|
319
|
+
font-family: var(--cc-side-nav-font-family, 'Poppins', sans-serif) !important;
|
|
320
|
+
font-size: var(--cc-side-nav-tooltip-font-size, 12px) !important;
|
|
321
|
+
font-weight: var(--cc-side-nav-tooltip-font-weight, 500) !important;
|
|
322
|
+
padding: var(--cc-side-nav-tooltip-padding, 8px 14px) !important;
|
|
323
|
+
border-radius: var(--cc-side-nav-tooltip-border-radius, 6px) !important;
|
|
324
|
+
box-shadow: var(--cc-side-nav-tooltip-shadow, 0 4px 12px rgba(0, 0, 0, 0.35)) !important;
|
|
325
|
+
letter-spacing: var(--cc-side-nav-tooltip-letter-spacing, 0.2px) !important;
|
|
326
|
+
position: relative !important;
|
|
327
|
+
overflow: visible !important;
|
|
328
|
+
|
|
329
|
+
&::before {
|
|
330
|
+
content: '';
|
|
331
|
+
position: absolute;
|
|
332
|
+
left: -6px;
|
|
333
|
+
top: 50%;
|
|
334
|
+
transform: translateY(-50%);
|
|
335
|
+
width: 0;
|
|
336
|
+
height: 0;
|
|
337
|
+
border-top: 5px solid transparent;
|
|
338
|
+
border-bottom: 5px solid transparent;
|
|
339
|
+
border-right: 6px solid var(--cc-side-nav-tooltip-bg, #1e1e2d);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, HostBinding } from '@angular/core';
|
|
2
|
+
import { TooltipPosition } from '@angular/material/tooltip';
|
|
3
|
+
import { SideNavSection, SideNavItem, SideNavStyleConfig } from '../../side-nav.models';
|
|
4
|
+
import { DEFAULT_SIDE_NAV_TOOLTIP_POSITION } from '../../../../utils/constants';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'lib-side-nav',
|
|
8
|
+
templateUrl: './side-nav.component.html',
|
|
9
|
+
styleUrls: ['./side-nav.component.scss'],
|
|
10
|
+
standalone: false
|
|
11
|
+
})
|
|
12
|
+
export class SideNavComponent implements OnChanges {
|
|
13
|
+
@Input() sections: SideNavSection[] = [];
|
|
14
|
+
@Input() userRoles?: string[]; // If provided, filters items automatically based on roles
|
|
15
|
+
@Input() activeId?: string;
|
|
16
|
+
@Input() styleConfig?: SideNavStyleConfig;
|
|
17
|
+
|
|
18
|
+
/** Control whether the nav is collapsed externally (two-way bindable) */
|
|
19
|
+
@Input() collapsed: boolean = false;
|
|
20
|
+
/** Width of the nav when expanded. Overrides the CSS variable default. */
|
|
21
|
+
@Input() width?: string;
|
|
22
|
+
/** Width of the nav when collapsed (icons only). Overrides the CSS variable default. */
|
|
23
|
+
@Input() collapsedWidth?: string;
|
|
24
|
+
/** Whether to show the collapse toggle button */
|
|
25
|
+
@Input() showCollapseToggle: boolean = true;
|
|
26
|
+
/** Whether to hide icons when the side nav is expanded */
|
|
27
|
+
@Input() hideIconsWhenExpanded: boolean = false;
|
|
28
|
+
/** Whether to show tooltips on nav items */
|
|
29
|
+
@Input() showTooltips: boolean = false;
|
|
30
|
+
/** Position of the tooltip */
|
|
31
|
+
@Input() tooltipPosition: TooltipPosition = DEFAULT_SIDE_NAV_TOOLTIP_POSITION as TooltipPosition;
|
|
32
|
+
|
|
33
|
+
/** Optional dictionary for label translation */
|
|
34
|
+
@Input() labels?: { [key: string]: string };
|
|
35
|
+
|
|
36
|
+
@Output() itemClicked = new EventEmitter<SideNavItem>();
|
|
37
|
+
/** Emits whenever the collapsed state changes (supports two-way binding via [(collapsed)]) */
|
|
38
|
+
@Output() collapsedChange = new EventEmitter<boolean>();
|
|
39
|
+
|
|
40
|
+
/** Applies collapsed class to :host for the width CSS transition */
|
|
41
|
+
@HostBinding('class.cc-side-nav-host-collapsed') get isHostCollapsed() {
|
|
42
|
+
return this.collapsed;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
filteredSections: SideNavSection[] = [];
|
|
46
|
+
|
|
47
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
48
|
+
if (changes['sections'] || changes['userRoles'] || changes['labels']) {
|
|
49
|
+
this.filterAndMapSections();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private filterAndMapSections() {
|
|
54
|
+
if (!this.sections) {
|
|
55
|
+
this.filteredSections = [];
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const clonedSections: SideNavSection[] = structuredClone(this.sections);
|
|
60
|
+
|
|
61
|
+
this.filteredSections = clonedSections.map(section => {
|
|
62
|
+
// Map section heading if labels are provided
|
|
63
|
+
if (this.labels && section.heading) {
|
|
64
|
+
section.heading = this.labels[section.heading] || section.heading;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Filter and map items
|
|
68
|
+
section.items = section.items.filter(item => {
|
|
69
|
+
if (this.userRoles && this.userRoles.length > 0 && item.roles && item.roles.length > 0) {
|
|
70
|
+
const hasRole = item.roles.some(role => this.userRoles?.includes(role));
|
|
71
|
+
if (!hasRole) return false;
|
|
72
|
+
}
|
|
73
|
+
return true;
|
|
74
|
+
}).map((item: any) => {
|
|
75
|
+
// Map item labels and tooltips
|
|
76
|
+
if (this.labels) {
|
|
77
|
+
const mappedLabel = this.labels[item.labelKey || item.label] || item.labelKey || item.label;
|
|
78
|
+
return {
|
|
79
|
+
...item,
|
|
80
|
+
label: mappedLabel,
|
|
81
|
+
tooltip: this.labels[item.tooltip || item.labelKey] || mappedLabel
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
return item;
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
return section;
|
|
88
|
+
}).filter(section => section.items.length > 0);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
onItemClick(item: SideNavItem, event: Event) {
|
|
92
|
+
if (item.disabled) {
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.activeId = item.id;
|
|
97
|
+
this.itemClicked.emit(item);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
toggleCollapse() {
|
|
101
|
+
this.collapsed = !this.collapsed;
|
|
102
|
+
this.collapsedChange.emit(this.collapsed);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
get customStyles(): { [key: string]: string } {
|
|
106
|
+
const styles: { [key: string]: string } = {};
|
|
107
|
+
|
|
108
|
+
// Size overrides from direct inputs (take priority over styleConfig)
|
|
109
|
+
if (this.width) styles['--cc-side-nav-width'] = this.width;
|
|
110
|
+
if (this.collapsedWidth) styles['--cc-side-nav-collapsed-width'] = this.collapsedWidth;
|
|
111
|
+
|
|
112
|
+
if (!this.styleConfig) return styles;
|
|
113
|
+
|
|
114
|
+
if (this.styleConfig.bg) styles['--cc-side-nav-bg'] = this.styleConfig.bg;
|
|
115
|
+
if (this.styleConfig.width) styles['--cc-side-nav-width'] = this.styleConfig.width;
|
|
116
|
+
if (this.styleConfig.collapsedWidth) styles['--cc-side-nav-collapsed-width'] = this.styleConfig.collapsedWidth;
|
|
117
|
+
if (this.styleConfig.fontFamily) styles['--cc-side-nav-font-family'] = this.styleConfig.fontFamily;
|
|
118
|
+
if (this.styleConfig.headingColor) styles['--cc-side-nav-heading-color'] = this.styleConfig.headingColor;
|
|
119
|
+
if (this.styleConfig.itemColor) styles['--cc-side-nav-item-color'] = this.styleConfig.itemColor;
|
|
120
|
+
if (this.styleConfig.itemHoverBg) styles['--cc-side-nav-item-hover-bg'] = this.styleConfig.itemHoverBg;
|
|
121
|
+
if (this.styleConfig.activeBg) styles['--cc-side-nav-active-bg'] = this.styleConfig.activeBg;
|
|
122
|
+
if (this.styleConfig.activeColor) styles['--cc-side-nav-active-color'] = this.styleConfig.activeColor;
|
|
123
|
+
if (this.styleConfig.activeHoverBg) styles['--cc-side-nav-active-hover-bg'] = this.styleConfig.activeHoverBg;
|
|
124
|
+
if (this.styleConfig.toggleBg) styles['--cc-side-nav-toggle-bg'] = this.styleConfig.toggleBg;
|
|
125
|
+
if (this.styleConfig.toggleBorderColor) styles['--cc-side-nav-toggle-border-color'] = this.styleConfig.toggleBorderColor;
|
|
126
|
+
if (this.styleConfig.tooltipBg) styles['--cc-side-nav-tooltip-bg'] = this.styleConfig.tooltipBg;
|
|
127
|
+
if (this.styleConfig.tooltipColor) styles['--cc-side-nav-tooltip-color'] = this.styleConfig.tooltipColor;
|
|
128
|
+
if (this.styleConfig.tooltipFontWeight) styles['--cc-side-nav-tooltip-font-weight'] = this.styleConfig.tooltipFontWeight;
|
|
129
|
+
if (this.styleConfig.tooltipLetterSpacing) styles['--cc-side-nav-tooltip-letter-spacing'] = this.styleConfig.tooltipLetterSpacing;
|
|
130
|
+
if (this.styleConfig.tooltipOffset) styles['--cc-side-nav-tooltip-offset'] = this.styleConfig.tooltipOffset;
|
|
131
|
+
if (this.styleConfig.tooltipShadow) styles['--cc-side-nav-tooltip-shadow'] = this.styleConfig.tooltipShadow;
|
|
132
|
+
|
|
133
|
+
return styles;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface SideNavItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
route?: string; // Optional: Angular router link path
|
|
6
|
+
roles?: string[]; // Optional RBAC role checking
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
showArrow?: boolean; // Optional: Toggle to show/hide the arrow icon for this item
|
|
9
|
+
tooltip?: string; // Optional: Custom tooltip text, defaults to label if not provided
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface SideNavStyleConfig {
|
|
13
|
+
bg?: string;
|
|
14
|
+
width?: string;
|
|
15
|
+
collapsedWidth?: string;
|
|
16
|
+
fontFamily?: string;
|
|
17
|
+
headingColor?: string;
|
|
18
|
+
itemColor?: string;
|
|
19
|
+
itemHoverBg?: string;
|
|
20
|
+
activeBg?: string;
|
|
21
|
+
activeColor?: string;
|
|
22
|
+
activeHoverBg?: string;
|
|
23
|
+
// Toggle pill
|
|
24
|
+
toggleBg?: string;
|
|
25
|
+
toggleBorderColor?: string;
|
|
26
|
+
// Tooltip
|
|
27
|
+
tooltipBg?: string;
|
|
28
|
+
tooltipColor?: string;
|
|
29
|
+
tooltipFontWeight?: string;
|
|
30
|
+
tooltipLetterSpacing?: string;
|
|
31
|
+
tooltipOffset?: string;
|
|
32
|
+
tooltipShadow?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface SideNavSection {
|
|
36
|
+
heading?: string; // E.g., 'LEARNING CENTRE'. Optional if a section has no heading.
|
|
37
|
+
items: SideNavItem[];
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { RouterModule } from '@angular/router';
|
|
4
|
+
import { MaterialModule } from '../material/material.module';
|
|
5
|
+
import { SideNavComponent } from './components/side-nav/side-nav.component';
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
declarations: [SideNavComponent],
|
|
9
|
+
imports: [
|
|
10
|
+
CommonModule,
|
|
11
|
+
RouterModule,
|
|
12
|
+
MaterialModule
|
|
13
|
+
],
|
|
14
|
+
exports: [SideNavComponent]
|
|
15
|
+
})
|
|
16
|
+
export class SideNavModule { }
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$default-side-nav-config: (
|
|
4
|
+
// Container & Global
|
|
5
|
+
bg: #ffffff,
|
|
6
|
+
border-color: rgba(0, 0, 0, 0.08),
|
|
7
|
+
width: 220px,
|
|
8
|
+
collapsed-width: 56px,
|
|
9
|
+
gap-sections: 24px,
|
|
10
|
+
padding: 16px,
|
|
11
|
+
|
|
12
|
+
// Typographic Global
|
|
13
|
+
font-family: ('Poppins', sans-serif),
|
|
14
|
+
|
|
15
|
+
// Header Typography
|
|
16
|
+
heading-font-weight: 500,
|
|
17
|
+
heading-font-size: 16px,
|
|
18
|
+
heading-color: #3C4043,
|
|
19
|
+
|
|
20
|
+
// Item Defaults (Inactive)
|
|
21
|
+
item-gap: 4px,
|
|
22
|
+
item-padding: 12px 16px,
|
|
23
|
+
item-border-radius: 8px,
|
|
24
|
+
item-font-weight: 400,
|
|
25
|
+
item-font-size: 14px,
|
|
26
|
+
item-color: #5F6368,
|
|
27
|
+
|
|
28
|
+
// Item Hover
|
|
29
|
+
item-hover-bg: rgba(30, 30, 45, 0.08),
|
|
30
|
+
item-hover-color: #1e1e2d,
|
|
31
|
+
|
|
32
|
+
// Active Item
|
|
33
|
+
active-bg: #1e1e2d,
|
|
34
|
+
active-color: #ffffff,
|
|
35
|
+
active-font-weight: 500,
|
|
36
|
+
active-hover-bg: #2a2a3d,
|
|
37
|
+
|
|
38
|
+
// Disable State
|
|
39
|
+
disabled-opacity: 0.5,
|
|
40
|
+
|
|
41
|
+
// Toggle Pill
|
|
42
|
+
toggle-bg: #ffffff,
|
|
43
|
+
toggle-border-color: rgba(0, 0, 0, 0.1),
|
|
44
|
+
|
|
45
|
+
// Tooltip Styling
|
|
46
|
+
tooltip-bg: #1e1e2d,
|
|
47
|
+
tooltip-color: #FFFFFF,
|
|
48
|
+
tooltip-padding: 8px 14px,
|
|
49
|
+
tooltip-border-radius: 6px,
|
|
50
|
+
tooltip-font-size: 12px,
|
|
51
|
+
tooltip-font-weight: 500,
|
|
52
|
+
tooltip-letter-spacing: 0.2px,
|
|
53
|
+
tooltip-offset: 20px,
|
|
54
|
+
tooltip-shadow: 0 4px 12px rgba(0, 0, 0, 0.35)
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
@mixin side-nav-theme($user-config: ()) {
|
|
58
|
+
$config: map.merge($default-side-nav-config, $user-config);
|
|
59
|
+
|
|
60
|
+
// Container
|
|
61
|
+
--cc-side-nav-bg: #{map.get($config, bg)};
|
|
62
|
+
--cc-side-nav-border-color: #{map.get($config, border-color)};
|
|
63
|
+
--cc-side-nav-width: #{map.get($config, width)};
|
|
64
|
+
--cc-side-nav-collapsed-width: #{map.get($config, collapsed-width)};
|
|
65
|
+
--cc-side-nav-gap-sections: #{map.get($config, gap-sections)};
|
|
66
|
+
--cc-side-nav-padding: #{map.get($config, padding)};
|
|
67
|
+
|
|
68
|
+
// Typography Family
|
|
69
|
+
--cc-side-nav-font-family: #{map.get($config, font-family)};
|
|
70
|
+
|
|
71
|
+
// Headers
|
|
72
|
+
--cc-side-nav-heading-font-weight: #{map.get($config, heading-font-weight)};
|
|
73
|
+
--cc-side-nav-heading-font-size: #{map.get($config, heading-font-size)};
|
|
74
|
+
--cc-side-nav-heading-color: #{map.get($config, heading-color)};
|
|
75
|
+
|
|
76
|
+
// Items Config
|
|
77
|
+
--cc-side-nav-item-gap: #{map.get($config, item-gap)};
|
|
78
|
+
--cc-side-nav-item-padding: #{map.get($config, item-padding)};
|
|
79
|
+
--cc-side-nav-item-border-radius: #{map.get($config, item-border-radius)};
|
|
80
|
+
|
|
81
|
+
// Inactive Items
|
|
82
|
+
--cc-side-nav-item-font-weight: #{map.get($config, item-font-weight)};
|
|
83
|
+
--cc-side-nav-item-font-size: #{map.get($config, item-font-size)};
|
|
84
|
+
--cc-side-nav-item-color: #{map.get($config, item-color)};
|
|
85
|
+
--cc-side-nav-item-hover-bg: #{map.get($config, item-hover-bg)};
|
|
86
|
+
--cc-side-nav-item-hover-color: #{map.get($config, item-hover-color)};
|
|
87
|
+
|
|
88
|
+
// Active Items
|
|
89
|
+
--cc-side-nav-active-bg: #{map.get($config, active-bg)};
|
|
90
|
+
--cc-side-nav-active-color: #{map.get($config, active-color)};
|
|
91
|
+
--cc-side-nav-active-font-weight: #{map.get($config, active-font-weight)};
|
|
92
|
+
--cc-side-nav-active-hover-bg: #{map.get($config, active-hover-bg)};
|
|
93
|
+
|
|
94
|
+
// Disabled
|
|
95
|
+
--cc-side-nav-disabled-opacity: #{map.get($config, disabled-opacity)};
|
|
96
|
+
|
|
97
|
+
// Toggle Pill
|
|
98
|
+
--cc-side-nav-toggle-bg: #{map.get($config, toggle-bg)};
|
|
99
|
+
--cc-side-nav-toggle-border-color: #{map.get($config, toggle-border-color)};
|
|
100
|
+
|
|
101
|
+
// Tooltip
|
|
102
|
+
--cc-side-nav-tooltip-bg: #{map.get($config, tooltip-bg)};
|
|
103
|
+
--cc-side-nav-tooltip-color: #{map.get($config, tooltip-color)};
|
|
104
|
+
--cc-side-nav-tooltip-padding: #{map.get($config, tooltip-padding)};
|
|
105
|
+
--cc-side-nav-tooltip-border-radius: #{map.get($config, tooltip-border-radius)};
|
|
106
|
+
--cc-side-nav-tooltip-font-size: #{map.get($config, tooltip-font-size)};
|
|
107
|
+
--cc-side-nav-tooltip-font-weight: #{map.get($config, tooltip-font-weight)};
|
|
108
|
+
--cc-side-nav-tooltip-letter-spacing: #{map.get($config, tooltip-letter-spacing)};
|
|
109
|
+
--cc-side-nav-tooltip-offset: #{map.get($config, tooltip-offset)};
|
|
110
|
+
--cc-side-nav-tooltip-shadow: #{map.get($config, tooltip-shadow)};
|
|
111
|
+
}
|