ydb-embedded-ui 4.25.0 → 4.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +39 -0
  3. package/dist/components/BasicNodeViewer/BasicNodeViewer.scss +3 -11
  4. package/dist/components/CircularProgressBar/CircularProgressBar.scss +4 -4
  5. package/dist/components/DateRange/DateRange.scss +3 -3
  6. package/dist/components/DiagnosticCard/DiagnosticCard.scss +4 -4
  7. package/dist/components/Divider/Divider.scss +1 -1
  8. package/dist/components/EmptyState/EmptyState.scss +8 -9
  9. package/dist/components/EntityStatus/EntityStatus.scss +19 -29
  10. package/dist/components/ExternalLinkWithIcon/ExternalLinkWithIcon.tsx +2 -2
  11. package/dist/components/FullNodeViewer/FullNodeViewer.scss +1 -4
  12. package/dist/components/Fullscreen/Fullscreen.scss +2 -9
  13. package/dist/components/Icon/Icon.tsx +1 -5
  14. package/dist/components/InfoViewer/InfoViewer.scss +6 -6
  15. package/dist/components/LabelWithPopover/LabelWithPopover.tsx +3 -2
  16. package/dist/components/NodeHostWrapper/NodeHostWrapper.tsx +2 -2
  17. package/dist/components/PoolBar/PoolBar.scss +6 -6
  18. package/dist/components/PoolUsage/PoolUsage.scss +15 -17
  19. package/dist/components/ProgressViewer/ProgressViewer.scss +17 -16
  20. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +3 -3
  21. package/dist/components/SpeedMultiMeter/SpeedMultiMeter.scss +5 -5
  22. package/dist/components/SpeedMultiMeter/SpeedMultiMeter.tsx +12 -13
  23. package/dist/components/SplitPane/SplitPane.scss +5 -5
  24. package/dist/components/TableSkeleton/TableSkeleton.scss +1 -1
  25. package/dist/components/Tablet/Tablet.scss +10 -10
  26. package/dist/components/TabletsStatistic/TabletsStatistic.scss +13 -13
  27. package/dist/components/Tag/Tag.scss +3 -3
  28. package/dist/components/TruncatedQuery/TruncatedQuery.scss +1 -1
  29. package/dist/components/UsageLabel/UsageLabel.scss +2 -2
  30. package/dist/components/UsageLabel/UsageLabel.tsx +1 -1
  31. package/dist/components/VirtualTable/VirtualTable.scss +3 -3
  32. package/dist/containers/App/App.scss +20 -24
  33. package/dist/containers/App/Content.js +5 -4
  34. package/dist/containers/AsideNavigation/AsideNavigation.scss +1 -4
  35. package/dist/containers/AsideNavigation/AsideNavigation.tsx +12 -27
  36. package/dist/containers/Authentication/Authentication.scss +4 -4
  37. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +4 -6
  38. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.tsx +1 -1
  39. package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.scss +3 -3
  40. package/dist/containers/Cluster/VersionsBar/VersionsBar.tsx +1 -1
  41. package/dist/containers/Header/Header.scss +1 -1
  42. package/dist/containers/Heatmap/Heatmap.scss +3 -5
  43. package/dist/containers/Heatmap/Histogram/Histogram.scss +6 -6
  44. package/dist/containers/Node/NodeStructure/NodeStructure.scss +10 -13
  45. package/dist/containers/Node/NodeStructure/Pdisk.tsx +1 -1
  46. package/dist/containers/ReduxTooltip/ReduxTooltip.js +1 -1
  47. package/dist/containers/ReduxTooltip/ReduxTooltip.scss +1 -18
  48. package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.scss +23 -23
  49. package/dist/containers/Storage/PDisk/PDisk.scss +4 -4
  50. package/dist/containers/Storage/PDiskPopup/PDiskPopup.tsx +1 -1
  51. package/dist/containers/Storage/Storage.scss +1 -1
  52. package/dist/containers/Storage/StorageGroups/StorageGroups.scss +1 -1
  53. package/dist/containers/Storage/UsageFilter/UsageFilter.scss +7 -6
  54. package/dist/containers/Storage/VDiskPopup/VDiskPopup.scss +1 -1
  55. package/dist/containers/Storage/VDiskPopup/VDiskPopup.tsx +1 -1
  56. package/dist/containers/Tablet/Tablet.scss +5 -5
  57. package/dist/containers/TabletsFilters/TabletsFilters.scss +2 -3
  58. package/dist/containers/Tenant/Acl/Acl.scss +1 -15
  59. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.scss +0 -4
  60. package/dist/containers/Tenant/Diagnostics/Consumers/TopicStats/ConsumersTopicStats.scss +5 -4
  61. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +0 -6
  62. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +2 -2
  63. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +2 -2
  64. package/dist/containers/Tenant/Diagnostics/Network/Network.scss +8 -10
  65. package/dist/containers/Tenant/Diagnostics/Network/NodeNetwork/NodeNetwork.scss +8 -8
  66. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.scss +1 -5
  67. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.tsx +1 -4
  68. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.tsx +0 -1
  69. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +12 -12
  70. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.scss +1 -36
  71. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.scss +3 -3
  72. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.scss +7 -7
  73. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +2 -2
  74. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.scss +1 -1
  75. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +4 -8
  76. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +2 -1
  77. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +3 -6
  78. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +2 -5
  79. package/dist/containers/Tenant/Query/Issues/Issues.scss +11 -14
  80. package/dist/containers/Tenant/Query/Preview/Preview.scss +3 -7
  81. package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.scss +1 -1
  82. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +4 -8
  83. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.scss +3 -9
  84. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.scss +0 -9
  85. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.tsx +11 -13
  86. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.scss +5 -5
  87. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.tsx +3 -3
  88. package/dist/containers/Tenant/Tenant.scss +1 -2
  89. package/dist/containers/Tenant/utils/schemaControls.tsx +2 -2
  90. package/dist/containers/UserSettings/Setting.tsx +5 -1
  91. package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.scss +2 -3
  92. package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.scss +1 -1
  93. package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.tsx +1 -1
  94. package/dist/index.tsx +1 -0
  95. package/dist/services/api.ts +4 -3
  96. package/dist/services/settings.ts +113 -0
  97. package/dist/store/reducers/executeQuery.ts +6 -3
  98. package/dist/store/reducers/settings/settings.ts +7 -74
  99. package/dist/store/reducers/settings/types.ts +4 -3
  100. package/dist/styles/mixins.scss +37 -35
  101. package/dist/styles/themes/dark-hc.scss +296 -0
  102. package/dist/styles/themes/dark.scss +297 -0
  103. package/dist/styles/themes/light-hc.scss +289 -0
  104. package/dist/styles/themes/light.scss +291 -0
  105. package/dist/styles/themes.scss +73 -0
  106. package/dist/types/window.d.ts +2 -2
  107. package/dist/utils/hooks/useSetting.ts +6 -7
  108. package/dist/utils/i18n/i18n.ts +2 -2
  109. package/package.json +7 -6
  110. package/dist/containers/App/TipPopup/TipPopup.js +0 -66
  111. package/dist/containers/App/TipPopup/TipPopup.scss +0 -46
  112. package/dist/utils/settings.ts +0 -13
@@ -1,3 +1,5 @@
1
+ @import '../../styles/mixins.scss';
2
+
1
3
  .progress-viewer {
2
4
  position: relative;
3
5
  z-index: 0;
@@ -11,12 +13,12 @@
11
13
  height: 23px;
12
14
  padding: 0 4px;
13
15
 
14
- font-size: var(--yc-text-body-2-font-size);
16
+ font-size: var(--g-text-body-2-font-size);
15
17
  white-space: nowrap;
16
18
 
17
- color: var(--yc-color-text-light-primary);
19
+ color: var(--g-color-text-light-primary);
18
20
  border-radius: 2px;
19
- background: var(--yc-color-base-generic);
21
+ background: var(--g-color-base-generic);
20
22
 
21
23
  &__line {
22
24
  position: absolute;
@@ -26,13 +28,13 @@
26
28
  height: 100%;
27
29
 
28
30
  &_bg_scarlet {
29
- background: var(--yc-color-infographics-danger-heavy);
31
+ background: var(--ydb-color-status-red);
30
32
  }
31
33
  &_bg_apple {
32
- background: var(--yc-color-infographics-positive-heavy);
34
+ background: var(--ydb-color-status-green);
33
35
  }
34
36
  &_bg_saffron {
35
- background: var(--yc-color-infographics-warning-heavy);
37
+ background: var(--ydb-color-status-yellow);
36
38
  }
37
39
  }
38
40
 
@@ -40,30 +42,29 @@
40
42
  position: relative;
41
43
  z-index: 1;
42
44
  &_text_contrast0 {
43
- color: var(--yc-color-text-light-primary);
45
+ color: var(--g-color-text-light-primary);
44
46
  }
45
47
  &_text_contrast70 {
46
- color: var(--yc-color-text-complementary);
48
+ color: var(--g-color-text-complementary);
47
49
  }
48
50
  }
49
51
 
50
52
  &_size_xs {
51
53
  height: 20px;
52
54
 
53
- font-size: var(--yc-text-body-2-font-size);
54
- line-height: var(--yc-text-body-2-line-height);
55
+ @include body-2-typography();
55
56
  }
56
57
 
57
58
  &_size_s {
58
59
  height: 28px;
59
60
 
60
- font-size: var(--yc-text-body-1-font-size);
61
+ font-size: var(--g-text-body-1-font-size);
61
62
  line-height: 28px;
62
63
  }
63
64
  &_size_m {
64
65
  height: 32px;
65
66
 
66
- font-size: var(--yc-text-body-2-font-size);
67
+ font-size: var(--g-text-body-2-font-size);
67
68
  line-height: 32px;
68
69
  }
69
70
 
@@ -71,25 +72,25 @@
71
72
  height: 24px;
72
73
 
73
74
  font-size: 13px;
74
- line-height: var(--yc-text-subheader-3-line-height);
75
+ line-height: var(--g-text-subheader-3-line-height);
75
76
  }
76
77
 
77
78
  &_size_n {
78
79
  height: 36px;
79
80
 
80
- font-size: var(--yc-text-body-1-font-size);
81
+ font-size: var(--g-text-body-1-font-size);
81
82
  line-height: 36px;
82
83
  }
83
84
 
84
85
  &_size_l {
85
86
  height: 38px;
86
87
 
87
- font-size: var(--yc-text-subheader-3-font-size);
88
+ font-size: var(--g-text-subheader-3-font-size);
88
89
  line-height: 38px;
89
90
  }
90
91
 
91
92
  &_size_head {
92
- font-size: var(--yc-text-body-1-font-size);
93
+ font-size: var(--g-text-body-1-font-size);
93
94
  line-height: 36px;
94
95
  }
95
96
  }
@@ -4,11 +4,11 @@
4
4
 
5
5
  align-items: center;
6
6
 
7
- color: var(--yc-color-text-complementary);
7
+ color: var(--g-color-text-complementary);
8
8
  &__result-status-icon {
9
- color: var(--yc-color-text-positive);
9
+ color: var(--g-color-text-positive);
10
10
  &_error {
11
- color: var(--yc-color-text-danger);
11
+ color: var(--g-color-text-danger);
12
12
  }
13
13
  }
14
14
  }
@@ -35,7 +35,7 @@
35
35
  height: 6px;
36
36
 
37
37
  &_highlighted {
38
- background: var(--yc-color-line-generic);
38
+ background: var(--g-color-line-generic);
39
39
  }
40
40
  }
41
41
 
@@ -44,11 +44,11 @@
44
44
  height: 100%;
45
45
 
46
46
  &_color_light {
47
- background: var(--yc-color-infographics-info-medium);
47
+ background: var(--g-color-base-info-medium);
48
48
  }
49
49
 
50
50
  &_color_dark {
51
- background: var(--yc-color-infographics-info-heavy);
51
+ background: var(--g-color-base-info-heavy);
52
52
  }
53
53
  }
54
54
 
@@ -82,11 +82,11 @@
82
82
  line-height: 18px;
83
83
 
84
84
  &_color_primary {
85
- color: var(--yc-color-text-primary);
85
+ color: var(--g-color-text-primary);
86
86
  }
87
87
 
88
88
  &_color_secondary {
89
- color: var(--yc-color-text-secondary);
89
+ color: var(--g-color-text-secondary);
90
90
  }
91
91
  }
92
92
  }
@@ -101,19 +101,18 @@ export const SpeedMultiMeter = ({
101
101
  {withValue && (
102
102
  <div className={b('displayed-value')}>{formatValue(valueToDisplay)}</div>
103
103
  )}
104
- <div className={b('popover-container')}>
105
- <Popover
106
- content={renderPopoverContent()}
107
- placement={'bottom'}
108
- disabled={!withPopover}
109
- hasArrow={true}
110
- size="s"
111
- >
112
- <div className={b('bars')} onMouseLeave={onLeaveDiagram}>
113
- {renderValues()}
114
- </div>
115
- </Popover>
116
- </div>
104
+ <Popover
105
+ content={renderPopoverContent()}
106
+ className={b('popover-container')}
107
+ placement={'bottom'}
108
+ disabled={!withPopover}
109
+ hasArrow={true}
110
+ size="s"
111
+ >
112
+ <div className={b('bars')} onMouseLeave={onLeaveDiagram}>
113
+ {renderValues()}
114
+ </div>
115
+ </Popover>
117
116
  </div>
118
117
  </div>
119
118
  );
@@ -24,7 +24,7 @@
24
24
  position: relative;
25
25
  z-index: 10;
26
26
 
27
- background: var(--yc-color-base-background);
27
+ background: var(--g-color-base-background);
28
28
 
29
29
  &::after {
30
30
  position: absolute;
@@ -35,12 +35,12 @@
35
35
 
36
36
  content: '';
37
37
 
38
- background-color: var(--yc-color-base-generic-ultralight);
38
+ background-color: var(--g-color-base-generic-ultralight);
39
39
  }
40
40
 
41
41
  &.active::after,
42
42
  &:hover::after {
43
- background-color: var(--yc-color-line-generic-hover);
43
+ background-color: var(--g-color-line-generic-hover);
44
44
 
45
45
  transition: background-color 1s ease;
46
46
  }
@@ -67,7 +67,7 @@
67
67
 
68
68
  border-width: 1px 0;
69
69
  border-style: solid;
70
- border-color: var(--yc-color-base-generic-hover);
70
+ border-color: var(--g-color-base-generic-hover);
71
71
 
72
72
  transform: translate(-50%, -50%);
73
73
  }
@@ -91,7 +91,7 @@
91
91
 
92
92
  border-width: 0 1px;
93
93
  border-style: solid;
94
- border-color: var(--yc-color-base-generic-hover);
94
+ border-color: var(--g-color-base-generic-hover);
95
95
 
96
96
  transform: translate(-50%, -50%);
97
97
  }
@@ -8,7 +8,7 @@
8
8
  height: var(--data-table-row-height);
9
9
 
10
10
  .yc-skeleton {
11
- height: var(--yc-text-body-2-line-height);
11
+ height: var(--g-text-body-2-line-height);
12
12
  }
13
13
  }
14
14
 
@@ -1,8 +1,8 @@
1
1
  .tablet {
2
2
  cursor: pointer;
3
3
 
4
- color: var(--yc-color-text-complementary);
5
- border-color: var(--yc-color-base-generic-medium-hover);
4
+ color: var(--g-color-text-complementary);
5
+ border-color: var(--g-color-base-generic-medium-hover);
6
6
 
7
7
  &__wrapper {
8
8
  margin-right: 2px;
@@ -17,24 +17,24 @@
17
17
  }
18
18
 
19
19
  &_status_gray {
20
- background-color: var(--yc-color-text-complementary);
20
+ background-color: var(--ydb-color-status-grey);
21
21
  }
22
22
  &_status_yellow {
23
- background-color: var(--yc-color-base-warning-heavy);
23
+ background-color: var(--ydb-color-status-yellow);
24
24
  }
25
25
  &_status_orange {
26
- background-color: var(--yc-color-text-warning-heavy);
26
+ background-color: var(--ydb-color-status-orange);
27
27
  }
28
28
  &_status_red {
29
- background-color: var(--yc-color-base-danger-heavy);
29
+ background-color: var(--ydb-color-status-red);
30
30
  }
31
31
  &_status_green {
32
- background-color: var(--yc-color-base-positive-heavy);
32
+ background-color: var(--ydb-color-status-green);
33
33
  }
34
- &_state_blue {
35
- background-color: var(--yc-color-base-info-heavy);
34
+ &_status_blue {
35
+ background-color: var(--ydb-color-status-blue);
36
36
  }
37
37
  &_status_black {
38
- background-color: var(--yc-color-text-secondary);
38
+ background-color: var(--ydb-color-status-black);
39
39
  }
40
40
  }
@@ -15,33 +15,33 @@
15
15
  text-decoration: none;
16
16
  text-transform: uppercase;
17
17
 
18
- color: var(--yc-color-text-secondary);
18
+ color: var(--g-color-text-secondary);
19
19
  border: 1px solid;
20
20
  border-radius: 2px;
21
21
 
22
22
  &_state_green {
23
- color: var(--yc-color-text-positive);
24
- background-color: var(--yc-color-base-positive);
23
+ color: var(--g-color-text-positive);
24
+ background-color: var(--g-color-base-positive-light);
25
25
  }
26
26
  &_state_yellow {
27
- color: var(--yc-color-text-warning);
28
- background-color: var(--yc-color-base-warning);
27
+ color: var(--g-color-text-warning);
28
+ background-color: var(--g-color-base-warning-light);
29
29
  }
30
30
  &_state_blue {
31
- color: var(--yc-color-text-info);
32
- background-color: var(--yc-color-base-info);
31
+ color: var(--g-color-text-info);
32
+ background-color: var(--g-color-base-info-light);
33
33
  }
34
34
  &_state_orange {
35
- color: var(--yc-color-text-warning-heavy);
36
- background-color: var(--yc-color-infographics-warning-light);
35
+ color: var(--g-color-text-warning-heavy);
36
+ background-color: var(--g-color-base-warning-light);
37
37
  }
38
38
  &_state_red {
39
- color: var(--yc-color-text-danger);
40
- background: var(--yc-color-base-danger);
39
+ color: var(--g-color-text-danger);
40
+ background: var(--g-color-base-danger-light);
41
41
  }
42
42
  &_state_gray {
43
- color: var(--yc-color-text-secondary);
44
- border: 1px solid var(--yc-color-line-generic-hover);
43
+ color: var(--g-color-text-secondary);
44
+ border: 1px solid var(--g-color-line-generic-hover);
45
45
  }
46
46
  }
47
47
  }
@@ -5,15 +5,15 @@
5
5
  font-size: 12px;
6
6
  text-transform: uppercase;
7
7
 
8
- color: var(--yc-color-text-primary);
8
+ color: var(--g-color-text-primary);
9
9
  border-radius: 3px;
10
- background: var(--yc-color-base-generic);
10
+ background: var(--g-color-base-generic);
11
11
 
12
12
  &:last-child {
13
13
  margin-right: 0;
14
14
  }
15
15
 
16
16
  &_type_blue {
17
- background-color: var(--yc-color-celestial-thunder);
17
+ background-color: var(--g-color-celestial-thunder);
18
18
  }
19
19
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  &_color {
12
12
  &_secondary {
13
- color: var(--yc-color-text-secondary);
13
+ color: var(--g-color-text-secondary);
14
14
  }
15
15
  }
16
16
  }
@@ -1,6 +1,6 @@
1
1
  .ydb-usage-label {
2
2
  &_overload {
3
- color: var(--yc-color-text-light-primary);
4
- background-color: var(--yc-color-base-danger-heavy);
3
+ color: var(--g-color-text-light-primary);
4
+ background-color: var(--ydb-color-status-red);
5
5
  }
6
6
  }
@@ -6,7 +6,7 @@ import './UsageLabel.scss';
6
6
 
7
7
  const b = cn('ydb-usage-label');
8
8
 
9
- interface UsageLabelProps extends LabelProps {
9
+ interface UsageLabelProps extends Omit<LabelProps, 'value'> {
10
10
  value: number | string;
11
11
  overloadThreshold?: number;
12
12
  }
@@ -8,11 +8,11 @@
8
8
 
9
9
  --virtual-table-sort-icon-space: 18px;
10
10
 
11
- --virtual-table-border-color: var(--yc-color-base-generic-hover);
12
- --virtual-table-hover-color: var(--yc-color-base-float-hover);
11
+ --virtual-table-border-color: var(--g-color-base-generic-hover);
12
+ --virtual-table-hover-color: var(--g-color-base-float-hover);
13
13
 
14
14
  width: 100%;
15
- @include body2-typography();
15
+ @include body-2-typography();
16
16
 
17
17
  &__table {
18
18
  width: 100%;
@@ -23,30 +23,38 @@ body,
23
23
  }
24
24
 
25
25
  :root {
26
- --yc-color-infographics-yellow-light: rgba(255, 199, 0, 0.15);
27
- --yc-color-infographics-yellow-medium: rgba(255, 219, 77, 0.4);
28
- --yc-color-base-warning-orange: #ff922e;
26
+ --g-color-base-yellow-light: rgba(255, 199, 0, 0.15);
27
+ --g-color-base-yellow-medium: rgba(255, 219, 77, 0.4);
29
28
 
30
29
  --data-table-row-height: 40px;
31
30
  }
32
31
 
33
- .yc-root {
34
- --ydb-data-table-color-hover: var(--yc-color-base-float-hover);
32
+ .g-root {
33
+ --ydb-data-table-color-hover: var(--g-color-base-float-hover);
34
+
35
+ // Colors for tablets, status icons and progress bars
36
+ --ydb-color-status-grey: var(--g-color-base-neutral-heavy);
37
+ --ydb-color-status-green: var(--g-color-base-positive-heavy);
38
+ --ydb-color-status-yellow: var(--g-color-base-warning-heavy);
39
+ --ydb-color-status-orange: #ff922e;
40
+ --ydb-color-status-red: var(--g-color-base-danger-heavy);
41
+ --ydb-color-status-blue: var(--g-color-base-info-heavy);
42
+ --ydb-color-status-black: var(--g-color-base-misc-heavy);
35
43
  }
36
44
 
37
45
  :is(#tab, .yc-tabs-item_active .yc-tabs-item__title) {
38
- color: var(--yc-color-text-primary) !important;
46
+ color: var(--g-color-text-primary) !important;
39
47
  }
40
48
 
41
49
  :is(#tab, .yc-tabs-item__title) {
42
- color: var(--yc-color-text-secondary);
50
+ color: var(--g-color-text-secondary);
43
51
  }
44
52
 
45
- .ycn-aside-header__pane-container {
53
+ .gn-aside-header__pane-container {
46
54
  height: 100%;
47
55
  }
48
56
 
49
- .ycn-aside-header__content {
57
+ .gn-aside-header__content {
50
58
  position: relative;
51
59
 
52
60
  display: flex;
@@ -71,7 +79,7 @@ body,
71
79
 
72
80
  .data-table {
73
81
  width: 100%;
74
- @include body2-typography();
82
+ @include body-2-typography();
75
83
 
76
84
  &__table {
77
85
  max-width: 100%;
@@ -105,22 +113,10 @@ body,
105
113
  justify-content: center;
106
114
  align-items: center;
107
115
  }
108
-
109
- // Should be removed after https://github.com/ydb-platform/ydb-embedded-ui/issues/344
110
- .yc-button__text {
111
- display: flex;
112
- align-items: center;
113
- }
114
-
115
- .g-select {
116
- .yc-button__text {
117
- align-items: baseline;
118
- }
119
- }
120
116
  }
121
117
 
122
118
  .error {
123
- color: var(--yc-color-text-danger);
119
+ color: var(--g-color-text-danger);
124
120
  }
125
121
 
126
122
  .data-table__row:hover .entity-status__clipboard-button,
@@ -128,7 +124,7 @@ body,
128
124
  display: flex;
129
125
  }
130
126
 
131
- .yc-root .data-table_highlight-rows .data-table__row:hover {
127
+ .g-root .data-table_highlight-rows .data-table__row:hover {
132
128
  background: var(--ydb-data-table-color-hover);
133
129
  }
134
130
 
@@ -16,8 +16,8 @@ import ReduxTooltip from '../ReduxTooltip/ReduxTooltip';
16
16
  import Header from '../Header/Header';
17
17
  import AppIcons from '../AppIcons/AppIcons';
18
18
 
19
- import {getParsedSettingValue} from '../../store/reducers/settings/settings';
20
19
  import {THEME_KEY} from '../../utils/constants';
20
+ import {useSetting} from '../../utils/hooks';
21
21
 
22
22
  import './App.scss';
23
23
  import PropTypes from 'prop-types';
@@ -72,7 +72,10 @@ Content.propTypes = {
72
72
  };
73
73
 
74
74
  function ContentWrapper(props) {
75
- const {theme, singleClusterMode, isAuthenticated} = props;
75
+ const {singleClusterMode, isAuthenticated} = props;
76
+
77
+ const [theme] = useSetting(THEME_KEY);
78
+
76
79
  return (
77
80
  <HistoryContext.Consumer>
78
81
  {(history) => (
@@ -96,7 +99,6 @@ function ContentWrapper(props) {
96
99
  }
97
100
 
98
101
  ContentWrapper.propTypes = {
99
- theme: PropTypes.string,
100
102
  singleClusterMode: PropTypes.bool,
101
103
  isAuthenticated: PropTypes.bool,
102
104
  children: PropTypes.node,
@@ -104,7 +106,6 @@ ContentWrapper.propTypes = {
104
106
 
105
107
  function mapStateToProps(state) {
106
108
  return {
107
- theme: getParsedSettingValue(state, THEME_KEY),
108
109
  isAuthenticated: state.authentication.isAuthenticated,
109
110
  singleClusterMode: state.singleClusterMode,
110
111
  };
@@ -6,7 +6,7 @@
6
6
 
7
7
  margin-left: 16px;
8
8
 
9
- line-height: var(--yc-text-body-2-line-height);
9
+ line-height: var(--g-text-body-2-line-height);
10
10
  }
11
11
  &__user-info-wrapper {
12
12
  display: flex;
@@ -15,9 +15,6 @@
15
15
  &__ydb-internal-user-title {
16
16
  font-weight: 500;
17
17
  }
18
- &__user-icon {
19
- color: var(--yc-color-text-misc);
20
- }
21
18
  &__ydb-user-wrapper {
22
19
  width: 300px;
23
20
  padding: 10px;
@@ -1,5 +1,5 @@
1
1
  import React, {useState} from 'react';
2
- import {connect} from 'react-redux';
2
+ import {useDispatch} from 'react-redux';
3
3
  import {useLocation} from 'react-router';
4
4
  import {useHistory} from 'react-router-dom';
5
5
  import cn from 'bem-cn-lite';
@@ -19,7 +19,6 @@ import settingsIcon from '../../assets/icons/settings.svg';
19
19
  import supportIcon from '../../assets/icons/support.svg';
20
20
 
21
21
  import {logout} from '../../store/reducers/authentication/authentication';
22
- import {getParsedSettingValue, setSettingValue} from '../../store/reducers/settings/settings';
23
22
  import {TENANT_PAGE, TENANT_PAGES_IDS} from '../../store/reducers/tenant/constants';
24
23
  import routes, {TENANT, createHref, parseQuery} from '../../routes';
25
24
  import {useSetting, useTypedSelector} from '../../utils/hooks';
@@ -117,10 +116,6 @@ function YdbUserDropdown({isCompact, popupAnchor, ydbUser}: YdbUserDropdownProps
117
116
 
118
117
  interface AsideNavigationProps {
119
118
  children: React.ReactNode;
120
- ydbUser: string;
121
- compact: boolean;
122
- logout: VoidFunction;
123
- setSettingValue: (name: string, value: string) => void;
124
119
  }
125
120
 
126
121
  enum Panel {
@@ -189,15 +184,19 @@ export const useGetLeftNavigationItems = () => {
189
184
 
190
185
  function AsideNavigation(props: AsideNavigationProps) {
191
186
  const history = useHistory();
187
+ const dispatch = useDispatch();
192
188
 
193
189
  const [visiblePanel, setVisiblePanel] = useState<Panel>();
194
190
 
195
- const setIsCompact = (compact: boolean) => {
196
- props.setSettingValue(ASIDE_HEADER_COMPACT_KEY, JSON.stringify(compact));
197
- };
191
+ const {user: ydbUser} = useTypedSelector((state) => state.authentication);
192
+ const [compact, setIsCompact] = useSetting<boolean>(ASIDE_HEADER_COMPACT_KEY);
198
193
 
199
194
  const menuItems = useGetLeftNavigationItems();
200
195
 
196
+ const onLogout = () => {
197
+ dispatch(logout());
198
+ };
199
+
201
200
  return (
202
201
  <React.Fragment>
203
202
  <AsideHeader
@@ -207,7 +206,7 @@ function AsideNavigation(props: AsideNavigationProps) {
207
206
  onClick: () => history.push('/'),
208
207
  }}
209
208
  menuItems={menuItems}
210
- compact={props.compact}
209
+ compact={compact}
211
210
  onChangeCompact={setIsCompact}
212
211
  className={b()}
213
212
  renderContent={() => props.children}
@@ -248,8 +247,8 @@ function AsideNavigation(props: AsideNavigationProps) {
248
247
  isCompact={compact}
249
248
  popupAnchor={asideRef}
250
249
  ydbUser={{
251
- login: props.ydbUser,
252
- logout: props.logout,
250
+ login: ydbUser,
251
+ logout: onLogout,
253
252
  }}
254
253
  />
255
254
  </React.Fragment>
@@ -269,18 +268,4 @@ function AsideNavigation(props: AsideNavigationProps) {
269
268
  );
270
269
  }
271
270
 
272
- const mapStateToProps = (state: any) => {
273
- const {user: ydbUser} = state.authentication;
274
-
275
- return {
276
- ydbUser,
277
- compact: getParsedSettingValue(state, ASIDE_HEADER_COMPACT_KEY),
278
- };
279
- };
280
-
281
- const mapDispatchToProps = {
282
- logout,
283
- setSettingValue,
284
- };
285
-
286
- export default connect(mapStateToProps, mapDispatchToProps)(AsideNavigation);
271
+ export default AsideNavigation;
@@ -28,8 +28,8 @@
28
28
 
29
29
  width: 100%;
30
30
 
31
- font-size: var(--yc-text-body-1-font-size);
32
- line-height: var(--yc-text-header-1-line-height);
31
+ font-size: var(--g-text-body-1-font-size);
32
+ line-height: var(--g-text-header-1-line-height);
33
33
  }
34
34
 
35
35
  &__logo {
@@ -45,7 +45,7 @@
45
45
  margin: 34px 0 16px;
46
46
 
47
47
  font-weight: 600;
48
- @include title-typography();
48
+ @include header-2-typography;
49
49
  }
50
50
 
51
51
  &__form-wrapper {
@@ -60,7 +60,7 @@
60
60
  padding: 40px;
61
61
 
62
62
  border-radius: 16px;
63
- background-color: var(--yc-color-base-background);
63
+ background-color: var(--g-color-base-background);
64
64
  }
65
65
 
66
66
  &__field-wrapper {