Skip to content

Commit

Permalink
Merge branch 'master' into feature/style_system
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/materials/motion/MotionPreview.tsx
#	packages/icons/docs/icons.stories.mdx
  • Loading branch information
alexasselin008 committed Oct 6, 2023
2 parents 9c94ac9 + 545c7d4 commit dd50d06
Show file tree
Hide file tree
Showing 65 changed files with 211 additions and 627 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

name: Chromatic

on:
on:
pull_request:
branches-ignore:
- changeset-release/*
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ storybook-static
.eslintcache
.stylelintcache
build-storybook.log
.idea
2 changes: 1 addition & 1 deletion .storybook/components/component-info/ComponentInfo.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.o-ui-sb-component-info-title {
display: inline-block !important;
color: var(--o-ui-text-alias-secondary) !important;
font-variation-settings: "wght" 500 !important;
font-weight: 550 !important;
font-size: var(--o-ui-fs-3) !important;
font-style: normal !important;
width: var(--o-ui-sz-11) !important;
Expand Down
3 changes: 1 addition & 2 deletions .storybook/components/preview/Preview.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
color: var(--o-ui-white);
z-index: 1;
font-size: 0.625rem;
font-weight: 400;
font-variation-settings: "wght" 500;
font-weight: 550;
letter-spacing: 0.025em;
text-transform: uppercase;
}
Expand Down
2 changes: 2 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { Themes } from "./styles/themes";
if (!isChromatic) {
// Custom font makes chromatic inconsistent and cause "false positive". View https://www.chromatic.com/docs/resource-loading#loading-custom-fonts.
import("@css/font/index.css");
} else {
import("./styles/chromatic.css");
}

export const parameters = {
Expand Down
2 changes: 1 addition & 1 deletion .storybook/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
html,
body {
font-family: "TT Interphases Variable", Arial, Helvetica, serif !important;
font-family: "Inter", Arial, Helvetica, serif !important;
-webkit-font-smoothing: antialiased;
font-size: 16px;
}
9 changes: 9 additions & 0 deletions .storybook/styles/chromatic.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* https://www.chromatic.com/docs/resource-loading/#solution-a-preload-fonts */
/* Given that loading fonts and making sure that these loads before Chromatic takes a snapshot, and given that the proposed solutions */
/* are currently not working. We needed a way to ensure that every snapshot uses the same font. The current approach is to force Arial for all Chromatic Snaphots */
/* While not ideal this at least solves the issue at hand. */
*,
*::before,
*::after {
font-family: Arial;
}
23 changes: 8 additions & 15 deletions .storybook/styles/docs.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:root {
/* Use this var only when the element is not affected by the font-family specified in Storybook docs theme */
--orbiter-font-family: "TT Interphases Variable", Arial, Helvetica, sans-serif;
--orbiter-font-family: "Inter", Arial, Helvetica, sans-serif;
}

/* LAYOUT */
Expand All @@ -15,7 +15,7 @@

/* STORY */
.docs-story div + div > button {
font-variation-settings: "wght" 500;
font-weight: 550;
font-size: var(--o-ui-fs-2);
}

Expand All @@ -32,8 +32,7 @@
}

.docblock-argstable-head tr th {
font-variation-settings: "wght" 500 !important;
font-weight: 400;
font-weight: 550 !important;
color: var(--o-ui-text-alias-primary) !important;
}

Expand All @@ -57,13 +56,11 @@

/* ARGS TABLE | BODY */
.docblock-argstable-body td > span {
font-variation-settings: "wght" 500 !important;
font-weight: 400;
font-weight: 550 !important;
}

.docblock-argstable-body td > label > span {
font-variation-settings: "wght" 500 !important;
font-weight: 400;
font-weight: 550 !important;
}

.docblock-argstable-body td label input[type=radio] {
Expand Down Expand Up @@ -154,8 +151,7 @@
.sbdocs.sbdocs-h4,
.sbdocs.sbdocs-h5,
.sbdocs.sbdocs-h6 {
font-variation-settings: "wght" 500;
font-weight: 400;
font-weight: 550;
/* fixing the default position relative on all titles in shared.tsx */
position: initial;
}
Expand All @@ -167,7 +163,7 @@

.sbdocs.sbdocs-h1,
.sbdocs .sbdocs-title {
font-variation-settings: "wght" 500;
font-weight: 550;
}

.sbdocs.sbdocs-h2 {
Expand Down Expand Up @@ -266,8 +262,7 @@
}

.sbdocs.sbdocs-table tr th {
font-weight: 400;
font-variation-settings: "wght" 600;
font-weight: 600;
font-size: var(--o-ui-fs-4);
}

Expand Down Expand Up @@ -303,7 +298,6 @@

.sbdocs.sbdocs-table b,
.sbdocs.sbdocs-table strong {
font-variation-settings: "wght" 600;
font-weight: 400;
}

Expand Down Expand Up @@ -354,7 +348,6 @@

/* ELEMENTS | STRONG */
.sbdocs strong {
font-variation-settings: "wght" 500;
font-weight: 400;
}

Expand Down
2 changes: 1 addition & 1 deletion .storybook/styles/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Themes = {
}),
docs: create({
base: "light",
fontBase: "TT Interphases Variable, Arial, Helvetica, sans-serif",
fontBase: "Inter, Arial, Helvetica, sans-serif",
textColor: "#04091A"
})
};
237 changes: 5 additions & 232 deletions docs/features/tokens/Tokens.stories.mdx

Large diffs are not rendered by default.

87 changes: 0 additions & 87 deletions docs/materials/motion/Motion.stories.mdx

This file was deleted.

17 changes: 0 additions & 17 deletions docs/materials/motion/MotionPreview.css

This file was deleted.

55 changes: 0 additions & 55 deletions docs/materials/motion/MotionPreview.tsx

This file was deleted.

1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@
},
"gitHead": "f8b5019bdc53f68abe27e931387aeec7f0747d85"
}

2 changes: 1 addition & 1 deletion packages/components/src/accordion/src/Accordion.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/* HEADER */
.o-ui-accordion .o-ui-accordion-header {
margin-bottom: 0;
font-variation-settings: "wght" 500;
font-weight: 500;
}

/* HEADER BORDERLESS */
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/accordion/src/AccordionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function InnerAccordionHeader(props: InnerAccordionHeaderProps) {
headingProps ?? {},
{
className: "o-ui-accordion-header",
size: "2xs"
size: "xs"
}
)}
>
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/button/src/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
background-image: none;
cursor: pointer;
line-height: var(--o-ui-lh-1);
font-variation-settings: "wght" 500;
font-weight: 500;
transition: all var(--o-ui-easing-duration-2) var(--o-ui-easing-productive);
border: none;
text-align: center;
Expand Down Expand Up @@ -402,4 +402,4 @@ a.o-ui-button {
.o-ui-button:hover.o-ui-button-primary .o-ui-button-counter,
.o-ui-button-hover:not([disabled]).o-ui-button-primary .o-ui-button-counter {
opacity: 1;
}
}
7 changes: 4 additions & 3 deletions packages/components/src/card/src/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ export function InnerCard({
},
content: {
as: Text,
className: "o-ui-card-content"
className: "o-ui-card-content",
size: "sm"
},
header: {
className: "o-ui-card-header"
},
heading: {
as: "span",
className: "o-ui-card-heading",
size: "xs"
size: "sm"
},
illustration: {
className: "o-ui-card-illustration",
Expand All @@ -73,7 +74,7 @@ export function InnerCard({
}), [orientationValue]));

const headerMarkup = isString(header?.props?.children)
? cloneElement(header, { children: <Text>{header?.props?.children}</Text> })
? cloneElement(header, { children: <Text size="sm">{header?.props?.children}</Text> })
: header;

const imageMarkup = image && (
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/counter/src/Counter.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/* HIGHLIGHT */
.o-ui-counter-highlight {
font-variation-settings: "wght" 500;
font-weight: 500;
}

/* PUSHED */
Expand Down
Loading

0 comments on commit dd50d06

Please sign in to comment.