Skip to content

Commit

Permalink
(chore) ungrade carbon
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaidrsk committed Oct 10, 2024
1 parent 0398e51 commit 88a8f29
Show file tree
Hide file tree
Showing 18 changed files with 6,228 additions and 4,626 deletions.
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"url": "https://github.com/openmrs/openmrs-esm-template-app/issues"
},
"dependencies": {
"@carbon/react": "^1.33.1",
"@carbon/react": "^1.68.0",
"lodash-es": "^4.17.21"
},
"peerDependencies": {
Expand Down Expand Up @@ -74,6 +74,7 @@
"dotenv": "^16.0.3",
"eslint": "^8.50.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react-hooks": "^4.6.2",
"husky": "^8.0.3",
Expand Down
8 changes: 4 additions & 4 deletions src/boxes/extensions/box.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* necessary. Here, the extensions set only their colors.
* Their sizes and other general features of their display
* is controlled by the slot. */
@import "~@openmrs/esm-styleguide/src/vars";

@use '@openmrs/esm-styleguide/src/vars' as *;

.blue {
background-color: darkblue;
}
Expand All @@ -20,4 +20,4 @@
@include brand-01(background-color);
color: white;
padding: 8px;
}
}
14 changes: 7 additions & 7 deletions src/boxes/slot/boxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
* `> * > *` is used to target the outermost DOM node of
* the extension.
*/
@use '@carbon/styles/scss/spacing';
@use '@carbon/layout';

.box > * > * {
height: spacing.$spacing-10;
width: spacing.$spacing-10;
height: layout.$spacing-10;
width: layout.$spacing-10;
}

.boxes {
margin: spacing.$spacing-07 0;
margin: layout.$spacing-07 0;
display: flex;
gap: spacing.$spacing-05;
gap: layout.$spacing-05;
}

.container {
max-width: 50rem;
margin-top: spacing.$spacing-09;
margin-top: layout.$spacing-09;

> * + * {
margin-top: spacing.$spacing-06;
margin-top: layout.$spacing-06;
}
}
6 changes: 3 additions & 3 deletions src/greeter/greeter.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@use '@carbon/styles/scss/spacing';
@use '@carbon/styles/scss/type';
@use '@carbon/layout';
@use '@carbon/type';

.container {
max-width: 50rem;

> * + * {
margin-top: spacing.$spacing-05;
margin-top: layout.$spacing-05;
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/greeter/greeter.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { useConfig } from '@openmrs/esm-framework';
import { Config } from '../config-schema';
import { getDefaultsFromConfigSchema, useConfig } from '@openmrs/esm-framework';
import { Config, configSchema } from '../config-schema';
import Greeter from './greeter.component';

const mockUseConfig = useConfig as jest.Mock;
const mockUseConfig = jest.mocked(useConfig<Config>);

it('displays the expected default text', () => {
const config: Config = { casualGreeting: false, whoToGreet: ['World'] };
Expand Down
8 changes: 4 additions & 4 deletions src/patient-getter/patient-getter.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@use '@carbon/styles/scss/spacing';
@use '@carbon/styles/scss/type';
@use '@carbon/layout';
@use '@carbon/type';

.container {
margin-top: spacing.$spacing-09;
margin-top: layout.$spacing-09;

> * + * {
margin-top: spacing.$spacing-06;
margin-top: layout.$spacing-06;
}
}

Expand Down
26 changes: 13 additions & 13 deletions src/resources/resources.scss
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
@use '@carbon/styles/scss/spacing';
@use '@carbon/styles/scss/type';
@use '@carbon/layout';
@use '@carbon/type';

.container {
padding: spacing.$spacing-07;
padding: layout.$spacing-07;
}

.heading {
@include type.type-style('heading-04');
margin: spacing.$spacing-05 0;
margin: layout.$spacing-05 0;
}

.explainer {
display: block;
}

.resources {
margin-top: spacing.$spacing-10;
margin-bottom: spacing.$spacing-09;
margin-top: layout.$spacing-10;
margin-bottom: layout.$spacing-09;

> * + * {
margin-right: spacing.$spacing-05;
margin-right: layout.$spacing-05;
}
}

.cardsContainer {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
column-gap: spacing.$spacing-06;
margin-top: spacing.$spacing-07;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
column-gap: layout.$spacing-06;
margin-top: layout.$spacing-07;
max-width: 75%;
}

.card {
margin: spacing.$spacing-03 0;
margin: layout.$spacing-03 0;
display: flex;
align-items: center;

Expand All @@ -41,7 +41,7 @@
}

svg {
margin-left: spacing.$spacing-02;
margin-left: layout.$spacing-02;
}
}

Expand All @@ -53,7 +53,7 @@
.title {
display: flex;
align-items: center;
margin-bottom: spacing.$spacing-05;
margin-bottom: layout.$spacing-05;

h4 {
@include type.type-style('heading-02');
Expand Down
10 changes: 5 additions & 5 deletions src/root.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@use '@carbon/styles/scss/spacing';
@use '@carbon/styles/scss/type';
@use '@carbon/layout';
@use '@carbon/type';

.container {
padding: spacing.$spacing-07;
padding: layout.$spacing-07;
}

.welcome {
@include type.type-style('heading-04');
margin: spacing.$spacing-05 0;
margin: layout.$spacing-05 0;
}

.explainer {
margin-bottom: 2rem;
margin-bottom: layout.$spacing-07;
}
2 changes: 1 addition & 1 deletion src/root.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import Root from './root.component';
* mock file. This line just tells TypeScript that the object is, in
* fact, a mock, and so will have methods like `mockReturnValue`.
*/
const mockUseConfig = useConfig as jest.Mock;
const mockUseConfig = jest.mocked(useConfig<Config>);

it('renders a landing page for the Template app', () => {
const config: Config = { casualGreeting: false, whoToGreet: ['World'] };
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"es2015.promise",
"es2016.array.include",
"es2018",
"es2020"
"es2020",
"es2022",
],
"resolveJsonModule": true,
"noEmit": true,
Expand Down
Loading

0 comments on commit 88a8f29

Please sign in to comment.