Skip to content

Commit c851c05

Browse files
committed
finished adding dark mode to everything except bar graph and react drop downs
1 parent 7f85f74 commit c851c05

File tree

8 files changed

+57
-222
lines changed

8 files changed

+57
-222
lines changed

src/app/components/StateRoute/History.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function History(props: Record<string, unknown>): JSX.Element {
9898
return changedState;
9999
}
100100

101-
if (index === 0) return 'Initial State';
101+
if (index === 0) return '<span class="initial-state">Initial State</span>';
102102

103103
// Add null checks for snapshots
104104
if (!snapshots || !snapshots[index] || !snapshots[index - 1]) {
@@ -111,7 +111,7 @@ function History(props: Record<string, unknown>): JSX.Element {
111111
statelessCleaning(snapshots[index]),
112112
);
113113

114-
if (!delta) return 'No state changes';
114+
if (!delta) return '<span class="no-changes">No State Changes</span>';
115115

116116
const changedState = findStateChangeObj(delta);
117117
return changedState.length > 0 ? formatters.html.format(changedState[0]) : 'No state changes';

src/app/styles/components/_actionComponent.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
}
118118

119119
.current-snap {
120-
font-weight: 800;
120+
font-weight: 700;
121121
border: none;
122122
background: transparent;
123123
font-size: 1rem;

src/app/styles/components/_ax.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
padding: 6px 12px;
2121
font-size: 14px;
2222
font-weight: 500;
23-
color: white;
24-
background-color: #14b8a6;
23+
color: var(--button-primary-text);
24+
background-color: var(--color-primary);
2525
border-radius: 6px;
2626
cursor: pointer;
2727
transition: all 200ms ease;
2828
user-select: none;
2929
}
3030

3131
.accessibility-controls label:hover {
32-
background-color: #0d9488;
32+
background-color: var(--color-primary-dark);
3333
}
3434

3535
.accessibility-disable input[type='radio'] {
@@ -44,18 +44,18 @@
4444
padding: 6px 12px;
4545
font-size: 14px;
4646
font-weight: 500;
47-
background-color: #f9fafb;
48-
border: 1px solid #e5e7eb;
49-
color: #374151;
47+
background-color: var(--bg-secondary);
48+
border: 1px solid var(--border-color);
49+
color: var(--text-primary);
5050
border-radius: 6px;
5151
cursor: pointer;
5252
transition: all 200ms ease;
5353
user-select: none;
5454
}
5555

5656
.accessibility-disable label:hover {
57-
border-color: #d1d5db;
58-
background-color: #f3f4f6;
57+
border-color: var(--border-color-dark);
58+
background-color: var(--bg-tertiary);
5959
}
6060

6161
.accessibility-text {
@@ -66,7 +66,7 @@
6666

6767
.accessibility-text p {
6868
margin: 0;
69-
color: #374151;
69+
color: var(--text-primary);
7070
font-size: 16px;
7171
}
7272

@@ -75,6 +75,6 @@
7575
margin: 0;
7676
padding: 0;
7777
padding: 8px 12px;
78-
border-bottom: 1px solid #e5e7eb;
79-
transition: background-color 150ms ease;
78+
border-bottom: 1px solid var(--border-color);
79+
background-color: var(--bg-primary);
8080
}

src/app/styles/components/_buttons.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,24 @@
124124
width: 64px;
125125
height: 32px;
126126
border-radius: 16px;
127-
border: 2px solid #e5e7eb;
128-
background-color: #f3f4f6;
127+
border: 2px solid var(--border-color);
128+
background-color: var(--bg-tertiary);
129129
cursor: pointer;
130130
transition: all 300ms ease;
131131
padding: 2px;
132132
}
133133

134134
.theme-toggle.dark {
135-
background-color: #1f2937;
136-
border-color: #374151;
135+
background-color: var(--bg-primary);
136+
border-color: var(--border-color-dark);
137137
}
138138

139139
.theme-toggle-slider {
140140
position: relative;
141141
width: 24px;
142142
height: 24px;
143143
border-radius: 50%;
144-
background-color: white;
144+
background-color: var(--bg-primary);
145145
transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
146146
display: flex;
147147
align-items: center;
@@ -151,7 +151,7 @@
151151

152152
.theme-toggle.dark .theme-toggle-slider {
153153
transform: translateX(32px);
154-
background-color: #14b8a6;
154+
background-color: var(--color-primary);
155155
}
156156

157157
.theme-toggle-icons {
@@ -170,14 +170,14 @@
170170
.theme-toggle-icon {
171171
width: 16px;
172172
height: 16px;
173-
color: #6b7280;
173+
color: var(--text-secondary);
174174
transition: color 300ms ease;
175175
}
176176

177177
.theme-toggle.dark .theme-toggle-icon.moon {
178-
color: #14b8a6;
178+
color: var(--color-primary);
179179
}
180180

181181
.theme-toggle.dark .theme-toggle-icon.sun {
182-
color: #6b7280;
182+
color: var(--text-secondary);
183183
}

src/app/styles/components/_rc-slider.scss

Lines changed: 3 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@
33
width: 100%;
44
margin: 12px;
55
border-radius: 6px;
6-
-ms-touch-action: none;
7-
touch-action: none;
8-
box-sizing: border-box;
9-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
106
}
117

12-
.rc-slider * {
13-
box-sizing: border-box;
14-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
15-
}
168
.rc-slider-rail {
179
position: absolute;
1810
width: 100%;
@@ -28,6 +20,7 @@
2820
border-radius: 6px;
2921
background-color: #284b63;
3022
}
23+
3124
.rc-slider-handle {
3225
position: absolute;
3326
margin-left: -8px;
@@ -43,189 +36,19 @@
4336
transition:
4437
transform 0.2s ease,
4538
box-shadow 0.2s ease;
46-
-ms-touch-action: pan-x;
47-
touch-action: pan-x;
48-
}
49-
.rc-slider-handle:focus {
50-
outline: none;
5139
}
5240

53-
.rc-slider-handle:hover {
54-
transform: scale(1.1);
55-
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
56-
}
57-
.rc-slider-handle:active {
58-
cursor: -webkit-grabbing;
59-
cursor: grabbing;
60-
transform: scale(1.1);
61-
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
62-
}
63-
.rc-slider-mark {
64-
position: absolute;
65-
top: 18px;
66-
left: 0;
67-
width: 100%;
68-
font-size: 16px;
69-
}
70-
.rc-slider-mark-text {
71-
position: absolute;
72-
display: inline-block;
73-
vertical-align: middle;
74-
text-align: center;
75-
cursor: pointer;
76-
color: #999;
77-
}
78-
.rc-slider-mark-text-active {
79-
color: #666;
80-
}
81-
.rc-slider-step {
82-
position: absolute;
83-
width: 100%;
84-
height: 4px;
85-
background: transparent;
86-
}
87-
88-
.rc-slider-disabled .rc-slider-track {
89-
background-color: #ccc;
90-
}
91-
.rc-slider-disabled .rc-slider-handle,
92-
.rc-slider-disabled .rc-slider-dot {
93-
border-color: #ccc;
94-
box-shadow: none;
95-
background-color: #fff;
96-
cursor: not-allowed;
97-
}
98-
.rc-slider-disabled .rc-slider-mark-text,
99-
.rc-slider-disabled .rc-slider-dot {
100-
cursor: not-allowed !important;
101-
}
10241
.rc-slider-vertical {
103-
width: 14px;
10442
height: 100%;
10543
padding: 0 5px;
10644
}
45+
10746
.rc-slider-vertical .rc-slider-rail {
10847
height: 100%;
10948
width: 4px;
11049
}
50+
11151
.rc-slider-vertical .rc-slider-track {
11252
left: 5px;
113-
bottom: 0;
114-
width: 4px;
115-
}
116-
.rc-slider-vertical .rc-slider-handle {
117-
-ms-touch-action: pan-y;
118-
touch-action: pan-y;
119-
}
120-
.rc-slider-vertical .rc-slider-mark {
121-
top: 0;
122-
left: 18px;
123-
height: 100%;
124-
}
125-
.rc-slider-vertical .rc-slider-step {
126-
height: 100%;
12753
width: 4px;
12854
}
129-
130-
.rc-slider-vertical .rc-slider-dot:first-child {
131-
margin-bottom: -4px;
132-
}
133-
.rc-slider-vertical .rc-slider-dot:last-child {
134-
margin-bottom: -4px;
135-
}
136-
.rc-slider-tooltip-zoom-down-enter,
137-
.rc-slider-tooltip-zoom-down-appear {
138-
animation-duration: 0.3s;
139-
animation-fill-mode: both;
140-
display: block !important;
141-
animation-play-state: paused;
142-
}
143-
.rc-slider-tooltip-zoom-down-leave {
144-
animation-duration: 0.3s;
145-
animation-fill-mode: both;
146-
display: block !important;
147-
animation-play-state: paused;
148-
}
149-
.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,
150-
.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {
151-
animation-name: rcSliderTooltipZoomDownIn;
152-
animation-play-state: running;
153-
}
154-
.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {
155-
animation-name: rcSliderTooltipZoomDownOut;
156-
animation-play-state: running;
157-
}
158-
.rc-slider-tooltip-zoom-down-enter,
159-
.rc-slider-tooltip-zoom-down-appear {
160-
transform: scale(0, 0);
161-
animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
162-
}
163-
.rc-slider-tooltip-zoom-down-leave {
164-
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
165-
}
166-
@keyframes rcSliderTooltipZoomDownIn {
167-
0% {
168-
opacity: 0;
169-
transform-origin: 50% 100%;
170-
transform: scale(0, 0);
171-
}
172-
100% {
173-
transform-origin: 50% 100%;
174-
transform: scale(1, 1);
175-
}
176-
}
177-
@keyframes rcSliderTooltipZoomDownOut {
178-
0% {
179-
transform-origin: 50% 100%;
180-
transform: scale(1, 1);
181-
}
182-
100% {
183-
opacity: 0;
184-
transform-origin: 50% 100%;
185-
transform: scale(0, 0);
186-
}
187-
}
188-
.rc-slider-tooltip {
189-
position: absolute;
190-
left: -9999px;
191-
top: -9999px;
192-
visibility: visible;
193-
box-sizing: border-box;
194-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
195-
}
196-
.rc-slider-tooltip * {
197-
box-sizing: border-box;
198-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
199-
}
200-
.rc-slider-tooltip-hidden {
201-
display: none;
202-
}
203-
.rc-slider-tooltip-placement-top {
204-
padding: 4px 0 8px 0;
205-
}
206-
.rc-slider-tooltip-inner {
207-
padding: 6px 2px;
208-
min-width: 24px;
209-
height: 24px;
210-
font-size: 16px;
211-
line-height: 1;
212-
color: #fff;
213-
text-align: center;
214-
text-decoration: none;
215-
background-color: #6c6c6c;
216-
border-radius: 6px;
217-
}
218-
.rc-slider-tooltip-arrow {
219-
position: absolute;
220-
width: 0;
221-
height: 0;
222-
border-color: transparent;
223-
border-style: solid;
224-
}
225-
.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {
226-
bottom: 4px;
227-
left: 50%;
228-
margin-left: -4px;
229-
border-width: 4px 4px 0;
230-
border-top-color: #6c6c6c;
231-
}

0 commit comments

Comments
 (0)