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
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pgo-uiux2",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A Vue 3 component library with PGO design system",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
9
|
+
},
|
|
10
|
+
"main": "./src/pgo-components/index.js",
|
|
11
|
+
"module": "./src/pgo-components/index.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./src/pgo-components/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./components": {
|
|
17
|
+
"import": "./src/components/pgo/index.ts"
|
|
18
|
+
},
|
|
19
|
+
"./components/*": "./src/components/pgo/*.vue",
|
|
20
|
+
"./style.css": "./src/pgo-components/styles/global.css",
|
|
21
|
+
"./router": "./src/router/index.js",
|
|
22
|
+
"./validations": "./src/validations/validationRules.js",
|
|
23
|
+
"./examples/*": "./src/components/examples/*.vue"
|
|
24
|
+
},
|
|
25
|
+
"0j3ctsfiles": [
|
|
26
|
+
"dist",
|
|
27
|
+
"src",
|
|
28
|
+
"tailwind.config.js",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"dev": "vite",
|
|
33
|
+
"build": "vite build",
|
|
34
|
+
"preview": "vite preview"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@heroicons/vue": "^2.2.0",
|
|
38
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
39
|
+
"@tiptap/extension-character-count": "^3.13.0",
|
|
40
|
+
"@tiptap/extension-table": "^3.13.0",
|
|
41
|
+
"@tiptap/extension-table-cell": "^3.13.0",
|
|
42
|
+
"@tiptap/extension-table-header": "^3.13.0",
|
|
43
|
+
"@tiptap/extension-table-row": "^3.13.0",
|
|
44
|
+
"@tiptap/extension-text-align": "^3.13.0",
|
|
45
|
+
"@tiptap/pm": "^3.13.0",
|
|
46
|
+
"@tiptap/starter-kit": "^3.13.0",
|
|
47
|
+
"@tiptap/vue-3": "^3.13.0",
|
|
48
|
+
"@vuepic/vue-datepicker": "^12.1.0",
|
|
49
|
+
"@vueuse/components": "^14.0.0",
|
|
50
|
+
"@vueuse/core": "^14.0.0",
|
|
51
|
+
"axios": "^1.13.2",
|
|
52
|
+
"date-fns": "^4.1.0",
|
|
53
|
+
"vue": "^3.5.22",
|
|
54
|
+
"vue-router": "^4.6.3",
|
|
55
|
+
"vue3-tailwind-components": "^0.3.3"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
59
|
+
"autoprefixer": "^10.4.22",
|
|
60
|
+
"eslint": "^9.39.2",
|
|
61
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
62
|
+
"postcss": "^8.5.6",
|
|
63
|
+
"sass-embedded": "^1.96.0",
|
|
64
|
+
"tailwindcss": "^4.1.17",
|
|
65
|
+
"typescript": "^5.9.3",
|
|
66
|
+
"vite": "^7.1.11",
|
|
67
|
+
"vite-plugin-dts": "^4.5.4",
|
|
68
|
+
"vite-plugin-vue-devtools": "^8.0.3"
|
|
69
|
+
},
|
|
70
|
+
"keywords": [
|
|
71
|
+
"vue",
|
|
72
|
+
"vue3",
|
|
73
|
+
"components",
|
|
74
|
+
"ui",
|
|
75
|
+
"pgo",
|
|
76
|
+
"tailwind",
|
|
77
|
+
"design-system"
|
|
78
|
+
],
|
|
79
|
+
"author": "PGO",
|
|
80
|
+
"license": "MIT",
|
|
81
|
+
"repository": {
|
|
82
|
+
"type": "git",
|
|
83
|
+
"url": "https://github.com/Laamin95/ui.git"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
Binary file
|
package/src/App.vue
ADDED
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app">
|
|
3
|
+
<PApp>
|
|
4
|
+
<!-- <AppBar :dense="false" :collapseOnScroll="true">
|
|
5
|
+
<div class="flex items-center px-4 h-full">
|
|
6
|
+
<button @click="toggleDrawer" class="mr-3">☰</button>
|
|
7
|
+
<h1 class="text-lg font-medium">My App</h1>
|
|
8
|
+
</div>
|
|
9
|
+
</AppBar> -->
|
|
10
|
+
|
|
11
|
+
<AppBar
|
|
12
|
+
id="appbar"
|
|
13
|
+
title="My Awesome Dashboard"
|
|
14
|
+
title-align="center"
|
|
15
|
+
title-class="text-lg font-bold text-indigo-600"
|
|
16
|
+
:drawer="true"
|
|
17
|
+
:menu="false"
|
|
18
|
+
fixed
|
|
19
|
+
:dense="isDense"
|
|
20
|
+
elevation="4"
|
|
21
|
+
border="border-b"
|
|
22
|
+
p="px-4"
|
|
23
|
+
:rtl="rtl || isRtl"
|
|
24
|
+
:overflow-actions="overflowActions"
|
|
25
|
+
:collapse-on-scroll="collapse"
|
|
26
|
+
:z-index="50"
|
|
27
|
+
custom-class="shadow-md"
|
|
28
|
+
@toggle-drawer="drawerOpen = !drawerOpen"
|
|
29
|
+
>
|
|
30
|
+
<!-- PREPEND -->
|
|
31
|
+
<template #prepend>
|
|
32
|
+
<button
|
|
33
|
+
class="hidden md:inline-flex items-center gap-1 px-3 py-1 rounded-md bg-indigo-100 hover:bg-indigo-200 text-indigo-700 dark:bg-indigo-900 dark:hover:bg-indigo-800"
|
|
34
|
+
>
|
|
35
|
+
<HeroIcon
|
|
36
|
+
name="home"
|
|
37
|
+
size="20"
|
|
38
|
+
/>
|
|
39
|
+
ގެޔަށް
|
|
40
|
+
</button>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<!-- TITLE (custom slot) -->
|
|
44
|
+
<template #title>
|
|
45
|
+
<div class="flex items-center gap-2">
|
|
46
|
+
<HeroIcon
|
|
47
|
+
name="sparkles"
|
|
48
|
+
size="22"
|
|
49
|
+
class="text-yellow-500"
|
|
50
|
+
/>
|
|
51
|
+
<span class="font-bold text-xl">ޕްރޮޖެކްޓުގެ ނަން</span>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<!-- NAV -->
|
|
56
|
+
<template #nav>
|
|
57
|
+
<button class="px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-slate-700">
|
|
58
|
+
އެއަށްފަސް
|
|
59
|
+
</button>
|
|
60
|
+
<button class="px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-slate-700">
|
|
61
|
+
ދެންއިން މެނޫ
|
|
62
|
+
</button>
|
|
63
|
+
<button class="px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-slate-700">
|
|
64
|
+
ފުރަތަމަ
|
|
65
|
+
</button>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<!-- ACTIONS -->
|
|
69
|
+
<template #actions>
|
|
70
|
+
<button class="p-2 rounded-full hover:bg-gray-100 dark:hover:bg-slate-700">
|
|
71
|
+
<HeroIcon
|
|
72
|
+
name="bell"
|
|
73
|
+
size="22"
|
|
74
|
+
/>
|
|
75
|
+
</button>
|
|
76
|
+
|
|
77
|
+
<button class="hidden md:block p-2 rounded-full hover:bg-gray-100 dark:hover:bg-slate-700">
|
|
78
|
+
<HeroIcon
|
|
79
|
+
name="cog-6-tooth"
|
|
80
|
+
size="22"
|
|
81
|
+
/>
|
|
82
|
+
</button>
|
|
83
|
+
</template>
|
|
84
|
+
|
|
85
|
+
<!-- APPEND -->
|
|
86
|
+
<template #append>
|
|
87
|
+
<button class="px-3 py-1 rounded-md bg-indigo-600 text-white hover:bg-indigo-700">
|
|
88
|
+
ލޮގްއައުޓް
|
|
89
|
+
</button>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
92
|
+
<!-- MOBILE NAV -->
|
|
93
|
+
<template #mobile-nav>
|
|
94
|
+
<button class="block w-full px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-slate-700">
|
|
95
|
+
ޑޭޝްބޯޑު
|
|
96
|
+
</button>
|
|
97
|
+
<button class="block w-full px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-slate-700">
|
|
98
|
+
Analytics
|
|
99
|
+
</button>
|
|
100
|
+
<button class="block w-full px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-slate-700">
|
|
101
|
+
Users
|
|
102
|
+
</button>
|
|
103
|
+
</template>
|
|
104
|
+
</AppBar>
|
|
105
|
+
|
|
106
|
+
<NavigationDrawer
|
|
107
|
+
v-model="drawerOpen"
|
|
108
|
+
v-model:items="sampleItems"
|
|
109
|
+
:temporary="temporary"
|
|
110
|
+
:rail="rail"
|
|
111
|
+
:hover-expand="hoverExpand"
|
|
112
|
+
:persistent="persistent"
|
|
113
|
+
:permanent="permanent"
|
|
114
|
+
:location="location"
|
|
115
|
+
:is-stuck="isStuck"
|
|
116
|
+
:filterable="true"
|
|
117
|
+
:group-by="'group'"
|
|
118
|
+
ref="el"
|
|
119
|
+
:draggable="true"
|
|
120
|
+
search-placeholder="ހޯދާ"
|
|
121
|
+
:group-icons="{
|
|
122
|
+
އާންމު: 'home',
|
|
123
|
+
'ތަފާސް ހިސާބު': 'document',
|
|
124
|
+
އެޑްމިން: 'cog'
|
|
125
|
+
}"
|
|
126
|
+
color="bg-blue-500"
|
|
127
|
+
width="w-64"
|
|
128
|
+
rail-width="w-16"
|
|
129
|
+
:close-on-scrim-click="true"
|
|
130
|
+
:overlay-app-bar="overlayAppBar"
|
|
131
|
+
:z-index="zIndex"
|
|
132
|
+
:app-bar-offset="appBarOffset"
|
|
133
|
+
>
|
|
134
|
+
<template #prepend>
|
|
135
|
+
<div class="px-3 py-2 text-sm font-semibold">
|
|
136
|
+
މިފިނި
|
|
137
|
+
</div>
|
|
138
|
+
</template>
|
|
139
|
+
|
|
140
|
+
<template #default>
|
|
141
|
+
<ul class="py-4">
|
|
142
|
+
<NavDrawerItem
|
|
143
|
+
class="px-4"
|
|
144
|
+
href="#/"
|
|
145
|
+
>
|
|
146
|
+
<HeroIcon
|
|
147
|
+
name="home"
|
|
148
|
+
size="20"
|
|
149
|
+
/>
|
|
150
|
+
ޑޭޝްބޯޑް
|
|
151
|
+
</NavDrawerItem>
|
|
152
|
+
<NavDrawerItem
|
|
153
|
+
class="px-4"
|
|
154
|
+
href="/page/Person/listView"
|
|
155
|
+
>
|
|
156
|
+
<HeroIcon
|
|
157
|
+
name="user"
|
|
158
|
+
size="20"
|
|
159
|
+
/>
|
|
160
|
+
މީހުން
|
|
161
|
+
</NavDrawerItem>
|
|
162
|
+
<NavDrawerItem
|
|
163
|
+
class="px-4"
|
|
164
|
+
href="#/reports"
|
|
165
|
+
>
|
|
166
|
+
<HeroIcon
|
|
167
|
+
name="document"
|
|
168
|
+
size="20"
|
|
169
|
+
/>
|
|
170
|
+
ރިޕޯޓް
|
|
171
|
+
</NavDrawerItem>
|
|
172
|
+
<NavDrawerItem
|
|
173
|
+
class="px-4"
|
|
174
|
+
href="#/users"
|
|
175
|
+
>
|
|
176
|
+
<HeroIcon
|
|
177
|
+
name="cog"
|
|
178
|
+
size="20"
|
|
179
|
+
/>
|
|
180
|
+
ސެޓިންގްސް
|
|
181
|
+
</NavDrawerItem>
|
|
182
|
+
</ul>
|
|
183
|
+
</template>
|
|
184
|
+
|
|
185
|
+
<!-- <template #footer>
|
|
186
|
+
</template> -->
|
|
187
|
+
|
|
188
|
+
</NavigationDrawer>
|
|
189
|
+
|
|
190
|
+
<Main>
|
|
191
|
+
<!-- CONTENT -->
|
|
192
|
+
<!-- <router-view /> -->
|
|
193
|
+
</Main>
|
|
194
|
+
|
|
195
|
+
<!-- <Footer>
|
|
196
|
+
<div class="p-3 text-center">
|
|
197
|
+
© 2025 Footer Example
|
|
198
|
+
</div>
|
|
199
|
+
</Footer> -->
|
|
200
|
+
</PApp>
|
|
201
|
+
</div>
|
|
202
|
+
</template>
|
|
203
|
+
|
|
204
|
+
<script setup>
|
|
205
|
+
import { onMounted, ref, watch, inject, computed, toRaw } from 'vue'
|
|
206
|
+
//import PApp from './components/pgo/PApp.vue'
|
|
207
|
+
//import AppBar from './components/pgo/AppBar.vue'
|
|
208
|
+
//import Button from './components/pgo/Button.vue'
|
|
209
|
+
//import OldAppBar from './components/pgo/OldAppBar.vue'
|
|
210
|
+
//import NavigationDrawer from './components/pgo/NavigationDrawer.vue'
|
|
211
|
+
// import Main from './components/pgo/Main.vue'
|
|
212
|
+
// import Footer from './components/pgo/Footer.vue'
|
|
213
|
+
// import HeroIcon from "./components/pgo/HeroIcon.vue";
|
|
214
|
+
// import NavDrawer from "./components/pgo/NavDrawer.vue";
|
|
215
|
+
// import NavDrawerItem from "./components/pgo/NavDrawerItem.vue";
|
|
216
|
+
// import { globalRtl } from './pgo-components/lib/core/rtl/rtl.ts'
|
|
217
|
+
// import { setRtl } from './pgo-components/lib/core/rtl/setRtl.ts'
|
|
218
|
+
// import { drawerOpen } from './pgo-components/lib/drawerState.ts'
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
// import DatePickerExample from './components/examples/DatePickerExample.vue'
|
|
222
|
+
// import DatePickerExample from './components/examples/DatePickerExample.vue'
|
|
223
|
+
|
|
224
|
+
// import EditorExample from './components/examples/EditorExample.vue'
|
|
225
|
+
// import TipTapEditorExample from './components/examples/TipTapEditorExample.vue'
|
|
226
|
+
|
|
227
|
+
// import BreadcrumbExample from './components/examples/BreadcrumbExample.vue'
|
|
228
|
+
// import ModalExample from './components/examples/ModalExample.vue'
|
|
229
|
+
|
|
230
|
+
// import { useSnackBar } from './pgo-components/plugins/useSnackBar.js'
|
|
231
|
+
|
|
232
|
+
// import ThemeToggle from './components/examples/ThemeToggle.vue'
|
|
233
|
+
// import { useTheme } from './pgo-components/composables/useTheme.js'
|
|
234
|
+
|
|
235
|
+
// const theme = useTheme()
|
|
236
|
+
|
|
237
|
+
const globalRtl = inject('globalRtl')
|
|
238
|
+
const setRtl = inject('setRtl')
|
|
239
|
+
const drawerOpen = inject('drawerOpen')
|
|
240
|
+
|
|
241
|
+
function onClick() {
|
|
242
|
+
alert('Clicked')
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const dataTheme = computed(() => document.documentElement.getAttribute('data-theme') || 'none')
|
|
246
|
+
|
|
247
|
+
// const snackbar = inject('snackbar')
|
|
248
|
+
|
|
249
|
+
const { t, setLanguage, language } = inject('i18n')
|
|
250
|
+
|
|
251
|
+
onMounted(() => {
|
|
252
|
+
const savedRtl = localStorage.getItem('rtlSetting')
|
|
253
|
+
// console.log('savedRtl', savedRtl)
|
|
254
|
+
// this.$snackbar.show({ message: 'ވަރަށް', variant: 'warning' })
|
|
255
|
+
|
|
256
|
+
// snack.show({
|
|
257
|
+
// message: 'File deleted',
|
|
258
|
+
// // variant: 'info',
|
|
259
|
+
// actions: [{ label: 'Undo', onClick: () => { /* undo logic */ } }],
|
|
260
|
+
// })
|
|
261
|
+
|
|
262
|
+
if (savedRtl !== null) {
|
|
263
|
+
globalRtl.value = JSON.parse(savedRtl)
|
|
264
|
+
setRtl(globalRtl.value)
|
|
265
|
+
} else {
|
|
266
|
+
globalRtl.value = false
|
|
267
|
+
setRtl(globalRtl.value)
|
|
268
|
+
}
|
|
269
|
+
})
|
|
270
|
+
|
|
271
|
+
// const drawerOpen = ref(true);
|
|
272
|
+
const drawerMode = ref('permanent')
|
|
273
|
+
|
|
274
|
+
function toggleDrawer() {
|
|
275
|
+
drawerOpen.value = !drawerOpen.value
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const rtl = ref(false)
|
|
279
|
+
const isDense = ref(false)
|
|
280
|
+
const collapse = ref(false)
|
|
281
|
+
|
|
282
|
+
const overflowActions = [
|
|
283
|
+
{
|
|
284
|
+
label: 'Profile',
|
|
285
|
+
icon: 'UserIcon',
|
|
286
|
+
onClick: () => alert('Profile clicked')
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
label: 'Settings',
|
|
290
|
+
icon: 'Cog6ToothIcon',
|
|
291
|
+
onClick: () => alert('Settings clicked')
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
label: 'Sign out',
|
|
295
|
+
icon: 'ArrowRightStartOnRectangleIcon',
|
|
296
|
+
onClick: () => alert('Logout clicked')
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
|
|
300
|
+
const temporary = ref(false)
|
|
301
|
+
const rail = ref(false)
|
|
302
|
+
const hoverExpand = ref(false)
|
|
303
|
+
const persistent = ref(false)
|
|
304
|
+
const permanent = ref(true)
|
|
305
|
+
const isStuck = ref(true)
|
|
306
|
+
const location = ref(globalRtl.value ? 'right' : 'left')
|
|
307
|
+
const overlayAppBar = ref(true)
|
|
308
|
+
const zIndex = ref(undefined)
|
|
309
|
+
const appBarOffset = ref(false)
|
|
310
|
+
|
|
311
|
+
const sampleItems = ref([
|
|
312
|
+
{ id: 1, label: 'އެޑްމިން', href: '#/', group: 'އާންމު' },
|
|
313
|
+
{ id: 2, label: "މީހުން", href: "/page/Person/listView", group: "އާންމު" },
|
|
314
|
+
{ id: 2, label: "އެންޓްރީ", href: "/page/Entry/listView", group: "އާންމު" },
|
|
315
|
+
{ id: 3, label: 'ރިޕޯޓް', href: '#/reports', group: 'ތަފާސް ހިސާބު' },
|
|
316
|
+
{ id: 4, label: 'ސެޓިންގްސް', href: '#/settings', group: 'އެޑްމިން' }
|
|
317
|
+
])
|
|
318
|
+
|
|
319
|
+
onMounted(() => {
|
|
320
|
+
const savedRtl = localStorage.getItem('rtlSetting')
|
|
321
|
+
if (savedRtl !== null) {
|
|
322
|
+
// Convert string to boolean
|
|
323
|
+
location.value = savedRtl === 'true' ? 'right' : 'left'
|
|
324
|
+
// console.log('Loaded saved RTL setting:', savedRtl)
|
|
325
|
+
} else {
|
|
326
|
+
// Fallback to globalRtl if no saved setting
|
|
327
|
+
location.value = globalRtl.value ? 'right' : 'left'
|
|
328
|
+
// console.log('No saved RTL setting, using globalRtl:', globalRtl.value)
|
|
329
|
+
}
|
|
330
|
+
})
|
|
331
|
+
|
|
332
|
+
watch(globalRtl, () => {
|
|
333
|
+
if (globalRtl.value) {
|
|
334
|
+
location.value = 'right'
|
|
335
|
+
rtl.value = true
|
|
336
|
+
} else {
|
|
337
|
+
location.value = 'left'
|
|
338
|
+
rtl.value = false
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
|
|
342
|
+
const isRtl = ref(true)
|
|
343
|
+
|
|
344
|
+
onMounted(() => {
|
|
345
|
+
const savedRtl = localStorage.getItem('rtlSetting')
|
|
346
|
+
if (savedRtl !== null) {
|
|
347
|
+
isRtl.value = savedRtl === 'true'
|
|
348
|
+
} else {
|
|
349
|
+
isRtl.value = globalRtl.value
|
|
350
|
+
}
|
|
351
|
+
// console.log('Initial RTL setting on mount:', isRtl.value)
|
|
352
|
+
})
|
|
353
|
+
|
|
354
|
+
watch(isRtl, v => {
|
|
355
|
+
setRtl(v)
|
|
356
|
+
if (isRtl.value == true) {
|
|
357
|
+
setLanguage('dv')
|
|
358
|
+
} else {
|
|
359
|
+
setLanguage('en')
|
|
360
|
+
}
|
|
361
|
+
})
|
|
362
|
+
</script>
|
|
363
|
+
|
|
364
|
+
<style scoped>
|
|
365
|
+
#app {
|
|
366
|
+
min-height: 100vh;
|
|
367
|
+
}
|
|
368
|
+
</style>
|
|
Binary file
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<AppBar
|
|
3
|
+
title="އެޕްގެ ނަން"
|
|
4
|
+
title-align="center"
|
|
5
|
+
title-class="text-xl font-bold"
|
|
6
|
+
fixed
|
|
7
|
+
elevation="2"
|
|
8
|
+
drawer
|
|
9
|
+
:rtl="isRtl"
|
|
10
|
+
>
|
|
11
|
+
<!-- Prepend slot: logo -->
|
|
12
|
+
<template #prepend>
|
|
13
|
+
<img src="../assets/logo.png" alt="Logo" class="h-8 w-8 mr-2" />
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<!-- Main nav slot -->
|
|
17
|
+
<template #nav>
|
|
18
|
+
<!-- <a href="#" class="px-3 py-2 text-blue-700 hover:text-blue-900">Home</a> -->
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<!-- Actions slot: buttons/icons -->
|
|
22
|
+
<template #actions>
|
|
23
|
+
<button class="p-2 rounded hover:bg-gray-100" @click="drawerOpen = !drawerOpen" aria-label="Toggle drawer">
|
|
24
|
+
<HeroIcon name="bars-3" size="20" color="text-blue-700" />
|
|
25
|
+
</button>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<!-- Append slot: custom icon -->
|
|
29
|
+
<template #append>
|
|
30
|
+
<!-- <HeroIcon name="bell" size="24" color="text-blue-700" /> -->
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<!-- Mobile nav slot -->
|
|
34
|
+
<template #mobile-nav>
|
|
35
|
+
<a href="#" class="block px-3 py-2 text-blue-700">Home</a>
|
|
36
|
+
<a href="#" class="block px-3 py-2 text-blue-700">About</a>
|
|
37
|
+
<a href="#" class="block px-3 py-2 text-blue-700">Contact</a>
|
|
38
|
+
</template>
|
|
39
|
+
</AppBar>
|
|
40
|
+
|
|
41
|
+
<div class="flex pr-100 pl-100 gap-2">
|
|
42
|
+
<label class="inline-flex items-center gap-2">
|
|
43
|
+
<input type="checkbox" v-model="isRtl" class="form-checkbox" />
|
|
44
|
+
<span class="text-sm text-gray-700">RTL</span>
|
|
45
|
+
</label>
|
|
46
|
+
<div class="flex gap-2">
|
|
47
|
+
<Button :color="language === 'en'? 'primary': 'gray'" @click="$setLanguage('en')">English</Button>
|
|
48
|
+
<Button class="faruma" :color="language =='dv'? 'primary': 'gray'" @click="$setLanguage('dv')">ދިވެހި</Button>
|
|
49
|
+
</div>
|
|
50
|
+
<p>Current language: {{ language }}</p>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script setup>
|
|
55
|
+
import AppBar from "../pgo/AppBar.vue";
|
|
56
|
+
import HeroIcon from "../pgo/HeroIcon.vue";
|
|
57
|
+
import { ref, watch, inject, onMounted } from "vue";
|
|
58
|
+
import { drawerOpen } from '../../pgo-components/lib/drawerState';
|
|
59
|
+
import { setRtl } from '../../pgo-components/lib/core/rtl/setRtl';
|
|
60
|
+
import Button from "../pgo/Button.vue";
|
|
61
|
+
const { t, setLanguage, language } = inject('i18n')
|
|
62
|
+
|
|
63
|
+
// const overflowActions = [
|
|
64
|
+
// {
|
|
65
|
+
// label: "Settings",
|
|
66
|
+
// icon: null, // You can use an icon component here
|
|
67
|
+
// onClick: () => alert("Settings clicked"),
|
|
68
|
+
// },
|
|
69
|
+
// {
|
|
70
|
+
// label: "Profile",
|
|
71
|
+
// icon: null,
|
|
72
|
+
// onClick: () => alert("Profile clicked"),
|
|
73
|
+
// },
|
|
74
|
+
// {
|
|
75
|
+
// label: "Logout",
|
|
76
|
+
// icon: null,
|
|
77
|
+
// onClick: () => alert("Logout clicked"),
|
|
78
|
+
// },
|
|
79
|
+
// ];
|
|
80
|
+
const isRtl = ref(true);
|
|
81
|
+
|
|
82
|
+
onMounted(() => {
|
|
83
|
+
const savedRtl = localStorage.getItem('rtlSetting');
|
|
84
|
+
if (savedRtl !== null) {
|
|
85
|
+
isRtl.value = savedRtl === 'true';
|
|
86
|
+
} else {
|
|
87
|
+
isRtl.value = globalRtl.value;
|
|
88
|
+
}
|
|
89
|
+
console.log("Initial RTL setting on mount:", isRtl.value);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
watch(isRtl, (v) => {
|
|
93
|
+
setRtl(v);
|
|
94
|
+
if (isRtl.value == true) {
|
|
95
|
+
setLanguage('dv')
|
|
96
|
+
} else {
|
|
97
|
+
setLanguage('en')
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
</script>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="grid place-items-center space-y-6 p-6">
|
|
3
|
+
<h2 class="text-xl font-semibold mb-2 text-center">Avatar Example Usage</h2>
|
|
4
|
+
|
|
5
|
+
<!-- Row: image + initials -->
|
|
6
|
+
<div class="flex items-center gap-8">
|
|
7
|
+
<Avatar src="https://i.pravatar.cc/100?img=5" alt="Alice" />
|
|
8
|
+
<Avatar text="Ahmed Shareef" :bordered="true" />
|
|
9
|
+
<Avatar text="P G O" size="lg" shape="rounded" :bordered="true" />
|
|
10
|
+
<Avatar text="UI" size="xl" :bordered="true" />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<!-- Shapes -->
|
|
14
|
+
<div class="flex items-center gap-8">
|
|
15
|
+
<Avatar text="CS" shape="circular" :bordered="true" />
|
|
16
|
+
<Avatar text="CS" shape="rounded" :bordered="true" />
|
|
17
|
+
<Avatar text="CS" shape="square" :bordered="true" />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- Sizes -->
|
|
21
|
+
<div class="flex items-center gap-8">
|
|
22
|
+
<Avatar text="xs" size="xs" :bordered="true" />
|
|
23
|
+
<Avatar text="sm" size="sm" :bordered="true" />
|
|
24
|
+
<Avatar text="md" size="md" :bordered="true" />
|
|
25
|
+
<Avatar text="lg" size="lg" :bordered="true" />
|
|
26
|
+
<Avatar text="xl" size="xl" :bordered="true" />
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<!-- Status -->
|
|
30
|
+
<!-- <div class="flex items-center gap-4">
|
|
31
|
+
<Avatar text="ON" status="online" />
|
|
32
|
+
<Avatar text="AW" status="away" />
|
|
33
|
+
<Avatar text="BZ" status="busy" />
|
|
34
|
+
<Avatar text="OF" status="offline" />
|
|
35
|
+
</div> -->
|
|
36
|
+
|
|
37
|
+
<!-- Disabled + Bordered -->
|
|
38
|
+
<!-- <div class="flex items-center gap-4">
|
|
39
|
+
<Avatar text="DB" :bordered="true" :disabled="true" />
|
|
40
|
+
<Avatar src="https://i.pravatar.cc/100?img=8" :bordered="true" />
|
|
41
|
+
</div> -->
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup lang="ts">
|
|
46
|
+
import Avatar from '../pgo/Avatar.vue'
|
|
47
|
+
</script>
|