pgo-uiux2 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +1 -0
- package/.env.production +1 -0
- package/.prettierrc +13 -0
- package/.vscode/extensions.json +3 -0
- package/BUTTON_GUIDE.md +257 -0
- package/README.md +49 -0
- package/THEME_REFERENCE.md +310 -0
- package/eslint.config.ts +27 -0
- package/index.html +13 -0
- package/package.json +85 -0
- package/public/favicon.ico +0 -0
- package/src/App.vue +368 -0
- package/src/assets/fonts/Faruma.ttf +0 -0
- package/src/components/examples/AppBarExample.vue +101 -0
- package/src/components/examples/AvatarExample.vue +47 -0
- package/src/components/examples/BannerExample.vue +287 -0
- package/src/components/examples/BaseInputExample.vue +25 -0
- package/src/components/examples/BreadcrumbExample.vue +53 -0
- package/src/components/examples/CardExample.vue +77 -0
- package/src/components/examples/ChipExample.vue +225 -0
- package/src/components/examples/DatePickerExample.vue +31 -0
- package/src/components/examples/DropdownExample.vue +84 -0
- package/src/components/examples/EditorExample.vue +200 -0
- package/src/components/examples/ExpansionPanelExample.vue +42 -0
- package/src/components/examples/FileUploadExample.vue +40 -0
- package/src/components/examples/FormExample.vue +121 -0
- package/src/components/examples/HugeTest.vue +8 -0
- package/src/components/examples/LayoutContainerExample.vue +80 -0
- package/src/components/examples/ModalExample.vue +82 -0
- package/src/components/examples/NavDrawerExample.vue +170 -0
- package/src/components/examples/NumberFieldExample.vue +145 -0
- package/src/components/examples/RadioButtonExample.vue +161 -0
- package/src/components/examples/SearchExample.vue +322 -0
- package/src/components/examples/SelectExample.vue +121 -0
- package/src/components/examples/StackedTableViewExample.vue +53 -0
- package/src/components/examples/TabExample.vue +336 -0
- package/src/components/examples/TableExample.vue +228 -0
- package/src/components/examples/TextFieldExample.vue +181 -0
- package/src/components/examples/TextareaExample.vue +173 -0
- package/src/components/examples/ThemeToggle.vue +50 -0
- package/src/components/examples/TimelineExample.vue +66 -0
- package/src/components/examples/TipTapEditorExample.vue +20 -0
- package/src/components/examples/TooltipExample.vue +53 -0
- package/src/components/examples/VueDatePickerShowcase.vue +214 -0
- package/src/components/examples/_DatePickerExample.vue +33 -0
- package/src/components/examples/__FormExample.vue +77 -0
- package/src/components/index.ts +25 -0
- package/src/components/pgo/AppBar.vue +347 -0
- package/src/components/pgo/Avatar.vue +139 -0
- package/src/components/pgo/Banner.vue +300 -0
- package/src/components/pgo/Breadcrumb.vue +101 -0
- package/src/components/pgo/Button.vue +171 -0
- package/src/components/pgo/Card.vue +178 -0
- package/src/components/pgo/ConfirmationModel.vue +32 -0
- package/src/components/pgo/DataTable.vue +845 -0
- package/src/components/pgo/DatePicker/CalendarPanel.vue +43 -0
- package/src/components/pgo/DatePicker/__DatePicker.vue +122 -0
- package/src/components/pgo/DatePicker/types.ts +11 -0
- package/src/components/pgo/DatePicker/useCalendar.ts +39 -0
- package/src/components/pgo/DatePicker/useDatePicker.ts +31 -0
- package/src/components/pgo/Deprecated/ToastContainer.vue +51 -0
- package/src/components/pgo/Deprecated/ToastItem.vue +55 -0
- package/src/components/pgo/Dropdown.vue +296 -0
- package/src/components/pgo/DropdownItem.vue +40 -0
- package/src/components/pgo/Editor.vue +511 -0
- package/src/components/pgo/ExpansionPanel.vue +185 -0
- package/src/components/pgo/Footer.vue +39 -0
- package/src/components/pgo/HeroIcon.vue +124 -0
- package/src/components/pgo/InputSearch.vue +194 -0
- package/src/components/pgo/LayoutContainer.vue +104 -0
- package/src/components/pgo/Main.vue +37 -0
- package/src/components/pgo/Modal.vue +273 -0
- package/src/components/pgo/NavDrawer.vue +127 -0
- package/src/components/pgo/NavDrawerItem.vue +161 -0
- package/src/components/pgo/NavigationDrawer.vue +849 -0
- package/src/components/pgo/OLDNavDrawer.vue +661 -0
- package/src/components/pgo/OldAppBar.vue +223 -0
- package/src/components/pgo/PApp.vue +102 -0
- package/src/components/pgo/Pagination.vue +242 -0
- package/src/components/pgo/Search copy.vue +310 -0
- package/src/components/pgo/Search.vue +411 -0
- package/src/components/pgo/StackedTableView.vue +167 -0
- package/src/components/pgo/Tab.vue +617 -0
- package/src/components/pgo/TestInput.vue +395 -0
- package/src/components/pgo/Timeline.vue +367 -0
- package/src/components/pgo/TimelineItem.vue +80 -0
- package/src/components/pgo/TipTapEditor.vue +315 -0
- package/src/components/pgo/Tooltip.NOTES.md +12 -0
- package/src/components/pgo/Tooltip.PROPS.md +21 -0
- package/src/components/pgo/Tooltip.vue +281 -0
- package/src/components/pgo/base/Base.vue +444 -0
- package/src/components/pgo/buttons/Chip.vue +324 -0
- package/src/components/pgo/buttons/ChipGroup.vue +224 -0
- package/src/components/pgo/buttons/Radio.vue +424 -0
- package/src/components/pgo/filters/FilterSection.vue +188 -0
- package/src/components/pgo/filters/Searchbar.vue +216 -0
- package/src/components/pgo/forms/DynamicForm.vue +45 -0
- package/src/components/pgo/forms/Form.vue +132 -0
- package/src/components/pgo/index.ts +15 -0
- package/src/components/pgo/inputs/Checkbox.vue +320 -0
- package/src/components/pgo/inputs/DatePicker.vue +395 -0
- package/src/components/pgo/inputs/FileUpload.vue +326 -0
- package/src/components/pgo/inputs/NumberField.vue +243 -0
- package/src/components/pgo/inputs/Radio.vue +162 -0
- package/src/components/pgo/inputs/RadioGroup.vue +188 -0
- package/src/components/pgo/inputs/Select.vue +535 -0
- package/src/components/pgo/inputs/TextField.vue +194 -0
- package/src/components/pgo/inputs/Textarea.vue +181 -0
- package/src/main.js +12 -0
- package/src/pgo-components/_index.js +31 -0
- package/src/pgo-components/assets/fonts/Faruma.ttf +0 -0
- package/src/pgo-components/assets/fonts/logo.png +0 -0
- package/src/pgo-components/composables/useTheme.js +10 -0
- package/src/pgo-components/directives/tooltip-directive.ts +393 -0
- package/src/pgo-components/index.js +96 -0
- package/src/pgo-components/lib/componentConfig.js +147 -0
- package/src/pgo-components/lib/core/composables/_useCalendar.ts +127 -0
- package/src/pgo-components/lib/core/composables/useDefaults.ts +15 -0
- package/src/pgo-components/lib/core/composables/useLanguageSelect.js +0 -0
- package/src/pgo-components/lib/core/composables/useRtl.ts +12 -0
- package/src/pgo-components/lib/core/defaults/createDefaults.ts +5 -0
- package/src/pgo-components/lib/core/defaults/defaults.ts +7 -0
- package/src/pgo-components/lib/core/rtl/rtl.ts +3 -0
- package/src/pgo-components/lib/core/rtl/setRtl.ts +19 -0
- package/src/pgo-components/lib/drawerState.ts +3 -0
- package/src/pgo-components/lib/i18n/defaultLables.js +71 -0
- package/src/pgo-components/lib/i18n/i18nPlugin.js +52 -0
- package/src/pgo-components/lib/i18n/useI18n.js +35 -0
- package/src/pgo-components/lib/index.ts +38 -0
- package/src/pgo-components/pages/Component.vue +7 -0
- package/src/pgo-components/pages/ComponentRenderer.vue +85 -0
- package/src/pgo-components/pages/Home.vue +130 -0
- package/src/pgo-components/pages/ListView.vue +370 -0
- package/src/pgo-components/pages/Page1.vue +296 -0
- package/src/pgo-components/pages/_Page1.vue +180 -0
- package/src/pgo-components/plugins/SnackBar.vue +251 -0
- package/src/pgo-components/plugins/SnackBarContainer.vue +53 -0
- package/src/pgo-components/plugins/SnackBarPlugin.ts +136 -0
- package/src/pgo-components/plugins/theme-plugin.js +114 -0
- package/src/pgo-components/plugins/types.ts +46 -0
- package/src/pgo-components/plugins/useSnackBar.js +11 -0
- package/src/pgo-components/plugins/useSnackBar.ts +21 -0
- package/src/pgo-components/plugins/validation-plugin.js +11 -0
- package/src/pgo-components/services/Entry.json +813 -0
- package/src/pgo-components/services/axios.js +54 -0
- package/src/pgo-components/services/data.json +90 -0
- package/src/pgo-components/services/person.json +260 -0
- package/src/pgo-components/services/toast.ts +44 -0
- package/src/pgo-components/styles/global.css +234 -0
- package/src/pgo-components/styles/reset.css +96 -0
- package/src/pgo-components/styles/tokens.css +18 -0
- package/src/pgo-components/styles/utilities/border-radius.css +57 -0
- package/src/pgo-components/styles/utilities/borders.css +85 -0
- package/src/pgo-components/styles/utilities/colors.css +38 -0
- package/src/pgo-components/styles/utilities/cursor.css +19 -0
- package/src/pgo-components/styles/utilities/display.css +78 -0
- package/src/pgo-components/styles/utilities/elevation.css +33 -0
- package/src/pgo-components/styles/utilities/flex.css +403 -0
- package/src/pgo-components/styles/utilities/float.css +41 -0
- package/src/pgo-components/styles/utilities/hover.css +9 -0
- package/src/pgo-components/styles/utilities/index.css +18 -0
- package/src/pgo-components/styles/utilities/opacity.css +27 -0
- package/src/pgo-components/styles/utilities/overflow.css +26 -0
- package/src/pgo-components/styles/utilities/palette.css +515 -0
- package/src/pgo-components/styles/utilities/position.css +14 -0
- package/src/pgo-components/styles/utilities/sizing.css +70 -0
- package/src/pgo-components/styles/utilities/spacing.css +578 -0
- package/src/pgo-components/styles/utilities/transitions.css +58 -0
- package/src/pgo-components/styles/utilities/typography.css +91 -0
- package/src/pgo-components/styles/utilities/z-index.css +11 -0
- package/src/pgo-components/tokens/index.js +337 -0
- package/src/router/index.js +88 -0
- package/src/shims-vue.d.ts +14 -0
- package/src/validations/validationRules.js +50 -0
- package/tailwind.config.js +73 -0
- package/test.php +5 -0
- package/tsconfig.json +25 -0
- package/ui +31 -0
- package/ui.pgo.mv.conf +18 -0
- package/vite.config.js +42 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
|
|
3
|
+
// Create axios instance with default config
|
|
4
|
+
const api = axios.create({
|
|
5
|
+
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000/api',
|
|
6
|
+
timeout: 10000,
|
|
7
|
+
headers: {
|
|
8
|
+
'Content-Type': 'application/json',
|
|
9
|
+
}
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
// Request interceptor
|
|
13
|
+
api.interceptors.request.use(
|
|
14
|
+
(config) => {
|
|
15
|
+
// Add auth token if exists
|
|
16
|
+
const token = localStorage.getItem('token')
|
|
17
|
+
if (token) {
|
|
18
|
+
config.headers.Authorization = `Bearer ${token}`
|
|
19
|
+
}
|
|
20
|
+
return config
|
|
21
|
+
},
|
|
22
|
+
(error) => {
|
|
23
|
+
return Promise.reject(error)
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
// Response interceptor
|
|
28
|
+
api.interceptors.response.use(
|
|
29
|
+
(response) => {
|
|
30
|
+
return response.data
|
|
31
|
+
},
|
|
32
|
+
(error) => {
|
|
33
|
+
// Handle errors globally
|
|
34
|
+
if (error.response) {
|
|
35
|
+
// Server responded with error
|
|
36
|
+
console.error('API Error:', error.response.data)
|
|
37
|
+
|
|
38
|
+
// Handle specific status codes
|
|
39
|
+
if (error.response.status === 401) {
|
|
40
|
+
// Unauthorized - redirect to login
|
|
41
|
+
localStorage.removeItem('token')
|
|
42
|
+
// router.push('/login') // Uncomment if using vue-router
|
|
43
|
+
}
|
|
44
|
+
} else if (error.request) {
|
|
45
|
+
// Request made but no response
|
|
46
|
+
console.error('Network Error:', error.request)
|
|
47
|
+
} else {
|
|
48
|
+
console.error('Error:', error.message)
|
|
49
|
+
}
|
|
50
|
+
return Promise.reject(error)
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
export default api
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"country_id": 1,
|
|
5
|
+
"id": 1,
|
|
6
|
+
"first_name_div": "\u07a2\u07a6\u078d\u07a9",
|
|
7
|
+
"gender": "F",
|
|
8
|
+
"is_in_custody": 0,
|
|
9
|
+
"date_of_birth": "1952-02-22"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"country_id": 1,
|
|
13
|
+
"id": 2,
|
|
14
|
+
"first_name_div": "\u0787\u07a7\u078b\u07a6\u0789\u07b0",
|
|
15
|
+
"gender": "M",
|
|
16
|
+
"is_in_custody": 0,
|
|
17
|
+
"date_of_birth": "1986-03-08"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"country_id": 1,
|
|
21
|
+
"id": 3,
|
|
22
|
+
"first_name_div": "\u0799\u07a6\u0790\u07a6\u0782\u07b0",
|
|
23
|
+
"gender": "M",
|
|
24
|
+
"is_in_custody": 0,
|
|
25
|
+
"date_of_birth": "1965-05-13"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"country_id": 1,
|
|
29
|
+
"id": 4,
|
|
30
|
+
"first_name_div": "\u0789\u07aa\u0799\u07a6\u0787\u07b0\u0789\u07a6\u078b\u07aa",
|
|
31
|
+
"gender": "M",
|
|
32
|
+
"is_in_custody": 0,
|
|
33
|
+
"date_of_birth": "1951-03-16"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"country_id": 1,
|
|
37
|
+
"id": 5,
|
|
38
|
+
"first_name_div": "\u0799\u07aa\u0790\u07a6\u0787\u07a8\u0782\u07b0",
|
|
39
|
+
"gender": "F",
|
|
40
|
+
"is_in_custody": 0,
|
|
41
|
+
"date_of_birth": "1981-03-22"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"country_id": 1,
|
|
45
|
+
"id": 6,
|
|
46
|
+
"first_name_div": "\u079d\u07a7\u0782\u07aa",
|
|
47
|
+
"gender": "M",
|
|
48
|
+
"is_in_custody": 0,
|
|
49
|
+
"date_of_birth": "1900-01-01"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"country_id": 1,
|
|
53
|
+
"id": 7,
|
|
54
|
+
"first_name_div": "\u0787\u07a6\u0799\u07b0\u0789\u07a6\u078b\u07aa",
|
|
55
|
+
"gender": "M",
|
|
56
|
+
"is_in_custody": 0,
|
|
57
|
+
"date_of_birth": "1983-02-22"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"country_id": 49,
|
|
61
|
+
"id": 8,
|
|
62
|
+
"first_name_div": "\u0787\u07a6\u0799\u07aa\u0789\u07a6\u078b\u07aa",
|
|
63
|
+
"gender": "M",
|
|
64
|
+
"is_in_custody": 0,
|
|
65
|
+
"date_of_birth": "1984-02-22"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"country_id": 1,
|
|
69
|
+
"id": 9,
|
|
70
|
+
"first_name_div": "\u0787\u07a6\u0799\u07b0\u0789\u07a6\u078b\u07aa",
|
|
71
|
+
"gender": "M",
|
|
72
|
+
"is_in_custody": 0,
|
|
73
|
+
"date_of_birth": "1986-11-18"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"country_id": 1,
|
|
77
|
+
"id": 10,
|
|
78
|
+
"first_name_div": "\u07a2\u07a6\u078a\u07a9\u078a\u07a7",
|
|
79
|
+
"gender": "F",
|
|
80
|
+
"is_in_custody": 0,
|
|
81
|
+
"date_of_birth": "1978-02-22"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"pagination": {
|
|
85
|
+
"current_page": 1,
|
|
86
|
+
"last_page": 5087,
|
|
87
|
+
"per_page": 10,
|
|
88
|
+
"total": 50868
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"country_id": 1,
|
|
5
|
+
"id": 1,
|
|
6
|
+
"first_name_div": "\u07a2\u07a6\u078d\u07a9",
|
|
7
|
+
"gender": "F",
|
|
8
|
+
"is_in_custody": 0,
|
|
9
|
+
"date_of_birth": "1952-02-22"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"country_id": 1,
|
|
13
|
+
"id": 2,
|
|
14
|
+
"first_name_div": "\u0787\u07a7\u078b\u07a6\u0789\u07b0",
|
|
15
|
+
"gender": "M",
|
|
16
|
+
"is_in_custody": 0,
|
|
17
|
+
"date_of_birth": "1986-03-08"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"country_id": 1,
|
|
21
|
+
"id": 3,
|
|
22
|
+
"first_name_div": "\u0799\u07a6\u0790\u07a6\u0782\u07b0",
|
|
23
|
+
"gender": "M",
|
|
24
|
+
"is_in_custody": 0,
|
|
25
|
+
"date_of_birth": "1965-05-13"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"country_id": 1,
|
|
29
|
+
"id": 4,
|
|
30
|
+
"first_name_div": "\u0789\u07aa\u0799\u07a6\u0787\u07b0\u0789\u07a6\u078b\u07aa",
|
|
31
|
+
"gender": "M",
|
|
32
|
+
"is_in_custody": 0,
|
|
33
|
+
"date_of_birth": "1951-03-16"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"country_id": 1,
|
|
37
|
+
"id": 5,
|
|
38
|
+
"first_name_div": "\u0799\u07aa\u0790\u07a6\u0787\u07a8\u0782\u07b0",
|
|
39
|
+
"gender": "F",
|
|
40
|
+
"is_in_custody": 0,
|
|
41
|
+
"date_of_birth": "1981-03-22"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"country_id": 1,
|
|
45
|
+
"id": 6,
|
|
46
|
+
"first_name_div": "\u079d\u07a7\u0782\u07aa",
|
|
47
|
+
"gender": "M",
|
|
48
|
+
"is_in_custody": 0,
|
|
49
|
+
"date_of_birth": "1900-01-01"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"country_id": 1,
|
|
53
|
+
"id": 7,
|
|
54
|
+
"first_name_div": "\u0787\u07a6\u0799\u07b0\u0789\u07a6\u078b\u07aa",
|
|
55
|
+
"gender": "M",
|
|
56
|
+
"is_in_custody": 0,
|
|
57
|
+
"date_of_birth": "1983-02-22"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"country_id": 49,
|
|
61
|
+
"id": 8,
|
|
62
|
+
"first_name_div": "\u0787\u07a6\u0799\u07aa\u0789\u07a6\u078b\u07aa",
|
|
63
|
+
"gender": "M",
|
|
64
|
+
"is_in_custody": 0,
|
|
65
|
+
"date_of_birth": "1984-02-22"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"country_id": 1,
|
|
69
|
+
"id": 9,
|
|
70
|
+
"first_name_div": "\u0787\u07a6\u0799\u07b0\u0789\u07a6\u078b\u07aa",
|
|
71
|
+
"gender": "M",
|
|
72
|
+
"is_in_custody": 0,
|
|
73
|
+
"date_of_birth": "1986-11-18"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"country_id": 1,
|
|
77
|
+
"id": 10,
|
|
78
|
+
"first_name_div": "\u07a2\u07a6\u078a\u07a9\u078a\u07a7",
|
|
79
|
+
"gender": "F",
|
|
80
|
+
"is_in_custody": 0,
|
|
81
|
+
"date_of_birth": "1978-02-22"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"component": "listView",
|
|
85
|
+
"componentSettings": {
|
|
86
|
+
"dataSource": "/var/www/uiux/src/services/data.json",
|
|
87
|
+
"table": {
|
|
88
|
+
"pagination": {
|
|
89
|
+
"current_page": 1,
|
|
90
|
+
"last_page": 5087,
|
|
91
|
+
"per_page": 10,
|
|
92
|
+
"total": 50868
|
|
93
|
+
},
|
|
94
|
+
"headers": [
|
|
95
|
+
{
|
|
96
|
+
"title": "\u078a\u07aa\u0783\u07a6\u078c\u07a6\u0789\u07a6 \u0782\u07a6\u0782\u07b0",
|
|
97
|
+
"value": "first_name_div",
|
|
98
|
+
"sortable": true,
|
|
99
|
+
"hidden": false,
|
|
100
|
+
"type": "string",
|
|
101
|
+
"displayType": "text"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"title": "\u0796\u07a8\u0782\u07b0\u0790\u07aa",
|
|
105
|
+
"value": "gender",
|
|
106
|
+
"sortable": false,
|
|
107
|
+
"hidden": false,
|
|
108
|
+
"type": "string",
|
|
109
|
+
"displayType": "select",
|
|
110
|
+
"displayProps": {
|
|
111
|
+
"items": [
|
|
112
|
+
{
|
|
113
|
+
"title": "Male",
|
|
114
|
+
"value": "M"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"title": "Female",
|
|
118
|
+
"value": "F"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"inlineEditable": true,
|
|
123
|
+
"lang": "en"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"title": "\u0789\u07a8\u0788\u07a6\u078e\u07aa\u078c\u07aa\u0784\u07a6\u0782\u07b0\u078b\u07aa\u078e\u07a6\u0787\u07a8",
|
|
127
|
+
"value": "is_in_custody",
|
|
128
|
+
"sortable": true,
|
|
129
|
+
"hidden": false,
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"displayType": "checkbox",
|
|
132
|
+
"displayProps": {
|
|
133
|
+
"color": "primary"
|
|
134
|
+
},
|
|
135
|
+
"lang": "en",
|
|
136
|
+
"inlineEditable": true
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"title": "\u0787\u07aa\u078a\u07a6\u0782\u07b0 \u078b\u07aa\u0788\u07a6\u0790\u07b0",
|
|
140
|
+
"value": "date_of_birth",
|
|
141
|
+
"sortable": true,
|
|
142
|
+
"hidden": false,
|
|
143
|
+
"type": "date",
|
|
144
|
+
"displayType": "text",
|
|
145
|
+
"lang": "en"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"FilterSection": {
|
|
150
|
+
"settings": {
|
|
151
|
+
"type": "submit"
|
|
152
|
+
},
|
|
153
|
+
"buttons": [
|
|
154
|
+
{
|
|
155
|
+
"type": "submit",
|
|
156
|
+
"color": "primary",
|
|
157
|
+
"prependIcon": "magnifying-glass",
|
|
158
|
+
"variant": "contained"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "Clear",
|
|
162
|
+
"label": "Clear",
|
|
163
|
+
"color": "secondary"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"type": "Close",
|
|
167
|
+
"label": "Close",
|
|
168
|
+
"color": "gray"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"filters": [
|
|
172
|
+
{
|
|
173
|
+
"type": "Select",
|
|
174
|
+
"key": "gender",
|
|
175
|
+
"label": "\u0796\u07a8\u0782\u07b0\u0790\u07aa",
|
|
176
|
+
"itemTitle": "itemTitleDv",
|
|
177
|
+
"itemValue": "itemValue",
|
|
178
|
+
"items": [
|
|
179
|
+
{
|
|
180
|
+
"itemTitleDv": "-\u0782\u07ac\u078c\u07b0-",
|
|
181
|
+
"itemValue": ""
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"itemTitleDv": "\u078a\u07a8\u0783\u07a8\u0780\u07ac\u0782\u07b0",
|
|
185
|
+
"itemValue": "M"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"itemTitleDv": "\u0787\u07a6\u0782\u07b0\u0780\u07ac\u0782\u07ac",
|
|
189
|
+
"itemValue": "F"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"type": "Select",
|
|
195
|
+
"key": "country_id",
|
|
196
|
+
"label": "\u07a4\u07a6\u0787\u07aa\u0789\u07aa",
|
|
197
|
+
"itemTitle": "name_div",
|
|
198
|
+
"itemValue": "id",
|
|
199
|
+
"url": "https:\/\/uiapi.pgo.mv\/api\/Country\/options\/id?itemTitle=name_div&itemValue=id&lang=dv"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"Searchbar": {
|
|
204
|
+
"title": "މީހުންގެ ލިސްޓް",
|
|
205
|
+
"quickFilters": [
|
|
206
|
+
{
|
|
207
|
+
"type": "ChipGroup",
|
|
208
|
+
"key": "status",
|
|
209
|
+
"chips": [
|
|
210
|
+
{ "value": "all", "label": "All" },
|
|
211
|
+
{ "value": "active", "label": "Active" },
|
|
212
|
+
{ "value": "pending", "label": "Pending" },
|
|
213
|
+
{ "value": "completed", "label": "Completed" }
|
|
214
|
+
],
|
|
215
|
+
"color": "primary",
|
|
216
|
+
"size": "small",
|
|
217
|
+
"clickable": true
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"type": "ChipGroup",
|
|
221
|
+
"key": "priority",
|
|
222
|
+
"chips": [
|
|
223
|
+
{ "value": "all", "label": "All Priority" },
|
|
224
|
+
{ "value": "high", "label": "High" },
|
|
225
|
+
{ "value": "medium", "label": "Medium" },
|
|
226
|
+
{ "value": "low", "label": "Low" }
|
|
227
|
+
],
|
|
228
|
+
"color": "secondary",
|
|
229
|
+
"size": "small",
|
|
230
|
+
"clickable": true
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "InputSearch",
|
|
234
|
+
"key": "search",
|
|
235
|
+
"placeholder": "Search...",
|
|
236
|
+
"size": "md"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"type": "DatePicker",
|
|
240
|
+
"key": "dob",
|
|
241
|
+
"placeholder": "DoB...",
|
|
242
|
+
"size": "md"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"buttons": [
|
|
246
|
+
{
|
|
247
|
+
"type": "search",
|
|
248
|
+
"color": "primary",
|
|
249
|
+
"icon": "magnifying-glass",
|
|
250
|
+
"variant": "contained"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"type": "Clear",
|
|
254
|
+
"label": "Clear",
|
|
255
|
+
"color": "secondary"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { reactive } from 'vue'
|
|
2
|
+
|
|
3
|
+
export type ToastType = 'info' | 'success' | 'warning' | 'error'
|
|
4
|
+
|
|
5
|
+
export interface ToastOptions {
|
|
6
|
+
message: string
|
|
7
|
+
type?: ToastType
|
|
8
|
+
duration?: number
|
|
9
|
+
closable?: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Toast extends Required<ToastOptions> {
|
|
13
|
+
id: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const state = reactive({
|
|
17
|
+
toasts: [] as Toast[]
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
let id = 0
|
|
21
|
+
|
|
22
|
+
function show(options: ToastOptions) {
|
|
23
|
+
state.toasts.unshift({
|
|
24
|
+
id: ++id,
|
|
25
|
+
message: options.message,
|
|
26
|
+
type: options.type ?? 'info',
|
|
27
|
+
duration: options.duration ?? 4000,
|
|
28
|
+
closable: options.closable ?? true
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function remove(id: number) {
|
|
33
|
+
state.toasts = state.toasts.filter(t => t.id !== id)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const toast = {
|
|
37
|
+
show,
|
|
38
|
+
success: (message: string, opts: Partial<ToastOptions> = {}) => show({ message, type: 'success', ...opts }),
|
|
39
|
+
error: (message: string, opts: Partial<ToastOptions> = {}) => show({ message, type: 'error', ...opts }),
|
|
40
|
+
warning: (message: string, opts: Partial<ToastOptions> = {}) => show({ message, type: 'warning', ...opts }),
|
|
41
|
+
info: (message: string, opts: Partial<ToastOptions> = {}) => show({ message, type: 'info', ...opts }),
|
|
42
|
+
remove,
|
|
43
|
+
state
|
|
44
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import './tokens.css';
|
|
3
|
+
@import './utilities/index.css';
|
|
4
|
+
|
|
5
|
+
@theme {
|
|
6
|
+
|
|
7
|
+
--color-primary: var(--color-primary);
|
|
8
|
+
--color-primary-text: var(--color-primary-text);
|
|
9
|
+
--color-background-color: var(--color-background);
|
|
10
|
+
--color-textcolor: var(--color-text);
|
|
11
|
+
--color-textsecondary: var(--color-text-secondary);
|
|
12
|
+
--color-background: var(--color-background);
|
|
13
|
+
--color-surface: var(--color-surface);
|
|
14
|
+
--color-surface-elevated: var(--color-surface-elevated);
|
|
15
|
+
--color-border: var(--color-border);
|
|
16
|
+
--color-border-light: var(--color-border-light);
|
|
17
|
+
--color-border-heavy: var(--color-border-heavy);
|
|
18
|
+
--color-success: var(--color-success);
|
|
19
|
+
--color-error: var(--color-error);
|
|
20
|
+
--color-muted: var(--color-muted);
|
|
21
|
+
--color-secondary: var(--color-secondary);
|
|
22
|
+
--color-secondary-text: var(--color-secondary-text);
|
|
23
|
+
--color-danger: var(--color-danger);
|
|
24
|
+
--color-divider: var(--color-divider);
|
|
25
|
+
--color-overlay: var(--color-overlay);
|
|
26
|
+
--color-warning: var(--color-warning);
|
|
27
|
+
--color-info: var(--color-info);
|
|
28
|
+
--color-focus: var(--color-focus);
|
|
29
|
+
--color-shadow: var(--color-shadow);
|
|
30
|
+
--color-disable: var(--color-disable);
|
|
31
|
+
|
|
32
|
+
--color-input-bg: var(--color-surface-elevated);
|
|
33
|
+
--color-input-text: var(--color-text-secondary);
|
|
34
|
+
--color-input-hover: var(--color-surface);
|
|
35
|
+
--color-input-border: var(--color-border);
|
|
36
|
+
--color-input-hover-border: var(--color-border-light);
|
|
37
|
+
--color-input-focus-border: var(--color-border-heavy);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:root {
|
|
41
|
+
/* fallbacks */
|
|
42
|
+
--vts-color-text: #18e929;
|
|
43
|
+
--vts-color-background: #22e910;
|
|
44
|
+
--vts-color-surface: #3ee913;
|
|
45
|
+
--vts-color-primary: #3b82f6;
|
|
46
|
+
--vts-color-primaryText: #09f3ad;
|
|
47
|
+
--vts-color-muted: #6b7280;
|
|
48
|
+
--vts-radius-md: 8px;
|
|
49
|
+
--vts-shadow-sm: 0 1px 3px rgba(2, 6, 23, 0.06);
|
|
50
|
+
|
|
51
|
+
--app-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
html[data-theme] {
|
|
55
|
+
/* nothing here — theme plugin writes variables programmatically */
|
|
56
|
+
/* Global theme for @vuepic/vue-datepicker */
|
|
57
|
+
--dp-background-color: var(--vts-color-surface);
|
|
58
|
+
--dp-text-color: var(--vts-color-text);
|
|
59
|
+
--dp-hover-color: var(--vts-color-surfaceElevated);
|
|
60
|
+
--dp-hover-text-color: var(--vts-color-text);
|
|
61
|
+
--dp-primary-color: var(--vts-color-primary);
|
|
62
|
+
--dp-primary-text-color: var(--vts-color-primaryText);
|
|
63
|
+
--dp-secondary-color: var(--vts-color-surfaceElevated);
|
|
64
|
+
--dp-border-color: var(--vts-color-border);
|
|
65
|
+
--dp-menu-border-color: var(--vts-color-border);
|
|
66
|
+
--dp-border-radius: var(--vts-radius-md);
|
|
67
|
+
--dp-shadow: var(--vts-elevation-2);
|
|
68
|
+
--dp-icon-color: var(--vts-color-text);
|
|
69
|
+
--dp-disabled-color: var(--vts-color-text-secondary);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
body {
|
|
73
|
+
color: var(--vts-color-text);
|
|
74
|
+
background: var(--vts-color-background);
|
|
75
|
+
transition: background .18s ease, color .18s ease;
|
|
76
|
+
padding: 1.2rem;
|
|
77
|
+
font-family: var(--app-font);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
* {
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Global font variable used by the app to allow theme switching (e.g., RTL font) */
|
|
86
|
+
:root {
|
|
87
|
+
--app-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
html,
|
|
91
|
+
body,
|
|
92
|
+
#app {
|
|
93
|
+
height: 100%;
|
|
94
|
+
margin: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* body {
|
|
98
|
+
font-family: var(--app-font);
|
|
99
|
+
} */
|
|
100
|
+
|
|
101
|
+
/* When RTL is active, switch to a more appropriate font for RTL languages. */
|
|
102
|
+
.rtl-font,
|
|
103
|
+
[dir="rtl"],
|
|
104
|
+
html[dir="rtl"],
|
|
105
|
+
body[dir="rtl"],
|
|
106
|
+
[lang="dv"],
|
|
107
|
+
html[lang="dv"],
|
|
108
|
+
body[lang="dv"] {
|
|
109
|
+
/* When RTL is active, prefer the local Faruma font if installed, then fall back to other system fonts. */
|
|
110
|
+
--app-font: "Faruma", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@font-face {
|
|
114
|
+
font-family: 'Faruma';
|
|
115
|
+
/* Your chosen name for the font */
|
|
116
|
+
src: url('/src/pgo-components/assets/fonts/Faruma.ttf') format('truetype');
|
|
117
|
+
font-weight: normal;
|
|
118
|
+
font-style: normal;
|
|
119
|
+
font-display: swap;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.faruma {
|
|
123
|
+
/* When RTL is active, prefer the local Faruma font if installed, then fall back to other system fonts. */
|
|
124
|
+
font-family: "Faruma", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
|
|
125
|
+
}
|
|
126
|
+
.eng-font {
|
|
127
|
+
/* When RTL is active, prefer the local Faruma font if installed, then fall back to other system fonts. */
|
|
128
|
+
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* VueDatePicker Default Theme Overrides matching theme tokens */
|
|
132
|
+
html .dp__theme_light {
|
|
133
|
+
/* Map VueDatePicker vars to app theme tokens */
|
|
134
|
+
--dp-background-color: var(--vts-color-surface);
|
|
135
|
+
--dp-text-color: var(--vts-color-text);
|
|
136
|
+
--dp-hover-color: var(--vts-color-surfaceElevated);
|
|
137
|
+
--dp-hover-text-color: var(--vts-color-text);
|
|
138
|
+
--dp-hover-icon-color: var(--vts-color-textSecondary);
|
|
139
|
+
--dp-primary-color: var(--vts-color-primary);
|
|
140
|
+
--dp-primary-disabled-color: var(--vts-color-borderLight);
|
|
141
|
+
--dp-primary-text-color: var(--vts-color-primaryText);
|
|
142
|
+
--dp-secondary-color: var(--vts-color-secondary);
|
|
143
|
+
--dp-border-color: var(--vts-color-border);
|
|
144
|
+
--dp-menu-border-color: var(--vts-color-border);
|
|
145
|
+
--dp-border-color-hover: var(--vts-color-borderLight);
|
|
146
|
+
--dp-border-color-focus: var(--vts-color-primary);
|
|
147
|
+
--dp-disabled-color: var(--vts-color-surface);
|
|
148
|
+
--dp-scroll-bar-background: var(--vts-color-surfaceElevated);
|
|
149
|
+
--dp-scroll-bar-color: var(--vts-color-muted);
|
|
150
|
+
--dp-success-color: var(--vts-color-success);
|
|
151
|
+
--dp-success-color-disabled: var(--vts-color-success);
|
|
152
|
+
--dp-icon-color: var(--vts-color-textSecondary);
|
|
153
|
+
--dp-danger-color: var(--vts-color-error);
|
|
154
|
+
--dp-marker-color: var(--vts-color-primary);
|
|
155
|
+
--dp-tooltip-color: var(--vts-color-surfaceElevated);
|
|
156
|
+
--dp-disabled-color-text: var(--vts-color-textSecondary);
|
|
157
|
+
/* If supported, use color-mix for a soft token-based highlight */
|
|
158
|
+
--dp-highlight-color: color-mix(in srgb, var(--vts-color-primary) 12%, transparent);
|
|
159
|
+
--dp-range-between-dates-background-color: var(--dp-hover-color);
|
|
160
|
+
--dp-range-between-dates-text-color: var(--dp-hover-text-color);
|
|
161
|
+
--dp-range-between-border-color: var(--dp-hover-color);
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* VueDatePicker Default Theme Overrides matching theme tokens */
|
|
167
|
+
html .dp__theme_dark {
|
|
168
|
+
/* Map VueDatePicker dark theme vars to app tokens (will read dark values) */
|
|
169
|
+
--dp-background-color: var(--vts-color-surface);
|
|
170
|
+
--dp-text-color: var(--vts-color-text);
|
|
171
|
+
--dp-hover-color: var(--vts-color-surfaceElevated);
|
|
172
|
+
--dp-hover-text-color: var(--vts-color-text);
|
|
173
|
+
--dp-hover-icon-color: var(--vts-color-textSecondary);
|
|
174
|
+
--dp-primary-color: var(--vts-color-primary);
|
|
175
|
+
--dp-primary-disabled-color: var(--vts-color-borderLight);
|
|
176
|
+
--dp-primary-text-color: var(--vts-color-primaryText);
|
|
177
|
+
--dp-secondary-color: var(--vts-color-secondary);
|
|
178
|
+
--dp-border-color: var(--vts-color-border);
|
|
179
|
+
--dp-menu-border-color: var(--vts-color-border);
|
|
180
|
+
--dp-border-color-hover: var(--vts-color-borderLight);
|
|
181
|
+
--dp-border-color-focus: var(--vts-color-primary);
|
|
182
|
+
--dp-disabled-color: var(--vts-color-surface);
|
|
183
|
+
--dp-scroll-bar-background: var(--vts-color-surfaceElevated);
|
|
184
|
+
--dp-scroll-bar-color: var(--vts-color-muted);
|
|
185
|
+
--dp-success-color: var(--vts-color-success);
|
|
186
|
+
--dp-success-color-disabled: var(--vts-color-success);
|
|
187
|
+
--dp-icon-color: var(--vts-color-textSecondary);
|
|
188
|
+
--dp-danger-color: var(--vts-color-error);
|
|
189
|
+
--dp-marker-color: var(--vts-color-primary);
|
|
190
|
+
--dp-tooltip-color: var(--vts-color-surfaceElevated);
|
|
191
|
+
--dp-disabled-color-text: var(--vts-color-textSecondary);
|
|
192
|
+
--dp-highlight-color: color-mix(in srgb, var(--vts-color-primary) 12%, transparent);
|
|
193
|
+
--dp-range-between-dates-background-color: var(--dp-hover-color);
|
|
194
|
+
--dp-range-between-dates-text-color: var(--dp-hover-text-color);
|
|
195
|
+
--dp-range-between-border-color: var(--dp-hover-color);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
/* Keep VueDatePicker LTR even when the page is RTL */
|
|
200
|
+
.dp__main,
|
|
201
|
+
.dp__main * {
|
|
202
|
+
direction: ltr !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Undo RTL arrow rotation applied by library when any ancestor has dir="rtl" */
|
|
206
|
+
.dp__main .dp__inner_nav {
|
|
207
|
+
transform: none !important;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
/* Global tooltip styles for v-tooltip directive */
|
|
212
|
+
.vts-tooltip {
|
|
213
|
+
background-color: var(--vts-color-surfaceElevated);
|
|
214
|
+
color: var(--vts-color-text);
|
|
215
|
+
border: 1px solid var(--vts-color-border);
|
|
216
|
+
border-radius: var(--vts-radius-sm);
|
|
217
|
+
box-shadow: var(--vts-elevation-2, 0 4px 12px rgba(0, 0, 0, 0.12));
|
|
218
|
+
padding: 6px 10px;
|
|
219
|
+
max-width: 280px;
|
|
220
|
+
pointer-events: none; /* do not steal hover from activator */
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.vts-tooltip-content {
|
|
224
|
+
font-size: 0.875rem;
|
|
225
|
+
line-height: 1.25rem;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.vts-tooltip-arrow {
|
|
229
|
+
position: absolute;
|
|
230
|
+
background: var(--vts-color-surfaceElevated);
|
|
231
|
+
border-top: 1.5px solid var(--vts-color-border);
|
|
232
|
+
border-left: 1.5px solid var(--vts-color-border);
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
}
|