Skip to content

Commit 8b78d04

Browse files
committed
feat: use react-unipika library
1 parent 7d4199c commit 8b78d04

File tree

26 files changed

+228
-1353
lines changed

26 files changed

+228
-1353
lines changed

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@gravity-ui/navigation": "^3.3.9",
2828
"@gravity-ui/paranoid": "^3.0.0",
2929
"@gravity-ui/react-data-table": "^2.2.1",
30+
"@gravity-ui/react-unipika": "^0.5.0",
3031
"@gravity-ui/table": "^1.10.1",
3132
"@gravity-ui/uikit": "^7.23.0",
3233
"@gravity-ui/unipika": "^5.2.1",
Lines changed: 21 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
@use '../../styles/mixins.scss';
22

33
.ydb-json-viewer {
4-
--data-table-row-height: 20px;
54
--toolbar-background-color: var(--g-color-base-background);
6-
75
width: 100%;
86

97
&__toolbar {
@@ -17,56 +15,32 @@
1715
background-color: var(--toolbar-background-color);
1816
}
1917

20-
&__content {
21-
font-family: var(--g-font-family-monospace);
22-
}
23-
24-
&__row {
25-
height: 1em;
26-
}
27-
28-
&__cell {
29-
position: relative;
30-
31-
white-space: nowrap !important;
32-
* {
33-
white-space: nowrap !important;
34-
}
35-
}
36-
37-
&__collapsed {
38-
position: absolute;
39-
40-
margin-top: -2px;
41-
margin-left: -3ex;
42-
}
43-
4418
&__match-counter {
4519
align-content: center;
4620

4721
text-wrap: nowrap;
4822
}
49-
50-
&__key {
51-
color: var(--g-color-text-misc);
52-
}
53-
54-
&__value {
55-
&_type {
56-
&_string {
57-
color: var(--color-unipika-string);
58-
}
59-
&_boolean {
60-
color: var(--color-unipika-bool);
61-
}
62-
&_null {
63-
color: var(--color-unipika-null);
64-
}
65-
&_int64 {
66-
color: var(--color-unipika-int);
67-
}
68-
&_double {
69-
color: var(--color-unipika-float);
23+
.g-ru-cell {
24+
&__key {
25+
color: var(--g-color-text-misc);
26+
}
27+
&__value {
28+
&_type {
29+
&_string {
30+
color: var(--color-unipika-string);
31+
}
32+
&_boolean {
33+
color: var(--color-unipika-bool);
34+
}
35+
&_null {
36+
color: var(--color-unipika-null);
37+
}
38+
&_int64 {
39+
color: var(--color-unipika-int);
40+
}
41+
&_double {
42+
color: var(--color-unipika-float);
43+
}
7044
}
7145
}
7246
}
@@ -77,39 +51,7 @@
7751
width: 300px;
7852
}
7953

80-
&__filtered {
81-
&_highlighted {
82-
background-color: var(--g-color-base-generic-medium);
83-
}
84-
&_clickable {
85-
cursor: pointer;
86-
87-
color: var(--g-color-text-info);
88-
}
89-
}
90-
9154
&__match-btn {
9255
margin-left: -1px;
9356
}
94-
95-
&__full-value {
96-
overflow: hidden auto;
97-
98-
max-width: 90vw;
99-
max-height: 90vh;
100-
margin: var(--g-spacing-3) 0;
101-
102-
word-break: break-all;
103-
@include mixins.body-2-typography();
104-
}
105-
106-
.data-table__head {
107-
display: none;
108-
}
109-
110-
.data-table__td {
111-
overflow: visible;
112-
113-
padding: 0;
114-
}
11557
}

0 commit comments

Comments
 (0)