@gooddata/sdk-ui-dashboard 11.64.0-alpha.1 → 11.64.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,14 @@
13
13
  @use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
14
14
 
15
15
  $dashboard-menu-item-icon-color: var(--gd-palette-complementary-5-from-theme, #b1c1d1);
16
+ $headline-line-height: (variables.$item-headline-lineHeight + variables.$item-headline-padding-vertical) * 2;
17
+ $headline-small-line-height: 36px;
18
+ $headline-margin: 10px;
19
+ $item-small-screen-padding-top: 10px;
20
+ $item-small-screen-padding: 5px;
21
+ $item-compact-padding: 3px;
22
+ $headline-compact-height: 20px;
23
+ $headline-compact-margin-bottom: 5px;
16
24
 
17
25
  // this must be used on the body element in gdc-dashboards
18
26
  .gd-dashboards-root {
@@ -384,7 +392,7 @@ $dashboard-menu-item-icon-color: var(--gd-palette-complementary-5-from-theme, #b
384
392
  transition: variables.$transition-length;
385
393
 
386
394
  @media #{kit-variables.$xsmall-only}, #{kit-variables.$small-only} {
387
- padding: 10px 5px 5px;
395
+ padding: $item-small-screen-padding-top $item-small-screen-padding $item-small-screen-padding;
388
396
  }
389
397
 
390
398
  &::before {
@@ -455,8 +463,8 @@ $dashboard-menu-item-icon-color: var(--gd-palette-complementary-5-from-theme, #b
455
463
  position: relative;
456
464
  z-index: 1;
457
465
  height: (variables.$item-headline-lineHeight + variables.$item-headline-padding-vertical) * 2 + 2; // relate SD-956: please update HEADLINE_OUTER_HEIGHT in widgetHeightUtil.ts when height is changed
458
- margin-top: 10px;
459
- line-height: (variables.$item-headline-lineHeight + variables.$item-headline-padding-vertical) * 2;
466
+ margin-top: $headline-margin;
467
+ line-height: $headline-line-height;
460
468
 
461
469
  @media #{kit-variables.$xsmall-only}, #{kit-variables.$small-only} {
462
470
  margin-top: 0;
@@ -464,7 +472,20 @@ $dashboard-menu-item-icon-color: var(--gd-palette-complementary-5-from-theme, #b
464
472
  }
465
473
 
466
474
  .visualization & {
467
- margin-bottom: 10px;
475
+ margin-bottom: $headline-margin;
476
+ }
477
+
478
+ &--small {
479
+ height: 38px;
480
+ line-height: $headline-small-line-height;
481
+
482
+ .item-headline {
483
+ font-size: 15px;
484
+ }
485
+ }
486
+
487
+ &--no-top-margin {
488
+ margin-top: 0;
468
489
  }
469
490
  }
470
491
 
@@ -822,8 +843,29 @@ $dashboard-menu-item-icon-color: var(--gd-palette-complementary-5-from-theme, #b
822
843
  }
823
844
 
824
845
  .gd-dash-content--density-compact {
846
+ $padding-saving: 2 * (variables.$item-inner-padding - $item-compact-padding);
847
+ $small-screen-padding-saving: $item-small-screen-padding-top + $item-small-screen-padding - 2 *
848
+ $item-compact-padding;
849
+ $compact-title: $headline-compact-height + $headline-compact-margin-bottom;
850
+ // the comfortable title shrinks to its line height in the overfilled widget column
851
+ $title-saving: $headline-line-height + $headline-margin - $compact-title;
852
+ $small-title-saving: $headline-small-line-height + $headline-margin - $compact-title;
853
+
854
+ // space saved per headline title size, subtracted from the tile min height by getDensityAdjustedMinHeight
855
+ --headline-density-saving-untitled: #{$padding-saving};
856
+ --headline-density-saving-small: #{$padding-saving + $headline-margin + $small-title-saving};
857
+ --headline-density-saving-medium: #{$padding-saving + $title-saving};
858
+ --headline-density-saving-large: #{$padding-saving + $headline-margin + $title-saving};
859
+
860
+ @media #{kit-variables.$xsmall-only}, #{kit-variables.$small-only} {
861
+ --headline-density-saving-untitled: #{$small-screen-padding-saving};
862
+ --headline-density-saving-small: #{$small-screen-padding-saving + $small-title-saving};
863
+ --headline-density-saving-medium: #{$small-screen-padding-saving + $title-saving};
864
+ --headline-density-saving-large: #{$small-screen-padding-saving + $title-saving};
865
+ }
866
+
825
867
  .dash-item-content {
826
- padding: 3px;
868
+ padding: $item-compact-padding;
827
869
  }
828
870
 
829
871
  // override highcharts direct style
@@ -834,13 +876,13 @@ $dashboard-menu-item-icon-color: var(--gd-palette-complementary-5-from-theme, #b
834
876
 
835
877
  .item-headline-outer {
836
878
  margin-top: 0;
837
- height: 20px;
838
- line-height: 20px;
879
+ height: $headline-compact-height;
880
+ line-height: $headline-compact-height;
839
881
  }
840
882
 
841
883
  .visualization {
842
884
  .item-headline-outer {
843
- margin-bottom: 5px;
885
+ margin-bottom: $headline-compact-margin-bottom;
844
886
  }
845
887
  }
846
888