Skip to content

Commit 1b117ed

Browse files
committed
refactor: styling changes and component imports
1 parent e327a78 commit 1b117ed

File tree

14 files changed

+100
-96
lines changed

14 files changed

+100
-96
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pega/react-sdk-components",
3-
"version": "0.25.4",
3+
"version": "0.25.5",
44
"description": "React SDK packaging: bridge and components, overrides",
55
"main": "index.ts",
66
"scripts": {
@@ -98,7 +98,6 @@
9898
"eslint-plugin-react": "^7.37.5",
9999
"eslint-plugin-react-hooks": "^5.2.0",
100100
"eslint-plugin-sonarjs": "^3.0.5",
101-
"typescript-eslint": "^8.45.0",
102101
"html-webpack-plugin": "^5.6.4",
103102
"http-server": "^14.1.1",
104103
"istanbul": "^0.4.5",
@@ -119,6 +118,7 @@
119118
"ts-jest": "^29.4.1",
120119
"ts-loader": "^9.5.2",
121120
"typescript": "^5.9.2",
121+
"typescript-eslint": "^8.45.0",
122122
"webpack": "^5.101.2",
123123
"webpack-cli": "^6.0.1",
124124
"webpack-dev-server": "^5.2.2"

packages/react-sdk-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pega/react-sdk-components",
3-
"version": "0.25.4",
3+
"version": "0.25.5",
44
"description": "React SDK Infrastructure: bridge and components",
55
"_filesComment": "During packing, npm ignores everything NOT in the files list",
66
"files": [

packages/react-sdk-components/src/common.css

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -62,88 +62,3 @@
6262
[class*='MuiInputAdornment-positionStart'] {
6363
margin-right: 0 !important;
6464
}
65-
66-
.tox .tox-toolbar {
67-
background-color: var(--app-background-color) !important;
68-
}
69-
70-
.tox .tox-toolbar__primary {
71-
background-color: var(--app-background-color) !important;
72-
}
73-
74-
.tox .tox-toolbar__button {
75-
color: var(--app-text-color) !important;
76-
}
77-
78-
.tox .tox-toolbar__button--enabled {
79-
background: var(--app-primary-color) !important;
80-
color: #fff !important;
81-
}
82-
83-
.tox .tox-dialog {
84-
background-color: var(--modal-top-color) !important;
85-
color: var(--app-text-color) !important;
86-
border: 1px solid var(--modal-border-color) !important;
87-
padding: 20px !important;
88-
box-shadow: 0 0 10px 3px var(--modal-box-shadow-color) !important;
89-
}
90-
91-
.tox .tox-dialog__header {
92-
background-color: var(--modal-top-color) !important;
93-
color: var(--app-text-color) !important;
94-
font-weight: 500;
95-
border-bottom: 1px solid var(--modal-border-color);
96-
}
97-
98-
.tox .tox-dialog__footer {
99-
background: transparent !important;
100-
border-top: 1px solid var(--modal-border-color);
101-
}
102-
103-
.tox .tox-dialog-wrap__backdrop {
104-
background-color: var(--modal-background-color) !important;
105-
}
106-
107-
.tox .tox-dialog__body input,
108-
.tox .tox-dialog__body textarea,
109-
.tox .tox-dialog__body select {
110-
background: initial !important;
111-
color: var(--app-text-color) !important;
112-
border: 1px solid var(--app-neutral-color) !important;
113-
border-radius: 4px !important;
114-
padding: 6px 10px !important;
115-
font-size: 1em !important;
116-
font-family: inherit !important;
117-
}
118-
119-
.tox .tox-dialog__body button {
120-
background: transparent;
121-
color: #fff !important;
122-
border: none !important;
123-
border-radius: 4px !important;
124-
padding: 8px 16px !important;
125-
font-size: 1em !important;
126-
cursor: pointer !important;
127-
}
128-
129-
.tox .tox-dialog__footer .tox-button {
130-
background: var(--app-primary-color) !important;
131-
color: #fff !important;
132-
border: none !important;
133-
border-radius: 4px !important;
134-
padding: 8px 16px !important;
135-
font-size: 1em !important;
136-
cursor: pointer !important;
137-
}
138-
139-
.tox .tox-dialog__footer .tox-button--secondary {
140-
background: var(--app-secondary-color) !important;
141-
color: var(--secondary-button-text-color) !important;
142-
font-size: 0.875rem !important;
143-
cursor: pointer !important;
144-
}
145-
146-
/* Support for google map autocomplete */
147-
.pac-container {
148-
z-index: 2147483647;
149-
}

packages/react-sdk-components/src/components/field/Group/Group.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { type ReactElement, useMemo } from 'react';
22
import Grid2 from '@mui/material/Grid2';
3-
import FieldGroup from '../../designSystemExtension/FieldGroup';
3+
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
44
import type { PConnFieldProps } from '../../../types/PConnProps';
55

66
interface GroupProps extends PConnFieldProps {
@@ -13,6 +13,8 @@ interface GroupProps extends PConnFieldProps {
1313
}
1414

1515
export default function Group(props: GroupProps) {
16+
const FieldGroup = getComponentFromMap('FieldGroup');
17+
1618
const { children, heading, showHeading, instructions, collapsible, displayMode, type } = props;
1719

1820
const isReadOnly = displayMode === 'DISPLAY_ONLY';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Support for google map autocomplete */
2+
.pac-container {
3+
z-index: 2147483647;
4+
}

packages/react-sdk-components/src/components/field/Location/Location.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
88
import type { PConnFieldProps } from '../../../types/PConnProps';
99
import handleEvent from '../../helpers/event-utils';
1010

11+
import './Location.css';
12+
1113
interface LocationProps extends PConnFieldProps {
1214
coordinates?: string;
1315
onlyCoordinates?: boolean;
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
.tox .tox-toolbar {
2+
background-color: var(--app-background-color) !important;
3+
}
4+
5+
.tox .tox-toolbar__primary {
6+
background-color: var(--app-background-color) !important;
7+
}
8+
9+
.tox .tox-toolbar__button {
10+
color: var(--app-text-color) !important;
11+
}
12+
13+
.tox .tox-toolbar__button--enabled {
14+
background: var(--app-primary-color) !important;
15+
color: #fff !important;
16+
}
17+
18+
.tox .tox-dialog {
19+
background-color: var(--modal-top-color) !important;
20+
color: var(--app-text-color) !important;
21+
border: 1px solid var(--modal-border-color) !important;
22+
padding: 20px !important;
23+
box-shadow: 0 0 10px 3px var(--modal-box-shadow-color) !important;
24+
}
25+
26+
.tox .tox-dialog__header {
27+
background-color: var(--modal-top-color) !important;
28+
color: var(--app-text-color) !important;
29+
font-weight: 500;
30+
border-bottom: 1px solid var(--modal-border-color);
31+
}
32+
33+
.tox .tox-dialog__footer {
34+
background: transparent !important;
35+
border-top: 1px solid var(--modal-border-color);
36+
}
37+
38+
.tox .tox-dialog-wrap__backdrop {
39+
background-color: var(--modal-background-color) !important;
40+
}
41+
42+
.tox .tox-dialog__body input,
43+
.tox .tox-dialog__body textarea,
44+
.tox .tox-dialog__body select {
45+
background: initial !important;
46+
color: var(--app-text-color) !important;
47+
border: 1px solid var(--app-neutral-color) !important;
48+
border-radius: 4px !important;
49+
padding: 6px 10px !important;
50+
font-size: 1em !important;
51+
font-family: inherit !important;
52+
}
53+
54+
.tox .tox-dialog__body button {
55+
background: transparent;
56+
color: #fff !important;
57+
border: none !important;
58+
border-radius: 4px !important;
59+
padding: 8px 16px !important;
60+
font-size: 1em !important;
61+
cursor: pointer !important;
62+
}
63+
64+
.tox .tox-dialog__footer .tox-button {
65+
background: var(--app-primary-color) !important;
66+
color: #fff !important;
67+
border: none !important;
68+
border-radius: 4px !important;
69+
padding: 8px 16px !important;
70+
font-size: 1em !important;
71+
cursor: pointer !important;
72+
}
73+
74+
.tox .tox-dialog__footer .tox-button--secondary {
75+
background: var(--app-secondary-color) !important;
76+
color: var(--secondary-button-text-color) !important;
77+
font-size: 0.875rem !important;
78+
cursor: pointer !important;
79+
}

packages/react-sdk-components/src/components/field/RichText/RichText.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import handleEvent from '../../helpers/event-utils';
44
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
55
import type { PConnFieldProps } from '../../../types/PConnProps';
66

7+
import './RichText.css';
8+
79
interface RichTextProps extends PConnFieldProps {
810
// If any, enter additional props that only exist on TextArea here
911
additionalProps?: object;

packages/react-sdk-components/src/components/field/UserReference/UserReference.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Typography } from '@mui/material';
44
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
55
import type { PConnProps } from '../../../types/PConnProps';
66

7-
import FieldValueList from '../../designSystemExtension/FieldValueList';
87
import { getUserId, isUserNameAvailable } from './UserReferenceUtils';
98

109
const DROPDOWN_LIST = 'Drop-down list';
@@ -34,6 +33,7 @@ const UserReference = (props: UserReferenceProps) => {
3433
// Get emitted components from map (so we can get any override that may exist)
3534
const AutoComplete = getComponentFromMap('AutoComplete');
3635
const Dropdown = getComponentFromMap('Dropdown');
36+
const FieldValueList = getComponentFromMap('FieldValueList');
3737

3838
const {
3939
label = '',

packages/react-sdk-components/src/components/template/DefaultPage/DefaultPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useMemo, Children } from 'react';
22
import type { ReactNode } from 'react';
33
import { Grid2 } from '@mui/material';
4-
import Banner from '../../designSystemExtension/Banner';
4+
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
55

66
export interface CommonPageProps {
77
/** Page title */
@@ -72,6 +72,8 @@ export default function DefaultPage({
7272
backgroundColor = '',
7373
tintImage
7474
}: DefaultPageProps) {
75+
const Banner = getComponentFromMap('Banner');
76+
7577
const childArray = useMemo(() => {
7678
return Children.toArray(children);
7779
}, [children]);

0 commit comments

Comments
 (0)