Skip to content

Commit 3206ec4

Browse files
committed
feat: light / dark theme changes
1 parent 87d8edb commit 3206ec4

File tree

16 files changed

+342
-48
lines changed

16 files changed

+342
-48
lines changed

.prettierrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// Prettier config options: https://prettier.io/docs/en/options.html
22
// Shared front-end config: https://git.pega.io/projects/FE/repos/configs/browse/packages/prettier-config/index.json
33

4-
module.exports = import('@pega/prettier-config').then((pegaPrettierConfig) => ({
4+
module.exports = import('@pega/prettier-config').then(pegaPrettierConfig => ({
55
...pegaPrettierConfig.default,
66
printWidth: 150,
7-
trailingComma: 'none'
7+
trailingComma: 'none',
8+
arrowParens: 'avoid'
89
}));

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const config = {
2020
],
2121
framework: '@storybook/react-webpack5',
2222

23-
webpackFinal: async (config) => {
23+
webpackFinal: async config => {
2424
if (config.resolve?.alias) {
2525
config.resolve.alias['@pega/react-sdk-components/lib/bridge/react_pconnect'] = path.resolve(__dirname, '../__mocks__/react_pconnect.jsx');
2626
config.resolve.alias['@pega/react-sdk-components/lib/components/designSystemExtension/DetailsFields'] = path.resolve(

__mocks__/DetailsFields.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { format } from '@pega/react-sdk-components/lib/components/helpers/format
77

88
import createPConnectComponent from './react_pconnect';
99

10-
const useStyles = makeStyles((theme) => ({
10+
const useStyles = makeStyles(theme => ({
1111
root: {
1212
paddingRight: theme.spacing(1),
1313
paddingLeft: theme.spacing(1),

__mocks__/state-utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { connect, Provider, shallowEqual } from 'react-redux';
22

33
const connectToState = (mapStateToProps = () => {}) => {
4-
return (Component) => {
4+
return Component => {
55
const ConnectedComponent = connect(mapStateToProps, null, null, {
66
areStatePropsEqual: (next, prev: any) => {
77
// Compare visibility

package-lock.json

Lines changed: 89 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353
"_internal-build-jest-assets": "dx-component-builder-sdk buildJestAssets"
5454
},
5555
"dependencies": {
56-
"@pega/auth": "^0.2.31",
56+
"@pega/auth": "^0.2.34",
5757
"@pega/cosmos-react-condition-builder": "^8.4.1",
5858
"@pega/cosmos-react-core": "^8.4.1",
5959
"@pega/cosmos-react-work": "^8.4.1",
60-
"@pega/react-sdk-components": "~0.25.2",
60+
"@pega/react-sdk-components": "~0.25.4",
6161
"@storybook/react-webpack5": "^8.6.14",
6262
"@types/react-dom": "^18.3.7",
6363
"@types/styled-components": "^5.1.34",
@@ -74,10 +74,10 @@
7474
"@babel/preset-typescript": "^7.23.3",
7575
"@loadable/component": "^5.16.3",
7676
"@pega/configs": "^0.17.0",
77-
"@pega/constellationjs": "~24.2.2",
78-
"@pega/dx-component-builder-sdk": "~24.2.12",
79-
"@pega/pcore-pconnect-typedefs": "~3.2.2",
80-
"@pega/react-sdk-overrides": "~0.25.2",
77+
"@pega/constellationjs": "~25.1.0",
78+
"@pega/dx-component-builder-sdk": "~24.2.14",
79+
"@pega/pcore-pconnect-typedefs": "~4.1.0",
80+
"@pega/react-sdk-overrides": "~0.25.4",
8181
"@playwright/test": "^1.54.2",
8282
"@storybook/addon-essentials": "^8.6.14",
8383
"@storybook/addon-links": "^8.6.14",

scripts/copy-configs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ function gatherConfigFiles() {
5959
// Look for an process any Custom component configs
6060
const jsFilesCustom = fg.sync(`${COMPONENTS_ROOT_SOURCE}/${COMPONENTS_CUSTOM_DIR}/**/${CONFIG_NAME}`);
6161

62-
jsFilesCustom.forEach((file) => {
62+
jsFilesCustom.forEach(file => {
6363
// console.log(`${LOG_PRELUDE} found file: ${file}`);
6464
copyConfigRelatedFile(file);
6565
});
6666

6767
// Look for an process any override component configs
6868
const jsFilesOverride = fg.sync(`${COMPONENTS_ROOT_SOURCE}/${COMPONENTS_OVERRIDE_DIR}/**/${CONFIG_NAME}`);
6969

70-
jsFilesOverride.forEach((file) => {
70+
jsFilesOverride.forEach(file => {
7171
// console.log(`${LOG_PRELUDE} found file: ${file}`);
7272
copyConfigRelatedFile(file);
7373
});
@@ -76,7 +76,7 @@ function gatherConfigFiles() {
7676
function gatherConfigExtFiles() {
7777
const jsFiles = fg.sync(`${COMPONENTS_ROOT_SOURCE}/**/${CONFIG_EXT_NAME}`);
7878

79-
jsFiles.forEach((file) => {
79+
jsFiles.forEach(file => {
8080
// console.log(`${LOG_PRELUDE} found file: ${file}`);
8181
copyConfigRelatedFile(file);
8282
});

sdk-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"comment_sdk_config": "This is the configuration file for the React SDK",
33
"sdk_optional_configs_doc_comment": "See the document(link below) for more details on all the available config settings",
44
"sdk_optional_configs_doc": "https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/configuring-sdk-config-json.html",
5+
"theme": "light",
56
"authConfig": {
67
"authService": "pega",
78

src/samples/Embedded/Header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Typography } from '@mui/material';
22
import { makeStyles } from '@mui/styles';
33

4-
const useStyles = makeStyles((theme) => ({
4+
const useStyles = makeStyles(theme => ({
55
embeddedHeader: {
66
display: 'flex',
77
alignItems: 'center',

src/samples/Embedded/ResolutionScreen/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import makeStyles from '@mui/styles/makeStyles';
22

3-
const useStyles = makeStyles((theme) => ({
3+
const useStyles = makeStyles(theme => ({
44
resolutionPart: {
55
display: 'flex',
66
flexDirection: 'row'

0 commit comments

Comments
 (0)