Skip to content

Commit

Permalink
feat: wip with carbon 11
Browse files Browse the repository at this point in the history
  • Loading branch information
timrbula committed Aug 8, 2022
1 parent 5cde0d7 commit 1ac0bb2
Show file tree
Hide file tree
Showing 24 changed files with 38 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .storybook/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@use '@carbon/react/scss/components/notification/tokens' as notification;
@use '@carbon/react/scss/components/tag/tokens' as tag;
@use '@carbon/react/scss/components';
@use '../src/styles/index' with ($use-theme-boomerang: false);
@use '../src/styles/index' with ($use-theme-boomerang: true);

[data-carbon-theme="boomerang"] {
@include theme.add-component-tokens(map.merge(button.$button-tokens, button.$button-tokens));
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@boomerang-io/carbon-addons-boomerang-react",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.7",
"license": "Apache-2",
"repository": {
"type": "git",
Expand Down Expand Up @@ -57,7 +57,7 @@
"window-or-global": "1.0.1"
},
"peerDependencies": {
"@carbon/react": "1.7.0",
"@carbon/react": "^1.8.0",
"axios": ">=0.26.0",
"formik": "^2.1.5",
"prop-types": "^15.8.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Error403/ForbiddenErrorBackground.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import React from "react";

function ForbiddenErrorBackground(props) {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Error404/NotFoundErrorBackground.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import React from "react";

function NotFoundErrorBackground(props) {
return (
Expand Down
6 changes: 2 additions & 4 deletions src/components/ErrorBoundary/ErrorBoundary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { prefix } from "../../internal/settings";

import ErrorMessage from "../ErrorMessage";



/**
* todo: convert this to hooks in the future.
* As of now getDerivedStateFromError not available via hooks
Expand Down Expand Up @@ -41,10 +39,10 @@ class ErrorBoundary extends Component {
}

render() {
const ErrorComponent = this.props.errorComponent;
const { errorComponent: ErrorComponent, className, style, errorProps, ...rest } = this.props;
if (this.state.hasError) {
return (
<div className={this.props.className} style={this.props.style} {...this.props}>
<div className={className} style={style} {...rest}>
<ErrorComponent {...this.props.errorProps} />
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions src/components/ErrorBoundary/_errorBoundary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
right: 0;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
// display: flex;
// justify-content: center;
// align-items: center;
}

1 change: 1 addition & 0 deletions src/components/ErrorDragon/assets/ErrorGraphic.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from "react";
const SvgErrorGraphic = (props) => (
<svg width={1244} height={386} {...props}>
<defs>
Expand Down
4 changes: 2 additions & 2 deletions src/components/FeatureHeader/FeatureHeader.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ const DataList = () => {

const Actions = () => (
<div style={{ display: "flex", alignItems: "flex-end", marginBottom: "1rem" }}>
<Button kind="ghost" renderIcon={View} style={{ marginRight: "1rem", width: "10rem" }} size="medium">
<Button kind="ghost" renderIcon={View} style={{ marginRight: "1rem" }} size="medium">
View component
</Button>
<Button renderIcon={Save} style={{ width: "10rem" }} size="medium">
<Button renderIcon={Save} size="medium">
Save
</Button>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/components/FeatureNavTab/_featureNavTab.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use "../../styles/config" as *;
@use '@carbon/themes/scss/tokens' as theme;
@use "../../styles/themes/shell-tokens" as shell;
@use "@carbon/react/scss/motion";
@use '@carbon/themes/scss/tokens' as theme;

.#{$prefix}--bmrg-feature-nav-tab {
border-bottom: 0.125rem solid #b9bfc7;
Expand All @@ -19,12 +20,12 @@
}

.#{$prefix}--bmrg-feature-nav-tab--active {
border-bottom: 0.125rem solid theme.$support-success;
border-bottom: 0.125rem solid shell.$bmrg-active-color;
color: theme.$text-primary;
font-weight: 600;

&:hover {
border-bottom: 0.125rem solid theme.$support-success;
border-bottom: 0.125rem solid shell.$bmrg-active-color;
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/components/FeatureSideNavLink/_featureSideNavLink.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "../../styles/config" as *;
@use "../../styles/themes/shell-tokens" as shell;
@use '@carbon/themes/scss/tokens' as theme;

.#{$prefix}--bmrg-feature-sidenav-link {
Expand All @@ -13,11 +14,11 @@
width: 100%;
&:focus {
outline-offset: -0.125rem !important;
outline: 0.125rem solid theme.$support-success !important;
outline: 0.125rem solid shell.$bmrg-active-color !important;
}
&.#{$prefix}--bmrg-feature-sidenav-active-link {
background-color: theme.$background-selected;
border-left-color: theme.$support-success;
border-left-color: shell.$bmrg-active-color;
color: theme.$text-primary;
svg {
fill: initial;
Expand Down
2 changes: 1 addition & 1 deletion src/components/GdprRedirectModal/GdprRedirectModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ModalHeader, ModalBody, ModalFooter } from "@carbon/react";
import { prefix } from "../../internal/settings";
import { USER_STATUS } from "./constants";
import CastleDrawBridge from "./assets/CastleDrawBridge";
import CastleNoDoor from "./assets/castle_nodoor";
import CastleNoDoor from "./assets/CastleNoDoor";



Expand Down
2 changes: 1 addition & 1 deletion src/components/LoadingAnimation/assets/Loading.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

import React from "react";

const SvgLoading = (props) => (
<svg
Expand Down
1 change: 1 addition & 0 deletions src/styles/themes/_boomerang.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ $shell-tokens: (
bmrg-header-button-text-color: #272727,
bmrg-header-attachment-background-color: #50565b,
bmrg-sidenav-active-background-color: #343a3f,
bmrg-active-color: #009d9a
);

$theme: map.merge($v11-tokens, $v10-tokens);
1 change: 1 addition & 0 deletions src/styles/themes/_shell-tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ $bmrg-header-modal-background-color: var(--cds-bmrg-header-modal-background-colo
$bmrg-header-button-text-color: theme.$text-inverse;
$bmrg-header-attachment-background-color: var(--cds-bmrg-header-attachment-background-color);
$bmrg-sidenav-active-background-color: var(--cds-bmrg-sidenav-active-background-color);
$bmrg-active-color: var(--cds-bmrg-active-color, theme.$background-brand);
2 changes: 1 addition & 1 deletion src/styles/utils/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $breakpoints: (
@each $name, $variable in $token-map {
// Only create properties for non-map objects. Some theme tokens are maps in the default themes that we merge with
@if type-of($variable) != map {
#{$prefix}-#{$name}: $variable;
#{$prefix}-#{$name}: #{$variable};
}
}
}
6 changes: 3 additions & 3 deletions styles/scss/components/ErrorBoundary/_errorBoundary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
right: 0;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
// display: flex;
// justify-content: center;
// align-items: center;
}

7 changes: 4 additions & 3 deletions styles/scss/components/FeatureNavTab/_featureNavTab.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use "../../styles/config" as *;
@use '@carbon/themes/scss/tokens' as theme;
@use "../../styles/themes/shell-tokens" as shell;
@use "@carbon/react/scss/motion";
@use '@carbon/themes/scss/tokens' as theme;

.#{$prefix}--bmrg-feature-nav-tab {
border-bottom: 0.125rem solid #b9bfc7;
Expand All @@ -19,12 +20,12 @@
}

.#{$prefix}--bmrg-feature-nav-tab--active {
border-bottom: 0.125rem solid theme.$support-success;
border-bottom: 0.125rem solid shell.$bmrg-active-color;
color: theme.$text-primary;
font-weight: 600;

&:hover {
border-bottom: 0.125rem solid theme.$support-success;
border-bottom: 0.125rem solid shell.$bmrg-active-color;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "../../styles/config" as *;
@use "../../styles/themes/shell-tokens" as shell;
@use '@carbon/themes/scss/tokens' as theme;

.#{$prefix}--bmrg-feature-sidenav-link {
Expand All @@ -13,11 +14,11 @@
width: 100%;
&:focus {
outline-offset: -0.125rem !important;
outline: 0.125rem solid theme.$support-success !important;
outline: 0.125rem solid shell.$bmrg-active-color !important;
}
&.#{$prefix}--bmrg-feature-sidenav-active-link {
background-color: theme.$background-selected;
border-left-color: theme.$support-success;
border-left-color: shell.$bmrg-active-color;
color: theme.$text-primary;
svg {
fill: initial;
Expand Down
1 change: 1 addition & 0 deletions styles/scss/styles/themes/_boomerang.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ $shell-tokens: (
bmrg-header-button-text-color: #272727,
bmrg-header-attachment-background-color: #50565b,
bmrg-sidenav-active-background-color: #343a3f,
bmrg-active-color: #009d9a
);

$theme: map.merge($v11-tokens, $v10-tokens);
1 change: 1 addition & 0 deletions styles/scss/styles/themes/_shell-tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ $bmrg-header-modal-background-color: var(--cds-bmrg-header-modal-background-colo
$bmrg-header-button-text-color: theme.$text-inverse;
$bmrg-header-attachment-background-color: var(--cds-bmrg-header-attachment-background-color);
$bmrg-sidenav-active-background-color: var(--cds-bmrg-sidenav-active-background-color);
$bmrg-active-color: var(--cds-bmrg-active-color, theme.$background-brand);
2 changes: 1 addition & 1 deletion styles/scss/styles/utils/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $breakpoints: (
@each $name, $variable in $token-map {
// Only create properties for non-map objects. Some theme tokens are maps in the default themes that we merge with
@if type-of($variable) != map {
#{$prefix}-#{$name}: $variable;
#{$prefix}-#{$name}: #{$variable};
}
}
}

0 comments on commit 1ac0bb2

Please sign in to comment.