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,322 @@
1
+ <template>
2
+ <div class="p-6 max-w-4xl mx-auto space-y-8">
3
+ <h2 class="text-3xl font-bold text-gray-800 mb-6">Search Components</h2>
4
+
5
+ <Card title="Basic Search">
6
+ <div class="space-y-6">
7
+ <!-- Simple Search -->
8
+ <InputSearch
9
+ v-model="basicSearch"
10
+ label="Basic Search"
11
+ placeholder="Search..."
12
+ hint="Type to search"
13
+ />
14
+
15
+ <p class="text-sm text-gray-600">Selected: {{ basicSearch }}</p>
16
+ </div>
17
+ </Card>
18
+
19
+ <Card title="Search with Items">
20
+ <div class="space-y-6">
21
+ <!-- With Array of Strings -->
22
+ <InputSearch
23
+ v-model="selectedFruit"
24
+ label="Search Fruits"
25
+ :items="fruits"
26
+ placeholder="Search fruits..."
27
+ @select="handleFruitSelect"
28
+ />
29
+
30
+ <!-- With Array of Objects -->
31
+ <InputSearch
32
+ v-model="selectedUser"
33
+ label="Search Users"
34
+ :items="users"
35
+ item-text="name"
36
+ item-value="id"
37
+ :filter-keys="['name', 'email']"
38
+ placeholder="Search by name or email..."
39
+ return-object
40
+ @select="handleUserSelect"
41
+ >
42
+ <template #item="{ item }">
43
+ <div class="flex items-center gap-3">
44
+ <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
45
+ {{ item.name.charAt(0) }}
46
+ </div>
47
+ <div>
48
+ <div class="font-medium">{{ item.name }}</div>
49
+ <div class="text-xs text-muted-foreground">{{ item.email }}</div>
50
+ </div>
51
+ </div>
52
+ </template>
53
+ </InputSearch>
54
+
55
+ <div class="p-4 bg-gray-50 rounded">
56
+ <p class="text-sm font-medium">Selected User:</p>
57
+ <pre class="text-xs mt-2">{{ JSON.stringify(selectedUser, null, 2) }}</pre>
58
+ </div>
59
+ </div>
60
+ </Card>
61
+
62
+ <Card title="Search Variants">
63
+ <div class="space-y-6">
64
+ <!-- Default -->
65
+ <InputSearch
66
+ v-model="variantSearch"
67
+ label="Default"
68
+ :items="fruits"
69
+ variant="default"
70
+ />
71
+
72
+ <!-- Outlined -->
73
+ <InputSearch
74
+ v-model="variantSearch"
75
+ label="Outlined"
76
+ :items="fruits"
77
+ variant="outlined"
78
+ />
79
+
80
+ <!-- Filled -->
81
+ <InputSearch
82
+ v-model="variantSearch"
83
+ label="Filled"
84
+ :items="fruits"
85
+ variant="filled"
86
+ />
87
+ </div>
88
+ </Card>
89
+
90
+ <Card title="Sizes & Rounded">
91
+ <div class="space-y-6">
92
+ <!-- Small -->
93
+ <InputSearch
94
+ v-model="sizeSearch"
95
+ label="Small"
96
+ :items="fruits"
97
+ size="sm"
98
+ rounded="sm"
99
+ />
100
+
101
+ <!-- Medium (Default) -->
102
+ <InputSearch
103
+ v-model="sizeSearch"
104
+ label="Medium"
105
+ :items="fruits"
106
+ size="md"
107
+ rounded="md"
108
+ />
109
+
110
+ <!-- Large -->
111
+ <InputSearch
112
+ v-model="sizeSearch"
113
+ label="Large"
114
+ :items="fruits"
115
+ size="lg"
116
+ rounded="lg"
117
+ />
118
+
119
+ <!-- Full Rounded -->
120
+ <InputSearch
121
+ v-model="sizeSearch"
122
+ label="Full Rounded"
123
+ :items="fruits"
124
+ rounded="full"
125
+ />
126
+ </div>
127
+ </Card>
128
+
129
+ <Card title="Search Features">
130
+ <div class="space-y-6">
131
+ <!-- Loading State -->
132
+ <InputSearch
133
+ v-model="loadingSearch"
134
+ label="Loading State"
135
+ :items="fruits"
136
+ loading
137
+ />
138
+
139
+ <!-- Not Clearable -->
140
+ <InputSearch
141
+ v-model="noClearSearch"
142
+ label="Not Clearable"
143
+ :items="fruits"
144
+ :clearable="false"
145
+ />
146
+
147
+ <!-- Min Search Length -->
148
+ <InputSearch
149
+ v-model="minLengthSearch"
150
+ label="Min Search Length (3 characters)"
151
+ :items="fruits"
152
+ :min-search-length="3"
153
+ hint="Type at least 3 characters to search"
154
+ />
155
+
156
+ <!-- Custom Debounce -->
157
+ <InputSearch
158
+ v-model="debounceSearch"
159
+ label="Custom Debounce (1000ms)"
160
+ :items="fruits"
161
+ :debounce="1000"
162
+ hint="Results appear 1 second after typing"
163
+ />
164
+
165
+ <!-- Hide Prepend Icon -->
166
+ <InputSearch
167
+ v-model="noPrependSearch"
168
+ label="No Prepend Icon"
169
+ :items="fruits"
170
+ hide-prepend-icon
171
+ />
172
+ </div>
173
+ </Card>
174
+
175
+ <Card title="Custom Filter & Slots">
176
+ <div class="space-y-6">
177
+ <!-- Custom Filter -->
178
+ <InputSearch
179
+ v-model="customFilterSearch"
180
+ label="Custom Filter (Starts With)"
181
+ :items="countries"
182
+ :custom-filter="customFilter"
183
+ item-text="name"
184
+ item-value="code"
185
+ >
186
+ <template #item="{ item }">
187
+ <div class="flex items-center gap-2">
188
+ <span class="text-lg">{{ item.flag }}</span>
189
+ <span>{{ item.name }}</span>
190
+ <span class="text-xs text-muted-foreground">({{ item.code }})</span>
191
+ </div>
192
+ </template>
193
+ </InputSearch>
194
+
195
+ <!-- Custom No Data -->
196
+ <InputSearch
197
+ v-model="noDataSearch"
198
+ label="Custom No Data Message"
199
+ :items="[]"
200
+ placeholder="Search..."
201
+ >
202
+ <template #noData>
203
+ <div class="text-center py-4">
204
+ <div class="text-4xl mb-2">🔍</div>
205
+ <p class="text-sm text-muted-foreground">No results found</p>
206
+ </div>
207
+ </template>
208
+ </InputSearch>
209
+
210
+ <!-- Custom Loading -->
211
+ <InputSearch
212
+ v-model="customLoadingSearch"
213
+ label="Custom Loading Message"
214
+ :items="fruits"
215
+ loading
216
+ >
217
+ <template #loading>
218
+ <div class="flex items-center gap-2 justify-center py-2">
219
+ <svg class="animate-spin h-4 w-4" fill="none" viewBox="0 0 24 24">
220
+ <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
221
+ <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
222
+ </svg>
223
+ <span>Searching our database...</span>
224
+ </div>
225
+ </template>
226
+ </InputSearch>
227
+ </div>
228
+ </Card>
229
+
230
+ <Card title="States">
231
+ <div class="space-y-6">
232
+ <!-- Disabled -->
233
+ <InputSearch
234
+ v-model="stateSearch"
235
+ label="Disabled"
236
+ :items="fruits"
237
+ disabled
238
+ />
239
+
240
+ <!-- Readonly -->
241
+ <InputSearch
242
+ v-model="stateSearch"
243
+ label="Readonly"
244
+ :items="fruits"
245
+ readonly
246
+ />
247
+
248
+ <!-- Error -->
249
+ <InputSearch
250
+ v-model="errorSearch"
251
+ label="With Error"
252
+ :items="fruits"
253
+ error="This field is required"
254
+ />
255
+ </div>
256
+ </Card>
257
+ </div>
258
+ </template>
259
+
260
+ <script setup>
261
+ import { ref } from 'vue'
262
+ import Card from '../pgo/Card.vue'
263
+ import Search from '../pgo/Search.vue'
264
+ import InputSearch from '../pgo/InputSearch.vue'
265
+
266
+ // Data
267
+ const basicSearch = ref('')
268
+ const selectedFruit = ref('')
269
+ const selectedUser = ref(null)
270
+ const variantSearch = ref('')
271
+ const sizeSearch = ref('')
272
+ const loadingSearch = ref('')
273
+ const noClearSearch = ref('')
274
+ const minLengthSearch = ref('')
275
+ const debounceSearch = ref('')
276
+ const noPrependSearch = ref('')
277
+ const customFilterSearch = ref('')
278
+ const noDataSearch = ref('')
279
+ const customLoadingSearch = ref('')
280
+ const stateSearch = ref('Apple')
281
+ const errorSearch = ref('')
282
+
283
+ const fruits = [
284
+ 'Apple', 'Banana', 'Orange', 'Mango', 'Grapes',
285
+ 'Strawberry', 'Pineapple', 'Watermelon', 'Kiwi', 'Peach'
286
+ ]
287
+
288
+ const users = [
289
+ { id: 1, name: 'John Doe', email: 'john@example.com' },
290
+ { id: 2, name: 'Jane Smith', email: 'jane@example.com' },
291
+ { id: 3, name: 'Bob Johnson', email: 'bob@example.com' },
292
+ { id: 4, name: 'Alice Williams', email: 'alice@example.com' },
293
+ { id: 5, name: 'Charlie Brown', email: 'charlie@example.com' },
294
+ ]
295
+
296
+ const countries = [
297
+ { code: 'US', name: 'United States', flag: '🇺🇸' },
298
+ { code: 'UK', name: 'United Kingdom', flag: '🇬🇧' },
299
+ { code: 'CA', name: 'Canada', flag: '🇨🇦' },
300
+ { code: 'AU', name: 'Australia', flag: '🇦🇺' },
301
+ { code: 'DE', name: 'Germany', flag: '🇩🇪' },
302
+ { code: 'FR', name: 'France', flag: '🇫🇷' },
303
+ { code: 'JP', name: 'Japan', flag: '🇯🇵' },
304
+ { code: 'MV', name: 'Maldives', flag: '🇲🇻' },
305
+ ]
306
+
307
+ // Custom filter function (starts with)
308
+ const customFilter = (items, search) => {
309
+ return items.filter(item =>
310
+ item.name.toLowerCase().startsWith(search.toLowerCase())
311
+ )
312
+ }
313
+
314
+ // Event handlers
315
+ const handleFruitSelect = (fruit) => {
316
+ console.log('Fruit selected:', fruit)
317
+ }
318
+
319
+ const handleUserSelect = (user) => {
320
+ console.log('User selected:', user)
321
+ }
322
+ </script>
@@ -0,0 +1,121 @@
1
+ <template>
2
+ <div class="p-6 max-w-4xl mx-auto space-y-8">
3
+ <h2 class="text-3xl font-bold text-gray-800 mb-6">Select Components</h2>
4
+ <Card
5
+ title="Card title "
6
+ cardClass=" border-dashed"
7
+ rounded="xl"
8
+ >
9
+
10
+ <Select
11
+ v-model="selectedCountry"
12
+ :items="countries"
13
+ label="Select Country"
14
+ placeholder="Choose a country"
15
+ :multiple="true"
16
+
17
+ />
18
+ <Select
19
+ v-model="selectedCountry"
20
+ :items="countries"
21
+ label="Select Country"
22
+ placeholder="Choose a country"
23
+ labelTextSize="text-xl"
24
+ labelTextColor="text-secondary"
25
+ itemText="text"
26
+ itemValue="value"
27
+ padding="px-6 py-2"
28
+ rounded=""
29
+ header-bg="bg-primary-100"
30
+ header-bd="border-primary-200"
31
+
32
+ />
33
+ <template #footer>
34
+ <div class="flex justify-end gap-2 ">
35
+ <Button variant="cancel" label="Cancel"></Button>
36
+ <Button label="Save"></Button>
37
+ </div>
38
+ </template>
39
+ </Card>
40
+
41
+ <Card
42
+ title="Card Title 3"
43
+ margin="mx-8 my-4"
44
+ padding="px-4 py-2"
45
+ bg="bg-primary-50"
46
+ color="primary"
47
+ bd="border border-primary-200"
48
+ rounded="lg"
49
+ shadow="shadow-md"
50
+ header-bg="bg-primary-200"
51
+ header-bd="border-b border-primary-200"
52
+ header-text="text-primary"
53
+ footer-bg="bg-primary-100"
54
+ cardClass=""
55
+ >
56
+ <!-- <template #header>
57
+ <div class="flex justify-between items-center">
58
+ <h3 class="text-lg font-thin">Card Title 2</h3>
59
+ <button class="text-gray-500 hover:text-gray-700">×</button>
60
+ </div>
61
+ </template> -->
62
+
63
+ <Select
64
+ v-model="selectedCountry"
65
+ :items="countries"
66
+ label="Select Country"
67
+ placeholder="Choose a country"
68
+ labelTextSize="text-xl"
69
+ labelTextColor="text-secondary"
70
+ itemText="text"
71
+ itemValue="value"
72
+ padding="px-4 py-2"
73
+ rounded="lg"
74
+ header-bg="bg-primary-100"
75
+ header-bd="border-primary-200"
76
+
77
+ />
78
+ <Select
79
+ v-model="selectedCountries"
80
+ :items="countries"
81
+ label="Select Multiple Countries"
82
+ placeholder="Choose a country"
83
+ labelTextSize="text-xl"
84
+ labelTextColor="text-secondary"
85
+ itemText="text"
86
+ itemValue="value"
87
+ padding="px-4 py-2"
88
+ margin="mx-4 my-4"
89
+ rounded="xl"
90
+ header-bg="bg-primary-100"
91
+ header-bd="border-primary-200"
92
+ :multiple="true"
93
+ :searchable="true"
94
+ :dir="'rtl'"
95
+ />
96
+
97
+ <template #footer>
98
+ <div class="flex justify-end gap-2 ">
99
+ <Button variant="cancel" label="Cancel"></Button>
100
+ <Button label="Save"></Button>
101
+ </div>
102
+ </template>
103
+ </Card>
104
+ </div>
105
+ </template>
106
+ <script setup>
107
+ import { ref } from 'vue'
108
+ import Select from '../pgo/inputs/Select.vue'
109
+ import Card from '../pgo/Card.vue'
110
+ import Button from '../pgo/Button.vue'
111
+
112
+ const selectedCountry = ref(null)
113
+ const selectedCountries = ref([])
114
+
115
+ const countries = [
116
+ { value: 1, text: 'sdgsd' },
117
+ { value: 2, text: 'sdgdsg' },
118
+ { value: 3, text: 'sdgdsgds' }
119
+ ]
120
+
121
+ </script>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div class="p-6">
3
+ <StackedTableView
4
+ :data="items"
5
+ :columns="columns"
6
+ :filters="filters"
7
+ @view="onView"
8
+ />
9
+ </div>
10
+ </template>
11
+
12
+ <script setup>
13
+ import StackedTableView from '../pgo/StackedTableView.vue'
14
+ import { ref } from 'vue'
15
+
16
+ const items = ref([
17
+ { id: 1, name: 'Alice', role: 'Admin', status: 'Active' },
18
+ { id: 2, name: 'Bob', role: 'User', status: 'Inactive' },
19
+ { id: 3, name: 'Charlie', role: 'User', status: 'Active' },
20
+ { id: 4, name: 'Dana', role: 'Manager', status: 'Active' },
21
+ { id: 5, name: 'Eva', role: 'Admin', status: 'Inactive' },
22
+ ])
23
+
24
+ const columns = [
25
+ { key: 'name', label: 'Name' },
26
+ { key: 'role', label: 'Role' },
27
+ { key: 'status', label: 'Status' },
28
+ ]
29
+
30
+ const filters = [
31
+ {
32
+ key: 'role',
33
+ label: 'Role',
34
+ options: [
35
+ { label: 'Admin', value: 'Admin' },
36
+ { label: 'Manager', value: 'Manager' },
37
+ { label: 'User', value: 'User' },
38
+ ],
39
+ },
40
+ {
41
+ key: 'status',
42
+ label: 'Status',
43
+ options: [
44
+ { label: 'Active', value: 'Active' },
45
+ { label: 'Inactive', value: 'Inactive' },
46
+ ],
47
+ },
48
+ ]
49
+
50
+ function onView(item) {
51
+ alert('Viewing ' + item.name)
52
+ }
53
+ </script>