pgo-uiux2 1.0.0
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/.env +1 -0
- package/.env.production +1 -0
- package/.prettierrc +13 -0
- package/.vscode/extensions.json +3 -0
- package/BUTTON_GUIDE.md +257 -0
- package/README.md +49 -0
- package/THEME_REFERENCE.md +310 -0
- package/eslint.config.ts +27 -0
- package/index.html +13 -0
- package/package.json +85 -0
- package/public/favicon.ico +0 -0
- package/src/App.vue +368 -0
- package/src/assets/fonts/Faruma.ttf +0 -0
- package/src/components/examples/AppBarExample.vue +101 -0
- package/src/components/examples/AvatarExample.vue +47 -0
- package/src/components/examples/BannerExample.vue +287 -0
- package/src/components/examples/BaseInputExample.vue +25 -0
- package/src/components/examples/BreadcrumbExample.vue +53 -0
- package/src/components/examples/CardExample.vue +77 -0
- package/src/components/examples/ChipExample.vue +225 -0
- package/src/components/examples/DatePickerExample.vue +31 -0
- package/src/components/examples/DropdownExample.vue +84 -0
- package/src/components/examples/EditorExample.vue +200 -0
- package/src/components/examples/ExpansionPanelExample.vue +42 -0
- package/src/components/examples/FileUploadExample.vue +40 -0
- package/src/components/examples/FormExample.vue +121 -0
- package/src/components/examples/HugeTest.vue +8 -0
- package/src/components/examples/LayoutContainerExample.vue +80 -0
- package/src/components/examples/ModalExample.vue +82 -0
- package/src/components/examples/NavDrawerExample.vue +170 -0
- package/src/components/examples/NumberFieldExample.vue +145 -0
- package/src/components/examples/RadioButtonExample.vue +161 -0
- package/src/components/examples/SearchExample.vue +322 -0
- package/src/components/examples/SelectExample.vue +121 -0
- package/src/components/examples/StackedTableViewExample.vue +53 -0
- package/src/components/examples/TabExample.vue +336 -0
- package/src/components/examples/TableExample.vue +228 -0
- package/src/components/examples/TextFieldExample.vue +181 -0
- package/src/components/examples/TextareaExample.vue +173 -0
- package/src/components/examples/ThemeToggle.vue +50 -0
- package/src/components/examples/TimelineExample.vue +66 -0
- package/src/components/examples/TipTapEditorExample.vue +20 -0
- package/src/components/examples/TooltipExample.vue +53 -0
- package/src/components/examples/VueDatePickerShowcase.vue +214 -0
- package/src/components/examples/_DatePickerExample.vue +33 -0
- package/src/components/examples/__FormExample.vue +77 -0
- package/src/components/index.ts +25 -0
- package/src/components/pgo/AppBar.vue +347 -0
- package/src/components/pgo/Avatar.vue +139 -0
- package/src/components/pgo/Banner.vue +300 -0
- package/src/components/pgo/Breadcrumb.vue +101 -0
- package/src/components/pgo/Button.vue +171 -0
- package/src/components/pgo/Card.vue +178 -0
- package/src/components/pgo/ConfirmationModel.vue +32 -0
- package/src/components/pgo/DataTable.vue +845 -0
- package/src/components/pgo/DatePicker/CalendarPanel.vue +43 -0
- package/src/components/pgo/DatePicker/__DatePicker.vue +122 -0
- package/src/components/pgo/DatePicker/types.ts +11 -0
- package/src/components/pgo/DatePicker/useCalendar.ts +39 -0
- package/src/components/pgo/DatePicker/useDatePicker.ts +31 -0
- package/src/components/pgo/Deprecated/ToastContainer.vue +51 -0
- package/src/components/pgo/Deprecated/ToastItem.vue +55 -0
- package/src/components/pgo/Dropdown.vue +296 -0
- package/src/components/pgo/DropdownItem.vue +40 -0
- package/src/components/pgo/Editor.vue +511 -0
- package/src/components/pgo/ExpansionPanel.vue +185 -0
- package/src/components/pgo/Footer.vue +39 -0
- package/src/components/pgo/HeroIcon.vue +124 -0
- package/src/components/pgo/InputSearch.vue +194 -0
- package/src/components/pgo/LayoutContainer.vue +104 -0
- package/src/components/pgo/Main.vue +37 -0
- package/src/components/pgo/Modal.vue +273 -0
- package/src/components/pgo/NavDrawer.vue +127 -0
- package/src/components/pgo/NavDrawerItem.vue +161 -0
- package/src/components/pgo/NavigationDrawer.vue +849 -0
- package/src/components/pgo/OLDNavDrawer.vue +661 -0
- package/src/components/pgo/OldAppBar.vue +223 -0
- package/src/components/pgo/PApp.vue +102 -0
- package/src/components/pgo/Pagination.vue +242 -0
- package/src/components/pgo/Search copy.vue +310 -0
- package/src/components/pgo/Search.vue +411 -0
- package/src/components/pgo/StackedTableView.vue +167 -0
- package/src/components/pgo/Tab.vue +617 -0
- package/src/components/pgo/TestInput.vue +395 -0
- package/src/components/pgo/Timeline.vue +367 -0
- package/src/components/pgo/TimelineItem.vue +80 -0
- package/src/components/pgo/TipTapEditor.vue +315 -0
- package/src/components/pgo/Tooltip.NOTES.md +12 -0
- package/src/components/pgo/Tooltip.PROPS.md +21 -0
- package/src/components/pgo/Tooltip.vue +281 -0
- package/src/components/pgo/base/Base.vue +444 -0
- package/src/components/pgo/buttons/Chip.vue +324 -0
- package/src/components/pgo/buttons/ChipGroup.vue +224 -0
- package/src/components/pgo/buttons/Radio.vue +424 -0
- package/src/components/pgo/filters/FilterSection.vue +188 -0
- package/src/components/pgo/filters/Searchbar.vue +216 -0
- package/src/components/pgo/forms/DynamicForm.vue +45 -0
- package/src/components/pgo/forms/Form.vue +132 -0
- package/src/components/pgo/index.ts +15 -0
- package/src/components/pgo/inputs/Checkbox.vue +320 -0
- package/src/components/pgo/inputs/DatePicker.vue +395 -0
- package/src/components/pgo/inputs/FileUpload.vue +326 -0
- package/src/components/pgo/inputs/NumberField.vue +243 -0
- package/src/components/pgo/inputs/Radio.vue +162 -0
- package/src/components/pgo/inputs/RadioGroup.vue +188 -0
- package/src/components/pgo/inputs/Select.vue +535 -0
- package/src/components/pgo/inputs/TextField.vue +194 -0
- package/src/components/pgo/inputs/Textarea.vue +181 -0
- package/src/main.js +12 -0
- package/src/pgo-components/_index.js +31 -0
- package/src/pgo-components/assets/fonts/Faruma.ttf +0 -0
- package/src/pgo-components/assets/fonts/logo.png +0 -0
- package/src/pgo-components/composables/useTheme.js +10 -0
- package/src/pgo-components/directives/tooltip-directive.ts +393 -0
- package/src/pgo-components/index.js +96 -0
- package/src/pgo-components/lib/componentConfig.js +147 -0
- package/src/pgo-components/lib/core/composables/_useCalendar.ts +127 -0
- package/src/pgo-components/lib/core/composables/useDefaults.ts +15 -0
- package/src/pgo-components/lib/core/composables/useLanguageSelect.js +0 -0
- package/src/pgo-components/lib/core/composables/useRtl.ts +12 -0
- package/src/pgo-components/lib/core/defaults/createDefaults.ts +5 -0
- package/src/pgo-components/lib/core/defaults/defaults.ts +7 -0
- package/src/pgo-components/lib/core/rtl/rtl.ts +3 -0
- package/src/pgo-components/lib/core/rtl/setRtl.ts +19 -0
- package/src/pgo-components/lib/drawerState.ts +3 -0
- package/src/pgo-components/lib/i18n/defaultLables.js +71 -0
- package/src/pgo-components/lib/i18n/i18nPlugin.js +52 -0
- package/src/pgo-components/lib/i18n/useI18n.js +35 -0
- package/src/pgo-components/lib/index.ts +38 -0
- package/src/pgo-components/pages/Component.vue +7 -0
- package/src/pgo-components/pages/ComponentRenderer.vue +85 -0
- package/src/pgo-components/pages/Home.vue +130 -0
- package/src/pgo-components/pages/ListView.vue +370 -0
- package/src/pgo-components/pages/Page1.vue +296 -0
- package/src/pgo-components/pages/_Page1.vue +180 -0
- package/src/pgo-components/plugins/SnackBar.vue +251 -0
- package/src/pgo-components/plugins/SnackBarContainer.vue +53 -0
- package/src/pgo-components/plugins/SnackBarPlugin.ts +136 -0
- package/src/pgo-components/plugins/theme-plugin.js +114 -0
- package/src/pgo-components/plugins/types.ts +46 -0
- package/src/pgo-components/plugins/useSnackBar.js +11 -0
- package/src/pgo-components/plugins/useSnackBar.ts +21 -0
- package/src/pgo-components/plugins/validation-plugin.js +11 -0
- package/src/pgo-components/services/Entry.json +813 -0
- package/src/pgo-components/services/axios.js +54 -0
- package/src/pgo-components/services/data.json +90 -0
- package/src/pgo-components/services/person.json +260 -0
- package/src/pgo-components/services/toast.ts +44 -0
- package/src/pgo-components/styles/global.css +234 -0
- package/src/pgo-components/styles/reset.css +96 -0
- package/src/pgo-components/styles/tokens.css +18 -0
- package/src/pgo-components/styles/utilities/border-radius.css +57 -0
- package/src/pgo-components/styles/utilities/borders.css +85 -0
- package/src/pgo-components/styles/utilities/colors.css +38 -0
- package/src/pgo-components/styles/utilities/cursor.css +19 -0
- package/src/pgo-components/styles/utilities/display.css +78 -0
- package/src/pgo-components/styles/utilities/elevation.css +33 -0
- package/src/pgo-components/styles/utilities/flex.css +403 -0
- package/src/pgo-components/styles/utilities/float.css +41 -0
- package/src/pgo-components/styles/utilities/hover.css +9 -0
- package/src/pgo-components/styles/utilities/index.css +18 -0
- package/src/pgo-components/styles/utilities/opacity.css +27 -0
- package/src/pgo-components/styles/utilities/overflow.css +26 -0
- package/src/pgo-components/styles/utilities/palette.css +515 -0
- package/src/pgo-components/styles/utilities/position.css +14 -0
- package/src/pgo-components/styles/utilities/sizing.css +70 -0
- package/src/pgo-components/styles/utilities/spacing.css +578 -0
- package/src/pgo-components/styles/utilities/transitions.css +58 -0
- package/src/pgo-components/styles/utilities/typography.css +91 -0
- package/src/pgo-components/styles/utilities/z-index.css +11 -0
- package/src/pgo-components/tokens/index.js +337 -0
- package/src/router/index.js +88 -0
- package/src/shims-vue.d.ts +14 -0
- package/src/validations/validationRules.js +50 -0
- package/tailwind.config.js +73 -0
- package/test.php +5 -0
- package/tsconfig.json +25 -0
- package/ui +31 -0
- package/ui.pgo.mv.conf +18 -0
- package/vite.config.js +42 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="w-full space-y-4">
|
|
3
|
+
<!-- Search + Filters Bar -->
|
|
4
|
+
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-3">
|
|
5
|
+
<input
|
|
6
|
+
v-model="searchQuery"
|
|
7
|
+
type="text"
|
|
8
|
+
placeholder="Search..."
|
|
9
|
+
class="border border-gray-200 px-4 py-2 w-full md:w-64"
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<div class="flex flex-wrap gap-2 items-center">
|
|
13
|
+
<div v-for="f in filters" :key="f.key" class="flex items-center gap-2">
|
|
14
|
+
<label class="text-sm font-medium">{{ f.label }}</label>
|
|
15
|
+
<select v-model="activeFilters[f.key]" class="border border-gray-200 px-3 py-2">
|
|
16
|
+
<option value="">All</option>
|
|
17
|
+
<option v-for="o in f.options" :key="o.value" :value="o.value">{{ o.label }}</option>
|
|
18
|
+
</select>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<!-- Table (Desktop) -->
|
|
24
|
+
<div class="hidden md:block border border-gray-200 overflow-hidden">
|
|
25
|
+
<table class="w-full text-left">
|
|
26
|
+
<thead class="bg-gray-100">
|
|
27
|
+
<tr>
|
|
28
|
+
<th
|
|
29
|
+
v-for="col in columns"
|
|
30
|
+
:key="col.key"
|
|
31
|
+
class="px-4 py-3 cursor-pointer select-none"
|
|
32
|
+
@click="toggleSort(col.key)"
|
|
33
|
+
>
|
|
34
|
+
<div class="flex items-center gap-1">
|
|
35
|
+
<span>{{ col.label }}</span>
|
|
36
|
+
<span v-if="sortKey === col.key">{{ sortDirection === 'asc' ? '▲' : '▼' }}</span>
|
|
37
|
+
</div>
|
|
38
|
+
</th>
|
|
39
|
+
<th class="px-4 py-3">Actions</th>
|
|
40
|
+
</tr>
|
|
41
|
+
</thead>
|
|
42
|
+
<tbody>
|
|
43
|
+
<tr v-for="item in paginatedData" :key="item.id" class="border-t border-gray-200">
|
|
44
|
+
<td v-for="col in columns" :key="col.key" class="px-4 py-3">{{ item[col.key] }}</td>
|
|
45
|
+
<td class="px-4 py-3">
|
|
46
|
+
<button class="text-blue-600 hover:underline" @click="emit('view', item)">View</button>
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
</tbody>
|
|
50
|
+
</table>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<!-- Stacked Cards (Mobile) -->
|
|
54
|
+
<div class="md:hidden space-y-4">
|
|
55
|
+
<div
|
|
56
|
+
v-for="item in paginatedData"
|
|
57
|
+
:key="item.id"
|
|
58
|
+
class="border border-gray-200 p-4 shadow-sm space-y-2"
|
|
59
|
+
>
|
|
60
|
+
<div v-for="col in columns" :key="col.key" class="flex justify-between">
|
|
61
|
+
<span class="text-sm font-medium">{{ col.label }}</span>
|
|
62
|
+
<span class="text-sm">{{ item[col.key] }}</span>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="pt-2 border-t mt-2">
|
|
66
|
+
<button class="text-blue-600 hover:underline" @click="emit('view', item)">View</button>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<!-- Pagination -->
|
|
72
|
+
<div class="flex items-center justify-between pt-4">
|
|
73
|
+
<button
|
|
74
|
+
class="px-3 py-2 border border-gray-200"
|
|
75
|
+
:disabled="page === 1"
|
|
76
|
+
@click="page--"
|
|
77
|
+
>Prev</button>
|
|
78
|
+
|
|
79
|
+
<span>Page {{ page }} / {{ totalPages }}</span>
|
|
80
|
+
|
|
81
|
+
<button
|
|
82
|
+
class="px-3 py-2 border border-gray-200"
|
|
83
|
+
:disabled="page === totalPages"
|
|
84
|
+
@click="page++"
|
|
85
|
+
>Next</button>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<script setup>
|
|
91
|
+
import { ref, computed, watch } from 'vue'
|
|
92
|
+
|
|
93
|
+
const props = defineProps({
|
|
94
|
+
data: { type: Array, required: true },
|
|
95
|
+
columns: { type: Array, required: true },
|
|
96
|
+
filters: { type: Array, default: () => [] },
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
const emit = defineEmits(['view'])
|
|
100
|
+
|
|
101
|
+
// Search
|
|
102
|
+
const searchQuery = ref('')
|
|
103
|
+
|
|
104
|
+
// Filters
|
|
105
|
+
const activeFilters = ref({})
|
|
106
|
+
props.filters.forEach(f => (activeFilters.value[f.key] = ''))
|
|
107
|
+
|
|
108
|
+
// Sorting
|
|
109
|
+
const sortKey = ref(null)
|
|
110
|
+
const sortDirection = ref('asc')
|
|
111
|
+
|
|
112
|
+
function toggleSort(key) {
|
|
113
|
+
if (sortKey.value === key) {
|
|
114
|
+
sortDirection.value = sortDirection.value === 'asc' ? 'desc' : 'asc'
|
|
115
|
+
} else {
|
|
116
|
+
sortKey.value = key
|
|
117
|
+
sortDirection.value = 'asc'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Pagination
|
|
122
|
+
const page = ref(1)
|
|
123
|
+
const pageSize = 10
|
|
124
|
+
|
|
125
|
+
const filteredData = computed(() => {
|
|
126
|
+
let result = [...props.data]
|
|
127
|
+
|
|
128
|
+
// Search
|
|
129
|
+
if (searchQuery.value) {
|
|
130
|
+
const q = searchQuery.value.toLowerCase()
|
|
131
|
+
result = result.filter(item =>
|
|
132
|
+
Object.values(item).some(v => String(v).toLowerCase().includes(q))
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Filters
|
|
137
|
+
props.filters.forEach(f => {
|
|
138
|
+
const active = activeFilters.value[f.key]
|
|
139
|
+
if (active) {
|
|
140
|
+
result = result.filter(item => item[f.key] === active)
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
// Sorting
|
|
145
|
+
if (sortKey.value) {
|
|
146
|
+
result.sort((a, b) => {
|
|
147
|
+
const v1 = a[sortKey.value]
|
|
148
|
+
const v2 = b[sortKey.value]
|
|
149
|
+
if (v1 === v2) return 0
|
|
150
|
+
return sortDirection.value === 'asc' ? (v1 > v2 ? 1 : -1) : (v1 < v2 ? 1 : -1)
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return result
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
const totalPages = computed(() => Math.ceil(filteredData.value.length / pageSize))
|
|
158
|
+
|
|
159
|
+
const paginatedData = computed(() => {
|
|
160
|
+
const start = (page.value - 1) * pageSize
|
|
161
|
+
return filteredData.value.slice(start, start + pageSize)
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
watch([searchQuery, activeFilters, sortKey, sortDirection], () => {
|
|
165
|
+
page.value = 1
|
|
166
|
+
})
|
|
167
|
+
</script>
|