From ece79f16953c5ac00b6d50466fb653b161b2df96 Mon Sep 17 00:00:00 2001 From: claire bontempo <68122737+hellobontempo@users.noreply.github.com> Date: Thu, 13 Jan 2022 10:00:50 -0800 Subject: [PATCH] UI/Clients single month template (#13635) * create SingleMonth template * updates stattext styling * add flex helper and fix header margin * rename variable in formatNumber helper * update templates with size-specific margins * clarify class name * fix jsdoc param type --- ui/app/styles/components/stat-text.scss | 15 +++++++-- ui/app/styles/core/charts.scss | 5 ++- ui/app/styles/core/helpers.scss | 4 +++ .../components/clients/attribution.hbs | 2 +- .../components/clients/monthly-usage.hbs | 2 +- .../components/clients/running-total.hbs | 2 +- .../components/clients/single-month.hbs | 33 +++++++++++++++++++ ui/lib/core/addon/components/stat-text.js | 4 +-- ui/lib/core/addon/helpers/format-number.js | 8 ++--- .../addon/templates/components/bar-chart.hbs | 2 +- 10 files changed, 64 insertions(+), 13 deletions(-) create mode 100644 ui/app/templates/components/clients/single-month.hbs diff --git a/ui/app/styles/components/stat-text.scss b/ui/app/styles/components/stat-text.scss index 129771435..4059545ad 100644 --- a/ui/app/styles/components/stat-text.scss +++ b/ui/app/styles/components/stat-text.scss @@ -1,6 +1,6 @@ .stat-text-container { line-height: normal; - height: 100%; + max-height: 100%; display: flex; flex-direction: column; @@ -17,7 +17,6 @@ font-weight: $font-weight-normal; color: $ui-gray-700; line-height: inherit; - flex-grow: 1; } .stat-value { font-size: $size-3; @@ -104,3 +103,15 @@ } } } + +.has-gap { + gap: $spacing-xxl; +} + +.stat-text-flex-wrapper { + display: flex; + justify-content: flex-start; + flex-wrap: wrap; + column-gap: 70px; + row-gap: 20px; +} diff --git a/ui/app/styles/core/charts.scss b/ui/app/styles/core/charts.scss index 4de34306c..6bda0f123 100644 --- a/ui/app/styles/core/charts.scss +++ b/ui/app/styles/core/charts.scss @@ -32,7 +32,10 @@ grid-column-end: span col4-end; grid-row-start: 1; box-shadow: inset 0 -1px 0 $vault-gray-200; - margin-bottom: $spacing-xl; + + > h2 { + padding-bottom: $spacing-xs; + } } .has-export { diff --git a/ui/app/styles/core/helpers.scss b/ui/app/styles/core/helpers.scss index 712554e02..17fdd97ad 100644 --- a/ui/app/styles/core/helpers.scss +++ b/ui/app/styles/core/helpers.scss @@ -75,6 +75,10 @@ display: flex !important; justify-content: flex-end; } +.is-flex-start { + display: flex !important; + justify-content: flex-start; +} .is-flex-full { flex-basis: 100%; } diff --git a/ui/app/templates/components/clients/attribution.hbs b/ui/app/templates/components/clients/attribution.hbs index 3bb5040c5..871b190e4 100644 --- a/ui/app/templates/components/clients/attribution.hbs +++ b/ui/app/templates/components/clients/attribution.hbs @@ -1,5 +1,5 @@
{{this.chartText.description}}
diff --git a/ui/app/templates/components/clients/monthly-usage.hbs b/ui/app/templates/components/clients/monthly-usage.hbs index 6ae22a513..aea831438 100644 --- a/ui/app/templates/components/clients/monthly-usage.hbs +++ b/ui/app/templates/components/clients/monthly-usage.hbs @@ -1,5 +1,5 @@{{@description}}
diff --git a/ui/app/templates/components/clients/running-total.hbs b/ui/app/templates/components/clients/running-total.hbs index c41814e1b..53049b448 100644 --- a/ui/app/templates/components/clients/running-total.hbs +++ b/ui/app/templates/components/clients/running-total.hbs @@ -1,6 +1,6 @@{{@description}}