Skip to content

Commit 809d6cf

Browse files
committed
feat(components): initial darkmode
1 parent 9d07ea9 commit 809d6cf

File tree

18 files changed

+154
-56
lines changed

18 files changed

+154
-56
lines changed

docs/app/components/AllComponents.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
<template>
22
<div class="flex gap-4 flex-wrap mx-4">
3+
<PUCompare>
4+
<template #left>
5+
<img src="/bg.svg" class="w-full h-full object-cover" />
6+
</template>
7+
<template #right>
8+
<img src="/bg.svg" class="w-full h-full object-cover" />
9+
</template>
10+
</PUCompare>
11+
12+
313
<ShowComponent is-new>
414
<template #component>
515
<div class="flex w-48 relative">

docs/app/components/AsideMenu.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ const items: Items[] = [
2727
links: [
2828
{ name: 'PUAccordion', link: '/docs/components/pu-accordion' },
2929
{ name: 'PUAvatar', link: '/docs/components/pu-avatar', new: true },
30+
{ name: 'PUAudio', link: '/docs/components/pu-audio', new: true },
31+
// { name: 'PUChip', link: '/docs/components/pu-chip' },
32+
// { name: 'PUCollapsible', link: '/docs/components/pu-collapsible' },
33+
// { name: 'PUDataTable', link: '/docs/components/pu-data-table', new: true },
34+
// { name: 'PUDropdown', link: '/docs/components/pu-dropdown' },
35+
// { name: 'PUInputNumber', link: '/docs/components/pu-input-number' },
36+
// { name: 'PUList', link: '/docs/components/pu-list' },
37+
// { name: 'PUMenu', link: '/docs/components/pu-menu' },
38+
// { name: 'PUPagination', link: '/docs/components/pu-pagination' },
39+
// { name: 'PURating', link: '/docs/components/pu-rating' },
40+
// { name: 'PUSearch', link: '/docs/components/pu-search' },
41+
// { name: 'PUSelectGroup', link: '/docs/components/pu-select-group' },
42+
3043
{ name: 'PUBadge', link: '/docs/components/pu-badge' },
3144
{ name: 'PUButtonIcon', link: '/docs/components/pu-button-icon' },
3245
{ name: 'PUButton', link: '/docs/components/pu-button' },

docs/app/components/CodeBlock.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<div class="p-6 bg-gradient-to-b from-white to-gray-50 rounded-xl shadow-lg h-auto">
1919
<div
2020
v-if="activeTab === 'Preview'"
21-
class="w-full h-full flex justify-center items-center gap-2"
21+
class="w-full h-full flex justify-center items-center gap-2 p-4 bg-primary-light-500 dark"
2222
>
2323
<slot name="preview" />
2424
</div>

docs/app/components/HeaderUi.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
id="nav-mobile"
1919
class="right hide-on-med-and-down flex gap-4 mt-4"
2020
>
21-
<li><a href="/docs"><PUButton flavor="outlined">Docs</PUButton></a></li>
22-
<li><a href="https://github.com/paper-kit/nuxt"><PUButton flavor="outlined">Github</PUButton></a></li>
21+
<li><a href="/docs"><PUButton flavor="outlined" icon-right="file-alt">docs</PUButton></a></li>
22+
<li><a href="https://github.com/paper-kit/nuxt"><PUButton flavor="outlined" icon-right="github-alt">github</PUButton></a></li>
2323
</ul>
2424
</div>
2525
</div>

docs/app/components/paper/ShowAccordion.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<div class="w-72">
2121
<PUAccordion :items="demoItems">
2222
<template #content>
23-
<div class="p-4 bg-gray-50 rounded">
23+
<div class="p-4 bg-gray-50 rounded dark:text-primary-light-500">
2424
Custom content area with additional styling
2525
</div>
2626
</template>
@@ -39,7 +39,7 @@
3939
class="w-full"
4040
>
4141
<template #header="{ item, isOpen }">
42-
<h3 :class="{ 'text-[#E12B56]': isOpen, 'text-gray-800': !isOpen }">
42+
<h3 :class="{ 'text-[#E12B56]': isOpen, 'text-gray-800 dark:text-white': !isOpen }">
4343
{{ item.title }}
4444
</h3>
4545
</template>

docs/app/components/paper/ShowInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<PUInput
1818
v-model="searchValue"
1919
icon-left="search"
20-
icon-right="cancel"
20+
icon-right="close-x-exit"
2121
placeholder="Search..."
2222
/>
2323
</template>

docs/content/docs/components/pu-accordion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Basic Usage
5858
<template>
5959
<PUAccordion :items="items">
6060
<template #content="{ item }">
61-
<div class="custom-content">
61+
<div class="p-4 bg-gray-50 rounded dark:text-primary-light-500">
6262
<PUIcon name="info" />
6363
{{ item.content }}
6464
</div>

src/runtime/components/PUAccordion.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ const toggle = (index: number) => {
6565

6666
<style scoped>
6767
.accordion {
68-
@apply p-1 bg-white shadow-sm;
69-
@apply border-2 border-primary-light-500 rounded-lg;
68+
@apply p-1 bg-white dark:bg-primary-light-500 shadow-sm;
69+
@apply border-2 border-primary-light-500 dark:border-white rounded-lg;
7070
@apply text-base;
7171
}
7272
@@ -79,19 +79,19 @@ const toggle = (index: number) => {
7979
}
8080
8181
.default-header {
82-
@apply text-gray-800 text-lg;
82+
@apply text-gray-800 dark:text-white text-lg;
8383
}
8484
8585
.icon {
86-
@apply transform transition-transform duration-200;
86+
@apply transform transition-transform duration-200 dark:text-white;;
8787
}
8888
8989
.accordion-content {
90-
@apply p-2 text-gray-700 text-base;
90+
@apply p-2 text-gray-700 dark:text-gray-50 text-base;
9191
}
9292
9393
.divider {
94-
@apply border-t border-primary-light-500/10 my-2;
94+
@apply border-t border-primary-light-500/10 dark:border-white/50 my-2;
9595
}
9696
9797
/* Transitions */

src/runtime/components/PUAudio.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ watch(isMuted, (newVal) => {
6666
</script>
6767

6868
<template>
69-
<div class="relative w-full max-w-lg border-2 border-primary-light-500 rounded-lg shadow-lg p-4 flex items-center gap-3 bg-white">
69+
<div class="relative w-full max-w-lg border-2 border-primary-light-500 dark:border-white rounded-lg shadow-lg p-4 flex items-center gap-3 bg-white dark:bg-primary-light-500">
7070
<audio
7171
ref="audioRef"
7272
:src="src"
@@ -76,32 +76,32 @@ watch(isMuted, (newVal) => {
7676
<button @click="togglePlay">
7777
<PUIcon
7878
:name="isPlaying ? 'pause' : 'play'"
79-
class="w-8 h-8 text-primary-light-500"
79+
class="w-8 h-8 text-primary-light-500 dark:text-white"
8080
/>
8181
</button>
8282

8383
<input
8484
type="range"
85-
class="flex-1 accent-primary-light-500"
85+
class="flex-1 accent-primary-light-500 dark:accent-white"
8686
min="0"
8787
:max="duration"
8888
:value="currentTime"
8989
@input="seek"
9090
>
9191

92-
<span class="text-md font-bold text-primary-light-600 font-patrick">
92+
<span class="text-md font-bold text-primary-light-600 dark:text-gray-50 font-patrick">
9393
{{ formatTime(currentTime) }} / {{ formatTime(duration) }}
9494
</span>
9595

9696
<button @click="toggleMute">
9797
<PUIcon
9898
:name="isMuted ? 'volume-mute' : 'volume'"
99-
class="w-6 h-6 text-primary-light-500"
99+
class="w-6 h-6 text-primary-light-500 dark:text-white"
100100
/>
101101
</button>
102102
<input
103103
type="range"
104-
class="w-16 accent-primary-light-500"
104+
class="w-16 accent-primary-light-500 dark:accent-white"
105105
min="0"
106106
max="1"
107107
step="0.1"

src/runtime/components/PUAvatar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ const shapeClass = computed(() => {
6767

6868
<style scoped>
6969
div {
70-
border: 2px solid black;
70+
@apply border-2 border-primary-light-500 dark:border-primary-dark-500
7171
}
7272
</style>

0 commit comments

Comments
 (0)