Skip to content

Commit f064909

Browse files
authored
Merge pull request #143 from mostafaznv/dev
feat: dark mode #138
2 parents 01c77af + 8ff7790 commit f064909

18 files changed

+250
-66
lines changed

dist/css/field.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/field.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/ckeditor/plugins/SnippetBrowser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ export default class SnippetBrowser {
7979
}
8080

8181
get icon() {
82-
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 502.664 502.664"><path d="M153.821 358.226L0 274.337v-46.463l153.821-83.414v54.574L46.636 250.523l107.185 53.431v54.272zm26.273 29.358L282.103 115.08h32.227L212.084 387.584h-31.99zm168.749-29.358v-54.272l107.164-52.999-107.164-52.59v-53.927l153.821 83.522v46.183l-153.821 84.083z" fill="#000"/></svg>`
82+
return `<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 502.664 502.664"><path d="M281.398 117.079c-.489 1.267-23.338 62.246-50.775 135.51-27.437 73.263-50.068 133.685-50.29 134.271-.321.844 2.936 1.019 15.673.838l16.079-.228 50.499-134.462c27.775-73.955 50.768-135.311 51.097-136.348l.597-1.885h-31.99l-.89 2.304M76.656 186.33.419 227.693l-.222 23.354-.222 23.354 75.97 41.455c41.784 22.8 76.474 41.576 77.088 41.725.914.222 1.117-4.632 1.117-26.621v-26.893l-53.648-26.753-53.649-26.754 3.173-1.598c1.745-.879 25.415-12.257 52.601-25.284s49.9-24.056 50.476-24.508c.799-.628 1.047-7.161 1.047-27.529 0-14.688-.282-26.699-.628-26.69-.346.009-34.935 18.63-76.866 41.379m271.858-14.73v26.666l53.717 26.324 53.717 26.323-53.717 26.63-53.717 26.631v26.867c0 25.24.089 26.834 1.466 26.316.806-.303 35.482-19.099 77.057-41.769l75.591-41.217-.192-23.294-.191-23.293-76.237-41.412c-41.931-22.777-76.52-41.418-76.866-41.425-.346-.007-.628 11.987-.628 26.653" fill-rule="evenodd"/></svg>`
8383
}
8484
}

resources/js/ckeditor/plugins/element-attribute/src/add-attribute-to-element-ui.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class ElementAddAttributesUI extends Plugin {
153153
}
154154

155155
_pluginIcon() {
156-
return '<svg version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill="none" style="color: transparent"><path d="M0 0h24v24h-24v-24Z"></path><path stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M8 15v-6"></path><path stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.6 15h-3v-6h3c1.105 0 2 .895 2 2v2c0 1.105-.895 2-2 2Z"></path><path stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M18.353 21.353h-12.706c-1.657 0-3-1.343-3-3v-12.706c0-1.657 1.343-3 3-3h12.705c1.657 0 3 1.343 3 3v12.705c.001 1.658-1.342 3.001-2.999 3.001Z"></path></g></svg>'
156+
return '<svg width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.88 1.982A3.752 3.752 0 0 0 1.982 4.9c-.058.288-.063 1.013-.053 7.24l.011 6.92.091.293c.404 1.304 1.312 2.212 2.616 2.616l.293.091 6.92.011c7.616.012 7.194.025 7.851-.23 1.204-.468 2.125-1.592 2.326-2.841.059-.361.059-13.639 0-14-.201-1.249-1.123-2.374-2.326-2.84-.652-.253-.234-.24-7.739-.237-5.682.003-6.876.013-7.092.059m14.019 1.479c.335.088.525.181.81.396.323.244.621.645.76 1.023l.111.3v13.64l-.111.3a2.364 2.364 0 0 1-1.349 1.349l-.3.111H5.18l-.3-.111c-.526-.194-1.068-.688-1.284-1.172-.205-.456-.196-.134-.196-7.297 0-7.163-.009-6.841.196-7.297.184-.412.696-.923 1.108-1.108.441-.198.136-.19 7.278-.192 5.885-.003 6.709.004 6.917.058M7.815 8.277a.8.8 0 0 0-.462.354l-.093.149v6.44l.093.149c.357.574 1.223.443 1.363-.207.059-.275.06-6.065.001-6.321a.747.747 0 0 0-.902-.564m3.6-.001a.806.806 0 0 0-.462.355l-.093.149V15.233l.12.17a.965.965 0 0 0 .28.253c.155.082.212.084 1.96.084 1.761 0 1.807-.002 2.12-.092a2.797 2.797 0 0 0 1.908-1.908c.088-.307.092-.376.092-1.74 0-1.364-.004-1.433-.092-1.74a2.81 2.81 0 0 0-1.888-1.904c-.287-.085-.376-.089-2.06-.1-.968-.006-1.816.003-1.885.02m3.639 1.565c.29.109.596.415.705.705.075.201.081.309.081 1.454 0 1.45-.014 1.523-.366 1.874-.351.352-.424.366-1.876.366H12.36V9.76h1.238c1.147 0 1.255.006 1.456.081" fill-rule="evenodd" /></svg>'
157157
}
158158

159159
get _isVisible() {

resources/js/components/RadioInput.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="radio-container">
3-
<label v-for="option in options" class="radio" :key="option.value">
3+
<label v-for="option in options" class="radio text-gray-600 dark:text-gray-500" :key="option.value">
44
{{ option.label }}
55

66
<input
@@ -60,7 +60,6 @@ function onChange(e) {
6060
cursor: pointer;
6161
font-size: 14px;
6262
font-weight: 600;
63-
color: rgba(var(--colors-gray-600));
6463
user-select: none;
6564
6665
input {

resources/js/components/media-browser/MediaBrowser.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<modal v-model="modalStatus" class="media-browser" :title="__(title)" :content-no-overflow="true">
33
<template #header>
4-
<span>{{ __('Media Browser') }}</span>
4+
<span class="">{{ __('Media Browser') }}</span>
55
</template>
66

77

resources/js/components/media-browser/MediaBrowserInfo.vue

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
2-
<div v-if="item" class="info h-full nova-ckeditor-mobile-none">
2+
<div v-if="item" class="info h-full nova-ckeditor-mobile-none bg-white dark:bg-gray-800 border-l border-gray-100 dark:border-gray-600">
33
<div class="flex-grow overflow-y-auto overflow-x-hidden">
44
<div class="info__header mb-2">
5-
<strong :title="item.name">{{ item.name }}</strong>
5+
<strong class="text-gray-500 dark:text-gray-200" :title="item.name">{{ item.name }}</strong>
66

77
<button @click="close" type="button">
88
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
@@ -34,8 +34,10 @@
3434
</div>
3535

3636
<div class="info__data">
37-
<div v-for="item in info" :key="item.label" class="info__data--item">
38-
<span class="info__data--item-label">{{ __(item.label) }}</span>
37+
<div v-for="item in info" :key="item.label" class="info__data--item text-gray-500 dark:text-gray-200 border-b border-gray-100 dark:border-gray-700">
38+
<span class="info__data--item-label text-gray-600 dark:text-gray-500">
39+
{{ __(item.label) }}
40+
</span>
3941

4042
<div class="info__data--item-value">
4143
<template v-if="item.label === 'Dominant Color'">
@@ -243,8 +245,6 @@ function secondsToHms(seconds) {
243245
justify-content: space-between;
244246
width: 320px;
245247
padding: 8px 8px 0;
246-
background: #fff;
247-
border-left: solid 1px rgba(var(--colors-gray-100));
248248
249249
&__header {
250250
display: flex;
@@ -254,7 +254,6 @@ function secondsToHms(seconds) {
254254
strong {
255255
font-size: 18px;
256256
font-weight: 600;
257-
color: rgba(var(--colors-gray-500));
258257
white-space: nowrap;
259258
overflow: hidden;
260259
text-overflow: ellipsis;
@@ -294,13 +293,10 @@ function secondsToHms(seconds) {
294293
align-items: center;
295294
justify-content: space-between;
296295
font-size: 14px;
297-
color: rgba(var(--colors-gray-500));
298-
border-bottom: solid 1px rgba(var(--colors-gray-100));
299296
height: 36px;
300297
301298
&-label {
302299
font-weight: bold;
303-
color: rgba(var(--colors-gray-600));
304300
}
305301
306302
&-value {

resources/js/components/media-browser/MediaBrowserItem.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div @dblclick.stop="pick" @click.stop="select(true)" class="item" :class="{selected: isSelected}">
2+
<div @dblclick.stop="pick" @click.stop="select(true)" class="item bg-white dark:bg-gray-800" :class="{selected: isSelected}">
33
<figure class="item__preview">
44
<figcaption class="item__preview--format">{{ format }}</figcaption>
55

@@ -40,7 +40,7 @@
4040
</figcaption>
4141
</figure>
4242

43-
<div class="item__details">
43+
<div class="item__details border-t border-gray-200 dark:border-gray-700">
4444
<span class="item__details--name" :title="item.name">{{ item.name }}</span>
4545

4646
<button @click.stop.prevent="select(false)" type="button" class="item__details--select">
@@ -148,7 +148,6 @@ function play() {
148148
.item {
149149
position: relative;
150150
display: block;
151-
background-color: white;
152151
box-shadow: 0 0 4px 2px rgba(46, 49, 56, 0.15);
153152
border: 1px solid transparent;
154153
overflow: hidden;
@@ -219,7 +218,6 @@ function play() {
219218
}
220219
221220
&__details {
222-
border-top: 1px solid rgba(46, 49, 56, 0.15);
223221
display: flex;
224222
align-items: center;
225223
justify-content: space-between;

resources/js/components/media-browser/MediaBrowserList.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<transition name="fade">
3-
<div v-if="loading" class="loading" />
3+
<div v-if="loading" class="loading bg-white/75 dark:bg-gray-800/75" />
44
</transition>
55

66

@@ -180,7 +180,6 @@ fetch(props.page)
180180
left: 0;
181181
width: 100%;
182182
height: 100%;
183-
background-color: rgba(255, 255, 255, 0.5);
184183
z-index: 10;
185184
}
186185

resources/js/components/media-browser/MediaBrowserNavbar.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="navbar">
2+
<div class="navbar bg-white dark:bg-gray-800">
33
<div class="inline-flex items-center gap-1 nova-ckeditor-mobile-none">
44
<button
55
@click.stop="download"
@@ -214,7 +214,6 @@ init()
214214
position: relative;
215215
width: 100%;
216216
height: 52px;
217-
background-color: white;
218217
display: flex;
219218
align-items: center;
220219
justify-content: space-between;

resources/js/components/media-browser/MediaBrowserPagination.vue

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="pagination">
2+
<div class="pagination bg-white dark:bg-gray-800">
33
<div v-if="loading" class="loading">
44
<div class="indeterminate"></div>
55
</div>
@@ -31,6 +31,7 @@
3131
v-model.number="inputPage"
3232
@select.stop.prevent
3333
type="number"
34+
class="border-b border-gray-200 dark:border-gray-600"
3435
:title="__('Enter Page Number')"
3536
min="1"
3637
:max="total"
@@ -138,7 +139,6 @@ function pick() {
138139
display: flex;
139140
align-items: center;
140141
justify-content: center;
141-
background: white;
142142
height: 50px;
143143
box-shadow: 0 0 6px rgba(46, 49, 56, 0.05);
144144
z-index: 100;
@@ -175,10 +175,9 @@ function pick() {
175175
text-align: center;
176176
width: 32px;
177177
outline: none;
178-
border: none;
179178
appearance: textfield;
180-
border-bottom: solid 1px rgba(var(--colors-gray-200));
181179
margin-bottom: -2px;
180+
background: transparent;
182181
183182
&::-webkit-outer-spin-button,
184183
&::-webkit-inner-spin-button {

resources/js/components/media-browser/MediaBrowserRenameModal.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@select.stop.prevent
1515
v-model="name"
1616
ref="input"
17-
class="rename-modal__input flex-grow"
17+
class="rename-modal__input flex-grow bg-transparent"
1818
/>
1919
</div>
2020
</template>

resources/js/components/media-browser/MediaBrowserSearchModal.vue

+6-7
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@
2020

2121

2222
<div class="p-3 overflow-x-hidden">
23-
<span class="search-modal__history--label">{{ __('Recent searches') }}:</span>
23+
<span class="search-modal__history--label text-gray-500 dark:text-gray-400">
24+
{{ __('Recent searches') }}:
25+
</span>
2426

2527
<div
2628
v-for="(item, index) in reverseHistory"
2729
@click.stop="select(index)"
28-
class="search-modal__history--item flex items-center justify-between"
30+
class="search-modal__history--item flex items-center justify-between hover:bg-gray-200 dark:hover:bg-gray-800"
2931
:key="index"
3032
>
31-
<span>{{ item }}</span>
33+
<span class="text-gray-500 dark:text-gray-400">{{ item }}</span>
3234

3335
<button
3436
@click.stop="deleteItemFromHistory(index)"
@@ -156,12 +158,12 @@ initHistory()
156158
outline: none;
157159
//width: 300px;
158160
height: 30px;
161+
background: transparent;
159162
}
160163
161164
.search-modal__history {
162165
&--label {
163166
display: block;
164-
color: rgba(var(--colors-gray-500));
165167
font-size: 14px;
166168
margin-bottom: 12px;
167169
}
@@ -174,7 +176,6 @@ initHistory()
174176
border-radius: 6px;
175177
176178
& > span {
177-
color: rgba(var(--colors-gray-500));
178179
font-size: 16px;
179180
white-space: nowrap;
180181
overflow: hidden;
@@ -197,8 +198,6 @@ initHistory()
197198
}
198199
199200
&:hover {
200-
background: rgba(var(--colors-gray-200));
201-
202201
& > button {
203202
opacity: 1;
204203
}

resources/js/components/media-browser/MediaBrowserTypeList.vue

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
2-
<div class="browser-list" :class="{'is-extended': extended}">
2+
<div class="browser-list bg-white dark:bg-gray-800 border-r border-gray-100 dark:border-gray-600" :class="{'is-extended': extended}">
33
<div>
44
<div
55
v-if="hasImagePicker"
66
@click="select('image')"
7-
class="browser-list__item"
7+
class="browser-list__item text-gray-500 dark:text-gray-200"
88
:class="{selected: modelValue === 'image'}"
99
:title="__('Images')"
1010
>
@@ -16,7 +16,7 @@
1616
<div
1717
v-if="hasVideoPicker"
1818
@click="select('video')"
19-
class="browser-list__item"
19+
class="browser-list__item text-gray-500 dark:text-gray-200"
2020
:class="{selected: modelValue === 'video'}"
2121
:title="__('Videos')"
2222
>
@@ -28,7 +28,7 @@
2828
<div
2929
v-if="hasAudioPicker"
3030
@click="select('audio')"
31-
class="browser-list__item"
31+
class="browser-list__item text-gray-500 dark:text-gray-200"
3232
:class="{selected: modelValue === 'audio'}"
3333
:title="__('Audios')"
3434
>
@@ -40,7 +40,7 @@
4040
<div
4141
v-if="hasFilePicker"
4242
@click="select('file')"
43-
class="browser-list__item"
43+
class="browser-list__item text-gray-500 dark:text-gray-200"
4444
:class="{selected: modelValue === 'file'}"
4545
:title="__('Files')"
4646
>
@@ -51,7 +51,7 @@
5151
</div>
5252

5353
<div class="browser-list__toggle-sidebar">
54-
<button type="button" @click.stop.prevent="toggle">
54+
<button type="button" class="hover:bg-gray-100 dark:hover:bg-gray-700" @click.stop.prevent="toggle">
5555
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6z"></path><path d="m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6z"></path></svg>
5656
</button>
5757
</div>
@@ -138,8 +138,6 @@ function pick() {
138138
display: flex;
139139
flex-direction: column;
140140
justify-content: space-between;
141-
background: #fff;
142-
border-right: solid 1px rgba(var(--colors-gray-100));
143141
144142
&__item {
145143
display: flex;
@@ -148,7 +146,6 @@ function pick() {
148146
gap: 14px;
149147
height: 48px;
150148
font-size: 14px;
151-
color: rgba(var(--colors-gray-500));
152149
padding: 0 16px;
153150
transition: all 300ms, border-left-width 100ms;
154151
cursor: pointer;
@@ -201,8 +198,6 @@ function pick() {
201198
}
202199
203200
&:hover {
204-
background: rgba(var(--colors-gray-100));
205-
206201
svg {
207202
fill: rgba(var(--colors-gray-800));
208203
}

resources/js/components/modal.vue

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div ref="modal" class="absolute">
2+
<div ref="modal" class="absolute text-gray-500 dark:text-gray-200">
33
<transition name="editorModal" mode="out-in">
44
<div
55
v-if="modelValue"
@@ -9,10 +9,10 @@
99
:class="{
1010
'modal-is-active': modelValue,
1111
'full-screen-modal w-screen h-screen top-0 left-0 w-full': fullscreen,
12-
'centered-modal rounded-lg shadow-lg border': !fullscreen
12+
'centered-modal rounded-lg shadow-lg border border-gray-200 dark:border-gray-600': !fullscreen
1313
}"
1414
>
15-
<div class="modal__header flex-0 flex items-center px-3 py-2 bg-white border-b border-primary-10%">
15+
<div class="modal__header flex-0 flex items-center px-3 py-2 bg-white dark:bg-gray-800 border-b border-primary-10% dark:border-gray-600">
1616
<div v-if="title" class="flex-0 text-gray-400 pl-2">
1717
<h2 class="self-center text-primary-600 text-base font-semibold">{{ title }}</h2>
1818
</div>
@@ -23,8 +23,8 @@
2323

2424
<div class="flex-0 flex items-center" :class="{'pr-2': title}">
2525
<slot name="header-right">
26-
<button @click.prevent="$emit('update:modelValue',false)" class="h-5 w-5 m-0 cursor-pointer text-primary-400">
27-
<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" data-testid="CloseOutlined-icon" class="ckbox-icon ckbox-icon--base ckbox-btn__icon">
26+
<button @click.prevent="$emit('update:modelValue',false)" class="h-5 w-5 m-0 cursor-pointer text-primary-400 text-gray-900 dark:text-gray-400">
27+
<svg focusable="false" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" data-testid="CloseOutlined-icon" class="ckbox-icon ckbox-icon--base ckbox-btn__icon">
2828
<path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path>
2929
</svg>
3030
</button>
@@ -33,13 +33,13 @@
3333
</div>
3434

3535
<div
36-
class="flex-1 w-full bg-grad-sidebar modal-content"
36+
class="flex-1 w-full bg-grad-sidebar dark:bg-gray-700 modal-content"
3737
:style="{'overflow-y': contentNoOverflow ? 'hidden' : 'scroll'}"
3838
>
3939
<slot name="default"/>
4040
</div>
4141

42-
<div class="modal-footer flex-0 w-full bg-logo border-t border-gray-300 p-2" v-if="hasSlot('footer')">
42+
<div class="modal-footer flex-0 w-full bg-logo border-t border-gray-300 dark:border-gray-500 p-2" v-if="hasSlot('footer')">
4343
<slot name="footer"/>
4444
</div>
4545
</div>

resources/js/components/snippet-browser/SnippetBrowserFooter.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="footer px-3">
2+
<div class="footer px-3 bg-white dark:bg-gray-800">
33
<default-button
44
@click.stop="$emit('pick')"
55
type="button"
@@ -34,7 +34,6 @@ const props = defineProps({
3434
display: flex;
3535
align-items: center;
3636
justify-content: flex-end;
37-
background: white;
3837
height: 50px;
3938
box-shadow: 0 0 6px rgba(46, 49, 56, 0.05);
4039
z-index: 100;

0 commit comments

Comments
 (0)