Skip to content

Commit 4a964e1

Browse files
#210 - Fixed dark styles (#211)
* #210 - small fixes * #210 - Added toggle dark styles * #210 - Started updating tw config to ts * #210 - removed class to easier missing style detection * #210 - Added panel dark styles * #210 - Added page titles * #210 - demo color fixes * #210 - Added textarea dark styles * #210 - Updated to using custom class * #210 - refined Dropdown styles * #210 - input dark styles * #210 - Fixed button style * #210 - Updated snapshots * #210 - Updated version * #210 - Table dark styles * #210 - Select dark styles * #210 - Updated snapshots Co-authored-by: Karl Davies <[email protected]>
1 parent ab00b27 commit 4a964e1

File tree

43 files changed

+309
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+309
-165
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ module.exports = {
198198
"ignore": ["describe"]
199199
}
200200
],
201-
"jest/no-disabled-tests": "warn"
201+
"jest/no-disabled-tests": "off"
202202
}
203203
}
204204
]

src/Demo.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<main class="h-full transition-colors bg-gray-100 dark:bg-gray-700 relative">
33
<div class="flex">
4+
<!-- Menu -->
45
<div class="menu px-12 shadow-xl dark:bg-gray-600 dark:text-gray-300 z-30 bg-white"
56
:class="[ isOpen ? 'open' : 'closed' ]">
67
<div class="sticky top-0">
@@ -9,7 +10,7 @@
910
Vueish UI
1011
</h1>
1112
<UIButton minimal
12-
class="dark:text-gray-200"
13+
class="dark:text-gray-200 dark:hover:text-gray-700"
1314
@click="isOpen = false"
1415
v-html="clearIcon" />
1516
</div>
@@ -30,9 +31,10 @@
3031
</div>
3132
</div>
3233
</div>
34+
3335
<div class="flex-1 min-h-screen h-full w-full p-10">
3436
<UIButton v-if="!isOpen"
35-
class="dark:text-gray-200 mb-4"
37+
class="dark:text-gray-200 dark:hover:text-gray-700 mb-4"
3638
minimal
3739
@click="isOpen = true">
3840
<svg xmlns="http://www.w3.org/2000/svg"
@@ -47,6 +49,9 @@
4749
</svg>
4850
</UIButton>
4951
<div class="mx-auto" style="max-width: 1000px">
52+
<h1 class="text-2xl mb-2 text-center text-color">
53+
{{ $route.meta.label }}
54+
</h1>
5055
<router-view />
5156
</div>
5257
</div>

src/assets/styles/main.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,19 @@
1616
@tailwind base;
1717
@tailwind components;
1818
@tailwind utilities;
19+
20+
.text-color {
21+
@apply text-gray-800;
22+
}
23+
24+
.dark .text-color {
25+
@apply text-gray-200;
26+
}
27+
28+
.text-color-muted {
29+
@apply text-gray-500;
30+
}
31+
32+
.dark .text-color-muted {
33+
@apply text-gray-400;
34+
}

src/components/avatar/Demo.vue

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
<template>
2-
Using the default slot
2+
<p class="text-color">
3+
Using the default slot
4+
</p>
35
<UIAvatar>hi</UIAvatar>
46

5-
No props/slot with squared
7+
<p class="text-color">
8+
No props/slot with squared
9+
</p>
610
<UIAvatar squared />
711

8-
Small sizing with tw classes
12+
<p class="text-color">
13+
Small sizing with tw classes
14+
</p>
915
<UIAvatar alt="Person" class="override" />
10-
Default
16+
17+
<p class="text-color">
18+
Default
19+
</p>
1120
<UIAvatar>OP</UIAvatar>
12-
Large sizing with tw classes
21+
22+
<p class="text-color">
23+
Large sizing with tw classes
24+
</p>
1325
<UIAvatar src="https://picsum.photos/50?random=1" class="!h-12 !w-12" />
1426

15-
<div class="mt-12">
27+
<p class="mt-12 text-color">
1628
Avatar group
17-
</div>
29+
</p>
1830
<UIAvatarGroup class="!h-12 !w-12 bg-green-700">
1931
<UIAvatar alt="smt" />
2032
<UIAvatar src="https://picsum.photos/50?random=3" />
@@ -24,9 +36,9 @@
2436
<UIAvatar alt="smt" />
2537
</UIAvatarGroup>
2638

27-
<div class="mt-12">
39+
<p class="mt-12 text-color">
2840
Avatar group (reverse stacking)
29-
</div>
41+
</p>
3042
<UIAvatarGroup class="!h-12 !w-12" reverse-stacking>
3143
<UIAvatar alt="smt" />
3244
<UIAvatar src="https://picsum.photos/50?random=5" />
@@ -36,9 +48,9 @@
3648
<UIAvatar alt="smt" />
3749
</UIAvatarGroup>
3850

39-
<div class="mt-12">
51+
<p class="mt-12 text-color">
4052
Avatar group (with avatars as prop)
41-
</div>
53+
</p>
4254
<UIAvatarGroup :avatars="avatars" class="!h-10 !w-10" />
4355
</template>
4456

src/components/avatar/UIAvatar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="ui-avatar text-lg overflow-hidden h-8 w-8
3-
text-white bg-brand-300 flex flex-col justify-center items-center"
3+
text-white bg-brand-400 flex flex-col justify-center items-center"
44
:class="[ squared ? 'rounded' : 'rounded-full' ]">
55
<img v-if="src && loaded"
66
:src="src"

src/components/avatar/__snapshots__/UIAvatar.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`UIAvatar should correctly display 1`] = `
44
<div
55
class="ui-avatar text-lg overflow-hidden h-8 w-8
6-
text-white bg-brand-300 flex flex-col justify-center items-center rounded-full"
6+
text-white bg-brand-400 flex flex-col justify-center items-center rounded-full"
77
>
88
99
<span>

src/components/avatar/__snapshots__/UIAvatarGroup.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exports[`UIAvatarGroup should correctly display 1`] = `
1212
1313
<div
1414
class="ui-avatar text-lg overflow-hidden h-8 w-8
15-
text-white bg-brand-300 flex flex-col justify-center items-center rounded-full"
15+
text-white bg-brand-400 flex flex-col justify-center items-center rounded-full"
1616
style="z-index: 50;"
1717
>
1818
@@ -38,7 +38,7 @@ exports[`UIAvatarGroup should correctly display 1`] = `
3838
</div>
3939
<div
4040
class="ui-avatar text-lg overflow-hidden h-8 w-8
41-
text-white bg-brand-300 flex flex-col justify-center items-center rounded-full"
41+
text-white bg-brand-400 flex flex-col justify-center items-center rounded-full"
4242
style="z-index: 40;"
4343
>
4444
@@ -49,7 +49,7 @@ exports[`UIAvatarGroup should correctly display 1`] = `
4949
</div>
5050
<div
5151
class="ui-avatar text-lg overflow-hidden h-8 w-8
52-
text-white bg-brand-300 flex flex-col justify-center items-center rounded-full"
52+
text-white bg-brand-400 flex flex-col justify-center items-center rounded-full"
5353
style="z-index: 30;"
5454
>
5555
@@ -60,7 +60,7 @@ exports[`UIAvatarGroup should correctly display 1`] = `
6060
</div>
6161
<div
6262
class="ui-avatar text-lg overflow-hidden h-8 w-8
63-
text-white bg-brand-300 flex flex-col justify-center items-center rounded-full"
63+
text-white bg-brand-400 flex flex-col justify-center items-center rounded-full"
6464
style="z-index: 20;"
6565
>
6666
<img
@@ -69,7 +69,7 @@ exports[`UIAvatarGroup should correctly display 1`] = `
6969
</div>
7070
<div
7171
class="ui-avatar text-lg overflow-hidden h-8 w-8
72-
text-white bg-brand-300 flex flex-col justify-center items-center rounded"
72+
text-white bg-brand-400 flex flex-col justify-center items-center rounded"
7373
style="z-index: 10;"
7474
>
7575

src/components/button-group/UIButtonGroup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ export default defineComponent({
5151
@apply flex-1 w-full;
5252
}
5353
& > button:last-child {
54-
@apply rounded-b rounded-r-none;
54+
@apply rounded-b rounded-tr-none;
5555
}
5656
& > button:first-child {
57-
@apply rounded-t rounded-l-none;
57+
@apply rounded-t rounded-bl-none;
5858
}
5959
}
6060
.spread {

src/components/button-toggle/Demo.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
name="multi"
1717
class="mb-6" />
1818

19-
<p>Prop options</p>
19+
<p class="text-color">
20+
Prop options
21+
</p>
2022
<UIButtonToggle v-model="selected"
2123
:options="options"
2224
:large="large"
@@ -25,7 +27,7 @@
2527
:clearable="clearable"
2628
:disabled="disabled" />
2729

28-
<p class="mt-4">
30+
<p class="mt-4 text-color">
2931
Slotted option
3032
</p>
3133
<UIButtonToggle v-model="selectedSlotted"

src/components/button-toggle/__snapshots__/UIButtonToggle.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports[`UIButtonToggle should correctly display 1`] = `
99
1010
<button
1111
aria-checked="false"
12-
class="text-gray-600 shadow-sm border-gray-400 disabled:bg-gray-300 disabled:shadow-none ring-gray-600 hover:text-white hover:bg-gray-400 border focus:ring-offset-2 px-3.5 py-2 ui-button rounded relative font-bold text-sm m-0 focus:outline-none ring-0 focus:ring-2 border"
12+
class="text-gray-600 dark:text-gray-400 shadow-sm border-gray-400 disabled:bg-gray-300disabled:shadow-none ring-gray-600 hover:text-white dark:hover:text-white hover:bg-gray-400 border focus:ring-offset-2 px-3.5 py-2 ui-button rounded relative font-bold text-sm m-0 focus:outline-none ring-0 focus:ring-2 border"
1313
role="switch"
1414
type="button"
1515
>
@@ -29,7 +29,7 @@ exports[`UIButtonToggle should correctly display 1`] = `
2929
</button>
3030
<button
3131
aria-checked="false"
32-
class="text-gray-600 shadow-sm border-gray-400 disabled:bg-gray-300 disabled:shadow-none ring-gray-600 hover:text-white hover:bg-gray-400 border focus:ring-offset-2 px-3.5 py-2 ui-button rounded relative font-bold text-sm m-0 focus:outline-none ring-0 focus:ring-2 border border-l-0"
32+
class="text-gray-600 dark:text-gray-400 shadow-sm border-gray-400 disabled:bg-gray-300disabled:shadow-none ring-gray-600 hover:text-white dark:hover:text-white hover:bg-gray-400 border focus:ring-offset-2 px-3.5 py-2 ui-button rounded relative font-bold text-sm m-0 focus:outline-none ring-0 focus:ring-2 border border-l-0"
3333
role="switch"
3434
type="button"
3535
>
@@ -49,7 +49,7 @@ exports[`UIButtonToggle should correctly display 1`] = `
4949
</button>
5050
<button
5151
aria-checked="false"
52-
class="text-gray-600 shadow-sm border-gray-400 disabled:bg-gray-300 disabled:shadow-none ring-gray-600 hover:text-white hover:bg-gray-400 border focus:ring-offset-2 px-3.5 py-2 ui-button rounded relative font-bold text-sm m-0 focus:outline-none ring-0 focus:ring-2 border border-l-0"
52+
class="text-gray-600 dark:text-gray-400 shadow-sm border-gray-400 disabled:bg-gray-300disabled:shadow-none ring-gray-600 hover:text-white dark:hover:text-white hover:bg-gray-400 border focus:ring-offset-2 px-3.5 py-2 ui-button rounded relative font-bold text-sm m-0 focus:outline-none ring-0 focus:ring-2 border border-l-0"
5353
role="switch"
5454
type="button"
5555
>

0 commit comments

Comments
 (0)