Skip to content

Commit b060590

Browse files
committed
release(modal): v1.3.1
1 parent 5e75883 commit b060590

File tree

9 files changed

+129
-81
lines changed

9 files changed

+129
-81
lines changed

index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
"modal": {
247247
"react": true,
248248
"icon": true,
249-
"version": "1.3.0",
249+
"version": "1.3.1",
250250
"style": true,
251251
"test": true,
252252
"install": false,

src/command-palette/style.scss

+7-7
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,27 @@
5454
@each $theme in ('light', 'dark') {
5555
.theme-#{$theme} {
5656
.body {
57-
@include mixin.theme-rule(background-color, color-bg-container, $theme);
57+
@include mixin.theme-var(background-color, color-bg-container, $theme);
5858
}
5959

6060
.input {
61-
@include mixin.theme-rule(background-color, color-bg-container, $theme);
62-
@include mixin.theme-rule(border-color, color-border, $theme);
63-
@include mixin.theme-rule(color, color-text, $theme);
61+
@include mixin.theme-var(background-color, color-bg-container, $theme);
62+
@include mixin.theme-var(border-color, color-border, $theme);
63+
@include mixin.theme-var(color, color-text, $theme);
6464
}
6565

6666
.list {
6767
li {
6868
&:hover {
69-
@include mixin.theme-rule(
69+
@include mixin.theme-var(
7070
background-color,
7171
color-fill-secondary,
7272
$theme
7373
);
7474
}
7575
&.active {
76-
@include mixin.theme-rule(color, color-white, $theme);
77-
@include mixin.theme-rule(background-color, color-primary, $theme);
76+
@include mixin.theme-var(color, color-white, $theme);
77+
@include mixin.theme-var(background-color, color-primary, $theme);
7878
}
7979
}
8080
}

src/data-grid/style.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@
100100

101101
@each $theme in ('light', 'dark') {
102102
.theme-#{$theme} {
103-
@include mixin.theme-rule(border-color, color-border, $theme);
103+
@include mixin.theme-var(border-color, color-border, $theme);
104104
th,
105105
td {
106-
@include mixin.theme-rule(border-color, color-border, $theme);
106+
@include mixin.theme-var(border-color, color-border, $theme);
107107
}
108108
th {
109-
@include mixin.theme-rule(background-color, color-fill-secondary, $theme);
109+
@include mixin.theme-var(background-color, color-fill-secondary, $theme);
110110
&.sortable {
111111
&:hover {
112-
@include mixin.theme-rule(background-color, color-fill, $theme);
112+
@include mixin.theme-var(background-color, color-fill, $theme);
113113
}
114114
}
115115
}
@@ -124,7 +124,7 @@
124124
}
125125
&:focus {
126126
.node.selectable.selected {
127-
@include mixin.theme-rule(background-color, color-primary, $theme);
127+
@include mixin.theme-var(background-color, color-primary, $theme);
128128
}
129129
}
130130
}

src/icon-list/style.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
.item {
6969
&.selected {
7070
.icon {
71-
@include mixin.theme-rule(background-color, color-border, $theme);
71+
@include mixin.theme-var(background-color, color-border, $theme);
7272
}
7373
.name {
74-
@include mixin.theme-rule(background-color, color-primary, $theme);
75-
@include mixin.theme-rule(color, color-white, $theme);
74+
@include mixin.theme-var(background-color, color-primary, $theme);
75+
@include mixin.theme-var(color, color-white, $theme);
7676
}
7777
}
7878
}

src/modal/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 (3 Nov 2024)
26

37
* feat: add auto theme

src/modal/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "modal",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Create modal dialogs",
55
"luna": {
66
"react": true,

src/modal/style.scss

+49-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@use '../share/mixin' as mixin;
2-
@use '../share/theme' as theme;
1+
@use '../share/mixin' as *;
2+
@use '../share/theme' as *;
33

44
.luna-modal {
55
position: fixed;
@@ -10,7 +10,7 @@
1010
display: flex;
1111
justify-content: center;
1212
align-items: center;
13-
@include mixin.component();
13+
@include component();
1414
& {
1515
background: rgba(0, 0, 0, 0.5);
1616
}
@@ -26,11 +26,11 @@
2626

2727
.body {
2828
position: relative;
29-
background: theme.$color-bg-container;
3029
max-height: 100%;
3130
display: flex;
3231
flex-direction: column;
3332
border-radius: 4px;
33+
border: 1px solid;
3434
&.no-title {
3535
position: static;
3636
.title {
@@ -81,19 +81,17 @@
8181

8282
.button {
8383
padding: 0 12px;
84-
background: #e9ecef;
8584
cursor: default;
8685
position: relative;
8786
user-select: none;
8887
margin: 0 4px;
89-
font-size: #{theme.$font-size-s-m}px;
88+
font-size: #{$font-size-s-m}px;
9089
border-radius: 4px;
9190
overflow: hidden;
9291
height: 28px;
9392
line-height: 28px;
9493
&:active {
9594
&::before {
96-
background: theme.$color-primary;
9795
content: '';
9896
opacity: 0.4;
9997
position: absolute;
@@ -105,13 +103,10 @@
105103
}
106104
}
107105
&.secondary {
108-
color: theme.$color-primary;
109-
border: 1px solid theme.$color-border;
110-
background: #fff;
106+
border: 1px solid;
111107
}
112108
&.primary {
113109
color: #fff;
114-
background: theme.$color-primary;
115110
}
116111
}
117112

@@ -121,14 +116,52 @@
121116
width: 100%;
122117
font-size: 16px;
123118
padding: 6px 12px;
124-
border: 1px solid theme.$color-border;
119+
border: 1px solid;
125120
-webkit-appearance: none;
126121
-moz-appearance: none;
127122
}
128123

129-
.theme-dark {
130-
.body {
131-
background: theme.$color-bg-container-dark;
132-
border: 1px solid theme.$color-border-dark;
124+
@each $theme in ('light', 'dark') {
125+
.theme-#{$theme} {
126+
.body {
127+
@include theme-vars(
128+
(
129+
background-color: color-bg-container,
130+
border-color: color-border,
131+
),
132+
$theme
133+
);
134+
}
135+
.button {
136+
@include theme-var(background-color, color-bg-container, $theme);
137+
&:active {
138+
&::before {
139+
@include theme-var(background-color, color-primary, $theme);
140+
}
141+
}
142+
&.secondary {
143+
@include theme-vars(
144+
(
145+
color: color-primary,
146+
border-color: color-border,
147+
background-color: color-bg-container,
148+
),
149+
$theme
150+
);
151+
}
152+
&.primary {
153+
@include theme-var(background-color, color-primary, $theme);
154+
}
155+
}
156+
.input {
157+
@include theme-vars(
158+
(
159+
background-color: color-bg-container,
160+
color: color-text,
161+
border-color: color-border,
162+
),
163+
$theme
164+
);
165+
}
133166
}
134167
}

0 commit comments

Comments
 (0)