Skip to content

Commit

Permalink
fix(theme): remove font (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao authored Sep 15, 2023
1 parent bfb03cf commit fec9ccb
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 45 deletions.
5 changes: 5 additions & 0 deletions .changeset/slow-crabs-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@interlay/theme": patch
---

fix/remove theme font
1 change: 0 additions & 1 deletion .eslintcache

This file was deleted.

10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
*.css
.changeset
dist
scripts/*
*.config.js
.DS_Store
node_modules
coverage
build
!.storybook
!.commitlintrc.cjs
!.lintstagedrc
!jest.config.js
!tsup.config.ts
1 change: 1 addition & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link href="https://fonts.googleapis.com/css?family=Inter:bold,medium,light,regular" rel="stylesheet" />
13 changes: 7 additions & 6 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { Preview } from '@storybook/react';

import React from 'react';
import { InterlayUIProvider } from "../packages/core/system/src";
import "../packages/core/theme/src/css/theme.interlay.css";

import { InterlayUIProvider } from '../packages/core/system/src';
import '../packages/core/theme/src/css/theme.interlay.css';

const preview: Preview = {
parameters: {
Expand All @@ -15,19 +16,19 @@ const preview: Preview = {
}
},
decorators: [
(Story, {globals: {locale}}) => {
(Story, { globals: { locale } }) => {
const direction =
// @ts-ignore
locale && new Intl.Locale(locale)?.textInfo?.direction === "rtl" ? "rtl" : undefined;
locale && new Intl.Locale(locale)?.textInfo?.direction === 'rtl' ? 'rtl' : undefined;

return (
<InterlayUIProvider locale={locale}>
<div lang={locale} dir={direction}>
<div dir={direction} lang={locale} style={{ fontFamily: 'Inter' }}>
<Story />
</div>
</InterlayUIProvider>
);
},
}
]
};

Expand Down
9 changes: 5 additions & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"postpack": "clean-package restore"
},
"dependencies": {
"@interlay/coin-icons": "workspace:*",
"@interlay/hooks": "workspace:*",
"@interlay/icons": "workspace:*",
"@interlay/coin-icons": "workspace:*",
"@interlay/theme": "workspace:*",
"@interlay/system": "workspace:*",
"@interlay/theme": "workspace:*",
"@react-aria/accordion": "3.0.0-alpha.20",
"@react-aria/breadcrumbs": "^3.5.4",
"@react-aria/button": "^3.8.1",
Expand Down Expand Up @@ -76,7 +76,6 @@
"@react-stately/toggle": "^3.6.1",
"@react-stately/tooltip": "^3.4.3",
"@react-stately/tree": "^3.7.1",
"@react-types/meter": "^3.3.3",
"react-transition-group": "^4.4.5"
},
"peerDependencies": {
Expand All @@ -85,14 +84,16 @@
"styled-components": ">=6.0.0"
},
"devDependencies": {
"@interlay/test-utils": "workspace:*",
"@react-types/grid": "^3.2.0",
"@react-types/meter": "^3.3.3",
"@react-types/shared": "^3.19.0",
"@react-types/tabs": "^3.3.2",
"@types/react-transition-group": "^4.4.6",
"@types/styled-components": "^5.1.26",
"clean-package": "^2.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@interlay/test-utils": "workspace:*",
"styled-components": "^6.0.7"
},
"clean-package": "../../clean-package.config.json"
Expand Down
29 changes: 1 addition & 28 deletions packages/core/theme/src/css/theme.base.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
@import url('reset.css');

@font-face {
font-family: 'inter';
src: url('../fonts/inter/Inter-Light.ttf') format('truetype');
font-weight: 300; /* light */
font-style: normal;
}
@font-face {
font-family: 'inter';
src: url('../fonts/inter/Inter-Regular.ttf') format('truetype');
font-weight: 400; /* regular */
font-style: normal;
}
@font-face {
font-family: 'inter';
src: url('../fonts/inter/Inter-Medium.ttf') format('truetype');
font-weight: 500; /* medium */
font-style: normal;
}
@font-face {
font-family: 'inter';
src: url('../fonts/inter/Inter-Bold.ttf') format('truetype');
font-weight: 700; /* bold */
font-style: normal;
}

* {
box-sizing: border-box;
font-family: 'inter';
font-family: inherit;
}

:root {
--fonts-primary: 'inter';

--font-weights-light: 300;
--font-weights-book: 400;
--font-weights-medium: 500;
Expand Down
Binary file removed packages/core/theme/src/fonts/inter/Inter-Black.ttf
Binary file not shown.
Binary file removed packages/core/theme/src/fonts/inter/Inter-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed packages/core/theme/src/fonts/inter/Inter-Light.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed packages/core/theme/src/fonts/inter/Inter-Thin.ttf
Binary file not shown.
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

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

0 comments on commit fec9ccb

Please sign in to comment.