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.
Files changed (180) hide show
  1. package/.env +1 -0
  2. package/.env.production +1 -0
  3. package/.prettierrc +13 -0
  4. package/.vscode/extensions.json +3 -0
  5. package/BUTTON_GUIDE.md +257 -0
  6. package/README.md +49 -0
  7. package/THEME_REFERENCE.md +310 -0
  8. package/eslint.config.ts +27 -0
  9. package/index.html +13 -0
  10. package/package.json +85 -0
  11. package/public/favicon.ico +0 -0
  12. package/src/App.vue +368 -0
  13. package/src/assets/fonts/Faruma.ttf +0 -0
  14. package/src/components/examples/AppBarExample.vue +101 -0
  15. package/src/components/examples/AvatarExample.vue +47 -0
  16. package/src/components/examples/BannerExample.vue +287 -0
  17. package/src/components/examples/BaseInputExample.vue +25 -0
  18. package/src/components/examples/BreadcrumbExample.vue +53 -0
  19. package/src/components/examples/CardExample.vue +77 -0
  20. package/src/components/examples/ChipExample.vue +225 -0
  21. package/src/components/examples/DatePickerExample.vue +31 -0
  22. package/src/components/examples/DropdownExample.vue +84 -0
  23. package/src/components/examples/EditorExample.vue +200 -0
  24. package/src/components/examples/ExpansionPanelExample.vue +42 -0
  25. package/src/components/examples/FileUploadExample.vue +40 -0
  26. package/src/components/examples/FormExample.vue +121 -0
  27. package/src/components/examples/HugeTest.vue +8 -0
  28. package/src/components/examples/LayoutContainerExample.vue +80 -0
  29. package/src/components/examples/ModalExample.vue +82 -0
  30. package/src/components/examples/NavDrawerExample.vue +170 -0
  31. package/src/components/examples/NumberFieldExample.vue +145 -0
  32. package/src/components/examples/RadioButtonExample.vue +161 -0
  33. package/src/components/examples/SearchExample.vue +322 -0
  34. package/src/components/examples/SelectExample.vue +121 -0
  35. package/src/components/examples/StackedTableViewExample.vue +53 -0
  36. package/src/components/examples/TabExample.vue +336 -0
  37. package/src/components/examples/TableExample.vue +228 -0
  38. package/src/components/examples/TextFieldExample.vue +181 -0
  39. package/src/components/examples/TextareaExample.vue +173 -0
  40. package/src/components/examples/ThemeToggle.vue +50 -0
  41. package/src/components/examples/TimelineExample.vue +66 -0
  42. package/src/components/examples/TipTapEditorExample.vue +20 -0
  43. package/src/components/examples/TooltipExample.vue +53 -0
  44. package/src/components/examples/VueDatePickerShowcase.vue +214 -0
  45. package/src/components/examples/_DatePickerExample.vue +33 -0
  46. package/src/components/examples/__FormExample.vue +77 -0
  47. package/src/components/index.ts +25 -0
  48. package/src/components/pgo/AppBar.vue +347 -0
  49. package/src/components/pgo/Avatar.vue +139 -0
  50. package/src/components/pgo/Banner.vue +300 -0
  51. package/src/components/pgo/Breadcrumb.vue +101 -0
  52. package/src/components/pgo/Button.vue +171 -0
  53. package/src/components/pgo/Card.vue +178 -0
  54. package/src/components/pgo/ConfirmationModel.vue +32 -0
  55. package/src/components/pgo/DataTable.vue +845 -0
  56. package/src/components/pgo/DatePicker/CalendarPanel.vue +43 -0
  57. package/src/components/pgo/DatePicker/__DatePicker.vue +122 -0
  58. package/src/components/pgo/DatePicker/types.ts +11 -0
  59. package/src/components/pgo/DatePicker/useCalendar.ts +39 -0
  60. package/src/components/pgo/DatePicker/useDatePicker.ts +31 -0
  61. package/src/components/pgo/Deprecated/ToastContainer.vue +51 -0
  62. package/src/components/pgo/Deprecated/ToastItem.vue +55 -0
  63. package/src/components/pgo/Dropdown.vue +296 -0
  64. package/src/components/pgo/DropdownItem.vue +40 -0
  65. package/src/components/pgo/Editor.vue +511 -0
  66. package/src/components/pgo/ExpansionPanel.vue +185 -0
  67. package/src/components/pgo/Footer.vue +39 -0
  68. package/src/components/pgo/HeroIcon.vue +124 -0
  69. package/src/components/pgo/InputSearch.vue +194 -0
  70. package/src/components/pgo/LayoutContainer.vue +104 -0
  71. package/src/components/pgo/Main.vue +37 -0
  72. package/src/components/pgo/Modal.vue +273 -0
  73. package/src/components/pgo/NavDrawer.vue +127 -0
  74. package/src/components/pgo/NavDrawerItem.vue +161 -0
  75. package/src/components/pgo/NavigationDrawer.vue +849 -0
  76. package/src/components/pgo/OLDNavDrawer.vue +661 -0
  77. package/src/components/pgo/OldAppBar.vue +223 -0
  78. package/src/components/pgo/PApp.vue +102 -0
  79. package/src/components/pgo/Pagination.vue +242 -0
  80. package/src/components/pgo/Search copy.vue +310 -0
  81. package/src/components/pgo/Search.vue +411 -0
  82. package/src/components/pgo/StackedTableView.vue +167 -0
  83. package/src/components/pgo/Tab.vue +617 -0
  84. package/src/components/pgo/TestInput.vue +395 -0
  85. package/src/components/pgo/Timeline.vue +367 -0
  86. package/src/components/pgo/TimelineItem.vue +80 -0
  87. package/src/components/pgo/TipTapEditor.vue +315 -0
  88. package/src/components/pgo/Tooltip.NOTES.md +12 -0
  89. package/src/components/pgo/Tooltip.PROPS.md +21 -0
  90. package/src/components/pgo/Tooltip.vue +281 -0
  91. package/src/components/pgo/base/Base.vue +444 -0
  92. package/src/components/pgo/buttons/Chip.vue +324 -0
  93. package/src/components/pgo/buttons/ChipGroup.vue +224 -0
  94. package/src/components/pgo/buttons/Radio.vue +424 -0
  95. package/src/components/pgo/filters/FilterSection.vue +188 -0
  96. package/src/components/pgo/filters/Searchbar.vue +216 -0
  97. package/src/components/pgo/forms/DynamicForm.vue +45 -0
  98. package/src/components/pgo/forms/Form.vue +132 -0
  99. package/src/components/pgo/index.ts +15 -0
  100. package/src/components/pgo/inputs/Checkbox.vue +320 -0
  101. package/src/components/pgo/inputs/DatePicker.vue +395 -0
  102. package/src/components/pgo/inputs/FileUpload.vue +326 -0
  103. package/src/components/pgo/inputs/NumberField.vue +243 -0
  104. package/src/components/pgo/inputs/Radio.vue +162 -0
  105. package/src/components/pgo/inputs/RadioGroup.vue +188 -0
  106. package/src/components/pgo/inputs/Select.vue +535 -0
  107. package/src/components/pgo/inputs/TextField.vue +194 -0
  108. package/src/components/pgo/inputs/Textarea.vue +181 -0
  109. package/src/main.js +12 -0
  110. package/src/pgo-components/_index.js +31 -0
  111. package/src/pgo-components/assets/fonts/Faruma.ttf +0 -0
  112. package/src/pgo-components/assets/fonts/logo.png +0 -0
  113. package/src/pgo-components/composables/useTheme.js +10 -0
  114. package/src/pgo-components/directives/tooltip-directive.ts +393 -0
  115. package/src/pgo-components/index.js +96 -0
  116. package/src/pgo-components/lib/componentConfig.js +147 -0
  117. package/src/pgo-components/lib/core/composables/_useCalendar.ts +127 -0
  118. package/src/pgo-components/lib/core/composables/useDefaults.ts +15 -0
  119. package/src/pgo-components/lib/core/composables/useLanguageSelect.js +0 -0
  120. package/src/pgo-components/lib/core/composables/useRtl.ts +12 -0
  121. package/src/pgo-components/lib/core/defaults/createDefaults.ts +5 -0
  122. package/src/pgo-components/lib/core/defaults/defaults.ts +7 -0
  123. package/src/pgo-components/lib/core/rtl/rtl.ts +3 -0
  124. package/src/pgo-components/lib/core/rtl/setRtl.ts +19 -0
  125. package/src/pgo-components/lib/drawerState.ts +3 -0
  126. package/src/pgo-components/lib/i18n/defaultLables.js +71 -0
  127. package/src/pgo-components/lib/i18n/i18nPlugin.js +52 -0
  128. package/src/pgo-components/lib/i18n/useI18n.js +35 -0
  129. package/src/pgo-components/lib/index.ts +38 -0
  130. package/src/pgo-components/pages/Component.vue +7 -0
  131. package/src/pgo-components/pages/ComponentRenderer.vue +85 -0
  132. package/src/pgo-components/pages/Home.vue +130 -0
  133. package/src/pgo-components/pages/ListView.vue +370 -0
  134. package/src/pgo-components/pages/Page1.vue +296 -0
  135. package/src/pgo-components/pages/_Page1.vue +180 -0
  136. package/src/pgo-components/plugins/SnackBar.vue +251 -0
  137. package/src/pgo-components/plugins/SnackBarContainer.vue +53 -0
  138. package/src/pgo-components/plugins/SnackBarPlugin.ts +136 -0
  139. package/src/pgo-components/plugins/theme-plugin.js +114 -0
  140. package/src/pgo-components/plugins/types.ts +46 -0
  141. package/src/pgo-components/plugins/useSnackBar.js +11 -0
  142. package/src/pgo-components/plugins/useSnackBar.ts +21 -0
  143. package/src/pgo-components/plugins/validation-plugin.js +11 -0
  144. package/src/pgo-components/services/Entry.json +813 -0
  145. package/src/pgo-components/services/axios.js +54 -0
  146. package/src/pgo-components/services/data.json +90 -0
  147. package/src/pgo-components/services/person.json +260 -0
  148. package/src/pgo-components/services/toast.ts +44 -0
  149. package/src/pgo-components/styles/global.css +234 -0
  150. package/src/pgo-components/styles/reset.css +96 -0
  151. package/src/pgo-components/styles/tokens.css +18 -0
  152. package/src/pgo-components/styles/utilities/border-radius.css +57 -0
  153. package/src/pgo-components/styles/utilities/borders.css +85 -0
  154. package/src/pgo-components/styles/utilities/colors.css +38 -0
  155. package/src/pgo-components/styles/utilities/cursor.css +19 -0
  156. package/src/pgo-components/styles/utilities/display.css +78 -0
  157. package/src/pgo-components/styles/utilities/elevation.css +33 -0
  158. package/src/pgo-components/styles/utilities/flex.css +403 -0
  159. package/src/pgo-components/styles/utilities/float.css +41 -0
  160. package/src/pgo-components/styles/utilities/hover.css +9 -0
  161. package/src/pgo-components/styles/utilities/index.css +18 -0
  162. package/src/pgo-components/styles/utilities/opacity.css +27 -0
  163. package/src/pgo-components/styles/utilities/overflow.css +26 -0
  164. package/src/pgo-components/styles/utilities/palette.css +515 -0
  165. package/src/pgo-components/styles/utilities/position.css +14 -0
  166. package/src/pgo-components/styles/utilities/sizing.css +70 -0
  167. package/src/pgo-components/styles/utilities/spacing.css +578 -0
  168. package/src/pgo-components/styles/utilities/transitions.css +58 -0
  169. package/src/pgo-components/styles/utilities/typography.css +91 -0
  170. package/src/pgo-components/styles/utilities/z-index.css +11 -0
  171. package/src/pgo-components/tokens/index.js +337 -0
  172. package/src/router/index.js +88 -0
  173. package/src/shims-vue.d.ts +14 -0
  174. package/src/validations/validationRules.js +50 -0
  175. package/tailwind.config.js +73 -0
  176. package/test.php +5 -0
  177. package/tsconfig.json +25 -0
  178. package/ui +31 -0
  179. package/ui.pgo.mv.conf +18 -0
  180. 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>