Skip to content

Commit 5e75883

Browse files
committed
release(data-grid): v1.3.1
1 parent 699d9c9 commit 5e75883

File tree

4 files changed

+34
-42
lines changed

4 files changed

+34
-42
lines changed

index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"data-grid": {
7575
"react": true,
7676
"icon": true,
77-
"version": "1.3.0",
77+
"version": "1.3.1",
7878
"style": true,
7979
"test": true,
8080
"install": false,

src/data-grid/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.3.1 (26 Feb 2025)
2+
3+
* refactor: theme
4+
15
## 1.3.0 (12 Jan 2025)
26

37
* feat: contextmenu event

src/data-grid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "data-grid",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Grid for displaying datasets",
55
"luna": {
66
"react": true,

src/data-grid/style.scss

+28-40
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
.luna-data-grid {
55
position: relative;
6-
border: 1px solid theme.$color-border;
6+
border: 1px solid;
77
overflow: hidden;
88
outline: none;
99
@include mixin.component();
@@ -22,7 +22,7 @@
2222
th,
2323
td {
2424
padding: 1px 4px;
25-
border-left: 1px solid theme.$color-border;
25+
border-left: 1px solid;
2626
white-space: nowrap;
2727
text-overflow: ellipsis;
2828
overflow: hidden;
@@ -33,16 +33,11 @@
3333

3434
th {
3535
font-weight: normal;
36-
border-bottom: 1px solid theme.$color-border;
36+
border-bottom: 1px solid;
3737
text-align: left;
38-
background: theme.$color-fill-secondary;
3938
position: relative;
4039
&.sortable {
4140
padding-right: #{theme.$padding-s-m}px;
42-
&:hover,
43-
&:active {
44-
background: theme.$color-fill;
45-
}
4641
}
4742
.icon-caret-down,
4843
.icon-caret-up {
@@ -63,13 +58,6 @@
6358
&:focus {
6459
.node.selectable.selected {
6560
color: #fff;
66-
background: theme.$color-primary;
67-
}
68-
}
69-
70-
&:focus.theme-dark {
71-
.node.selectable.selected {
72-
background: theme.$color-primary-dark;
7361
}
7462
}
7563
}
@@ -85,13 +73,6 @@
8573

8674
.data-container {
8775
overflow-y: auto;
88-
.node.selected,
89-
.node.selectable:hover {
90-
background: #ddd;
91-
}
92-
tr:nth-child(even) {
93-
background: #f2f7fd;
94-
}
9576
}
9677

9778
.filler-row {
@@ -117,27 +98,34 @@
11798
}
11899
}
119100

120-
.theme-dark {
121-
border-color: theme.$color-border-dark;
122-
th,
123-
td {
124-
border-color: theme.$color-border-dark;
125-
}
126-
th {
127-
background: theme.$color-fill-secondary-dark;
128-
&.sortable {
129-
&:hover {
130-
background: theme.$color-fill-dark;
101+
@each $theme in ('light', 'dark') {
102+
.theme-#{$theme} {
103+
@include mixin.theme-rule(border-color, color-border, $theme);
104+
th,
105+
td {
106+
@include mixin.theme-rule(border-color, color-border, $theme);
107+
}
108+
th {
109+
@include mixin.theme-rule(background-color, color-fill-secondary, $theme);
110+
&.sortable {
111+
&:hover {
112+
@include mixin.theme-rule(background-color, color-fill, $theme);
113+
}
131114
}
132115
}
133-
}
134-
.data-container {
135-
.node.selected,
136-
.node.selectable:hover {
137-
background: #393939;
116+
.data-container {
117+
.node.selected,
118+
.node.selectable:hover {
119+
background-color: if($theme == 'light', #ddd, #393939);
120+
}
121+
tr:nth-child(even) {
122+
background-color: if($theme == 'light', #f2f7fd, #0b2544);
123+
}
138124
}
139-
tr:nth-child(even) {
140-
background: #0b2544;
125+
&:focus {
126+
.node.selectable.selected {
127+
@include mixin.theme-rule(background-color, color-primary, $theme);
128+
}
141129
}
142130
}
143131
}

0 commit comments

Comments
 (0)