Skip to content

Commit

Permalink
[patch][v16.20.1]Added H6Font (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
ponnexcodev authored Jul 6, 2024
1 parent d85c960 commit 09fde28
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 10 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system-root",
"version": "16.20.0",
"version": "16.20.1",
"private": true,
"description": "Root design system mono-repo package.",
"homepage": "https://github.com/Toniq-Labs/toniq-labs-design-system",
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system",
"version": "16.20.0",
"version": "16.20.1",
"private": false,
"description": "Design system elements for Toniq Labs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum ToniqHeadingLevel {
H3 = 'h3',
H4 = 'h4',
H5 = 'h5',
H6 = 'h6',
}

/** A replacement for the h* heading elements. */
Expand All @@ -20,6 +21,7 @@ export const ToniqHeading = defineToniqElement<{level: ToniqHeadingLevel}>()({
'toniq-heading-h3': ({inputs}) => inputs.level === ToniqHeadingLevel.H3,
'toniq-heading-h4': ({inputs}) => inputs.level === ToniqHeadingLevel.H4,
'toniq-heading-h5': ({inputs}) => inputs.level === ToniqHeadingLevel.H5,
'toniq-heading-h6': ({inputs}) => inputs.level === ToniqHeadingLevel.H6,
},
styles: ({hostClasses}) => css`
${hostClasses['toniq-heading-h1'].selector} {
Expand All @@ -37,12 +39,16 @@ export const ToniqHeading = defineToniqElement<{level: ToniqHeadingLevel}>()({
${hostClasses['toniq-heading-h5'].selector} {
${toniqFontStyles.h5Font};
}
${hostClasses['toniq-heading-h6'].selector} {
${toniqFontStyles.h5Font};
}
h1,
h2,
h3,
h4,
h5 {
h5,
h6 {
${noNativeSpacing};
font: inherit;
overflow: inherit;
Expand Down Expand Up @@ -70,6 +76,10 @@ export const ToniqHeading = defineToniqElement<{level: ToniqHeadingLevel}>()({
return html`
<h5><slot></slot></h5>
`;
} else if (inputs.level === ToniqHeadingLevel.H6) {
return html`
<h5><slot></slot></h5>
`;
} else {
return html`
<slot></slot>
Expand Down
10 changes: 10 additions & 0 deletions packages/design-system/src/styles/fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ const fontStylesFallbacks = {
'line-height': css`28px`,
'font-size': css`20px`,
},
h6Font: {
'line-height': css`24px`,
'font-size': css`16px`,
},
monospaceFont: {
'font-family': css`'Inconsolata', monospace`,
'line-height': css`1.125em`,
Expand Down Expand Up @@ -157,6 +161,11 @@ export const toniqFontStyles = (() => {
${boldFont};
`;

const h6Font = css`
${combineFallbacksAndVars('h6Font')};
${boldFont};
`;

const monospaceFont = css`
${combineFallbacksAndVars('monospaceFont')}
`;
Expand All @@ -179,6 +188,7 @@ export const toniqFontStyles = (() => {
h3Font,
h4Font,
h5Font,
h6Font,
monospaceFont,
rubikFont,
} as const satisfies Record<FontStyleKey, FontStyleDefinition>;
Expand Down
2 changes: 1 addition & 1 deletion packages/native-elements-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system-native-elements-test",
"version": "16.20.0",
"version": "16.20.1",
"private": true,
"scripts": {
"compile": "virmator compile",
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system-scripts",
"version": "16.20.0",
"version": "16.20.1",
"private": true,
"scripts": {
"compile": "virmator compile",
Expand Down

0 comments on commit 09fde28

Please sign in to comment.