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,287 @@
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">Banner Components</h2>
4
+
5
+ <!-- Controls -->
6
+ <Card title="Banner Controls">
7
+ <div class="space-y-4">
8
+ <div class="flex gap-2 flex-wrap">
9
+ <Button @click="showDefault = true" color="gray" size="sm">Show Default</Button>
10
+ <Button @click="showInfo = true" color="info" size="sm">Show Info</Button>
11
+ <Button @click="showSuccess = true" color="success" size="sm">Show Success</Button>
12
+ <Button @click="showWarning = true" color="warning" size="sm">Show Warning</Button>
13
+ <Button @click="showError = true" color="danger" size="sm">Show Error</Button>
14
+ </div>
15
+ </div>
16
+ </Card>
17
+
18
+ <!-- Banner Examples -->
19
+ <div class="space-y-4">
20
+ <!-- Default Banner -->
21
+ <Banner
22
+ v-model="showDefault"
23
+ title="Default Banner"
24
+ message="This is a default banner message."
25
+ sticky
26
+ />
27
+
28
+ <!-- Info Banner -->
29
+ <Banner
30
+ v-model="showInfo"
31
+ variant="info"
32
+ icon="info"
33
+ title="Information"
34
+ message="This is an informational banner with an icon."
35
+ sticky
36
+ />
37
+
38
+ <!-- Success Banner -->
39
+ <Banner
40
+ v-model="showSuccess"
41
+ variant="success"
42
+ icon="success"
43
+ title="Success!"
44
+ message="Your action was completed successfully."
45
+ :timeout="5000"
46
+ show-progress
47
+ sticky
48
+ />
49
+
50
+ <!-- Warning Banner -->
51
+ <Banner
52
+ v-model="showWarning"
53
+ variant="warning"
54
+ icon="warning"
55
+ title="Warning"
56
+ message="Please review the following information carefully."
57
+ outlined
58
+ sticky
59
+ />
60
+
61
+ <!-- Error Banner -->
62
+ <Banner
63
+ v-model="showError"
64
+ variant="error"
65
+ icon="error"
66
+ title="Error"
67
+ message="An error occurred. Please try again."
68
+ sticky
69
+ />
70
+ </div>
71
+
72
+ <!-- More Examples -->
73
+ <Card title="Banner Variants">
74
+ <div class="space-y-6">
75
+ <!-- With Actions -->
76
+ <Banner
77
+ v-model="bannerWithActions"
78
+ variant="info"
79
+ icon="info"
80
+ title="Update Available"
81
+ message="A new version is available. Update now to get the latest features."
82
+ >
83
+ <template #actions>
84
+ <Button size="sm" variant="text" color="info" @click="bannerWithActions = false">
85
+ Dismiss
86
+ </Button>
87
+ <Button size="sm" color="info" @click="handleUpdate">
88
+ Update Now
89
+ </Button>
90
+ </template>
91
+ </Banner>
92
+
93
+ <!-- Dense Banner -->
94
+ <Banner
95
+ v-model="denseBanner"
96
+ variant="success"
97
+ icon="success"
98
+ message="Dense banner with compact spacing"
99
+ dense
100
+ />
101
+
102
+ <!-- With Custom Content -->
103
+ <Banner
104
+ v-model="customBanner"
105
+ variant="warning"
106
+ >
107
+ <template #title>
108
+ <div class="flex items-center gap-2">
109
+ <span class="text-2xl">⚠️</span>
110
+ <span>Custom Banner Content</span>
111
+ </div>
112
+ </template>
113
+ <template #default>
114
+ <p>You can use slots to fully customize the banner content.</p>
115
+ <ul class="list-disc list-inside mt-2 text-sm">
116
+ <li>Custom icons</li>
117
+ <li>Rich content</li>
118
+ <li>Any HTML structure</li>
119
+ </ul>
120
+ </template>
121
+ </Banner>
122
+
123
+ <!-- Auto-dismiss with Progress -->
124
+ <Banner
125
+ v-model="autoDismiss"
126
+ variant="success"
127
+ icon="success"
128
+ title="Auto Dismiss"
129
+ message="This banner will automatically dismiss in 10 seconds."
130
+ :timeout="10000"
131
+ show-progress
132
+ />
133
+
134
+ <!-- Bottom Position -->
135
+ <Banner
136
+ v-model="bottomBanner"
137
+ variant="info"
138
+ icon="info"
139
+ title="Bottom Banner"
140
+ message="This banner is positioned at the bottom."
141
+ position="bottom"
142
+ sticky
143
+ />
144
+
145
+ <!-- Rounded -->
146
+ <Banner
147
+ v-model="roundedBanner"
148
+ variant="error"
149
+ icon="error"
150
+ title="Rounded Banner"
151
+ message="This banner has rounded corners."
152
+ rounded="lg"
153
+ />
154
+
155
+ <!-- Not Closeable -->
156
+ <Banner
157
+ v-model="notCloseable"
158
+ variant="warning"
159
+ icon="warning"
160
+ title="Important Notice"
161
+ message="This banner cannot be closed by the user."
162
+ :closeable="false"
163
+ />
164
+ </div>
165
+
166
+ <div class="mt-6 flex gap-2 flex-wrap">
167
+ <Button @click="showAllBanners" size="sm">Show All Banners</Button>
168
+ <Button @click="hideAllBanners" variant="outlined" size="sm">Hide All Banners</Button>
169
+ </div>
170
+ </Card>
171
+
172
+ <!-- API Reference -->
173
+ <Card title="API Reference">
174
+ <div class="overflow-x-auto">
175
+ <table class="min-w-full text-sm">
176
+ <thead class="border-b">
177
+ <tr>
178
+ <th class="text-left p-2">Prop</th>
179
+ <th class="text-left p-2">Type</th>
180
+ <th class="text-left p-2">Default</th>
181
+ <th class="text-left p-2">Description</th>
182
+ </tr>
183
+ </thead>
184
+ <tbody class="divide-y">
185
+ <tr>
186
+ <td class="p-2 font-mono">v-model</td>
187
+ <td class="p-2">Boolean</td>
188
+ <td class="p-2">true</td>
189
+ <td class="p-2">Controls banner visibility</td>
190
+ </tr>
191
+ <tr>
192
+ <td class="p-2 font-mono">variant</td>
193
+ <td class="p-2">String</td>
194
+ <td class="p-2">'default'</td>
195
+ <td class="p-2">default | info | success | warning | error</td>
196
+ </tr>
197
+ <tr>
198
+ <td class="p-2 font-mono">icon</td>
199
+ <td class="p-2">String</td>
200
+ <td class="p-2">''</td>
201
+ <td class="p-2">Icon to display (info, success, warning, error)</td>
202
+ </tr>
203
+ <tr>
204
+ <td class="p-2 font-mono">timeout</td>
205
+ <td class="p-2">Number</td>
206
+ <td class="p-2">0</td>
207
+ <td class="p-2">Auto-dismiss after X ms (0 = disabled)</td>
208
+ </tr>
209
+ <tr>
210
+ <td class="p-2 font-mono">sticky</td>
211
+ <td class="p-2">Boolean</td>
212
+ <td class="p-2">false</td>
213
+ <td class="p-2">Stick to top/bottom of viewport</td>
214
+ </tr>
215
+ <tr>
216
+ <td class="p-2 font-mono">position</td>
217
+ <td class="p-2">String</td>
218
+ <td class="p-2">'top'</td>
219
+ <td class="p-2">Position when sticky (top | bottom)</td>
220
+ </tr>
221
+ <tr>
222
+ <td class="p-2 font-mono">showProgress</td>
223
+ <td class="p-2">Boolean</td>
224
+ <td class="p-2">false</td>
225
+ <td class="p-2">Show progress bar for auto-dismiss</td>
226
+ </tr>
227
+ </tbody>
228
+ </table>
229
+ </div>
230
+ </Card>
231
+ </div>
232
+ </template>
233
+
234
+ <script setup>
235
+ import { ref } from 'vue'
236
+ import Card from '../pgo/Card.vue'
237
+ import Banner from '../pgo/Banner.vue'
238
+ import Button from '../pgo/Button.vue'
239
+
240
+ const showDefault = ref(true)
241
+ const showInfo = ref(true)
242
+ const showSuccess = ref(true)
243
+ const showWarning = ref(true)
244
+ const showError = ref(true)
245
+ const bannerWithActions = ref(true)
246
+ const denseBanner = ref(true)
247
+ const customBanner = ref(true)
248
+ const autoDismiss = ref(true)
249
+ const bottomBanner = ref(false)
250
+ const roundedBanner = ref(true)
251
+ const notCloseable = ref(true)
252
+
253
+ const handleUpdate = () => {
254
+ alert('Update initiated!')
255
+ bannerWithActions.value = false
256
+ }
257
+
258
+ const showAllBanners = () => {
259
+ showDefault.value = true
260
+ showInfo.value = true
261
+ showSuccess.value = true
262
+ showWarning.value = true
263
+ showError.value = true
264
+ bannerWithActions.value = true
265
+ denseBanner.value = true
266
+ customBanner.value = true
267
+ autoDismiss.value = true
268
+ bottomBanner.value = true
269
+ roundedBanner.value = true
270
+ notCloseable.value = true
271
+ }
272
+
273
+ const hideAllBanners = () => {
274
+ showDefault.value = false
275
+ showInfo.value = false
276
+ showSuccess.value = false
277
+ showWarning.value = false
278
+ showError.value = false
279
+ bannerWithActions.value = false
280
+ denseBanner.value = false
281
+ customBanner.value = false
282
+ autoDismiss.value = false
283
+ bottomBanner.value = false
284
+ roundedBanner.value = false
285
+ notCloseable.value = false
286
+ }
287
+ </script>
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <BaseInput
3
+ v-bind="$props"
4
+ v-on="$attrs"
5
+ >
6
+ <template #control="{ attrs, events }">
7
+ <input
8
+ class="w-full bg-transparent outline-none"
9
+ v-bind="attrs"
10
+ v-on="events"
11
+ type="text"
12
+ />
13
+ </template>
14
+ </BaseInput>
15
+ </template>
16
+
17
+ <script setup>
18
+ import BaseInput from '@components/pgo/BaseInput.vue';
19
+
20
+ defineProps({
21
+ modelValue: String,
22
+ label: String,
23
+ ... // you can re-expose base props here or use inheritAttrs
24
+ })
25
+ </script>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div class="p-6 space-y-6">
3
+ <!-- Auto from router -->
4
+ <section>
5
+ <h3 class="mb-2 font-medium">
6
+ From Router
7
+ </h3>
8
+ <Breadcrumb />
9
+ </section>
10
+
11
+ <!-- Basic usage -->
12
+ <Breadcrumb :items="items" />
13
+
14
+ <!-- With prepend + custom divider -->
15
+ <Breadcrumb
16
+ :items="items"
17
+ container-class="text-[var(--vts-color-primary)]"
18
+ item-class="hover:underline"
19
+ active-class="text-[var(--vts-color-text)]"
20
+ >
21
+ <template #prepend>
22
+ <span class="text-[var(--vts-color-primary)]">📁&nbsp;</span>
23
+ </template>
24
+
25
+ <template #divider>
26
+ <span class="text-[var(--vts-color-textSecondary)]">/</span>
27
+ </template>
28
+ </Breadcrumb>
29
+
30
+ <!-- Minimal + RTL friendly -->
31
+ <div>
32
+ <Breadcrumb
33
+ :items="itemsEng"
34
+ container-class="text-[var(--vts-color-text)]"
35
+ />
36
+ </div>
37
+ </div>
38
+ </template>
39
+
40
+ <script setup lang="ts">
41
+ import Breadcrumb from '../pgo/Breadcrumb.vue'
42
+
43
+ const items = [
44
+ { label: 'އުޅޭތަން', href: '/' },
45
+ { label: 'ޕްރޮޖެކްޓްސް', href: '/projects' },
46
+ { label: 'ކުދި ޕްރޮޖެކްޓްސް', disabled: true }
47
+ ]
48
+ const itemsEng = [
49
+ { label: 'Home', href: '/' },
50
+ { label: 'Projects', href: '/projects' },
51
+ { label: 'Smaller projects', disabled: true }
52
+ ]
53
+ </script>
@@ -0,0 +1,77 @@
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">Card Components</h2>
4
+ <div class="flex gap-2">
5
+ <Card
6
+ lang="en"
7
+ :title="title"
8
+ :labels="labels"
9
+ :item="item"
10
+ cardClass="w-92 "
11
+ >
12
+
13
+ <!-- <p v-if="language == 'en'" class="">
14
+ This is a simple card component. You can use it to display content in a structured way.
15
+ </p>
16
+ <p v-if="language == 'dv'" class="">
17
+ ގައުމީ ސިއްހީ އިންޝުއަރެންސް ނިޒާމު އާސަންދަ އޮތީ ސަލާންޖަހަން ޖެހޭ ފަދަ ހާލަތެއްގައިކަން ގަބޫލުކުރަން ދަތި ކަމަށް ހެލްތު މިނިސްޓަރު އަބްދުﷲ ނާޒިމް އިބްރާހީމް މިއަދު ވިދާޅުވެއްޖެއެވެ.
18
+ </p> -->
19
+ <template #footer>
20
+ <div class="flex justify-end gap-2 ">
21
+ <!-- <pgo-button size="xs" color="gray" variant="outlined" label="buttons.cancel" />
22
+ <pgo-button size="xs" label="buttons.save" variant="default" /> -->
23
+ <Button size="xs" color="gray" variant="outlined" label="buttons.cancel"></Button>
24
+ <Button size="xs" label="buttons.save" variant="default"></Button>
25
+ </div>
26
+ </template>
27
+ </Card>
28
+ <Card
29
+ :title="labels"
30
+ lang="dv"
31
+ :labels="labels"
32
+ :item="item"
33
+ cardClass="w-92 "
34
+ rounded="xl"
35
+ class="border-dashed"
36
+ >
37
+
38
+ <template #footer>
39
+ <div class="flex justify-end gap-2 ">
40
+ <!-- <pgo-button size="xs" color="gray" variant="outlined" label="buttons.cancel" />
41
+ <pgo-button size="xs" label="buttons.save" variant="default" /> -->
42
+ <Button lang="dv" size="xs" label="buttons.save" variant="default"></Button>
43
+ <Button lang="dv" size="xs" color="gray" variant="outlined" label="buttons.cancel"></Button>
44
+ </div>
45
+ </template>
46
+ </Card>
47
+ </div>
48
+ </div>
49
+ </template>
50
+ <script setup>
51
+ import { ref } from 'vue'
52
+ import Card from '../pgo/Card.vue'
53
+ import Button from '../pgo/Button.vue'
54
+
55
+ const item = {
56
+ title: 'Sample Item',
57
+ body: ' This is a simple card component. You can use it to display content in a structured way.',
58
+ title_dv: 'ސަމްޕަލް އައިޓެމް',
59
+ body_dv: 'ގައުމީ ސިއްހީ އިންޝުއަރެންސް ނިޒާމު އާސަންދަ އޮތީ ސަލާންޖަހަން ޖެހޭ ފަދަ ހާލަތެއްގައިކަން ގަބޫލުކުރަން ދަތި ކަމަށް ހެލްތު މިނިސްޓަރު އަބްދުﷲ ނާޒިމް އިބްރާހީމް މިއަދު ވިދާޅުވެއްޖެއެވެ.'
60
+ }
61
+
62
+ const labels = {
63
+ en: {
64
+ title: 'title',
65
+ body: 'body'
66
+ },
67
+ dv: {
68
+ title: 'title_dv',
69
+ body: 'body_dv'
70
+ }
71
+ }
72
+
73
+ const title = {
74
+ en: 'title',
75
+ dv: 'ކާޑް',
76
+ }
77
+ </script>
@@ -0,0 +1,225 @@
1
+ <template>
2
+ <!-- Chips Examples -->
3
+ <div class="p-6 max-w-4xl mx-auto space-y-8">
4
+ <h2 class="text-3xl font-bold text-gray-800 mb-6">Chip Components</h2>
5
+
6
+ <!-- Basic Chips -->
7
+ <Card title="Basic Chips" class="space-y-4">
8
+ <div class="space-y-4">
9
+ <div>
10
+ <h4 class="text-lg font-semibold mb-2">Default Variants</h4>
11
+ <div class="flex flex-wrap gap-2">
12
+ <Chip label="Default" />
13
+ <Chip label="Primary" color="primary" />
14
+ <Chip label="Secondary" color="secondary" />
15
+ <Chip label="Success" color="success" />
16
+ <Chip label="Warning" color="warning" />
17
+ <Chip label="Error" color="error" />
18
+ <Chip label="Info" color="info" />
19
+ </div>
20
+ </div>
21
+
22
+ <div>
23
+ <h4 class="text-lg font-semibold mb-2">Outlined Variants</h4>
24
+ <div class="flex flex-wrap gap-2">
25
+ <Chip label="Default" variant="outlined" />
26
+ <Chip label="Primary" variant="outlined" color="primary" />
27
+ <Chip label="Secondary" variant="outlined" color="secondary" />
28
+ <Chip label="Success" variant="outlined" color="success" />
29
+ <Chip label="Warning" variant="outlined" color="warning" />
30
+ <Chip label="Error" variant="outlined" color="error" />
31
+ <Chip label="Info" variant="outlined" color="info" />
32
+ </div>
33
+ </div>
34
+
35
+ <div>
36
+ <h4 class="text-lg font-semibold mb-2">Filled Variants</h4>
37
+ <div class="flex flex-wrap gap-2">
38
+ <Chip label="Default" variant="filled" />
39
+ <Chip label="Primary" variant="filled" color="primary" />
40
+ <Chip label="Secondary" variant="filled" color="secondary" />
41
+ <Chip label="Success" variant="filled" color="success" />
42
+ <Chip label="Warning" variant="filled" color="warning" />
43
+ <Chip label="Error" variant="filled" color="error" />
44
+ <Chip label="Info" variant="filled" color="info" />
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </Card>
49
+
50
+ <!-- Chip Sizes -->
51
+ <Card title="Chip Sizes" class="space-y-4">
52
+ <div class="flex flex-wrap items-center gap-4">
53
+ <Chip label="Small Chip" size="small" />
54
+ <Chip label="Default Chip" size="default" />
55
+ <Chip label="Large Chip" size="large" />
56
+ </div>
57
+ </Card>
58
+
59
+ <!-- Interactive Chips -->
60
+ <Card title="Interactive Chips" class="space-y-4">
61
+ <div class="space-y-4">
62
+ <div>
63
+ <h4 class="text-lg font-semibold mb-2">Clickable Chips</h4>
64
+ <div class="flex flex-wrap gap-2">
65
+ <Chip label="Click Me" clickable @click="handleChipClick" />
66
+ <Chip label="Primary Click" color="primary" clickable @click="handleChipClick" />
67
+ <Chip label="Success Click" color="success" clickable @click="handleChipClick" />
68
+ </div>
69
+ </div>
70
+
71
+ <div>
72
+ <h4 class="text-lg font-semibold mb-2">Closable Chips</h4>
73
+ <div class="flex flex-wrap gap-2">
74
+ <Chip label="Closable" closable @close="handleChipClose" />
75
+ <Chip label="Primary Close" color="primary" closable @close="handleChipClose" />
76
+ <Chip label="Error Close" color="error" variant="filled" closable @close="handleChipClose" />
77
+ </div>
78
+ </div>
79
+
80
+ <div>
81
+ <h4 class="text-lg font-semibold mb-2">Disabled Chips</h4>
82
+ <div class="flex flex-wrap gap-2">
83
+ <Chip label="Disabled" disabled />
84
+ <Chip label="Disabled Click" clickable disabled />
85
+ <Chip label="Disabled Close" closable disabled />
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </Card>
90
+
91
+ <!-- Custom Styled Chips -->
92
+ <Card title="Custom Styled Chips" class="space-y-4">
93
+ <div class="flex flex-wrap gap-2">
94
+ <Chip
95
+ label="Custom Purple"
96
+ bg-color="bg-purple-100"
97
+ text-color="text-purple-800"
98
+ clickable
99
+ @click="handleChipClick"
100
+ />
101
+ <Chip
102
+ label="Custom Gradient"
103
+ bg-color="bg-gradient-to-r from-pink-500 to-violet-500"
104
+ text-color="text-white"
105
+ rounded="lg"
106
+ clickable
107
+ @click="handleChipClick"
108
+ />
109
+ <Chip
110
+ label="Custom Border"
111
+ variant="outlined"
112
+ border-color="border-orange-500"
113
+ text-color="text-orange-600"
114
+ closable
115
+ @close="handleChipClose"
116
+ />
117
+ </div>
118
+ </Card>
119
+
120
+ <!-- Chip Groups -->
121
+ <Card title="Chip Groups" class="space-y-6">
122
+ <div class="space-y-4">
123
+ <div>
124
+ <h4 class="text-lg font-semibold mb-2">Simple Chip Group</h4>
125
+ <ChipGroup
126
+ :chips="simpleChips"
127
+ color="primary"
128
+ clickable
129
+ @chip-click="handleGroupChipClick"
130
+ />
131
+ </div>
132
+
133
+ <div>
134
+ <h4 class="text-lg font-semibold mb-2">Closable Chip Group</h4>
135
+ <ChipGroup
136
+ v-model:chips="editableChips"
137
+ color="success"
138
+ closable
139
+ @chip-close="handleGroupChipClose"
140
+ />
141
+ </div>
142
+
143
+ <div>
144
+ <h4 class="text-lg font-semibold mb-2">Mixed Styled Chips</h4>
145
+ <ChipGroup
146
+ :chips="mixedChips"
147
+ gap="lg"
148
+ justify="center"
149
+ @chip-click="handleGroupChipClick"
150
+ />
151
+ </div>
152
+ </div>
153
+ </Card>
154
+ </div>
155
+ </template>
156
+ <script setup>
157
+ import { ref } from 'vue'
158
+ import Chip from '../pgo/buttons/Chip.vue'
159
+ import ChipGroup from '../pgo/buttons/ChipGroup.vue'
160
+ import Card from '../pgo/Card.vue'
161
+
162
+ // Chip Examples Data
163
+ const simpleChips = ref([
164
+ 'JavaScript',
165
+ 'Vue.js',
166
+ 'TypeScript',
167
+ 'Tailwind CSS',
168
+ 'Node.js'
169
+ ])
170
+
171
+ const editableChips = ref([
172
+ { id: 1, text: 'Frontend' },
173
+ { id: 2, text: 'Backend' },
174
+ { id: 3, text: 'Database' },
175
+ { id: 4, text: 'DevOps' }
176
+ ])
177
+
178
+ const mixedChips = ref([
179
+ {
180
+ id: 1,
181
+ text: 'High Priority',
182
+ color: 'error',
183
+ variant: 'filled',
184
+ clickable: true
185
+ },
186
+ {
187
+ id: 2,
188
+ text: 'Medium Priority',
189
+ color: 'warning',
190
+ variant: 'outlined',
191
+ clickable: true
192
+ },
193
+ {
194
+ id: 3,
195
+ text: 'Low Priority',
196
+ color: 'info',
197
+ variant: 'default',
198
+ clickable: true
199
+ },
200
+ {
201
+ id: 4,
202
+ text: 'Completed',
203
+ color: 'success',
204
+ variant: 'tonal',
205
+ closable: true
206
+ }
207
+ ])
208
+
209
+ // Chip Event Handlers
210
+ const handleChipClick = () => {
211
+ console.log('Chip clicked!')
212
+ }
213
+
214
+ const handleChipClose = () => {
215
+ console.log('Chip closed!')
216
+ }
217
+
218
+ const handleGroupChipClick = (event) => {
219
+ console.log('Group chip clicked:', event)
220
+ }
221
+
222
+ const handleGroupChipClose = (event) => {
223
+ console.log('Group chip closed:', event)
224
+ }
225
+ </script>