From ba8959cb6478161993cc507e3c720b898de5a989 Mon Sep 17 00:00:00 2001 From: m0ksem Date: Fri, 8 Jul 2022 15:12:35 +0300 Subject: [PATCH 01/13] Added text utils docs demo. --- packages/docs/src/locales/en/en.json | 3 +- packages/docs/src/locales/ru/ru.json | 3 +- .../styles/typography/examples/textUtils.vue | 29 +++++++++++++++++++ .../styles/typography/page-config.ts | 3 ++ packages/ui/src/styles/global/typography.scss | 4 +++ 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 packages/docs/src/page-configs/styles/typography/examples/textUtils.vue diff --git a/packages/docs/src/locales/en/en.json b/packages/docs/src/locales/en/en.json index c3951b5768..a6d2454b3e 100644 --- a/packages/docs/src/locales/en/en.json +++ b/packages/docs/src/locales/en/en.json @@ -3805,7 +3805,8 @@ "links": "Links", "textHighlighted": "Highlighted text", "blockquote": "Blockquote", - "textBlock": "Text block" + "textBlock": "Text block", + "textUtils": "Text utils" }, "ag-grid": { "title": "AG Grid Theme", diff --git a/packages/docs/src/locales/ru/ru.json b/packages/docs/src/locales/ru/ru.json index baba482372..331ade4d22 100644 --- a/packages/docs/src/locales/ru/ru.json +++ b/packages/docs/src/locales/ru/ru.json @@ -3686,7 +3686,8 @@ "links": "Ссылки", "textHighlighted": "Выделенный текст", "blockquote": "Цитата", - "textBlock": "Текстовый блок" + "textBlock": "Текстовый блок", + "textUtils": "Текстовые утилиты" }, "ag-grid": { "title": "Тема для AG Grid", diff --git a/packages/docs/src/page-configs/styles/typography/examples/textUtils.vue b/packages/docs/src/page-configs/styles/typography/examples/textUtils.vue new file mode 100644 index 0000000000..4e33dc0825 --- /dev/null +++ b/packages/docs/src/page-configs/styles/typography/examples/textUtils.vue @@ -0,0 +1,29 @@ + diff --git a/packages/docs/src/page-configs/styles/typography/page-config.ts b/packages/docs/src/page-configs/styles/typography/page-config.ts index bd25e63014..e452df0aa4 100644 --- a/packages/docs/src/page-configs/styles/typography/page-config.ts +++ b/packages/docs/src/page-configs/styles/typography/page-config.ts @@ -44,6 +44,9 @@ const config: ApiDocsBlock[] = [ block.headline('typography.textBlock'), block.example('textBlock'), + + block.headline('typography.textUtils'), + block.example('textUtils'), ] export default config diff --git a/packages/ui/src/styles/global/typography.scss b/packages/ui/src/styles/global/typography.scss index 9e38e71c77..16c8834829 100644 --- a/packages/ui/src/styles/global/typography.scss +++ b/packages/ui/src/styles/global/typography.scss @@ -72,6 +72,10 @@ text-align: center !important; } + &--justify { + text-align: justify !important; + } + &--uppercase { text-transform: uppercase !important; } From 1414a541d8079f8dc317bbb55d965090d51a5376 Mon Sep 17 00:00:00 2001 From: m0ksem Date: Fri, 8 Jul 2022 15:21:38 +0300 Subject: [PATCH 02/13] Removed extra grid styles. --- packages/ui/src/styles/global/_utility-global.scss | 12 ------------ packages/ui/src/styles/grid/_grid-global-styles.scss | 5 ----- 2 files changed, 17 deletions(-) diff --git a/packages/ui/src/styles/global/_utility-global.scss b/packages/ui/src/styles/global/_utility-global.scss index 97aa3f3d24..2fa390ceaa 100644 --- a/packages/ui/src/styles/global/_utility-global.scss +++ b/packages/ui/src/styles/global/_utility-global.scss @@ -8,18 +8,6 @@ cursor: pointer; } -.text-left { - text-align: left; -} - -.text-center { - text-align: center; -} - -.text-right { - text-align: right; -} - .visually-hidden { @include visually-hidden; } diff --git a/packages/ui/src/styles/grid/_grid-global-styles.scss b/packages/ui/src/styles/grid/_grid-global-styles.scss index d2539fdd92..737f5fb35c 100644 --- a/packages/ui/src/styles/grid/_grid-global-styles.scss +++ b/packages/ui/src/styles/grid/_grid-global-styles.scss @@ -255,11 +255,6 @@ display: inline-flex !important; } -// Not solitary. Is used in other places. -.fill-height { - height: 100%; -} - .no-wrap { @include va-no-wrap(); } From 84b08dafb8916d6238acd5979af0a5b130fff938 Mon Sep 17 00:00:00 2001 From: m0ksem Date: Fri, 15 Jul 2022 18:17:37 +0300 Subject: [PATCH 03/13] Fix stylelint issues. --- packages/ui/src/styles/global/reset.scss | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/packages/ui/src/styles/global/reset.scss b/packages/ui/src/styles/global/reset.scss index 634ee09cd6..513590faf2 100644 --- a/packages/ui/src/styles/global/reset.scss +++ b/packages/ui/src/styles/global/reset.scss @@ -9,6 +9,7 @@ body { height: 100%; min-height: 100vh; position: relative; + line-height: 1; } main { @@ -31,10 +32,6 @@ pre { font-size: 1em; } -a { - background-color: transparent; -} - abbr[title] { border-bottom: none; text-decoration: underline; @@ -113,13 +110,6 @@ button::-moz-focus-inner, padding: 0; } -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - fieldset { padding: 0.35em 0.75em 0.625em; } @@ -288,6 +278,7 @@ video { a { text-decoration: none; + background-color: transparent; } input { @@ -310,10 +301,6 @@ section { display: block; } -body { - line-height: 1; -} - ol, ul { list-style: none; From e5d932819bedc4ed53ca63637bd9c59691fd5635 Mon Sep 17 00:00:00 2001 From: m0ksem Date: Fri, 15 Jul 2022 18:19:46 +0300 Subject: [PATCH 04/13] Added VaIcon svg size support. --- packages/ui/src/components/va-icon/VaIcon.vue | 7 +++++++ packages/ui/src/styles/global/reset.scss | 10 +++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/ui/src/components/va-icon/VaIcon.vue b/packages/ui/src/components/va-icon/VaIcon.vue index 241d89044b..518933c373 100644 --- a/packages/ui/src/components/va-icon/VaIcon.vue +++ b/packages/ui/src/components/va-icon/VaIcon.vue @@ -75,6 +75,8 @@ export default defineComponent({ cursor: attrs.onClick ? 'pointer' : null, color: props.color ? getColor(props.color, undefined, true) : iconConfig.value.color, fontSize: sizeComputed.value, + height: sizeComputed.value, + lineHeight: sizeComputed.value, })) return { @@ -125,5 +127,10 @@ export default defineComponent({ transform: rotate(360deg); } } + + svg { + fill: currentColor; + height: 100%; + } } diff --git a/packages/ui/src/styles/global/reset.scss b/packages/ui/src/styles/global/reset.scss index 513590faf2..4a51c03b35 100644 --- a/packages/ui/src/styles/global/reset.scss +++ b/packages/ui/src/styles/global/reset.scss @@ -27,11 +27,6 @@ hr { overflow: visible; } -pre { - font-family: monospace, monospace; - font-size: 1em; -} - abbr[title] { border-bottom: none; text-decoration: underline; @@ -45,8 +40,9 @@ strong { code, kbd, -samp { - font-family: monospace, monospace; +samp, +pre { + font-family: monospace; font-size: 1em; } From f0b85e131eb33e43211d842f950a53e2e7ccab61 Mon Sep 17 00:00:00 2001 From: m0ksem Date: Fri, 15 Jul 2022 18:22:04 +0300 Subject: [PATCH 05/13] Update docs demo card design. --- packages/docs/src/components/DocsExample.vue | 187 +++++++++--------- .../docs/src/components/DocsNavigation.vue | 127 +++++++----- 2 files changed, 173 insertions(+), 141 deletions(-) diff --git a/packages/docs/src/components/DocsExample.vue b/packages/docs/src/components/DocsExample.vue index dca2e9fed8..9d89deb6b8 100644 --- a/packages/docs/src/components/DocsExample.vue +++ b/packages/docs/src/components/DocsExample.vue @@ -1,25 +1,23 @@ - @@ -125,3 +112,27 @@ export default { } } + + diff --git a/packages/docs/src/components/DocsNavigation.vue b/packages/docs/src/components/DocsNavigation.vue index 7c24e20711..46cfd4f84a 100644 --- a/packages/docs/src/components/DocsNavigation.vue +++ b/packages/docs/src/components/DocsNavigation.vue @@ -1,5 +1,17 @@ - diff --git a/packages/docs/src/components/DocsHeadline.vue b/packages/docs/src/components/DocsHeadline.vue index 6b03bafba3..e738354d95 100644 --- a/packages/docs/src/components/DocsHeadline.vue +++ b/packages/docs/src/components/DocsHeadline.vue @@ -29,11 +29,18 @@ export default defineComponent({ }) - diff --git a/packages/docs/src/components/DocsNavigation.vue b/packages/docs/src/components/DocsNavigation.vue index 46cfd4f84a..ccf7c468a3 100644 --- a/packages/docs/src/components/DocsNavigation.vue +++ b/packages/docs/src/components/DocsNavigation.vue @@ -45,7 +45,7 @@ color="gray" > - + {{ $t('docsNavigation.openCodeSandbox') }} @@ -120,7 +120,7 @@ const gitLink = computed( border-radius: 0.25rem; border-top-left-radius: 0; border-top-right-radius: 0; - padding: 0 var(--va-card-padding); + padding: 0 calc(var(--va-card-padding) - var(--va-button-sm-content-px) / 2); display: flex; align-items: center; flex-wrap: wrap; @@ -130,10 +130,6 @@ const gitLink = computed( margin-right: 0.25rem; font-weight: bold; - &:first-child { - margin-left: calc(var(--va-button-sm-content-px) / -2); - } - div { color: var(--va-gray); } diff --git a/packages/docs/src/components/DocsSubtitle.vue b/packages/docs/src/components/DocsSubtitle.vue index d7a84cf63b..63bdb1dad6 100644 --- a/packages/docs/src/components/DocsSubtitle.vue +++ b/packages/docs/src/components/DocsSubtitle.vue @@ -1,5 +1,5 @@