2020-12-19 00:14:06 +00:00
|
|
|
import Vue from 'vue';
|
2020-12-19 01:27:50 +00:00
|
|
|
import VueTailwind from 'vue-tailwind';
|
2021-01-23 02:50:32 +00:00
|
|
|
import VueDraggableResizable from 'vue-draggable-resizable';
|
2021-03-14 07:36:14 +00:00
|
|
|
|
2020-12-19 01:27:50 +00:00
|
|
|
import {
|
|
|
|
TInput,
|
|
|
|
TTextarea,
|
|
|
|
TSelect,
|
|
|
|
TRadio,
|
|
|
|
TCheckbox,
|
|
|
|
TButton,
|
|
|
|
TInputGroup,
|
|
|
|
TCard,
|
|
|
|
TAlert,
|
|
|
|
TModal,
|
|
|
|
TDropdown,
|
|
|
|
TRichSelect,
|
|
|
|
TPagination,
|
|
|
|
TTag,
|
|
|
|
TRadioGroup,
|
|
|
|
TCheckboxGroup,
|
|
|
|
TTable,
|
|
|
|
TDatepicker,
|
|
|
|
TToggle,
|
|
|
|
TDialog,
|
|
|
|
} from 'vue-tailwind/dist/components';
|
2020-12-27 02:42:26 +00:00
|
|
|
import Dashboard from './Dashboard.vue';
|
2020-12-19 00:14:06 +00:00
|
|
|
import router from './router';
|
|
|
|
import store from './store';
|
2021-01-10 08:29:38 +00:00
|
|
|
// optionally import default styles
|
2021-01-23 02:50:32 +00:00
|
|
|
import 'vue-draggable-resizable/dist/VueDraggableResizable.css';
|
2021-03-20 03:45:10 +00:00
|
|
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
2021-03-27 04:16:15 +00:00
|
|
|
import { faMousePointer, faFont, faFillDrip, faPaintBrush, faEyeDropper, faEraser, faSync } from '@fortawesome/free-solid-svg-icons'
|
2021-03-20 03:45:10 +00:00
|
|
|
import { faSquare } from '@fortawesome/free-regular-svg-icons'
|
|
|
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
|
|
|
2021-03-27 04:16:15 +00:00
|
|
|
library.add(faMousePointer, faSquare, faFont, faFillDrip, faPaintBrush, faEyeDropper, faEraser, faSync)
|
2020-12-19 01:45:52 +00:00
|
|
|
|
2020-12-19 00:14:06 +00:00
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
2020-12-19 01:27:50 +00:00
|
|
|
const settings = {
|
|
|
|
// Use the following syntax
|
|
|
|
// {component-name}: {
|
|
|
|
// component: {importedComponentObject},
|
|
|
|
// props: {
|
|
|
|
// {propToOverride}: {newDefaultValue}
|
|
|
|
// {propToOverride2}: {newDefaultValue2}
|
|
|
|
// }
|
|
|
|
// }
|
2021-01-10 08:29:38 +00:00
|
|
|
't-card': {
|
|
|
|
component: TCard,
|
|
|
|
props: {
|
|
|
|
fixedClasses: {
|
|
|
|
wrapper: 'border rounded shadow-sm ',
|
|
|
|
body: 'p-3',
|
|
|
|
header: 'border-b p-3 rounded-t',
|
2021-01-23 02:50:32 +00:00
|
|
|
footer: 'border-t p-3 rounded-b',
|
2021-01-10 08:29:38 +00:00
|
|
|
},
|
|
|
|
classes: {
|
|
|
|
wrapper: 'bg-white border-gray-100',
|
|
|
|
body: '',
|
|
|
|
header: 'border-gray-100',
|
2021-01-23 02:50:32 +00:00
|
|
|
footer: 'border-gray-100',
|
2021-01-10 08:29:38 +00:00
|
|
|
},
|
|
|
|
variants: {
|
|
|
|
danger: {
|
|
|
|
wrapper: 'bg-red-50 text-red-700 border-red-200',
|
|
|
|
header: 'border-red-200 text-red-700',
|
2021-01-23 02:50:32 +00:00
|
|
|
footer: 'border-red-200 text-red-700',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-01-10 08:29:38 +00:00
|
|
|
},
|
2020-12-19 01:27:50 +00:00
|
|
|
't-input': {
|
|
|
|
component: TInput,
|
|
|
|
props: {
|
|
|
|
classes: 'border-2 block w-full rounded text-gray-800',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
't-textarea': {
|
|
|
|
component: TTextarea,
|
|
|
|
props: {
|
|
|
|
classes: 'border-2 block w-full rounded text-gray-800',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
't-button': {
|
|
|
|
component: TButton,
|
|
|
|
props: {
|
|
|
|
classes: 'text-white bg-green-500 border border-transparent rounded shadow-sm hover:bg-green-600',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
't-modal': {
|
|
|
|
component: TModal,
|
|
|
|
fixedClasses: {
|
|
|
|
overlay: 'z-40 overflow-auto scrolling-touch left-0 top-0 bottom-0 right-0 w-full h-full fixed bg-opacity-50',
|
|
|
|
wrapper: 'relative mx-auto z-50 max-w-lg px-3 py-12',
|
|
|
|
modal: 'overflow-visible relative rounded',
|
|
|
|
body: 'p-3',
|
|
|
|
header: 'border-b p-3 rounded-t',
|
|
|
|
footer: ' p-3 rounded-b',
|
|
|
|
close: 'flex items-center justify-center rounded-full absolute right-0 top-0 -m-3 h-8 w-8 transition duration-100 ease-in-out focus:ring-2 focus:ring-blue-500 focus:outline-none focus:ring-opacity-50',
|
|
|
|
},
|
|
|
|
classes: {
|
|
|
|
overlay: 'bg-black',
|
|
|
|
wrapper: '',
|
|
|
|
modal: 'bg-white shadow',
|
|
|
|
body: 'p-3',
|
|
|
|
header: 'border-gray-100',
|
|
|
|
footer: 'bg-gray-100',
|
|
|
|
close: 'bg-gray-100 text-gray-600 hover:bg-gray-200',
|
|
|
|
closeIcon: 'fill-current h-4 w-4',
|
|
|
|
overlayEnterClass: '',
|
|
|
|
overlayEnterActiveClass: 'opacity-0 transition ease-out duration-100',
|
|
|
|
overlayEnterToClass: 'opacity-100',
|
|
|
|
overlayLeaveClass: 'transition ease-in opacity-100',
|
|
|
|
overlayLeaveActiveClass: '',
|
|
|
|
overlayLeaveToClass: 'opacity-0 duration-75',
|
|
|
|
enterClass: '',
|
|
|
|
enterActiveClass: '',
|
|
|
|
enterToClass: '',
|
|
|
|
leaveClass: '',
|
|
|
|
leaveActiveClass: '',
|
|
|
|
leaveToClass: '',
|
|
|
|
},
|
|
|
|
variants: {
|
|
|
|
danger: {
|
|
|
|
overlay: 'bg-red-100',
|
|
|
|
header: 'border-red-50 text-red-700',
|
|
|
|
close: 'bg-red-50 text-red-700 hover:bg-red-200 border-red-100 border',
|
|
|
|
modal: 'bg-white border border-red-100 shadow-lg',
|
|
|
|
footer: 'bg-red-50',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
2021-03-27 02:07:33 +00:00
|
|
|
't-checkbox': {
|
|
|
|
component: TCheckbox,
|
|
|
|
props: {
|
|
|
|
wrapped: true,
|
|
|
|
classes: {
|
|
|
|
label: 'text-sm uppercase mx-2 text-gray-700',
|
|
|
|
input: 'text-blue-500 transition duration-100 ease-in-out border-gray-300 rounded shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 focus:ring-offset-0 disabled:opacity-50 disabled:cursor-not-allowed',
|
|
|
|
inputWrapper: 'inline-flex',
|
|
|
|
wrapper: 'flex items-center',
|
|
|
|
// labelChecked: '',
|
|
|
|
// inputWrapperChecked: '',
|
|
|
|
// wrapperChecked: '',
|
|
|
|
}
|
|
|
|
// Variants and fixed classes in the same `object` format ...
|
|
|
|
}
|
|
|
|
},
|
2020-12-19 01:27:50 +00:00
|
|
|
// ...Rest of the components
|
|
|
|
};
|
|
|
|
|
|
|
|
Vue.use(VueTailwind, settings);
|
2021-03-20 03:45:10 +00:00
|
|
|
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
2021-01-23 02:50:32 +00:00
|
|
|
Vue.component('vue-draggable-resizable', VueDraggableResizable);
|
2020-12-19 01:27:50 +00:00
|
|
|
|
2020-12-19 00:14:06 +00:00
|
|
|
new Vue({
|
|
|
|
router,
|
|
|
|
store,
|
2020-12-27 02:42:26 +00:00
|
|
|
render: (h) => h(Dashboard),
|
2020-12-19 00:14:06 +00:00
|
|
|
}).$mount('#app');
|