pgo-ui 1.1.11 → 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 +1979 -1984
- package/dist/index.umd.js +51 -51
- package/dist/pgo-ui.css +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/src/components/pgo/DataTable.vue +2 -2
- package/src/components/pgo/DocumentViewer.vue +2 -2
- package/src/pgo-components/pages/ListView.vue +1 -0
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>
|
|
@@ -450,13 +450,13 @@
|
|
|
450
450
|
<div v-if="header.displayType == 'html'" :class="['text-base', cellText]" v-html="getNestedValue(item, header.value)" />
|
|
451
451
|
<div v-else-if="header.displayType == 'custom'" :class="['text-base', cellText]">
|
|
452
452
|
<template v-if="getCustomColumnData(header, item)?.type === 'CopyTextBox'">
|
|
453
|
-
<div class="flex flex-wrap items-center gap-1 justify-end">
|
|
453
|
+
<div class="flex flex-wrap items-center gap-1 justify-end font-en">
|
|
454
454
|
<CopyTextBox v-for="(chip, idx) in getCustomColumnData(header, item).CopyTextBox" :key="idx" v-bind="chip" />
|
|
455
455
|
</div>
|
|
456
456
|
</template>
|
|
457
457
|
<div v-else v-html="getCustomColumnData(header, item)" />
|
|
458
458
|
</div>
|
|
459
|
-
<div v-else-if="header.displayType == 'copyButton'" :class="['align-middle',
|
|
459
|
+
<div v-else-if="header.displayType == 'copyButton'" :class="['align-middle font-en',]">
|
|
460
460
|
<CopyTextBox :text="getNestedValue(item, header.value)" />
|
|
461
461
|
</div>
|
|
462
462
|
<div v-else-if="header.displayType == 'chip'" :class="['align-middle', getColumnFont(lang)]">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
v-model="open"
|
|
4
4
|
:persistent="true"
|
|
5
5
|
padding="p-0"
|
|
6
|
-
:width="
|
|
6
|
+
:width="width"
|
|
7
7
|
:fullscreen="fullscreen"
|
|
8
8
|
rounded="sm"
|
|
9
9
|
overflow="overflow-hidden"
|
|
@@ -76,7 +76,7 @@ const props = defineProps({
|
|
|
76
76
|
modelValue: { type: Boolean, default: false },
|
|
77
77
|
src: { type: String, default: '' },
|
|
78
78
|
title: { type: [String, Object], default: 'Document Viewer' },
|
|
79
|
-
|
|
79
|
+
width: { type: String, default: 'w-full sm:w-[900px]' },
|
|
80
80
|
modalHeight: { type: String, default: 'h-[75vh]' },
|
|
81
81
|
fullscreen: { type: Boolean, default: false },
|
|
82
82
|
initialPage: { type: Number, default: 1 },
|