chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
119
packages/admin-ui/src/components/typography/index.jsx
Normal file
119
packages/admin-ui/src/components/typography/index.jsx
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
import classnames from 'classnames'
|
||||
import React from 'react'
|
||||
|
||||
import styles from './typography.module.css'
|
||||
|
||||
function H1({ children, noMargin, className, ...props }) {
|
||||
const classNames = {
|
||||
[styles.h1]: true,
|
||||
[styles.noMargin]: noMargin,
|
||||
[className]: !!className
|
||||
}
|
||||
|
||||
return (
|
||||
<h1 className={classnames(classNames)} {...props}>
|
||||
{children}
|
||||
</h1>
|
||||
)
|
||||
}
|
||||
|
||||
function H2({ children, noMargin, className, ...props }) {
|
||||
const classNames = {
|
||||
[styles.h2]: true,
|
||||
[styles.noMargin]: noMargin,
|
||||
[className]: !!className
|
||||
}
|
||||
|
||||
return (
|
||||
<h2 className={classnames(classNames)} {...props}>
|
||||
{children}
|
||||
</h2>
|
||||
)
|
||||
}
|
||||
|
||||
function H3({ children, noMargin, className, ...props }) {
|
||||
const classNames = {
|
||||
[styles.h3]: true,
|
||||
[styles.noMargin]: noMargin,
|
||||
[className]: !!className
|
||||
}
|
||||
|
||||
return (
|
||||
<h3 className={classnames(classNames)} {...props}>
|
||||
{children}
|
||||
</h3>
|
||||
)
|
||||
}
|
||||
|
||||
function H4({ children, noMargin, className, ...props }) {
|
||||
const classNames = {
|
||||
[styles.h4]: true,
|
||||
[styles.noMargin]: noMargin,
|
||||
[className]: !!className
|
||||
}
|
||||
|
||||
return (
|
||||
<h4 className={classnames(classNames)} {...props}>
|
||||
{children}
|
||||
</h4>
|
||||
)
|
||||
}
|
||||
|
||||
function H5({ children, noMargin, className, ...props }) {
|
||||
const classNames = {
|
||||
[styles.h5]: true,
|
||||
[styles.noMargin]: noMargin,
|
||||
[className]: !!className
|
||||
}
|
||||
|
||||
return (
|
||||
<h5 className={classnames(classNames)} {...props}>
|
||||
{children}
|
||||
</h5>
|
||||
)
|
||||
}
|
||||
|
||||
const P = pBuilder('p')
|
||||
const Info1 = pBuilder('info1')
|
||||
const Info2 = pBuilder('info2')
|
||||
const Info3 = pBuilder('info3')
|
||||
const Mono = pBuilder('mono')
|
||||
const TL1 = pBuilder('tl1')
|
||||
const TL2 = pBuilder('tl2')
|
||||
const Label1 = pBuilder('label1')
|
||||
const Label2 = pBuilder('label2')
|
||||
const Label3 = pBuilder('label3')
|
||||
|
||||
function pBuilder(elementClass) {
|
||||
return ({ inline, noMargin, className, children, ...props }) => {
|
||||
const classNames = {
|
||||
[className]: !!className,
|
||||
[styles[elementClass]]: elementClass,
|
||||
[styles.inline]: inline,
|
||||
[styles.noMargin]: noMargin
|
||||
}
|
||||
return (
|
||||
<p className={classnames(classNames)} {...props}>
|
||||
{children}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
H1,
|
||||
H2,
|
||||
H3,
|
||||
H4,
|
||||
H5,
|
||||
TL1,
|
||||
TL2,
|
||||
P,
|
||||
Info1,
|
||||
Info2,
|
||||
Info3,
|
||||
Mono,
|
||||
Label1,
|
||||
Label2,
|
||||
Label3
|
||||
}
|
||||
138
packages/admin-ui/src/components/typography/styles.js
Normal file
138
packages/admin-ui/src/components/typography/styles.js
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
import {
|
||||
fontColor,
|
||||
fontSize1,
|
||||
fontSize2,
|
||||
fontSize3,
|
||||
fontSize4,
|
||||
fontSize5,
|
||||
fontPrimary,
|
||||
fontSecondary,
|
||||
fontMonospaced
|
||||
} from 'src/styling/variables'
|
||||
|
||||
const base = {
|
||||
lineHeight: '120%',
|
||||
color: fontColor
|
||||
}
|
||||
|
||||
export default {
|
||||
base: {
|
||||
lineHeight: '120%',
|
||||
color: fontColor
|
||||
},
|
||||
h1: {
|
||||
extend: base,
|
||||
fontSize: fontSize1,
|
||||
fontFamily: fontPrimary,
|
||||
fontWeight: 900
|
||||
},
|
||||
h2: {
|
||||
extend: base,
|
||||
fontSize: fontSize2,
|
||||
fontFamily: fontPrimary,
|
||||
fontWeight: 900
|
||||
},
|
||||
h3: {
|
||||
extend: base,
|
||||
fontSize: fontSize4,
|
||||
fontFamily: fontPrimary,
|
||||
fontWeight: 900
|
||||
},
|
||||
h4: {
|
||||
extend: base,
|
||||
fontSize: fontSize4,
|
||||
fontFamily: fontPrimary,
|
||||
fontWeight: 700
|
||||
},
|
||||
h5: {
|
||||
extend: base,
|
||||
fontSize: fontSize3,
|
||||
fontFamily: fontPrimary,
|
||||
fontWeight: 700
|
||||
},
|
||||
p: {
|
||||
...base,
|
||||
fontSize: fontSize4,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 500
|
||||
},
|
||||
tl1: {
|
||||
extend: base,
|
||||
fontSize: fontSize2,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 700
|
||||
},
|
||||
tl2: {
|
||||
extend: base,
|
||||
fontSize: fontSize4,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 700
|
||||
},
|
||||
info1: {
|
||||
extend: base,
|
||||
fontSize: fontSize1,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 700
|
||||
},
|
||||
info2: {
|
||||
extend: base,
|
||||
fontSize: fontSize3,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 700
|
||||
},
|
||||
info3: {
|
||||
extend: base,
|
||||
fontSize: fontSize3,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 500
|
||||
},
|
||||
mono: {
|
||||
extend: base,
|
||||
fontSize: fontSize4,
|
||||
fontFamily: fontMonospaced,
|
||||
fontWeight: 500
|
||||
},
|
||||
monoBold: {
|
||||
fontWeight: 700
|
||||
},
|
||||
monoSmall: {
|
||||
fontSize: fontSize5
|
||||
},
|
||||
inputFont: {
|
||||
fontSize: fontSize2,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 500,
|
||||
lineHeight: '110%',
|
||||
color: fontColor
|
||||
},
|
||||
regularLabel: {
|
||||
fontSize: fontSize4,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 500,
|
||||
lineHeight: '110%'
|
||||
},
|
||||
label1: {
|
||||
fontSize: fontSize5,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 500,
|
||||
color: fontColor
|
||||
},
|
||||
label2: {
|
||||
fontSize: fontSize5,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 700,
|
||||
color: fontColor
|
||||
},
|
||||
label3: {
|
||||
fontSize: fontSize4,
|
||||
fontFamily: fontSecondary,
|
||||
fontWeight: 500,
|
||||
color: fontColor
|
||||
},
|
||||
inline: {
|
||||
display: 'inline'
|
||||
},
|
||||
noMargin: {
|
||||
margin: 0
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
.base {
|
||||
line-height: 120%;
|
||||
color: var(--zodiac);
|
||||
}
|
||||
|
||||
.h1 {
|
||||
composes: base;
|
||||
font-size: 24px;
|
||||
font-family: var(--mont);
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.h2 {
|
||||
composes: base;
|
||||
font-size: 20px;
|
||||
font-family: var(--mont);
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.h3 {
|
||||
composes: base;
|
||||
font-size: 14px;
|
||||
font-family: var(--mont);
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.h4 {
|
||||
composes: base;
|
||||
font-size: 14px;
|
||||
font-family: var(--mont);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.h5 {
|
||||
composes: base;
|
||||
font-size: 16px;
|
||||
font-family: var(--mont);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.p {
|
||||
composes: base;
|
||||
font-size: 14px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tl1 {
|
||||
composes: base;
|
||||
font-size: 20px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.tl2 {
|
||||
composes: base;
|
||||
font-size: 14px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.info1 {
|
||||
composes: base;
|
||||
font-size: 24px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.info2 {
|
||||
composes: base;
|
||||
font-size: 16px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.info3 {
|
||||
composes: base;
|
||||
font-size: 16px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.mono {
|
||||
composes: base;
|
||||
font-size: 14px;
|
||||
font-family: var(--bpmono);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.monoBold {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.monoSmall {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.inputFont {
|
||||
font-size: 20px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 500;
|
||||
line-height: 110%;
|
||||
color: var(--zodiac);
|
||||
}
|
||||
|
||||
.regularLabel {
|
||||
font-size: 14px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 500;
|
||||
line-height: 110%;
|
||||
}
|
||||
|
||||
.label1 {
|
||||
font-size: 13px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 500;
|
||||
color: var(--zodiac);
|
||||
}
|
||||
|
||||
.label2 {
|
||||
font-size: 13px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 700;
|
||||
color: var(--zodiac);
|
||||
}
|
||||
|
||||
.label3 {
|
||||
font-size: 14px;
|
||||
font-family: var(--museo);
|
||||
font-weight: 500;
|
||||
color: var(--zodiac);
|
||||
}
|
||||
|
||||
.inline {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.noMargin {
|
||||
margin: 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue