Skip to content

Commit 9ba0fc9

Browse files
committed
chore: Update Tailwind CSS configuration and styles
The Tailwind CSS configuration and styles have been updated to include additional plugins and classes. This update improves the styling and layout of the Tools and PreviewsContainer components.
1 parent 206e80e commit 9ba0fc9

24 files changed

+246
-237
lines changed

dist/css/field.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/field.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

postcss.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
module.exports = {};
1+
module.exports = {
2+
tailwindcss: {},
3+
autoprefixer: {},
4+
}

resources/css/field.css

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
@import '../js/lib/PhotoSwipe/photoswipe.css';
2-
3-
/* Nova Field CSS */
4-
5-
.media-active {
6-
@apply hover:border-primary-600 border-primary-500;
7-
}
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
84

9-
.media-passive {
10-
@apply hover:border-gray-400 dark:hover:border-gray-800 border-gray-200 dark:border-gray-700;
11-
}
5+
@import '../js/lib/PhotoSwipe/photoswipe.css';
126

137
.fileList-container {
148
max-height: 40rem;
@@ -21,30 +15,34 @@
2115
.pswp__img-content,
2216
.pswp__video-content,
2317
.pswp__audio-content {
24-
@apply relative max-w-full;
18+
position: relative;
19+
max-width: 100%;
2520
}
2621
.pswp__pdf-content iframe {
2722
height: 100dvh;
28-
@apply container mx-auto;
23+
margin-inline: auto;
24+
@apply ln-container;
2925
}
3026

3127
.pswp__video-content video {
3228
height: 100dvh;
33-
@apply container mx-auto w-auto;
29+
margin-inline: auto;
30+
width: auto;
31+
@apply ln-container;
3432
}
3533

3634
.pswp__img-content img {
3735
max-height: 100dvh;
38-
@apply aspect-square object-contain;
36+
@apply ln-aspect-square ln-object-contain;
3937
}
4038
.pswp__audio-content {
41-
@apply flex items-center justify-center flex-col;
39+
@apply ln-flex ln-items-center ln-justify-center ln-flex-col;
4240
height: 100dvh;
4341
}
4442
.pswp__audio-content audio {
45-
@apply max-w-sm mx-auto w-full;
43+
@apply ln-max-w-sm ln-mx-auto ln-w-full;
4644
}
4745

4846
.text-danger {
49-
@apply text-red-500;
47+
@apply ln-text-red-500;
5048
}

resources/js/components/Buttons/GridButton.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const value = computed({
1515
<template>
1616
<button type="button" @click.prevent.stop="value = 'grid'"
1717
v-tooltip="{ content: __('Grid View'), delay: { show: 1, hide: 0 } }"
18-
class="cursor-pointer rounded text-sm font-bold inline-flex items-center justify-center focus:outline-none focus:ring border-2 w-6 h-6"
19-
:class="value === 'grid' ? 'border-primary-300 dark:border-gray-500 hover:border-primary-500 active:border-primary-400 dark:hover:border-gray-400 dark:active:border-gray-300 ring-primary-200 dark:ring-gray-600' : 'border-transparent'">
18+
class="ln-cursor-pointer ln-rounded ln-text-sm ln-font-bold ln-inline-flex ln-items-center ln-justify-center ln-focus:ln-outline-none ln-focus:ln-ring ln-border-2 ln-w-8 ln-p-1 ln-h-8"
19+
:class="value === 'grid' ? 'ln-border-primary-300 ln-dark:border-gray-500 ln-hover:border-primary-500 ln-active:border-primary-400 ln-dark:hover:border-gray-400 ln-dark:active:border-gray-300 ln-ring-primary-200 ln-dark:ring-gray-600' : 'ln-border-transparent'">
2020
<svg class="w-3.5 h-3.5 fill-current"
21-
:class="value === 'grid' ? 'text-primary-500 dark:text-gray-400' : 'text-gray-400 dark:text-gray-400'"
21+
:class="value === 'grid' ? 'ln-text-primary-500 ln-dark:ln-text-gray-400' : 'ln-text-gray-400 ln-dark:ln-text-gray-400'"
2222
viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg"
2323
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
2424
<g stroke="current" stroke-width="1" fill="current" fill-rule="evenodd" sketch:type="MSPage">

resources/js/components/Buttons/ListButton.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const value = computed({
1515
<template>
1616
<button type="button" @click.prevent.stop="value = 'list'"
1717
v-tooltip="{ content: __('List View'), delay: { show: 1, hide: 0 } }"
18-
class="cursor-pointer rounded text-sm font-bold inline-flex items-center justify-center focus:outline-none focus:ring border-2 w-6 h-6"
19-
:class="value === 'list' ? 'border-primary-300 dark:border-gray-500 hover:border-primary-500 active:border-primary-400 dark:hover:border-gray-400 dark:active:border-gray-300 ring-primary-200 dark:ring-gray-600' : 'border-transparent'">
18+
class="ln-cursor-pointer ln-rounded ln-text-sm ln-font-bold ln-inline-flex ln-items-center ln-justify-center ln-focus:ln-outline-none ln-focus:ln-ring ln-border-2 ln-w-8 ln-p-1 ln-h-8"
19+
:class="value === 'list' ? 'ln-border-primary-300 ln-dark:border-gray-500 ln-hover:border-primary-500 ln-active:border-primary-400 ln-dark:hover:border-gray-400 ln-dark:active:border-gray-300 ln-ring-primary-200 ln-dark:ring-gray-600' : 'ln-border-transparent'">
2020
<svg class="w-3.5 h-3.5 stroke-current"
21-
:class="value === 'list' ? 'text-primary-500 dark:text-gray-400' : 'text-gray-400 dark:text-gray-400'"
21+
:class="value === 'list' ? 'ln-text-primary-500 ln-dark:ln-text-gray-400' : 'ln-text-gray-400 ln-dark:ln-text-gray-400'"
2222
viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2323
<path
2424
d="M3 6.5C3 8.05556 3.5 9.41667 4 9.61111C4.5 9.80556 8 10 12 10C16 10 19.5 9.80555 20 9.61111C20.5 9.41667 21 8.05556 21 6.5C21 4.94444 20.5 3.58333 20 3.38889C19.5 3.19444 16 3 12 3C8 3 4.5 3.19444 4 3.38889C3.5 3.58333 3 4.94444 3 6.5Z"

resources/js/components/Buttons/TwoColumnButton.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const value = computed({
1515
<template>
1616
<button type="button" @click.prevent.stop="value = 'two-column'"
1717
v-tooltip="{ content: __('Two Column View'), delay: { show: 1, hide: 0 } }"
18-
class="cursor-pointer rounded text-sm font-bold inline-flex items-center justify-center focus:outline-none focus:ring border-2 w-6 h-6"
19-
:class="value === 'two-column' ? 'border-primary-300 dark:border-gray-500 hover:border-primary-500 active:border-primary-400 dark:hover:border-gray-400 dark:active:border-gray-300 ring-primary-200 dark:ring-gray-600' : 'border-transparent'">
18+
class="ln-cursor-pointer ln-rounded ln-text-sm ln-font-bold ln-inline-flex ln-items-center ln-justify-center ln-focus:ln-outline-none ln-focus:ln-ring ln-border-2 ln-w-8 ln-p-1 ln-h-8"
19+
:class="value === 'two-column' ? 'ln-border-primary-300 ln-dark:border-gray-500 ln-hover:border-primary-500 ln-active:border-primary-400 ln-dark:hover:border-gray-400 ln-dark:active:border-gray-300 ln-ring-primary-200 ln-dark:ring-gray-600' : 'ln-border-transparent'">
2020
<svg class="w-3.5 h-5 stroke-current"
21-
:class="value === 'two-column' ? 'text-primary-500 dark:text-gray-400' : 'text-gray-400 dark:text-gray-400'"
21+
:class="value === 'two-column' ? 'ln-text-primary-500 ln-dark:ln-text-gray-400' : 'ln-text-gray-400 ln-dark:ln-text-gray-400'"
2222
viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2323
<path
2424
d="M6.5 3C4.94444 3 3.58333 3.5 3.38889 4C3.19444 4.5 3 8 3 12C3 16 3.19444 19.5 3.38889 20C3.58333 20.5 4.94444 21 6.5 21C8.05556 21 9.41667 20.5 9.61111 20C9.80556 19.5 10 16 10 12C10 8 9.80556 4.5 9.61111 4C9.41667 3.5 8.05556 3 6.5 3Z"

resources/js/components/Gallery/Gallery.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,19 @@ export default {
136136
}
137137
</script>
138138
<template>
139-
<div :id="id" class="flex items-center group" @click.prevent.stop="onOpen">
140-
<div class="flex overflow-hidden" :class="{
141-
'-space-x-3': resourceView === 'index',
142-
'-space-x-5': resourceView === 'detail'
139+
<div :id="id" class="ln-flex ln-items-center ln-group" @click.prevent.stop="onOpen">
140+
<div class="ln-flex ln-overflow-hidden" :class="{
141+
'-ln-space-x-3': resourceView === 'index',
142+
'-ln-space-x-5': resourceView === 'detail'
143143
}">
144144
<gallery-item :resourceView="resourceView" v-for="(file, index) in files" :key="index" :index="index"
145145
:file="file" />
146146
</div>
147147
<div @click="onOpen" v-if="files.length > 2"
148-
class="select-none text-xs rounded-full ring-2 ring-white inline-flex items-center justify-center bg-gray-50 text-gray-600 cursor-pointerxw"
148+
class="ln-select-none ln-text-xs ln-rounded-full ln-ring-2 ln-ring-white ln-inline-flex ln-items-center ln-justify-center ln-bg-gray-50 ln-text-gray-600 ln-cursor-pointerxw"
149149
:class="{
150-
'h-6 w-6 -ml-3': resourceView === 'index',
151-
'h-8 w-8 -ml-5': resourceView === 'detail'
150+
'ln-h-6 ln-w-6 -ln-ml-3': resourceView === 'index',
151+
'ln-h-8 ln-w-8 -ln-ml-5': resourceView === 'detail'
152152
}">
153153
+{{ files.length - 2 }}
154154
</div>

resources/js/components/Gallery/GalleryItem.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ const isImage = computed(() => props.file.type.startsWith('image'));
1111
</script>
1212
<template>
1313
<a :href="file.src" :data-pswp-srcset="file.srcset" :data-pswp-width="file.width" :data-pswp-type="file.type"
14-
:data-pswp-height="file.height" target="_blank" rel="noreferrer" class="inline-block rounded-full" :class="{
15-
'h-6 w-6': resourceView === 'index',
16-
'h-8 w-8': resourceView === 'detail'
14+
:data-pswp-height="file.height" target="_blank" rel="noreferrer" class="ln-inline-block ln-rounded-full" :class="{
15+
'ln-h-6 ln-w-6': resourceView === 'index',
16+
'ln-h-8 ln-w-8': resourceView === 'detail'
1717
}" v-show="index <= 2">
1818
<img v-if="isImage" :src="file.src" :srcset="file.srcset" :alt="file.alt" loading="lazy" decoding="async"
19-
class="inline-block rounded-full aspect-auto bg-gray-200 object-scale-down" :class="{
20-
'h-6 w-6': resourceView === 'index',
21-
'h-8 w-8': resourceView === 'detail'
19+
class="ln-inline-block ln-rounded-full ln-aspect-auto ln-bg-gray-200 ln-object-scale-down" :class="{
20+
'ln-h-6 ln-w-6': resourceView === 'index',
21+
'ln-h-8 ln-w-8': resourceView === 'detail'
2222
}" />
23-
<div v-else class="inline-block rounded-md bg-gray-200" :class="{
24-
'h-6 w-6': resourceView === 'index',
25-
'h-8 w-8': resourceView === 'detail'
23+
<div v-else class="ln-inline-block ln-rounded-md ln-bg-gray-200" :class="{
24+
'ln-h-6 ln-w-6': resourceView === 'index',
25+
'ln-h-8 ln-w-8': resourceView === 'detail'
2626
}">
27-
<Icon type="document-text" class="h-4 w-4" />
27+
<Icon type="document-text" class="ln-h-4 ln-w-4" />
2828
</div>
2929
</a>
3030
</template>

resources/js/components/Previews/Block.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup>
22
import { useLocalization } from 'laravel-nova-useLocalization';
3-
import { computed } from 'vue';
43
import { formatBytes } from "../../utils";
54
65
const { __ } = useLocalization()
@@ -21,9 +20,9 @@ export default {
2120
</script>
2221

2322
<template>
24-
<div class="h-full flex items-start justify-center">
25-
<div class="relative w-full">
26-
<RemoveButton v-if="removable" class="absolute z-20 top-[-10px] right-[-9px]"
23+
<div class="ln-h-full ln-flex ln-items-start ln-justify-center">
24+
<div class="ln-relative ln-w-full">
25+
<RemoveButton v-if="removable" class="ln-absolute ln-z-20 ln-top-[-10px] ln-right-[-9px]"
2726
@click.prevent.stop="emit('removed', $event)" v-tooltip="{
2827
content: __('Remove'),
2928
delay: {
@@ -34,11 +33,14 @@ export default {
3433

3534
<preview :file="file" :editable="editable" @onDetail="emit('onDetail', $event)" :iconSize="36" />
3635

37-
<p class="font-semibold text-xs mt-1 break-all">{{ file.name }} {{ file.copy ? 'Copied' : '' }}</p>
38-
<p class="text-xs text-gray-500 mt-1 break-all">{{ formatBytes(file.originalFile?.size) }}</p>
39-
<p class="text-xs text-gray-500 mt-1 break-all">{{ file.type }}</p>
36+
<p class="ln-font-semibold ln-text-xs ln-mt-1 ln-break-all">{{ file.name }} {{ file.copy ? 'Copied' : ''
37+
}}
38+
</p>
39+
<p class="ln-text-xs ln-text-gray-500 ln-mt-1 ln-break-all">{{ formatBytes(file.originalFile?.size) }}
40+
</p>
41+
<p class="ln-text-xs ln-text-gray-500 ln-mt-1 ln-break-all">{{ file.type }}</p>
4042
<a :href="file.previewUrl" :download="file.name" v-if="downloadable && file.previewUrl"
41-
class="text-xs text-gray-500 mt-1 break-all ">Download</a>
43+
class="ln-text-xs ln-text-gray-500 ln-mt-1 ln-break-all ">Download</a>
4244
</div>
4345
</div>
4446
</template>

0 commit comments

Comments
 (0)