Skip to content

Commit

Permalink
Merge pull request #155 from GrigoriiAndrievskii/vkui-search-theme-ty…
Browse files Browse the repository at this point in the history
…pography

vkui search theme typography update
  • Loading branch information
8coon authored Jul 22, 2022
2 parents 658ab3f + 91da091 commit 50283d4
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 66 deletions.
232 changes: 170 additions & 62 deletions src/build/__snapshots__/snapthots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -194513,6 +194513,44 @@ Object {
},
},
},
"searchFontSearchExtraHeadline": Object {
"auto": Object {
"fontFamily": Object {
"name": "--vkui--search_font_search_extra_headline--font_family",
"value": "var(--vkui--search_font_search_extra_headline--font_family)",
},
"fontSize": Object {
"name": "--vkui--search_font_search_extra_headline--font_size",
"value": "var(--vkui--search_font_search_extra_headline--font_size)",
},
"fontWeight": Object {
"name": "--vkui--search_font_search_extra_headline--font_weight",
"value": "var(--vkui--search_font_search_extra_headline--font_weight)",
},
"lineHeight": Object {
"name": "--vkui--search_font_search_extra_headline--line_height",
"value": "var(--vkui--search_font_search_extra_headline--line_height)",
},
},
"regular": Object {
"fontFamily": Object {
"name": "--vkui--search_font_search_extra_headline--font_family--regular",
"value": "var(--vkui--search_font_search_extra_headline--font_family--regular, Arial, sans-serif)",
},
"fontSize": Object {
"name": "--vkui--search_font_search_extra_headline--font_size--regular",
"value": "var(--vkui--search_font_search_extra_headline--font_size--regular, 24px)",
},
"fontWeight": Object {
"name": "--vkui--search_font_search_extra_headline--font_weight--regular",
"value": "var(--vkui--search_font_search_extra_headline--font_weight--regular, 700)",
},
"lineHeight": Object {
"name": "--vkui--search_font_search_extra_headline--line_height--regular",
"value": "var(--vkui--search_font_search_extra_headline--line_height--regular, 28px)",
},
},
},
"searchFontSearchFootnoteBold": Object {
"auto": Object {
"fontFamily": Object {
Expand Down Expand Up @@ -194628,80 +194666,114 @@ Object {
},
},
"searchFontSearchTextBold": Object {
"compact": Object {
"auto": Object {
"fontFamily": Object {
"name": "--vkui--search_font_search_text_bold--compact--font_family",
"value": "var(--vkui--search_font_search_text_bold--compact--font_family, Arial, sans-serif)",
"name": "--vkui--search_font_search_text_bold--font_family",
"value": "var(--vkui--search_font_search_text_bold--font_family)",
},
"fontSize": Object {
"name": "--vkui--search_font_search_text_bold--compact--font_size",
"value": "var(--vkui--search_font_search_text_bold--compact--font_size, 15px)",
"name": "--vkui--search_font_search_text_bold--font_size",
"value": "var(--vkui--search_font_search_text_bold--font_size)",
},
"fontWeight": Object {
"name": "--vkui--search_font_search_text_bold--compact--font_weight",
"value": "var(--vkui--search_font_search_text_bold--compact--font_weight, 700)",
"name": "--vkui--search_font_search_text_bold--font_weight",
"value": "var(--vkui--search_font_search_text_bold--font_weight)",
},
"lineHeight": Object {
"name": "--vkui--search_font_search_text_bold--compact--line_height",
"value": "var(--vkui--search_font_search_text_bold--compact--line_height, 20px)",
"name": "--vkui--search_font_search_text_bold--line_height",
"value": "var(--vkui--search_font_search_text_bold--line_height)",
},
},
},
"searchFontSearchTextMailSans": Object {
"compact": Object {
"fontFamily": Object {
"name": "--vkui--search_font_search_text_mail_sans--compact--font_family",
"value": "var(--vkui--search_font_search_text_mail_sans--compact--font_family, Arial, sans-serif)",
"name": "--vkui--search_font_search_text_bold--font_family--compact",
"value": "var(--vkui--search_font_search_text_bold--font_family--compact, Arial, sans-serif)",
},
"fontSize": Object {
"name": "--vkui--search_font_search_text_bold--font_size--compact",
"value": "var(--vkui--search_font_search_text_bold--font_size--compact, 15px)",
},
"fontWeight": Object {
"name": "--vkui--search_font_search_text_bold--font_weight--compact",
"value": "var(--vkui--search_font_search_text_bold--font_weight--compact, 700)",
},
"lineHeight": Object {
"name": "--vkui--search_font_search_text_bold--line_height--compact",
"value": "var(--vkui--search_font_search_text_bold--line_height--compact, 20px)",
},
},
"regular": Object {
"fontFamily": Object {
"name": "--vkui--search_font_search_text_bold--font_family--regular",
"value": "var(--vkui--search_font_search_text_bold--font_family--regular, Helvetica, Arial, sans-serif)",
},
"fontSize": Object {
"name": "--vkui--search_font_search_text_mail_sans--compact--font_size",
"value": "var(--vkui--search_font_search_text_mail_sans--compact--font_size, 15px)",
"name": "--vkui--search_font_search_text_bold--font_size--regular",
"value": "var(--vkui--search_font_search_text_bold--font_size--regular, 16px)",
},
"fontWeight": Object {
"name": "--vkui--search_font_search_text_mail_sans--compact--font_weight",
"value": "var(--vkui--search_font_search_text_mail_sans--compact--font_weight, 400)",
"name": "--vkui--search_font_search_text_bold--font_weight--regular",
"value": "var(--vkui--search_font_search_text_bold--font_weight--regular, 400)",
},
"lineHeight": Object {
"name": "--vkui--search_font_search_text_mail_sans--compact--line_height",
"value": "var(--vkui--search_font_search_text_mail_sans--compact--line_height, 20px)",
"name": "--vkui--search_font_search_text_bold--line_height--regular",
"value": "var(--vkui--search_font_search_text_bold--line_height--regular, 20px)",
},
},
},
"searchFontSearchTitle1": Object {
"searchFontSearchTextMailSans": Object {
"auto": Object {
"fontFamily": Object {
"name": "--vkui--search_font_search_title1--font_family",
"value": "var(--vkui--search_font_search_title1--font_family)",
"name": "--vkui--search_font_search_text_mail_sans--font_family",
"value": "var(--vkui--search_font_search_text_mail_sans--font_family)",
},
"fontSize": Object {
"name": "--vkui--search_font_search_title1--font_size",
"value": "var(--vkui--search_font_search_title1--font_size)",
"name": "--vkui--search_font_search_text_mail_sans--font_size",
"value": "var(--vkui--search_font_search_text_mail_sans--font_size)",
},
"fontWeight": Object {
"name": "--vkui--search_font_search_title1--font_weight",
"value": "var(--vkui--search_font_search_title1--font_weight)",
"name": "--vkui--search_font_search_text_mail_sans--font_weight",
"value": "var(--vkui--search_font_search_text_mail_sans--font_weight)",
},
"lineHeight": Object {
"name": "--vkui--search_font_search_title1--line_height",
"value": "var(--vkui--search_font_search_title1--line_height)",
"name": "--vkui--search_font_search_text_mail_sans--line_height",
"value": "var(--vkui--search_font_search_text_mail_sans--line_height)",
},
},
"compact": Object {
"fontFamily": Object {
"name": "--vkui--search_font_search_text_mail_sans--font_family--compact",
"value": "var(--vkui--search_font_search_text_mail_sans--font_family--compact, Arial, sans-serif)",
},
"fontSize": Object {
"name": "--vkui--search_font_search_text_mail_sans--font_size--compact",
"value": "var(--vkui--search_font_search_text_mail_sans--font_size--compact, 15px)",
},
"fontWeight": Object {
"name": "--vkui--search_font_search_text_mail_sans--font_weight--compact",
"value": "var(--vkui--search_font_search_text_mail_sans--font_weight--compact, 400)",
},
"lineHeight": Object {
"name": "--vkui--search_font_search_text_mail_sans--line_height--compact",
"value": "var(--vkui--search_font_search_text_mail_sans--line_height--compact, 20px)",
},
},
"regular": Object {
"fontFamily": Object {
"name": "--vkui--search_font_search_title1--font_family--regular",
"value": "var(--vkui--search_font_search_title1--font_family--regular, Arial, sans-serif)",
"name": "--vkui--search_font_search_text_mail_sans--font_family--regular",
"value": "var(--vkui--search_font_search_text_mail_sans--font_family--regular, Helvetica, Arial, sans-serif)",
},
"fontSize": Object {
"name": "--vkui--search_font_search_title1--font_size--regular",
"value": "var(--vkui--search_font_search_title1--font_size--regular, 24px)",
"name": "--vkui--search_font_search_text_mail_sans--font_size--regular",
"value": "var(--vkui--search_font_search_text_mail_sans--font_size--regular, 16px)",
},
"fontWeight": Object {
"name": "--vkui--search_font_search_title1--font_weight--regular",
"value": "var(--vkui--search_font_search_title1--font_weight--regular, 700)",
"name": "--vkui--search_font_search_text_mail_sans--font_weight--regular",
"value": "var(--vkui--search_font_search_text_mail_sans--font_weight--regular, 400)",
},
"lineHeight": Object {
"name": "--vkui--search_font_search_title1--line_height--regular",
"value": "var(--vkui--search_font_search_title1--line_height--regular, 28px)",
"name": "--vkui--search_font_search_text_mail_sans--line_height--regular",
"value": "var(--vkui--search_font_search_text_mail_sans--line_height--regular, 20px)",
},
},
},
Expand Down Expand Up @@ -196851,6 +196923,14 @@ Object {
"lineHeight": "16px",
},
},
"searchFontSearchExtraHeadline": Object {
"regular": Object {
"fontFamily": "Arial, sans-serif",
"fontSize": "24px",
"fontWeight": 700,
"lineHeight": "28px",
},
},
"searchFontSearchFootnoteBold": Object {
"regular": Object {
"fontFamily": "Arial, sans-serif",
Expand Down Expand Up @@ -196882,6 +196962,12 @@ Object {
"fontWeight": 700,
"lineHeight": "20px",
},
"regular": Object {
"fontFamily": "Helvetica, Arial, sans-serif",
"fontSize": "16px",
"fontWeight": 400,
"lineHeight": "20px",
},
},
"searchFontSearchTextMailSans": Object {
"compact": Object {
Expand All @@ -196890,13 +196976,11 @@ Object {
"fontWeight": 400,
"lineHeight": "20px",
},
},
"searchFontSearchTitle1": Object {
"regular": Object {
"fontFamily": "Arial, sans-serif",
"fontSize": "24px",
"fontWeight": 700,
"lineHeight": "28px",
"fontFamily": "Helvetica, Arial, sans-serif",
"fontSize": "16px",
"fontWeight": 400,
"lineHeight": "20px",
},
},
"searchFontSearchTitle4": Object {
Expand Down Expand Up @@ -198057,6 +198141,14 @@ Object {
"lineHeight": "var(--vkui--search_font_search_caption2_mail_sans--line_height--regular, 16px)",
},
},
"searchFontSearchExtraHeadline": Object {
"regular": Object {
"fontFamily": "var(--vkui--search_font_search_extra_headline--font_family--regular, Arial, sans-serif)",
"fontSize": "var(--vkui--search_font_search_extra_headline--font_size--regular, 24px)",
"fontWeight": "var(--vkui--search_font_search_extra_headline--font_weight--regular, 700)",
"lineHeight": "var(--vkui--search_font_search_extra_headline--line_height--regular, 28px)",
},
},
"searchFontSearchFootnoteBold": Object {
"regular": Object {
"fontFamily": "var(--vkui--search_font_search_footnote_bold--font_family--regular, Arial, sans-serif)",
Expand All @@ -198083,26 +198175,30 @@ Object {
},
"searchFontSearchTextBold": Object {
"compact": Object {
"fontFamily": "var(--vkui--search_font_search_text_bold--compact--font_family, Arial, sans-serif)",
"fontSize": "var(--vkui--search_font_search_text_bold--compact--font_size, 15px)",
"fontWeight": "var(--vkui--search_font_search_text_bold--compact--font_weight, 700)",
"lineHeight": "var(--vkui--search_font_search_text_bold--compact--line_height, 20px)",
"fontFamily": "var(--vkui--search_font_search_text_bold--font_family--compact, Arial, sans-serif)",
"fontSize": "var(--vkui--search_font_search_text_bold--font_size--compact, 15px)",
"fontWeight": "var(--vkui--search_font_search_text_bold--font_weight--compact, 700)",
"lineHeight": "var(--vkui--search_font_search_text_bold--line_height--compact, 20px)",
},
"regular": Object {
"fontFamily": "var(--vkui--search_font_search_text_bold--font_family--regular, Helvetica, Arial, sans-serif)",
"fontSize": "var(--vkui--search_font_search_text_bold--font_size--regular, 16px)",
"fontWeight": "var(--vkui--search_font_search_text_bold--font_weight--regular, 400)",
"lineHeight": "var(--vkui--search_font_search_text_bold--line_height--regular, 20px)",
},
},
"searchFontSearchTextMailSans": Object {
"compact": Object {
"fontFamily": "var(--vkui--search_font_search_text_mail_sans--compact--font_family, Arial, sans-serif)",
"fontSize": "var(--vkui--search_font_search_text_mail_sans--compact--font_size, 15px)",
"fontWeight": "var(--vkui--search_font_search_text_mail_sans--compact--font_weight, 400)",
"lineHeight": "var(--vkui--search_font_search_text_mail_sans--compact--line_height, 20px)",
"fontFamily": "var(--vkui--search_font_search_text_mail_sans--font_family--compact, Arial, sans-serif)",
"fontSize": "var(--vkui--search_font_search_text_mail_sans--font_size--compact, 15px)",
"fontWeight": "var(--vkui--search_font_search_text_mail_sans--font_weight--compact, 400)",
"lineHeight": "var(--vkui--search_font_search_text_mail_sans--line_height--compact, 20px)",
},
},
"searchFontSearchTitle1": Object {
"regular": Object {
"fontFamily": "var(--vkui--search_font_search_title1--font_family--regular, Arial, sans-serif)",
"fontSize": "var(--vkui--search_font_search_title1--font_size--regular, 24px)",
"fontWeight": "var(--vkui--search_font_search_title1--font_weight--regular, 700)",
"lineHeight": "var(--vkui--search_font_search_title1--line_height--regular, 28px)",
"fontFamily": "var(--vkui--search_font_search_text_mail_sans--font_family--regular, Helvetica, Arial, sans-serif)",
"fontSize": "var(--vkui--search_font_search_text_mail_sans--font_size--regular, 16px)",
"fontWeight": "var(--vkui--search_font_search_text_mail_sans--font_weight--regular, 400)",
"lineHeight": "var(--vkui--search_font_search_text_mail_sans--line_height--regular, 20px)",
},
},
"searchFontSearchTitle4": Object {
Expand Down Expand Up @@ -199263,6 +199359,14 @@ Object {
"lineHeight": 16,
},
},
"searchFontSearchExtraHeadline": Object {
"regular": Object {
"fontFamily": "Arial, sans-serif",
"fontSize": 24,
"fontWeight": 700,
"lineHeight": 28,
},
},
"searchFontSearchFootnoteBold": Object {
"regular": Object {
"fontFamily": "Arial, sans-serif",
Expand Down Expand Up @@ -199294,6 +199398,12 @@ Object {
"fontWeight": 700,
"lineHeight": 20,
},
"regular": Object {
"fontFamily": "Helvetica, Arial, sans-serif",
"fontSize": 16,
"fontWeight": 400,
"lineHeight": 20,
},
},
"searchFontSearchTextMailSans": Object {
"compact": Object {
Expand All @@ -199302,13 +199412,11 @@ Object {
"fontWeight": 400,
"lineHeight": 20,
},
},
"searchFontSearchTitle1": Object {
"regular": Object {
"fontFamily": "Arial, sans-serif",
"fontSize": 24,
"fontWeight": 700,
"lineHeight": 28,
"fontFamily": "Helvetica, Arial, sans-serif",
"fontSize": 16,
"fontWeight": 400,
"lineHeight": 20,
},
},
"searchFontSearchTitle4": Object {
Expand Down
6 changes: 3 additions & 3 deletions src/interfaces/themes/search/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type SearchLocalElevations = {
};

export type SearchLocalFonts = {
searchFontSearchTitle1: Adaptive<Font>;
searchFontSearchExtraHeadline: Adaptive<Font>;
searchFontSearchTitle4: Adaptive<Font>;
searchFontSearchTitle4Bold: Adaptive<Font>;
searchFontSearchSubheadBold: Adaptive<Font>;
Expand All @@ -37,8 +37,8 @@ export type SearchLocalFonts = {
searchFontSearchCaption1Bold: Adaptive<Font>;
searchFontSearchCaption1MailSans: Adaptive<Font>;
searchFontSearchCaption2MailSans: Adaptive<Font>;
searchFontSearchTextBold: Partial<Adaptive<Font>>;
searchFontSearchTextMailSans: Partial<Adaptive<Font>>;
searchFontSearchTextBold: Adaptive<Font>;
searchFontSearchTextMailSans: Adaptive<Font>;
};

export interface LocalSearchColorsDescriptionStruct {
Expand Down
6 changes: 5 additions & 1 deletion src/themeDescriptions/themes/search/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {Adaptive} from '@/interfaces/general/tools';
import {Font} from '@/interfaces/general/typography';
import {ThemeSearchDescription} from '@/interfaces/themes/search';
import {lightTheme} from '@/themeDescriptions/base/paradigm';

Expand Down Expand Up @@ -31,7 +33,7 @@ export const searchTheme: ThemeSearchDescription = {
sizeBorderRadius: {
regular: 8,
},
searchFontSearchTitle1: {
searchFontSearchExtraHeadline: {
regular: {
fontSize: 24,
lineHeight: 28,
Expand Down Expand Up @@ -104,6 +106,7 @@ export const searchTheme: ThemeSearchDescription = {
},
},
searchFontSearchTextBold: {
...(lightTheme.fontText as Adaptive<Font>),
compact: {
fontSize: 15,
lineHeight: 20,
Expand All @@ -112,6 +115,7 @@ export const searchTheme: ThemeSearchDescription = {
},
},
searchFontSearchTextMailSans: {
...(lightTheme.fontText as Adaptive<Font>),
compact: {
fontSize: 15,
lineHeight: 20,
Expand Down

0 comments on commit 50283d4

Please sign in to comment.