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,178 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:dir="selectedDirection !== '' ? selectedDirection : ''"
|
|
4
|
+
:class="[faruma, margin, border, rounded ? `rounded-${rounded}` : '', shadow, cardClass, width, bg, `relative`,]"
|
|
5
|
+
>
|
|
6
|
+
<!-- Card Header -->
|
|
7
|
+
<div
|
|
8
|
+
v-if="$slots.header || title || selectedlabels.title "
|
|
9
|
+
class="overflow-clip "
|
|
10
|
+
>
|
|
11
|
+
<slot name="header">
|
|
12
|
+
<div
|
|
13
|
+
:class="[headerClass, headerBg, headerPadding, topRoundedClass, headerBd , headerText, `overflow-hidden`]"
|
|
14
|
+
>
|
|
15
|
+
<h3 :class="[titleClass, headerTextSize ]">
|
|
16
|
+
{{ selectedlabels.title ? selectedlabels.title : props.title }}
|
|
17
|
+
</h3>
|
|
18
|
+
</div>
|
|
19
|
+
</slot>
|
|
20
|
+
</div> <!-- Card Body -->
|
|
21
|
+
<div :class="[bodyClass, padding, textColor, textSize]">
|
|
22
|
+
<slot :attrs="controlAttrs">
|
|
23
|
+
{{ selectedlabels.body ? selectedlabels.body : '' }}
|
|
24
|
+
</slot>
|
|
25
|
+
</div> <!-- Card Footer -->
|
|
26
|
+
<div
|
|
27
|
+
v-if="$slots.footer"
|
|
28
|
+
:class="[footerClass, footerBg, footerText, footerTextSize, footerBd, footerMargin, footerPadding, bottomRoundedClass ]"
|
|
29
|
+
>
|
|
30
|
+
<slot name="footer">
|
|
31
|
+
{{ selectedlabels.footer ? selectedlabels.footer : '' }}
|
|
32
|
+
</slot>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup>
|
|
38
|
+
// import { provide } from 'vue'
|
|
39
|
+
import { useLanguageSelected } from '../../pgo-components/lib/componentConfig'
|
|
40
|
+
import { computed, inject, ref, provide } from 'vue'
|
|
41
|
+
const { language } = inject('i18n')
|
|
42
|
+
|
|
43
|
+
// console.log('language in Card.vue', language.value)
|
|
44
|
+
// provide('lang', language)
|
|
45
|
+
|
|
46
|
+
const props = defineProps({
|
|
47
|
+
//main card props
|
|
48
|
+
lang: { type: String, default: '' },
|
|
49
|
+
labels: { type: [String, Object], default: () => ({
|
|
50
|
+
en: {
|
|
51
|
+
title: '',
|
|
52
|
+
body: '',
|
|
53
|
+
footer: ''
|
|
54
|
+
},
|
|
55
|
+
dv: {
|
|
56
|
+
title: '',
|
|
57
|
+
body: '',
|
|
58
|
+
footer: ''
|
|
59
|
+
}
|
|
60
|
+
}) },
|
|
61
|
+
id: { type: String, default: '' },
|
|
62
|
+
width: { type: String, default: '' },
|
|
63
|
+
title: { type: [String, Object], default: '' },
|
|
64
|
+
cardClass: { type: String, default: '' },
|
|
65
|
+
overflow: { type: String, default: 'overflow-auto' },
|
|
66
|
+
bg: { type: String, default: 'bg-background-color' },
|
|
67
|
+
border: { type: String, default: 'border border-input-border' },
|
|
68
|
+
rounded: { type: String, default: '' },
|
|
69
|
+
shadow: { type: String, default: '' },
|
|
70
|
+
dir: { type: String, default: '' },
|
|
71
|
+
item: { type: Object, default: null },
|
|
72
|
+
|
|
73
|
+
//body props
|
|
74
|
+
bodyClass: { type: String, default: '' },
|
|
75
|
+
margin: { type: String, default: 'mx-0 my-6' },
|
|
76
|
+
padding: { type: String, default: 'px-6 py-4' },
|
|
77
|
+
textColor: { type: String, default: 'text-input-text' },
|
|
78
|
+
textSize: { type: String, default: 'text-base' },
|
|
79
|
+
|
|
80
|
+
// header props
|
|
81
|
+
headerClass: { type: String, default: '' },
|
|
82
|
+
titleClass: { type: String, default: '' },
|
|
83
|
+
headerBg: { type: String, default: '' },
|
|
84
|
+
headerText: { type: String, default: 'text-input-text' },
|
|
85
|
+
headerTextSize: { type: String, default: 'text-lg font-semibold' },
|
|
86
|
+
headerBd: { type: String, default: '' },
|
|
87
|
+
headerMargin: { type: String, default: '' },
|
|
88
|
+
headerPadding: { type: String, default: 'px-6 pt-4' },
|
|
89
|
+
|
|
90
|
+
//footer props
|
|
91
|
+
footerClass: { type: String, default: '' },
|
|
92
|
+
footerBg: { type: String, default: '' },
|
|
93
|
+
footerText: { type: String, default: 'text-input-text' },
|
|
94
|
+
footerTextSize: { type: String, default: '' },
|
|
95
|
+
footerBd: { type: String, default: '' },
|
|
96
|
+
footerMargin: { type: String, default: '' },
|
|
97
|
+
footerPadding: { type: String, default: 'px-6 py-4' },
|
|
98
|
+
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
const selectedDirection = computed(() => {
|
|
102
|
+
let selected = ''
|
|
103
|
+
if (props.dir == 'rtl') selected = 'rtl'
|
|
104
|
+
else if (props.lang == 'dv') selected = 'rtl'
|
|
105
|
+
else if (props.dir == 'ltr') selected = 'ltr'
|
|
106
|
+
else if (props.lang == 'en') selected = 'ltr'
|
|
107
|
+
else selected = ''
|
|
108
|
+
return selected
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
const selectLanguage = computed(() => {
|
|
112
|
+
let Selected = ''
|
|
113
|
+
if (props.lang != ''){
|
|
114
|
+
Selected = props.lang
|
|
115
|
+
}
|
|
116
|
+
else if (props.dir == 'rtl') {
|
|
117
|
+
Selected = 'dv'
|
|
118
|
+
}
|
|
119
|
+
else if (props.dir == 'ltr') {
|
|
120
|
+
Selected = 'en'
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
Selected = language.value
|
|
124
|
+
}
|
|
125
|
+
console.log('selectLanguage in Card222:', Selected)
|
|
126
|
+
return (Selected === 'dv') ? 'dv' : 'en'
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
// Provide dir and lang to child components - MOVED HERE AFTER COMPUTED
|
|
130
|
+
provide('parentDir', selectedDirection.value)
|
|
131
|
+
provide('parentLang', selectLanguage.value)
|
|
132
|
+
|
|
133
|
+
const controlAttrs = computed(() => ({
|
|
134
|
+
id: props.id,
|
|
135
|
+
dir: selectedDirection.value,
|
|
136
|
+
lang: selectLanguage.value,
|
|
137
|
+
}));
|
|
138
|
+
|
|
139
|
+
const faruma = computed(() => {
|
|
140
|
+
if (selectLanguage.value == 'dv') return 'faruma'
|
|
141
|
+
return ''
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
const selectedlabels = computed(() => {
|
|
145
|
+
return useLanguageSelected(props.labels, selectLanguage.value, '')
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
// console.log('selectedlabels in Card:', selectedlabels.value.title)
|
|
149
|
+
|
|
150
|
+
const topRoundedClass = computed(() => {
|
|
151
|
+
switch (props.rounded) {
|
|
152
|
+
case 'sm': return 'rounded-t-sm'
|
|
153
|
+
case 'md': return 'rounded-t-md'
|
|
154
|
+
case 'lg': return 'rounded-t-lg'
|
|
155
|
+
case 'xl': return 'rounded-t-xl'
|
|
156
|
+
case '2xl': return 'rounded-t-2xl'
|
|
157
|
+
case '3xl': return 'rounded-t-3xl'
|
|
158
|
+
case 'full': return 'rounded-t-full'
|
|
159
|
+
default: return 'rounded-t-lg'
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
})
|
|
163
|
+
const bottomRoundedClass = computed(() => {
|
|
164
|
+
switch (props.rounded) {
|
|
165
|
+
case 'sm': return 'rounded-b-sm'
|
|
166
|
+
case 'md': return 'rounded-b-md'
|
|
167
|
+
case 'lg': return 'rounded-b-lg'
|
|
168
|
+
case 'xl': return 'rounded-b-xl'
|
|
169
|
+
case '2xl': return 'rounded-b-2xl'
|
|
170
|
+
case '3xl': return 'rounded-b-3xl'
|
|
171
|
+
case 'full': return 'rounded-b-full'
|
|
172
|
+
default: return 'rounded-b-lg'
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
</script>
|
|
178
|
+
<style scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Model
|
|
3
|
+
v-model="showConfirmation"
|
|
4
|
+
persistent
|
|
5
|
+
lang="en"
|
|
6
|
+
|
|
7
|
+
title="Confirm Update"
|
|
8
|
+
>
|
|
9
|
+
<v-slot />
|
|
10
|
+
<template #footer>
|
|
11
|
+
<div class="flex justify-end gap-2">
|
|
12
|
+
<Button
|
|
13
|
+
label="Cancel"
|
|
14
|
+
color="secondary"
|
|
15
|
+
variant="outlined"
|
|
16
|
+
@click="cancelUpdate"
|
|
17
|
+
/>
|
|
18
|
+
<Button
|
|
19
|
+
label="Confirm"
|
|
20
|
+
color="primary"
|
|
21
|
+
:loading="updateLoading"
|
|
22
|
+
@click="confirmUpdate"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
</Model>
|
|
27
|
+
|
|
28
|
+
</template>
|
|
29
|
+
<script setup >
|
|
30
|
+
import { ref } from 'vue'
|
|
31
|
+
import Model from './Modal.vue'
|
|
32
|
+
</script>
|