Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plasma-b2c/web): add skeleton new typography sizes #960

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/required-primary-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
npm i --no-progress --no-audit react@17 react-dom@17 @types/[email protected] @types/react-dom@17 --prefix="./packages/plasma-web"

- name: Lerna bootstrap by scope
run: npx lerna bootstrap --scope=@salutejs/plasma-{ui,web,b2c,temple,hope,new-hope,core}
run: npx lerna bootstrap --scope=@salutejs/plasma-{ui,web,b2c,temple,hope,new-hope,core,icons}

- name: Unit tests for React 17
run: npm run test -- --scope=@salutejs/plasma-{ui,web,b2c,temple}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions packages/plasma-b2c/api/plasma-b2c.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,23 @@ headline4: string;
paragraph1: string;
paragraph2: string;
underline: string;
bodyL: string;
bodyM: string;
bodyS: string;
bodyXS: string;
bodyXXS: string;
dsplL: string;
dsplM: string;
dsplS: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
textL: string;
textM: string;
textS: string;
textXS: string;
};
}> & HTMLAttributes<HTMLDivElement> & SkeletonSizeProps & {
customGradientColor?: string | undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,74 @@ export const config = {
${skeletonTokens.lineHeight}: var(--plasma-typo-underline-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-underline-font-size);
`,
bodyL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-l-font-size);
`,
bodyM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-m-font-size);
`,
bodyS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-s-font-size);
`,
bodyXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-xs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-xs-font-size);
`,
bodyXXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-xxs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-xxs-font-size);
`,
dsplL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-l-font-size);
`,
dsplM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-m-font-size);
`,
dsplS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-s-font-size);
`,
h1: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h1-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h1-font-size);
`,
h2: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h2-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h2-font-size);
`,
h3: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h3-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h3-font-size);
`,
h4: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h4-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h4-font-size);
`,
h5: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h5-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h5-font-size);
`,
textL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-l-font-size);
`,
textM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-m-font-size);
`,
textS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-s-font-size);
`,
textXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-xs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-xs-font-size);
`,
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ const textSizes = [
'button2',
'caption',
'underline',
'bodyL',
'bodyM',
'bodyS',
'bodyXS',
'bodyXXS',
'dsplL',
'dsplM',
'dsplS',
'h1',
'h2',
'h3',
'h4',
'h5',
'textL',
'textM',
'textS',
'textXS',
];
const roundnessKeys = Object.keys(radiuses).map((r) => Number(r));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ const textSizes = [
'button2',
'caption',
'underline',
'bodyL',
'bodyM',
'bodyS',
'bodyXS',
'bodyXXS',
'dsplL',
'dsplM',
'dsplS',
'h1',
'h2',
'h3',
'h4',
'h5',
'textL',
'textM',
'textS',
'textXS',
];

const Default: StoryObj = {
Expand Down
17 changes: 17 additions & 0 deletions packages/plasma-web/api/plasma-web.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,23 @@ headline4: string;
paragraph1: string;
paragraph2: string;
underline: string;
bodyL: string;
bodyM: string;
bodyS: string;
bodyXS: string;
bodyXXS: string;
dsplL: string;
dsplM: string;
dsplS: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
textL: string;
textM: string;
textS: string;
textXS: string;
};
}> & HTMLAttributes<HTMLDivElement> & SkeletonSizeProps & {
customGradientColor?: string | undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,74 @@ export const config = {
${skeletonTokens.lineHeight}: var(--plasma-typo-underline-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-underline-font-size);
`,
bodyL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-l-font-size);
`,
bodyM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-m-font-size);
`,
bodyS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-s-font-size);
`,
bodyXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-xs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-xs-font-size);
`,
bodyXXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-xxs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-xxs-font-size);
`,
dsplL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-l-font-size);
`,
dsplM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-m-font-size);
`,
dsplS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-s-font-size);
`,
h1: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h1-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h1-font-size);
`,
h2: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h2-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h2-font-size);
`,
h3: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h3-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h3-font-size);
`,
h4: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h4-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h4-font-size);
`,
h5: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h5-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h5-font-size);
`,
textL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-l-font-size);
`,
textM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-m-font-size);
`,
textS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-s-font-size);
`,
textXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-xs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-xs-font-size);
`,
},
},
};
Loading
Loading