pgo-ui 1.1.12 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +31 -37
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/App.vue +16 -0
- package/src/components/pgo/AppBar.vue +1 -1
- package/src/components/pgo/CopyTextBox.vue +1 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -68,6 +68,13 @@
|
|
|
68
68
|
|
|
69
69
|
<!-- APPEND -->
|
|
70
70
|
<template #append>
|
|
71
|
+
<button
|
|
72
|
+
class="p-2 rounded-md hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer"
|
|
73
|
+
:title="isDark ? 'Switch to light mode' : 'Switch to dark mode'"
|
|
74
|
+
@click="toggleThemeVariant"
|
|
75
|
+
>
|
|
76
|
+
<HeroIcon :name="isDark ? 'sun' : 'moon'" size="22" color="text-current" />
|
|
77
|
+
</button>
|
|
71
78
|
<button class="p-2 rounded-md hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer">
|
|
72
79
|
<HeroIcon name="arrow-right-start-on-rectangle" size="22" color="text-current" />
|
|
73
80
|
</button>
|
|
@@ -187,6 +194,15 @@
|
|
|
187
194
|
// const setRtl = inject('setRtl')
|
|
188
195
|
const drawerOpen = inject('drawerOpen')
|
|
189
196
|
|
|
197
|
+
// Theme variant toggle — reads/writes the global VTS plugin; persistence handled by plugin
|
|
198
|
+
const themePlugin = typeof window !== 'undefined' ? /** @type {any} */ (window).__VTS_PLUGIN__ : null
|
|
199
|
+
const isDark = computed(() => themePlugin?.state?.variant === 'dark')
|
|
200
|
+
function toggleThemeVariant() {
|
|
201
|
+
if (!themePlugin?.setTheme) { return }
|
|
202
|
+
const next = isDark.value ? 'light' : 'dark'
|
|
203
|
+
themePlugin.setTheme(themePlugin.state?.theme ?? 'default', next)
|
|
204
|
+
}
|
|
205
|
+
|
|
190
206
|
// function onClick() {
|
|
191
207
|
// alert('Clicked')
|
|
192
208
|
// }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-tooltip="{en: 'Copy', dv: 'ކޮޕީ'}" :class="['cursor-pointer hover:text-gray-800 font-normal ',
|
|
2
|
+
<div v-tooltip="{en: 'Copy', dv: 'ކޮޕީ'}" :class="['cursor-pointer hover:text-gray-800 font-normal font-en',]" @click="handleChipClick">
|
|
3
3
|
{{ text }}
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|