Skip to content

Commit

Permalink
feat: use Carbon font tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
JC Estibariz committed Nov 29, 2023
1 parent ea0499c commit 6f27491
Show file tree
Hide file tree
Showing 38 changed files with 173 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .storybook/preview.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

body {
@font-14-400();
@body-compact-01();
}

#storybook-root {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,31 @@ exports[`EditorDetailsPanel rendering renders expected elements when showButtons
className="EditorDetailsPanel"
id="test"
>
<IconButton
aria-label="Close"
className="EditorDetailsPanel__close"
icon={
{
"icon": [],
"iconName": "xmark-thin",
}
}
id="closeDetailsPanelBtn"
size="large"
tooltipPlacement="left"
tooltipText="Close"
type="ghost"
/>
<h2
className="EditorDetailsPanel__title"
id="detailsPanelTitle"
<div
className="EditorDetailsPanel__header"
>
Test
</h2>
<h2
className="EditorDetailsPanel__title"
id="detailsPanelTitle"
>
Test
</h2>
<IconButton
aria-label="Close"
className="EditorDetailsPanel__close"
icon={
{
"icon": [],
"iconName": "xmark-thin",
}
}
id="closeDetailsPanelBtn"
size="large"
tooltipPlacement="left"
tooltipText="Close"
type="ghost"
/>
</div>
<React.Fragment>
cloneWithClassName
</React.Fragment>
Expand All @@ -39,27 +43,31 @@ exports[`EditorDetailsPanel rendering renders expected elements when showButtons
className="EditorDetailsPanel"
id="test"
>
<IconButton
aria-label="Close"
className="EditorDetailsPanel__close"
icon={
{
"icon": [],
"iconName": "xmark-thin",
}
}
id="closeDetailsPanelBtn"
size="large"
tooltipPlacement="left"
tooltipText="Close"
type="ghost"
/>
<h2
className="EditorDetailsPanel__title"
id="detailsPanelTitle"
<div
className="EditorDetailsPanel__header"
>
Test
</h2>
<h2
className="EditorDetailsPanel__title"
id="detailsPanelTitle"
>
Test
</h2>
<IconButton
aria-label="Close"
className="EditorDetailsPanel__close"
icon={
{
"icon": [],
"iconName": "xmark-thin",
}
}
id="closeDetailsPanelBtn"
size="large"
tooltipPlacement="left"
tooltipText="Close"
type="ghost"
/>
</div>
<React.Fragment>
cloneWithClassName
<DefaultDetailsButtons
Expand All @@ -84,27 +92,31 @@ exports[`EditorDetailsPanel rendering renders expected elements with two childre
className="EditorDetailsPanel"
id="test"
>
<IconButton
aria-label="Close"
className="EditorDetailsPanel__close"
icon={
{
"icon": [],
"iconName": "xmark-thin",
}
}
id="closeDetailsPanelBtn"
size="large"
tooltipPlacement="left"
tooltipText="Close"
type="ghost"
/>
<h2
className="EditorDetailsPanel__title"
id="detailsPanelTitle"
<div
className="EditorDetailsPanel__header"
>
Test
</h2>
<h2
className="EditorDetailsPanel__title"
id="detailsPanelTitle"
>
Test
</h2>
<IconButton
aria-label="Close"
className="EditorDetailsPanel__close"
icon={
{
"icon": [],
"iconName": "xmark-thin",
}
}
id="closeDetailsPanelBtn"
size="large"
tooltipPlacement="left"
tooltipText="Close"
type="ghost"
/>
</div>
<React.Fragment>
cloneWithClassName
cloneWithClassName
Expand All @@ -118,27 +130,31 @@ exports[`EditorDetailsPanel rendering renders expected elements with two childre
className="EditorDetailsPanel"
id="test"
>
<IconButton
aria-label="Close"
className="EditorDetailsPanel__close"
icon={
{
"icon": [],
"iconName": "xmark-thin",
}
}
id="closeDetailsPanelBtn"
size="large"
tooltipPlacement="left"
tooltipText="Close"
type="ghost"
/>
<h2
className="EditorDetailsPanel__title"
id="detailsPanelTitle"
<div
className="EditorDetailsPanel__header"
>
Test
</h2>
<h2
className="EditorDetailsPanel__title"
id="detailsPanelTitle"
>
Test
</h2>
<IconButton
aria-label="Close"
className="EditorDetailsPanel__close"
icon={
{
"icon": [],
"iconName": "xmark-thin",
}
}
id="closeDetailsPanelBtn"
size="large"
tooltipPlacement="left"
tooltipText="Close"
type="ghost"
/>
</div>
<React.Fragment>
cloneWithClassName
</React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

exports[`TableTitle rendering renders expected elements 1`] = `
<div
className="Table__title"
className="Table__header"
>
<h2
className="Table__title"
id="test"
>
Test title
Expand Down
14 changes: 6 additions & 8 deletions packages/pelagos/less/headers.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,26 @@
}

h1 {
@font-24-400();
@heading-04();
}

h2 {
@font-18-400();
@heading-03();
}

h3 {
@font-16-600();
@heading-02();
}

h4 {
@font-14-600();
@heading-compact-02();
}

h5 {
@font-12-600();
color: var(--text-secondary);
@heading-01();
}

h6 {
@font-10-600();
color: var(--text-secondary);
@heading-compact-01();
}
}
2 changes: 1 addition & 1 deletion packages/pelagos/less/inputs.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

::placeholder {
@font-12-400();
@body-compact-01();
color: var(--text-placeholder);

@media print {
Expand Down
2 changes: 1 addition & 1 deletion packages/pelagos/src/components/BlockHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {t} from '@bluecateng/l10n.macro';

import './BlockHeader.less';

/** Header for a form section. */
/** Header for a form section, usually as a Collapsible title. */
const BlockHeader = ({className, header, configured}) => (
<h2 className={`BlockHeader${className ? ` ${className}` : ''}`}>
{header}
Expand Down
4 changes: 2 additions & 2 deletions packages/pelagos/src/components/BlockHeader.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@

@layer pelagos {
.BlockHeader {
@body-01();
display: flex;
flex-direction: row;
align-items: center;
}

.BlockHeader__indicator {
@font-10-400();
@helper-text-01();
color: var(--text-helper);
margin-left: @sp-12;
}

.BlockHeader--configured {
@font-12-400();
color: var(--text-secondary);
}
}
4 changes: 2 additions & 2 deletions packages/pelagos/src/components/Breadcrumb.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

.Breadcrumb__crumbs {
@font-12-400();
@body-compact-01();
color: var(--text-primary);
display: block;
}
Expand All @@ -26,7 +26,7 @@
.Breadcrumb__back {
position: absolute;
left: -32px;
top: -8px;
top: -7px;
}

@media print {
Expand Down
2 changes: 1 addition & 1 deletion packages/pelagos/src/components/Button.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@layer pelagos {
.Button {
@focus-visible();
@font-14-600();
@body-compact-01();
display: inline-flex;
align-items: center;
white-space: nowrap;
Expand Down
3 changes: 1 addition & 2 deletions packages/pelagos/src/components/Calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
}

.Calendar__dayLabel {
@font-10-600();
color: var(--text-secondary);
@body-compact-01();
}

.Calendar__cell {
Expand Down
1 change: 1 addition & 0 deletions packages/pelagos/src/components/Collapsible.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
}

.Collapsible__title {
@body-01();
flex: 1;
text-align: left;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pelagos/src/components/DetailRegion.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

&__title {
@font-12-400();
@label-01();
color: var(--text-secondary);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pelagos/src/components/Dialog.less
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
}

&__title {
@font-16-600();
@heading-03();
@ellipsis();
padding: @sp-16;
border-bottom: 1px solid var(--border-subtle);
Expand Down
Loading

0 comments on commit 6f27491

Please sign in to comment.