Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c310cbb
Add peer dependency flag to multiple packages in package-lock.json
TerranceKhumalo-absa Feb 16, 2026
501b7a1
Refactor styles and update color variables for improved theming consi…
TerranceKhumalo-absa Feb 16, 2026
3685c38
Enhance input and loader components with improved theming and styling…
TerranceKhumalo-absa Feb 16, 2026
99e7559
Remove document attribute theme application tests from CpsThemeServic…
TerranceKhumalo-absa Feb 16, 2026
2e5dbf9
Refactor theme toggle component and styles for improved theming consi…
TerranceKhumalo-absa Feb 18, 2026
41c7e8e
Update default theme initialization in CpsThemeService tests for cons…
TerranceKhumalo-absa Feb 18, 2026
d6dc181
Remove specific font-family setting for password input in cps-input s…
TerranceKhumalo-absa Feb 18, 2026
1a80396
Refactor theme toggle component for improved accessibility and update…
TerranceKhumalo-absa Feb 23, 2026
9f872da
Refactor theme application logic in CpsThemeService for improved perf…
TerranceKhumalo-absa Mar 9, 2026
c5249f5
Enhance theme management and documentation across components, update …
TerranceKhumalo-absa Mar 26, 2026
f92199d
feat: add kafka icon to SVG and update icon names
TerranceKhumalo-absa Mar 31, 2026
892ea24
chore: add jest-preset-angular dependency to package.json
TerranceKhumalo-absa Mar 31, 2026
fa8152f
fix: update color references to use CSS variables for consistency
TerranceKhumalo-absa Mar 31, 2026
cf682e7
fix: update fallback theme to light mode and refine color variables f…
TerranceKhumalo-absa Apr 1, 2026
fbe4121
feat: enhance theme management by updating CSS variable usage and imp…
TerranceKhumalo-absa Apr 2, 2026
895d16c
feat: update color variables for improved theme consistency and acces…
TerranceKhumalo-absa Apr 7, 2026
78e864b
Update cps-loader and cps-theme configuration files
TerranceKhumalo-absa Apr 7, 2026
e60937f
chore: update @emnapi/wasi-threads to version 1.2.1 with updated inte…
TerranceKhumalo-absa Apr 7, 2026
fb9d9f9
chore: regenerate package-lock file
TerranceKhumalo-absa Apr 7, 2026
2e22023
fix(theme): gate composition theme controls and align default calm pa…
TerranceKhumalo-absa Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 8 additions & 133 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"eslint-plugin-standard": "^5.0.0",
"jest": "^30.3.0",
"jest-environment-jsdom": "^30.3.0",
"jest-preset-angular": "^16.1.2",
"ng-packagr": "^21.2.2",
"pa11y-ci": "^4.0.1",
"prettier": "^3.4.2",
Expand Down
2 changes: 1 addition & 1 deletion projects/composition/src/app/api-data/cps-loader.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"optional": false,
"readonly": false,
"type": "string",
"default": "depth",
"default": "var(--cps-accent-primary)",
"description": "Color of the label."
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"optional": true,
"readonly": false,
"type": "number",
"description": "The duration (in milliseconds) that the notification will be displayed before automatically closing.\nValue 0 means that the notification is persistent and will not be automatically closed."
"description": "The duration (in milliseconds) that the notification will be displayed before automatically closing.\r\nValue 0 means that the notification is persistent and will not be automatically closed."
},
{
"name": "allowDuplicates",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"optional": false,
"readonly": false,
"type": "string",
"default": "calm",
"default": "var(--cps-accent-primary)",
"description": "Color of the progress bar."
},
{
Expand Down
12 changes: 6 additions & 6 deletions projects/composition/src/app/api-data/cps-table.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,22 @@
"readonly": false,
"type": "boolean",
"default": "true",
"description": "Determines whether the 'Remove' button should be displayed in the row menu.\nNote: This setting only takes effect if 'showRowMenu' is true and 'rowMenuItems' is not set."
"description": "Determines whether the 'Remove' button should be displayed in the row menu.\r\nNote: This setting only takes effect if 'showRowMenu' is true and 'rowMenuItems' is not set."
},
{
"name": "showRowEditButton",
"optional": false,
"readonly": false,
"type": "boolean",
"default": "true",
"description": "Determines whether the 'Edit' button should be displayed in the row menu.\nNote: This setting only takes effect if 'showRowMenu' is true and 'rowMenuItems' is not set."
"description": "Determines whether the 'Edit' button should be displayed in the row menu.\r\nNote: This setting only takes effect if 'showRowMenu' is true and 'rowMenuItems' is not set."
},
{
"name": "rowMenuItems",
"optional": true,
"readonly": false,
"type": "CpsMenuItem[]",
"description": "Custom items to be displayed in the row menu.\nNote: This setting only takes effect if 'showRowMenu' is true."
"description": "Custom items to be displayed in the row menu.\r\nNote: This setting only takes effect if 'showRowMenu' is true."
},
{
"name": "reorderableRows",
Expand Down Expand Up @@ -178,7 +178,7 @@
"readonly": false,
"type": "boolean",
"default": "true",
"description": "If true, automatically detects filter type based on values, otherwise sets 'text' filter type for all columns.\nNote: This setting only takes effect if 'filterableByColumns' is true."
"description": "If true, automatically detects filter type based on values, otherwise sets 'text' filter type for all columns.\r\nNote: This setting only takes effect if 'filterableByColumns' is true."
},
{
"name": "sortMode",
Expand Down Expand Up @@ -570,15 +570,15 @@
"readonly": false,
"type": "boolean",
"default": "false",
"description": "Determines whether columns are resizable.\nIn case of using a custom template for columns, it is also needed to add cpsTColResizable directive to th elements."
"description": "Determines whether columns are resizable.\r\nIn case of using a custom template for columns, it is also needed to add cpsTColResizable directive to th elements."
},
{
"name": "columnResizeMode",
"optional": false,
"readonly": false,
"type": "\"expand\" | \"fit\"",
"default": "fit",
"description": "Determines how the columns are resized. It can be 'fit' (total width of the table stays the same) or 'expand' (total width of the table changes when resizing columns).\nNote: This setting only takes effect if 'resizableColumns' is true."
"description": "Determines how the columns are resized. It can be 'fit' (total width of the table stays the same) or 'expand' (total width of the table changes when resizing columns).\r\nNote: This setting only takes effect if 'resizableColumns' is true."
}
]
},
Expand Down
30 changes: 30 additions & 0 deletions projects/composition/src/app/api-data/cps-theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"components": {},
"name": "CpsThemeService",
"description": "CpsThemeService manages application theming including dark mode support.\r\n\r\nThis service provides:\r\n- Light and dark theme switching with smooth transitions\r\n- Automatic persistence of theme preference in localStorage\r\n- Reactive state management using Angular signals",
"types": {
"description": "Defines the custom types used by the module.",
"values": [
{
"name": "CpsTheme",
"value": "\"light\" | \"dark\"",
"description": "Available theme options"
},
{
"name": "CpsColorTheme",
"value": "\"neutral\" | \"calm\" | \"energy\" | \"passion\"",
"description": "Available color theme options"
},
{
"name": "CpsBaseTheme",
"value": "\"default\" | \"graphite\" | \"midnight\" | \"aubergine\"",
"description": "Available dark-mode base theme options"
},
{
"name": "CpsRadiusTheme",
"value": "\"none\" | \"compact\" | \"rounded\" | \"pill\"",
"description": "Available radius theme options"
}
]
}
}
12 changes: 6 additions & 6 deletions projects/composition/src/app/api-data/cps-tree-table.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,22 @@
"readonly": false,
"type": "boolean",
"default": "true",
"description": "Determines whether the 'Remove' button should be displayed in the row menu.\nNote: This setting only takes effect if 'showRowMenu' is true and 'rowMenuItems' is not set."
"description": "Determines whether the 'Remove' button should be displayed in the row menu.\r\nNote: This setting only takes effect if 'showRowMenu' is true and 'rowMenuItems' is not set."
},
{
"name": "showRowEditButton",
"optional": false,
"readonly": false,
"type": "boolean",
"default": "true",
"description": "Determines whether the 'Edit' button should be displayed in the row menu.\nNote: This setting only takes effect if 'showRowMenu' is true and 'rowMenuItems' is not set."
"description": "Determines whether the 'Edit' button should be displayed in the row menu.\r\nNote: This setting only takes effect if 'showRowMenu' is true and 'rowMenuItems' is not set."
},
{
"name": "rowMenuItems",
"optional": true,
"readonly": false,
"type": "CpsMenuItem[]",
"description": "Custom items to be displayed in the row menu.\nNote: This setting only takes effect if 'showRowMenu' is true."
"description": "Custom items to be displayed in the row menu.\r\nNote: This setting only takes effect if 'showRowMenu' is true."
},
{
"name": "loading",
Expand Down Expand Up @@ -530,7 +530,7 @@
"readonly": false,
"type": "boolean",
"default": "true",
"description": "If true, automatically detects filter type based on values, otherwise sets 'text' filter type for all columns.\nNote: This setting only takes effect if 'filterableByColumns' is true."
"description": "If true, automatically detects filter type based on values, otherwise sets 'text' filter type for all columns.\r\nNote: This setting only takes effect if 'filterableByColumns' is true."
},
{
"name": "showExportBtn",
Expand Down Expand Up @@ -586,15 +586,15 @@
"readonly": false,
"type": "boolean",
"default": "false",
"description": "Determines whether columns are resizable.\nIn case of using a custom template for columns, it is also needed to add cpsTTColResizable directive to th elements."
"description": "Determines whether columns are resizable.\r\nIn case of using a custom template for columns, it is also needed to add cpsTTColResizable directive to th elements."
},
{
"name": "columnResizeMode",
"optional": false,
"readonly": false,
"type": "\"expand\" | \"fit\"",
"default": "fit",
"description": "Determines how the columns are resized. It can be 'fit' (total width of the table stays the same) or 'expand' (total width of the table changes when resizing columns).\nNote: This setting only takes effect if 'resizableColumns' is true."
"description": "Determines how the columns are resized. It can be 'fit' (total width of the table stays the same) or 'expand' (total width of the table changes when resizing columns).\r\nNote: This setting only takes effect if 'resizableColumns' is true."
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"components": {},
"name": "CronValidationService",
"description": "Service for validating 6-field cron expressions with extended features.\n\nThis service handles cron validation logic for extended cron expression formats\nthat support additional features beyond standard Unix cron for more flexible\nscheduling capabilities.\n\nFormat: minutes hours day-of-month month day-of-week year\n\nKey Features:\n- Wildcards: asterisk (any value), question mark (any value for day fields)\n- Ranges: 1-5, MON-FRI, JAN-MAR\n- Steps: asterisk/15, 5/10, 1-5/2\n- Lists: 1,3,5, MON,WED,FRI\n- Special chars: L (last), W (weekday), hash (nth occurrence)",
"description": "Service for validating 6-field cron expressions with extended features.\r\n\r\nThis service handles cron validation logic for extended cron expression formats\r\nthat support additional features beyond standard Unix cron for more flexible\r\nscheduling capabilities.\r\n\r\nFormat: minutes hours day-of-month month day-of-week year\r\n\r\nKey Features:\r\n- Wildcards: asterisk (any value), question mark (any value for day fields)\r\n- Ranges: 1-5, MON-FRI, JAN-MAR\r\n- Steps: asterisk/15, 5/10, 1-5/2\r\n- Lists: 1,3,5, MON,WED,FRI\r\n- Special chars: L (last), W (weekday), hash (nth occurrence)",
"methods": {
"description": "Methods used in service.",
"values": [
Expand Down
6 changes: 5 additions & 1 deletion projects/composition/src/app/api-data/types_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@
"CpsTooltipOpenOn": "tooltip",
"CpsNotificationConfig": "notification",
"CpsNotificationAppearance": "notification",
"CpsNotificationPosition": "notification"
"CpsNotificationPosition": "notification",
"CpsTheme": "theme",
"CpsColorTheme": "theme",
"CpsBaseTheme": "theme",
"CpsRadiusTheme": "theme"
}
6 changes: 4 additions & 2 deletions projects/composition/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<div class="top-toolbar">
<img src="assets/ui_logo.svg" />
<img src="assets/ui_logo.svg" alt="CPS UI Kit logo" />
<span>Consumer Products UI Kit</span>
@if (version) {
<span
><b>v{{ version }}</b></span
>
}
@if (showThemeToggle) {
<app-theme-toggle />
}
</div>
<div class="composition-container">
<app-navigation-sidebar
Expand All @@ -16,7 +19,6 @@
<div class="composition-body-toolbar">
<cps-icon
icon="burger-arrow"
color="white"
class="sidebar-toggle-icon"
(click)="toggleSidebar()"></cps-icon>
<span class="composition-body-toolbar-title">{{ componentTitle }}</span>
Expand Down
33 changes: 26 additions & 7 deletions projects/composition/src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,37 @@

.top-toolbar {
height: vars.$top-tbar-height;
background-color: white;
background-color: var(--cps-surface-body);
display: flex;
padding-left: 20px;
padding: 0 14px;
align-items: center;
border-bottom: 1px solid lightgrey;
border-bottom: 1px solid var(--cps-border-color);
gap: 8px;
img {
width: 42px;
height: 42px;
}

span {
margin-left: 16px;
font-size: 18px;
color: vars.$color-calm;
color: var(--cps-accent-primary);
line-height: 1;

&:first-of-type {
flex: 1;
font-weight: lighter;
letter-spacing: 0.01em;
}

b {
color: var(--cps-accent-primary);
font-weight: 700;
font-size: 18px;
}
}

app-theme-toggle {
margin-left: auto;
}
}
.composition-container {
Expand All @@ -29,11 +47,12 @@
background-color: vars.$composition-background;
.composition-body-toolbar {
height: vars.$inner-tbar-height;
background: vars.$color-calm;
background: var(--cps-surface-elevated);
border-bottom: 1px solid var(--cps-border-color);
display: flex;
align-items: center;
justify-content: space-between;
color: white;
color: var(--cps-text-primary);
font-size: 20px;
.composition-body-toolbar-title {
margin: 0 auto;
Expand Down
10 changes: 8 additions & 2 deletions projects/composition/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { ActivatedRoute, RouterOutlet } from '@angular/router';
import { CpsIconComponent } from 'cps-ui-kit';
import { AppComponent } from './app.component';
import { NavigationSidebarComponent } from './components/navigation-sidebar/navigation-sidebar.component';
import { ThemeToggleComponent } from './components/theme-toggle/theme-toggle.component';

jest.mock('projects/cps-ui-kit/package.json', () => ({ version: '1.0.0' }), {
virtual: true
Expand All @@ -12,7 +13,12 @@ describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [AppComponent],
imports: [NavigationSidebarComponent, CpsIconComponent, RouterOutlet],
imports: [
NavigationSidebarComponent,
CpsIconComponent,
ThemeToggleComponent,
RouterOutlet
],
providers: [{ provide: ActivatedRoute, useValue: {} }]
}).compileComponents();
});
Expand Down
5 changes: 4 additions & 1 deletion projects/composition/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { filter, map } from 'rxjs/operators';
import packageJson from 'projects/cps-ui-kit/package.json';
import { filter, map } from 'rxjs/operators';

Check warning on line 4 in projects/composition/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

@Component({
selector: 'app-root',
Expand All @@ -9,11 +9,14 @@
styleUrls: ['./app.component.scss'],
standalone: false
})
export class AppComponent {
componentTitle = '';

sidebarExpanded = true;

showThemeToggle =
new URLSearchParams(window.location.search).get('experimental') === 'true';

Check warning on line 18 in projects/composition/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

version = packageJson?.version;

constructor(
Expand All @@ -27,7 +30,7 @@
map((route) => route?.firstChild),
map((route) => route?.snapshot?.routeConfig)
)
.subscribe((data: any) => {

Check warning on line 33 in projects/composition/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
this.componentTitle = data?.title?.toUpperCase() || '';
});
}
Expand Down
10 changes: 6 additions & 4 deletions projects/composition/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
// provideClientHydration
} from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { TitleStrategy } from '@angular/router';

Check warning on line 7 in projects/composition/src/app/app.module.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
import { CpsIconComponent } from 'cps-ui-kit';

Check warning on line 8 in projects/composition/src/app/app.module.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NavigationSidebarComponent } from './components/navigation-sidebar/navigation-sidebar.component';
import { TitleStrategy } from '@angular/router';
import { AppPrefixTitleStrategy } from './app.prefix-title-strategy';
import { CpsIconComponent } from 'cps-ui-kit';
import { NavigationSidebarComponent } from './components/navigation-sidebar/navigation-sidebar.component';

Check warning on line 12 in projects/composition/src/app/app.module.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
import { ThemeToggleComponent } from './components/theme-toggle/theme-toggle.component';

Check warning on line 13 in projects/composition/src/app/app.module.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

@NgModule({
declarations: [AppComponent],
Expand All @@ -18,7 +19,8 @@
BrowserAnimationsModule,
AppRoutingModule,
NavigationSidebarComponent,
CpsIconComponent
CpsIconComponent,
ThemeToggleComponent
],
providers: [
{ provide: TitleStrategy, useClass: AppPrefixTitleStrategy }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<cps-tab-group
tabsBackground="bg-light"
tabsBackground="var(--cps-background-color)"
animationType="fade"
(afterTabChanged)="changeTab($event)"
[selectedIndex]="selectedTabIndex">
Expand Down
Loading
Loading