@gspa/ui 0.1.3 → 0.2.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/README.md +35 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js +205 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs +1 -0
- package/dist/DataTable.css +1 -0
- package/dist/DataTableToolBar.css +1 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-DimMUyA-.js +205 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-mEO-VA6R.cjs +1 -0
- package/dist/Header.css +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-C1OQn24h.cjs +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js +137 -0
- package/dist/Loader.css +1 -0
- package/dist/ReminderConfig.css +1 -0
- package/dist/ReusableForm.css +1 -0
- package/dist/Sidebar.css +1 -0
- package/dist/Toast.css +1 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/components/Accordion.cjs +1 -0
- package/dist/components/Accordion.js +192 -0
- package/dist/components/AccordionItem.cjs +1 -0
- package/dist/components/AccordionItem.js +109 -0
- package/dist/components/AddReminderModal.cjs +1 -0
- package/dist/components/AddReminderModal.js +107 -0
- package/dist/components/Alert.cjs +1 -0
- package/dist/components/Alert.js +227 -0
- package/dist/components/Avatar.cjs +1 -0
- package/dist/components/Avatar.js +86 -0
- package/dist/components/Badge.cjs +1 -0
- package/dist/components/Badge.js +109 -0
- package/dist/components/Breadcrumb.cjs +1 -0
- package/dist/components/Breadcrumb.js +72 -0
- package/dist/components/Button.cjs +1 -0
- package/dist/components/Button.js +4 -0
- package/dist/components/ButtonGroup.cjs +1 -0
- package/dist/components/ButtonGroup.js +46 -0
- package/dist/components/Calendar.cjs +1 -0
- package/dist/components/Calendar.js +341 -0
- package/dist/components/Card.cjs +1 -0
- package/dist/components/Card.js +316 -0
- package/dist/components/CardBody.cjs +1 -0
- package/dist/components/CardBody.js +34 -0
- package/dist/components/CardContent.cjs +1 -0
- package/dist/components/CardContent.js +17 -0
- package/dist/components/CardFooter.cjs +1 -0
- package/dist/components/CardFooter.js +34 -0
- package/dist/components/CardHeader.cjs +1 -0
- package/dist/components/CardHeader.js +91 -0
- package/dist/components/CardTitle.cjs +1 -0
- package/dist/components/CardTitle.js +17 -0
- package/dist/components/Checkbox.cjs +1 -0
- package/dist/components/Checkbox.js +185 -0
- package/dist/components/CircularProgress.cjs +1 -0
- package/dist/components/CircularProgress.js +141 -0
- package/dist/components/DataTable.cjs +1 -0
- package/dist/components/DataTable.js +863 -0
- package/dist/components/DataTableCell.cjs +1 -0
- package/dist/components/DataTableCell.js +95 -0
- package/dist/components/DataTableFilters.cjs +1 -0
- package/dist/components/DataTableFilters.js +519 -0
- package/dist/components/DataTableHeader.cjs +1 -0
- package/dist/components/DataTableHeader.js +116 -0
- package/dist/components/DataTablePagination.cjs +1 -0
- package/dist/components/DataTablePagination.js +290 -0
- package/dist/components/DataTableRow.cjs +1 -0
- package/dist/components/DataTableRow.js +199 -0
- package/dist/components/DataTableToolBar.cjs +1 -0
- package/dist/components/DataTableToolBar.js +477 -0
- package/dist/components/DatePicker.cjs +1 -0
- package/dist/components/DatePicker.js +401 -0
- package/dist/components/Divider.cjs +1 -0
- package/dist/components/Divider.js +103 -0
- package/dist/components/Dropdown.cjs +1 -0
- package/dist/components/Dropdown.js +104 -0
- package/dist/components/DropdownItem.cjs +1 -0
- package/dist/components/DropdownItem.js +60 -0
- package/dist/components/EventsCalendar.cjs +1 -0
- package/dist/components/EventsCalendar.js +863 -0
- package/dist/components/FileUpload.cjs +1 -0
- package/dist/components/FileUpload.js +195 -0
- package/dist/components/FilterDrawer.cjs +1 -0
- package/dist/components/FilterDrawer.js +412 -0
- package/dist/components/Footer.cjs +1 -0
- package/dist/components/Footer.js +157 -0
- package/dist/components/FormField.cjs +1 -0
- package/dist/components/FormField.js +4 -0
- package/dist/components/Graph.cjs +1 -0
- package/dist/components/Graph.js +164 -0
- package/dist/components/GraphFilters.cjs +1 -0
- package/dist/components/GraphFilters.js +305 -0
- package/dist/components/Header.cjs +1 -0
- package/dist/components/Header.js +674 -0
- package/dist/components/Icon.cjs +1 -0
- package/dist/components/Icon.js +58 -0
- package/dist/components/Image.cjs +1 -0
- package/dist/components/Image.js +112 -0
- package/dist/components/Input.cjs +1 -0
- package/dist/components/Input.js +4 -0
- package/dist/components/InputGroup.cjs +1 -0
- package/dist/components/InputGroup.js +45 -0
- package/dist/components/Label.cjs +1 -0
- package/dist/components/Label.js +46 -0
- package/dist/components/Link.cjs +1 -0
- package/dist/components/Link.js +119 -0
- package/dist/components/ListItem.cjs +1 -0
- package/dist/components/ListItem.js +89 -0
- package/dist/components/Loader.cjs +1 -0
- package/dist/components/Loader.js +154 -0
- package/dist/components/Logo.cjs +1 -0
- package/dist/components/Logo.js +67 -0
- package/dist/components/MenuItem.cjs +1 -0
- package/dist/components/MenuItem.js +66 -0
- package/dist/components/Modal.cjs +1 -0
- package/dist/components/Modal.js +110 -0
- package/dist/components/ModalBody.cjs +1 -0
- package/dist/components/ModalBody.js +33 -0
- package/dist/components/ModalFooter.cjs +1 -0
- package/dist/components/ModalFooter.js +33 -0
- package/dist/components/ModalHeader.cjs +1 -0
- package/dist/components/ModalHeader.js +24 -0
- package/dist/components/MultiSelect.cjs +1 -0
- package/dist/components/MultiSelect.js +211 -0
- package/dist/components/Notification.cjs +1 -0
- package/dist/components/Notification.js +121 -0
- package/dist/components/Option.cjs +1 -0
- package/dist/components/Option.js +44 -0
- package/dist/components/Progress.cjs +1 -0
- package/dist/components/Progress.js +77 -0
- package/dist/components/ProgressBar.cjs +1 -0
- package/dist/components/ProgressBar.js +101 -0
- package/dist/components/Radio.cjs +1 -0
- package/dist/components/Radio.js +81 -0
- package/dist/components/RailNav.cjs +1 -0
- package/dist/components/RailNav.js +124 -0
- package/dist/components/ReminderConfig.cjs +1 -0
- package/dist/components/ReminderConfig.js +375 -0
- package/dist/components/ReusableForm.cjs +1 -0
- package/dist/components/ReusableForm.js +686 -0
- package/dist/components/ReusableFormModal.cjs +1 -0
- package/dist/components/ReusableFormModal.js +112 -0
- package/dist/components/RightDrawer.cjs +1 -0
- package/dist/components/RightDrawer.js +143 -0
- package/dist/components/Search.cjs +1 -0
- package/dist/components/Search.js +252 -0
- package/dist/components/Select.cjs +1 -0
- package/dist/components/Select.js +243 -0
- package/dist/components/Sidebar.cjs +1 -0
- package/dist/components/Sidebar.js +372 -0
- package/dist/components/Slider.cjs +1 -0
- package/dist/components/Slider.js +42 -0
- package/dist/components/Spinner.cjs +1 -0
- package/dist/components/Spinner.js +87 -0
- package/dist/components/Stepper.cjs +1 -0
- package/dist/components/Stepper.js +12 -0
- package/dist/components/StepperItem.cjs +1 -0
- package/dist/components/StepperItem.js +33 -0
- package/dist/components/Switch.cjs +1 -0
- package/dist/components/Switch.js +112 -0
- package/dist/components/Tab.cjs +1 -0
- package/dist/components/Tab.js +134 -0
- package/dist/components/TabPanel.cjs +1 -0
- package/dist/components/TabPanel.js +49 -0
- package/dist/components/Text.cjs +1 -0
- package/dist/components/Text.js +84 -0
- package/dist/components/Textarea.cjs +1 -0
- package/dist/components/Textarea.js +102 -0
- package/dist/components/ThemeConfigurator.cjs +1 -0
- package/dist/components/ThemeConfigurator.js +73 -0
- package/dist/components/Timeline.cjs +1 -0
- package/dist/components/Timeline.js +24 -0
- package/dist/components/TimelineItem.cjs +1 -0
- package/dist/components/TimelineItem.js +63 -0
- package/dist/components/Toast.cjs +1 -0
- package/dist/components/Toast.js +231 -0
- package/dist/components/Tooltip.cjs +1 -0
- package/dist/components/Tooltip.js +124 -0
- package/dist/components/Typography.cjs +1 -0
- package/dist/components/Typography.js +267 -0
- package/dist/components/charts/BarChart.cjs +1 -0
- package/dist/components/charts/BarChart.js +323 -0
- package/dist/components/charts/LineChart.cjs +1 -0
- package/dist/components/charts/LineChart.js +322 -0
- package/dist/components/charts/PieChart.cjs +1 -0
- package/dist/components/charts/PieChart.js +311 -0
- package/dist/components/charts/StackedBarChart.cjs +1 -0
- package/dist/components/charts/StackedBarChart.js +348 -0
- package/dist/components/widgets/DashboardWidget.cjs +1 -0
- package/dist/components/widgets/DashboardWidget.js +309 -0
- package/dist/directives/tooltip.cjs +47 -0
- package/dist/directives/tooltip.js +115 -0
- package/dist/gspa-ui.css +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.esm.js +315 -19546
- package/dist/layouts/AuthLayout.cjs +1 -0
- package/dist/layouts/AuthLayout.js +188 -0
- package/dist/layouts/DashboardLayout.cjs +1 -0
- package/dist/layouts/DashboardLayout.js +244 -0
- package/dist/layouts/DefaultLayout.cjs +1 -0
- package/dist/layouts/DefaultLayout.js +94 -0
- package/dist/layouts/ErrorLayout.cjs +1 -0
- package/dist/layouts/ErrorLayout.js +452 -0
- package/dist/lib/auth.cjs +1 -0
- package/dist/lib/auth.js +4 -0
- package/dist/lib/form-field.cjs +1 -0
- package/dist/lib/form-field.js +4 -0
- package/dist/lib/icon.cjs +1 -0
- package/dist/lib/icon.js +4 -0
- package/dist/lib/theme.cjs +1 -0
- package/dist/lib/theme.js +145 -0
- package/dist/lib/toast.cjs +1 -0
- package/dist/lib/toast.js +81 -0
- package/dist/src/components/Alert.vue.d.ts.map +1 -1
- package/dist/src/components/Button.vue.d.ts +127 -29
- package/dist/src/components/Button.vue.d.ts.map +1 -1
- package/dist/src/components/Checkbox.vue.d.ts +2 -2
- package/dist/src/components/DataTable.vue.d.ts +1 -1
- package/dist/src/components/FormField.vue.d.ts +106 -38
- package/dist/src/components/FormField.vue.d.ts.map +1 -1
- package/dist/src/components/Icon.vue.d.ts.map +1 -1
- package/dist/src/components/Input.vue.d.ts +137 -33
- package/dist/src/components/Input.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableFormModal.vue.d.ts +1 -1
- package/dist/src/components/Textarea.vue.d.ts +2 -2
- package/dist/src/index.d.ts +9 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/layouts/AuthLayout.vue.d.ts +2 -0
- package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
- package/dist/src/lib/form-field.d.ts +2 -0
- package/dist/src/lib/form-field.d.ts.map +1 -0
- package/dist/src/lib/icon.d.ts +2 -0
- package/dist/src/lib/icon.d.ts.map +1 -0
- package/dist/src/lib/theme.d.ts +4 -0
- package/dist/src/lib/theme.d.ts.map +1 -1
- package/dist/src/types.d.ts +44 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/styles/auth-layout.css +1 -0
- package/dist/styles/button.css +1 -0
- package/dist/styles/form-field.css +1 -0
- package/dist/styles/input.css +1 -0
- package/dist/styles/tokens.css +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/cn.cjs +1 -0
- package/dist/utils/cn.js +7 -0
- package/package.json +45 -8
- package/dist/index.js +0 -605
- package/dist/src/__tests__/Alert.spec.d.ts +0 -2
- package/dist/src/__tests__/Alert.spec.d.ts.map +0 -1
- package/dist/src/__tests__/App.spec.d.ts +0 -2
- package/dist/src/__tests__/App.spec.d.ts.map +0 -1
- package/dist/src/__tests__/AuthLayout.spec.d.ts +0 -2
- package/dist/src/__tests__/AuthLayout.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Badge.spec.d.ts +0 -2
- package/dist/src/__tests__/Badge.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Button.spec.d.ts +0 -2
- package/dist/src/__tests__/Button.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Card.spec.d.ts +0 -2
- package/dist/src/__tests__/Card.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Checkbox.spec.d.ts +0 -2
- package/dist/src/__tests__/Checkbox.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Dropdown.spec.d.ts +0 -2
- package/dist/src/__tests__/Dropdown.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Input.spec.d.ts +0 -2
- package/dist/src/__tests__/Input.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Modal.spec.d.ts +0 -2
- package/dist/src/__tests__/Modal.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Radio.spec.d.ts +0 -2
- package/dist/src/__tests__/Radio.spec.d.ts.map +0 -1
- package/dist/src/__tests__/ReusableForm.spec.d.ts +0 -2
- package/dist/src/__tests__/ReusableForm.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Tabs.spec.d.ts +0 -2
- package/dist/src/__tests__/Tabs.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../utils/cn.cjs"),n=require("./Divider.cjs"),l=require("./Icon.cjs"),o=require("./Link.cjs"),u=require("./Logo.cjs"),r=require("./Text.cjs"),a=require("./Typography.cjs"),c={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12"},x={class:"grid grid-cols-1 md:grid-cols-4 gap-8"},f={class:"col-span-1 md:col-span-2"},m={class:"space-y-2"},N={class:"flex space-x-4"},V={class:"flex flex-col md:flex-row justify-between items-center"},p={class:"flex space-x-6 mt-4 md:mt-0"},v={__name:"Footer",props:{className:{type:String,default:""}},setup(d){return(s,t)=>(e.openBlock(),e.createElementBlock("footer",{class:e.normalizeClass(e.unref(i.cn)(" border-t ",d.className))},[e.createElementVNode("div",c,[e.createElementVNode("div",x,[e.createElementVNode("div",f,[e.renderSlot(s.$slots,"brand",{},()=>[e.createVNode(u.default,{class:"mb-4"}),e.createVNode(r.default,{class:"ui-text max-w-md"},{default:e.withCtx(()=>[...t[0]||(t[0]=[e.createTextVNode(" Building beautiful applications with modern Vue.js components. ",-1)])]),_:1})])]),e.createElementVNode("div",null,[e.renderSlot(s.$slots,"links",{},()=>[e.createVNode(a.default,{variant:"text-sm",class:"mb-4"},{default:e.withCtx(()=>[...t[1]||(t[1]=[e.createTextVNode(" Quick Links ",-1)])]),_:1}),e.createElementVNode("div",m,[e.createVNode(o.default,{href:"#",class:"block ui-text hover:text-(--ui-text)"},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode(" About ",-1)])]),_:1}),e.createVNode(o.default,{href:"#",class:"block ui-text hover:text-(--ui-text)"},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Services ",-1)])]),_:1}),e.createVNode(o.default,{href:"#",class:"block ui-text hover:text-(--ui-text)"},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Contact ",-1)])]),_:1})])])]),e.createElementVNode("div",null,[e.renderSlot(s.$slots,"social",{},()=>[e.createVNode(a.default,{variant:"text-sm",class:"mb-4"},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" Follow Us ",-1)])]),_:1}),e.createElementVNode("div",N,[e.createVNode(o.default,{href:"#",class:"ui-text hover:text-(--ui-text)"},{default:e.withCtx(()=>[e.createVNode(l.default,{name:"square-x-twitter",prefix:"fab",class:"h-5 w-5"})]),_:1}),e.createVNode(o.default,{href:"#",class:"ui-text hover:text-(--ui-text)"},{default:e.withCtx(()=>[e.createVNode(l.default,{name:"github",prefix:"fab",class:"h-5 w-5"})]),_:1})])])])]),e.createVNode(n.default,{class:"my-8"}),e.createElementVNode("div",V,[e.renderSlot(s.$slots,"copyright",{},()=>[e.createVNode(r.default,{class:"ui-text"},{default:e.withCtx(()=>[e.createTextVNode(" © "+e.toDisplayString(new Date().getFullYear())+" Your Company. All rights reserved. ",1)]),_:1})]),e.renderSlot(s.$slots,"legal",{},()=>[e.createElementVNode("div",p,[e.createVNode(o.default,{href:"#",class:"ui-text hover:text-(--ui-text)"},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode(" Privacy ",-1)])]),_:1}),e.createVNode(o.default,{href:"#",class:"ui-text hover:text-(--ui-text)"},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" Terms ",-1)])]),_:1})])])])])],2))}};exports.default=v;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { createElementBlock as d, openBlock as x, normalizeClass as c, unref as p, createElementVNode as l, createVNode as s, renderSlot as a, withCtx as e, createTextVNode as o, toDisplayString as _ } from "vue";
|
|
2
|
+
import { cn as v } from "../utils/cn.js";
|
|
3
|
+
import b from "./Divider.js";
|
|
4
|
+
import m from "./Icon.js";
|
|
5
|
+
import i from "./Link.js";
|
|
6
|
+
import g from "./Logo.js";
|
|
7
|
+
import f from "./Text.js";
|
|
8
|
+
import n from "./Typography.js";
|
|
9
|
+
const h = { class: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12" }, w = { class: "grid grid-cols-1 md:grid-cols-4 gap-8" }, $ = { class: "col-span-1 md:col-span-2" }, y = { class: "space-y-2" }, k = { class: "flex space-x-4" }, N = { class: "flex flex-col md:flex-row justify-between items-center" }, C = { class: "flex space-x-6 mt-4 md:mt-0" }, T = {
|
|
10
|
+
__name: "Footer",
|
|
11
|
+
props: {
|
|
12
|
+
className: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(u) {
|
|
18
|
+
return (r, t) => (x(), d("footer", {
|
|
19
|
+
class: c(p(v)(" border-t ", u.className))
|
|
20
|
+
}, [
|
|
21
|
+
l("div", h, [
|
|
22
|
+
l("div", w, [
|
|
23
|
+
l("div", $, [
|
|
24
|
+
a(r.$slots, "brand", {}, () => [
|
|
25
|
+
s(g, { class: "mb-4" }),
|
|
26
|
+
s(f, { class: "ui-text max-w-md" }, {
|
|
27
|
+
default: e(() => [...t[0] || (t[0] = [
|
|
28
|
+
o(" Building beautiful applications with modern Vue.js components. ", -1)
|
|
29
|
+
])]),
|
|
30
|
+
_: 1
|
|
31
|
+
})
|
|
32
|
+
])
|
|
33
|
+
]),
|
|
34
|
+
l("div", null, [
|
|
35
|
+
a(r.$slots, "links", {}, () => [
|
|
36
|
+
s(n, {
|
|
37
|
+
variant: "text-sm",
|
|
38
|
+
class: "mb-4"
|
|
39
|
+
}, {
|
|
40
|
+
default: e(() => [...t[1] || (t[1] = [
|
|
41
|
+
o(" Quick Links ", -1)
|
|
42
|
+
])]),
|
|
43
|
+
_: 1
|
|
44
|
+
}),
|
|
45
|
+
l("div", y, [
|
|
46
|
+
s(i, {
|
|
47
|
+
href: "#",
|
|
48
|
+
class: "block ui-text hover:text-(--ui-text)"
|
|
49
|
+
}, {
|
|
50
|
+
default: e(() => [...t[2] || (t[2] = [
|
|
51
|
+
o(" About ", -1)
|
|
52
|
+
])]),
|
|
53
|
+
_: 1
|
|
54
|
+
}),
|
|
55
|
+
s(i, {
|
|
56
|
+
href: "#",
|
|
57
|
+
class: "block ui-text hover:text-(--ui-text)"
|
|
58
|
+
}, {
|
|
59
|
+
default: e(() => [...t[3] || (t[3] = [
|
|
60
|
+
o(" Services ", -1)
|
|
61
|
+
])]),
|
|
62
|
+
_: 1
|
|
63
|
+
}),
|
|
64
|
+
s(i, {
|
|
65
|
+
href: "#",
|
|
66
|
+
class: "block ui-text hover:text-(--ui-text)"
|
|
67
|
+
}, {
|
|
68
|
+
default: e(() => [...t[4] || (t[4] = [
|
|
69
|
+
o(" Contact ", -1)
|
|
70
|
+
])]),
|
|
71
|
+
_: 1
|
|
72
|
+
})
|
|
73
|
+
])
|
|
74
|
+
])
|
|
75
|
+
]),
|
|
76
|
+
l("div", null, [
|
|
77
|
+
a(r.$slots, "social", {}, () => [
|
|
78
|
+
s(n, {
|
|
79
|
+
variant: "text-sm",
|
|
80
|
+
class: "mb-4"
|
|
81
|
+
}, {
|
|
82
|
+
default: e(() => [...t[5] || (t[5] = [
|
|
83
|
+
o(" Follow Us ", -1)
|
|
84
|
+
])]),
|
|
85
|
+
_: 1
|
|
86
|
+
}),
|
|
87
|
+
l("div", k, [
|
|
88
|
+
s(i, {
|
|
89
|
+
href: "#",
|
|
90
|
+
class: "ui-text hover:text-(--ui-text)"
|
|
91
|
+
}, {
|
|
92
|
+
default: e(() => [
|
|
93
|
+
s(m, {
|
|
94
|
+
name: "square-x-twitter",
|
|
95
|
+
prefix: "fab",
|
|
96
|
+
class: "h-5 w-5"
|
|
97
|
+
})
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
}),
|
|
101
|
+
s(i, {
|
|
102
|
+
href: "#",
|
|
103
|
+
class: "ui-text hover:text-(--ui-text)"
|
|
104
|
+
}, {
|
|
105
|
+
default: e(() => [
|
|
106
|
+
s(m, {
|
|
107
|
+
name: "github",
|
|
108
|
+
prefix: "fab",
|
|
109
|
+
class: "h-5 w-5"
|
|
110
|
+
})
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
})
|
|
114
|
+
])
|
|
115
|
+
])
|
|
116
|
+
])
|
|
117
|
+
]),
|
|
118
|
+
s(b, { class: "my-8" }),
|
|
119
|
+
l("div", N, [
|
|
120
|
+
a(r.$slots, "copyright", {}, () => [
|
|
121
|
+
s(f, { class: "ui-text" }, {
|
|
122
|
+
default: e(() => [
|
|
123
|
+
o(" © " + _((/* @__PURE__ */ new Date()).getFullYear()) + " Your Company. All rights reserved. ", 1)
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
})
|
|
127
|
+
]),
|
|
128
|
+
a(r.$slots, "legal", {}, () => [
|
|
129
|
+
l("div", C, [
|
|
130
|
+
s(i, {
|
|
131
|
+
href: "#",
|
|
132
|
+
class: "ui-text hover:text-(--ui-text)"
|
|
133
|
+
}, {
|
|
134
|
+
default: e(() => [...t[6] || (t[6] = [
|
|
135
|
+
o(" Privacy ", -1)
|
|
136
|
+
])]),
|
|
137
|
+
_: 1
|
|
138
|
+
}),
|
|
139
|
+
s(i, {
|
|
140
|
+
href: "#",
|
|
141
|
+
class: "ui-text hover:text-(--ui-text)"
|
|
142
|
+
}, {
|
|
143
|
+
default: e(() => [...t[7] || (t[7] = [
|
|
144
|
+
o(" Terms ", -1)
|
|
145
|
+
])]),
|
|
146
|
+
_: 1
|
|
147
|
+
})
|
|
148
|
+
])
|
|
149
|
+
])
|
|
150
|
+
])
|
|
151
|
+
])
|
|
152
|
+
], 2));
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
export {
|
|
156
|
+
T as default
|
|
157
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../FormField.vue_vue_type_script_setup_true_lang-mEO-VA6R.cjs");exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("class-variance-authority"),r=require("../utils/cn.cjs"),p={class:"flex items-start justify-between"},u={class:"flex-1 min-w-0"},m={key:0,class:"shrink-0 ml-4"},g="text-lg font-semibold ui-text truncate",f="text-sm ui-text mt-1",v={__name:"Graph",props:{variant:{type:String,default:"default",validator:t=>["default","outlined","elevated","filled"].includes(t)},padding:{type:String,default:"md",validator:t=>["none","sm","md","lg","xl"].includes(t)},title:String,description:String},setup(t){const l=a.cva("rounded-lg overflow-hidden transition-all duration-200",{variants:{variant:{default:" border ",outlined:" border-2 ",elevated:" shadow-lg border ",filled:" border "},padding:{none:"",sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"}},defaultVariants:{variant:"default",padding:"md"}}),o=a.cva("border-b ui-border-strong last:border-b-0",{variants:{padding:{none:"p-4 pb-0",sm:"px-3 pt-3",md:"px-4 pt-4",lg:"px-6 pt-6",xl:"px-8 pt-8"}}}),s=a.cva("border-b ui-border-strong",{variants:{padding:{none:"p-4 pb-0",sm:"px-3 py-3",md:"px-4 py-4",lg:"px-6 py-6",xl:"px-8 py-8"}}}),d=a.cva("",{variants:{padding:{none:"p-4",sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"}}}),i=a.cva("border-t ui-border-strong bg-[color:color-mix(in oklab, var(--ui-surface), transparent 50%)]",{variants:{padding:{none:"p-4 pt-0",sm:"px-3 pb-3",md:"px-4 pb-4",lg:"px-6 pb-6",xl:"px-8 pb-8"}}}),c=a.cva("border-t ui-border-strong bg-[color:color-mix(in oklab, var(--ui-surface), transparent 50%)]",{variants:{padding:{none:"p-4 pt-0",sm:"px-3 pb-3",md:"px-4 pb-4",lg:"px-6 pb-6",xl:"px-8 pb-8"}}});return(n,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r.cn)(e.unref(l)({variant:t.variant,padding:t.padding})))},[n.$slots.header||t.title||t.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r.cn)(e.unref(o)({padding:t.padding})))},[e.renderSlot(n.$slots,"header",{},()=>[e.createElementVNode("div",p,[e.createElementVNode("div",u,[t.title?(e.openBlock(),e.createElementBlock("h3",{key:0,class:e.normalizeClass(g)},e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(f)},e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)]),n.$slots.actions?(e.openBlock(),e.createElementBlock("div",m,[e.renderSlot(n.$slots,"actions")])):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0),n.$slots.filters?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r.cn)(e.unref(s)({padding:t.padding})))},[e.renderSlot(n.$slots,"filters")],2)):e.createCommentVNode("",!0),n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(r.cn)(e.unref(d)({padding:t.padding})))},[e.renderSlot(n.$slots,"default")],2)):e.createCommentVNode("",!0),n.$slots.legend?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(r.cn)(e.unref(i)({padding:t.padding})))},[e.renderSlot(n.$slots,"legend")],2)):e.createCommentVNode("",!0),n.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(e.unref(r.cn)(e.unref(c)({padding:t.padding})))},[e.renderSlot(n.$slots,"footer")],2)):e.createCommentVNode("",!0)],2))}};exports.default=v;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { createElementBlock as n, openBlock as d, normalizeClass as s, unref as a, createCommentVNode as i, renderSlot as r, createElementVNode as p, toDisplayString as g } from "vue";
|
|
2
|
+
import { cva as l } from "class-variance-authority";
|
|
3
|
+
import { cn as o } from "../utils/cn.js";
|
|
4
|
+
const x = { class: "flex items-start justify-between" }, y = { class: "flex-1 min-w-0" }, h = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "shrink-0 ml-4"
|
|
7
|
+
}, k = "text-lg font-semibold ui-text truncate", $ = "text-sm ui-text mt-1", B = {
|
|
8
|
+
__name: "Graph",
|
|
9
|
+
props: {
|
|
10
|
+
variant: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "default",
|
|
13
|
+
validator: (t) => ["default", "outlined", "elevated", "filled"].includes(t)
|
|
14
|
+
},
|
|
15
|
+
padding: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "md",
|
|
18
|
+
validator: (t) => ["none", "sm", "md", "lg", "xl"].includes(t)
|
|
19
|
+
},
|
|
20
|
+
title: String,
|
|
21
|
+
description: String
|
|
22
|
+
},
|
|
23
|
+
setup(t) {
|
|
24
|
+
const u = l(
|
|
25
|
+
"rounded-lg overflow-hidden transition-all duration-200",
|
|
26
|
+
{
|
|
27
|
+
variants: {
|
|
28
|
+
variant: {
|
|
29
|
+
default: " border ",
|
|
30
|
+
outlined: " border-2 ",
|
|
31
|
+
elevated: " shadow-lg border ",
|
|
32
|
+
filled: " border "
|
|
33
|
+
},
|
|
34
|
+
padding: {
|
|
35
|
+
none: "",
|
|
36
|
+
sm: "p-3",
|
|
37
|
+
md: "p-4",
|
|
38
|
+
lg: "p-6",
|
|
39
|
+
xl: "p-8"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "default",
|
|
44
|
+
padding: "md"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
), c = l(
|
|
48
|
+
"border-b ui-border-strong last:border-b-0",
|
|
49
|
+
{
|
|
50
|
+
variants: {
|
|
51
|
+
padding: {
|
|
52
|
+
none: "p-4 pb-0",
|
|
53
|
+
sm: "px-3 pt-3",
|
|
54
|
+
md: "px-4 pt-4",
|
|
55
|
+
lg: "px-6 pt-6",
|
|
56
|
+
xl: "px-8 pt-8"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
), m = l(
|
|
61
|
+
"border-b ui-border-strong",
|
|
62
|
+
{
|
|
63
|
+
variants: {
|
|
64
|
+
padding: {
|
|
65
|
+
none: "p-4 pb-0",
|
|
66
|
+
sm: "px-3 py-3",
|
|
67
|
+
md: "px-4 py-4",
|
|
68
|
+
lg: "px-6 py-6",
|
|
69
|
+
xl: "px-8 py-8"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
), b = l("", {
|
|
74
|
+
variants: {
|
|
75
|
+
padding: {
|
|
76
|
+
none: "p-4",
|
|
77
|
+
sm: "p-3",
|
|
78
|
+
md: "p-4",
|
|
79
|
+
lg: "p-6",
|
|
80
|
+
xl: "p-8"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}), f = l(
|
|
84
|
+
"border-t ui-border-strong bg-[color:color-mix(in oklab, var(--ui-surface), transparent 50%)]",
|
|
85
|
+
{
|
|
86
|
+
variants: {
|
|
87
|
+
padding: {
|
|
88
|
+
none: "p-4 pt-0",
|
|
89
|
+
sm: "px-3 pb-3",
|
|
90
|
+
md: "px-4 pb-4",
|
|
91
|
+
lg: "px-6 pb-6",
|
|
92
|
+
xl: "px-8 pb-8"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
), v = l(
|
|
97
|
+
"border-t ui-border-strong bg-[color:color-mix(in oklab, var(--ui-surface), transparent 50%)]",
|
|
98
|
+
{
|
|
99
|
+
variants: {
|
|
100
|
+
padding: {
|
|
101
|
+
none: "p-4 pt-0",
|
|
102
|
+
sm: "px-3 pb-3",
|
|
103
|
+
md: "px-4 pb-4",
|
|
104
|
+
lg: "px-6 pb-6",
|
|
105
|
+
xl: "px-8 pb-8"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
return (e, V) => (d(), n("div", {
|
|
111
|
+
class: s(a(o)(a(u)({ variant: t.variant, padding: t.padding })))
|
|
112
|
+
}, [
|
|
113
|
+
e.$slots.header || t.title || t.description ? (d(), n("div", {
|
|
114
|
+
key: 0,
|
|
115
|
+
class: s(a(o)(a(c)({ padding: t.padding })))
|
|
116
|
+
}, [
|
|
117
|
+
r(e.$slots, "header", {}, () => [
|
|
118
|
+
p("div", x, [
|
|
119
|
+
p("div", y, [
|
|
120
|
+
t.title ? (d(), n("h3", {
|
|
121
|
+
key: 0,
|
|
122
|
+
class: s(k)
|
|
123
|
+
}, g(t.title), 1)) : i("", !0),
|
|
124
|
+
t.description ? (d(), n("p", {
|
|
125
|
+
key: 1,
|
|
126
|
+
class: s($)
|
|
127
|
+
}, g(t.description), 1)) : i("", !0)
|
|
128
|
+
]),
|
|
129
|
+
e.$slots.actions ? (d(), n("div", h, [
|
|
130
|
+
r(e.$slots, "actions")
|
|
131
|
+
])) : i("", !0)
|
|
132
|
+
])
|
|
133
|
+
])
|
|
134
|
+
], 2)) : i("", !0),
|
|
135
|
+
e.$slots.filters ? (d(), n("div", {
|
|
136
|
+
key: 1,
|
|
137
|
+
class: s(a(o)(a(m)({ padding: t.padding })))
|
|
138
|
+
}, [
|
|
139
|
+
r(e.$slots, "filters")
|
|
140
|
+
], 2)) : i("", !0),
|
|
141
|
+
e.$slots.default ? (d(), n("div", {
|
|
142
|
+
key: 2,
|
|
143
|
+
class: s(a(o)(a(b)({ padding: t.padding })))
|
|
144
|
+
}, [
|
|
145
|
+
r(e.$slots, "default")
|
|
146
|
+
], 2)) : i("", !0),
|
|
147
|
+
e.$slots.legend ? (d(), n("div", {
|
|
148
|
+
key: 3,
|
|
149
|
+
class: s(a(o)(a(f)({ padding: t.padding })))
|
|
150
|
+
}, [
|
|
151
|
+
r(e.$slots, "legend")
|
|
152
|
+
], 2)) : i("", !0),
|
|
153
|
+
e.$slots.footer ? (d(), n("div", {
|
|
154
|
+
key: 4,
|
|
155
|
+
class: s(a(o)(a(v)({ padding: t.padding })))
|
|
156
|
+
}, [
|
|
157
|
+
r(e.$slots, "footer")
|
|
158
|
+
], 2)) : i("", !0)
|
|
159
|
+
], 2));
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
export {
|
|
163
|
+
B as default
|
|
164
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("class-variance-authority"),D=require("../utils/cn.cjs"),m=require("../Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs"),y=require("./Select.cjs"),u=require("./Icon.cjs"),$={class:"border-b"},q={key:0,class:"flex items-center gap-3 min-w-64"},A={class:"relative flex-1"},R={class:"relative flex-1"},U={key:1,class:"min-w-40"},L={class:"relative"},M={key:2,class:"min-w-40"},I={class:"relative"},P=["value"],j={key:3,class:"flex items-center gap-2"},G={class:"flex items-center gap-3 ml-auto"},O={class:"flex items-center gap-3 flex-wrap"},H=["onClick"],J={__name:"GraphFilters",props:{showDateFilter:{type:Boolean,default:!0},showChartTypeFilter:{type:Boolean,default:!0},showExport:{type:Boolean,default:!1},showRefresh:{type:Boolean,default:!0},dataSources:{type:Array,default:()=>[]},variant:{type:String,default:"default",validator:o=>["default","minimal","bordered"].includes(o)},padding:{type:String,default:"normal",validator:o=>["compact","normal","comfortable"].includes(o)}},emits:["update:dateFrom","update:dateTo","update:chartType","update:dataSource","export","refresh","clear-filters"],setup(o,{emit:h}){const c=o,i=h,r=e.ref(""),s=e.ref(""),d=e.ref("bar"),n=e.ref(""),g=z.cva("flex flex-wrap items-center gap-4",{variants:{variant:{default:"",minimal:"bg-transparent",bordered:""},padding:{compact:"px-4 py-3",normal:"px-6 py-4",comfortable:"px-8 py-6"}},defaultVariants:{variant:"default",padding:"normal"}}),x=e.computed(()=>r.value||s.value||n.value),p=e.computed(()=>{const l=[];if(r.value||s.value){let t="";r.value&&s.value?t=`${r.value} to ${s.value}`:r.value?t=`From ${r.value}`:s.value&&(t=`Until ${s.value}`),t&&l.push({key:"date",label:"Date Range",value:t,icon:"calendar"})}if(n.value){const t=c.dataSources.find(a=>a.value===n.value);l.push({key:"dataSource",label:"Data Source",value:t?.label||n.value,icon:"database"})}return l}),C=e.computed(()=>D.cn(g({variant:c.variant,padding:c.padding}))),v=e.computed(()=>"w-full pl-10 pr-3 py-2 border ui-border-strong rounded-lg focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:border-transparent text-sm ui-surface "),f=e.computed(()=>"w-full pr-8 appearance-none border ui-border-strong rounded-lg focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:border-transparent text-sm py-2 pl-3 ui-surface "),V=e.computed(()=>"ui-text hover:text-(--ui-text) border hover:brightness-105 px-3 py-2 rounded-lg text-sm font-medium transition-all"),k=e.computed(()=>"ui-text ui-primary-bg hover:bg-(--ui-primary-strong) border border-(--ui-primary) px-3 py-2 rounded-lg text-sm font-medium transition-all"),b=e.computed(()=>"ui-text hover:text-(--ui-text) border hover:brightness-105 px-3 py-2 rounded-lg text-sm font-medium transition-all"),N=e.computed(()=>"px-6 py-3 ui-primary-soft border-t border-(--ui-primary-soft)"),B=e.computed(()=>"text-sm font-semibold ui-primary"),w=e.computed(()=>"flex items-center gap-1.5 ui-surface border border-(--ui-primary-soft) ui-primary px-3 py-1.5 rounded-full text-sm font-medium"),E=e.computed(()=>"ui-primary hover:text-(--ui-primary) ml-1 hover:bg-(--ui-primary-soft) rounded-full p-0.5 transition-all"),F=l=>{d.value=l.target.value,i("update:chartType",l.target.value)},S=l=>{n.value=l.target.value,i("update:dataSource",l.target.value)},T=()=>{r.value="",s.value="",n.value="",i("clear-filters")},_=l=>{switch(l){case"date":r.value="",s.value="";break;case"dataSource":n.value="";break}};return e.watch(()=>r.value,l=>{i("update:dateFrom",l)}),e.watch(()=>s.value,l=>{i("update:dateTo",l)}),(l,t)=>(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("div",{class:e.normalizeClass(C.value)},[o.showDateFilter?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",A,[e.createVNode(u.default,{icon:"calendar",class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>r.value=a),type:"date",class:e.normalizeClass(v.value),placeholder:"From date"},null,2),[[e.vModelText,r.value]])]),t[6]||(t[6]=e.createElementVNode("span",{class:"ui-text text-sm"},"to",-1)),e.createElementVNode("div",R,[e.createVNode(u.default,{icon:"calendar",class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>s.value=a),type:"date",class:e.normalizeClass(v.value),placeholder:"To date"},null,2),[[e.vModelText,s.value]])])])):e.createCommentVNode("",!0),o.showChartTypeFilter?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",L,[e.createVNode(y.default,{modelValue:d.value,"onUpdate:modelValue":t[2]||(t[2]=a=>d.value=a),class:e.normalizeClass(f.value),onChange:F},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createElementVNode("option",{value:"bar"}," Bar Chart ",-1),e.createElementVNode("option",{value:"line"}," Line Chart ",-1),e.createElementVNode("option",{value:"pie"}," Pie Chart ",-1)])]),_:1},8,["modelValue","class"]),e.createVNode(u.default,{icon:"chart-bar",class:"absolute right-2 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text pointer-events-none"})])])):e.createCommentVNode("",!0),o.dataSources.length>0?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",I,[e.createVNode(y.default,{modelValue:n.value,"onUpdate:modelValue":t[3]||(t[3]=a=>n.value=a),class:e.normalizeClass(f.value),onChange:S},{default:e.withCtx(()=>[t[8]||(t[8]=e.createElementVNode("option",{value:""}," All Sources ",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.dataSources,a=>(e.openBlock(),e.createElementBlock("option",{key:a.value,value:a.value},e.toDisplayString(a.label),9,P))),128))]),_:1},8,["modelValue","class"]),e.createVNode(u.default,{icon:"database",class:"absolute right-2 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text pointer-events-none"})])])):e.createCommentVNode("",!0),l.$slots.filters?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(l.$slots,"filters")])):e.createCommentVNode("",!0),e.createElementVNode("div",G,[x.value?(e.openBlock(),e.createBlock(m._sfc_main,{key:0,class:e.normalizeClass(V.value),onClick:T},{default:e.withCtx(()=>[e.createVNode(u.default,{icon:"rotate-left",class:"w-4 h-4 mr-2"}),t[9]||(t[9]=e.createTextVNode(" Clear Filters ",-1))]),_:1},8,["class"])):e.createCommentVNode("",!0),o.showExport?(e.openBlock(),e.createBlock(m._sfc_main,{key:1,class:e.normalizeClass(k.value),onClick:t[4]||(t[4]=a=>l.$emit("export"))},{default:e.withCtx(()=>[e.createVNode(u.default,{icon:"download",class:"w-4 h-4 mr-2"}),t[10]||(t[10]=e.createTextVNode(" Export ",-1))]),_:1},8,["class"])):e.createCommentVNode("",!0),o.showRefresh?(e.openBlock(),e.createBlock(m._sfc_main,{key:2,class:e.normalizeClass(b.value),onClick:t[5]||(t[5]=a=>l.$emit("refresh"))},{default:e.withCtx(()=>[e.createVNode(u.default,{icon:"sync",class:"w-4 h-4 mr-2"}),t[11]||(t[11]=e.createTextVNode(" Refresh ",-1))]),_:1},8,["class"])):e.createCommentVNode("",!0)])],2),p.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(N.value)},[e.createElementVNode("div",O,[e.createElementVNode("span",{class:e.normalizeClass(B.value)},"Active filters:",2),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.key,class:e.normalizeClass(w.value)},[e.createVNode(u.default,{icon:a.icon,class:"w-3 h-3"},null,8,["icon"]),e.createElementVNode("span",null,e.toDisplayString(a.label)+": "+e.toDisplayString(a.value),1),e.createElementVNode("button",{class:e.normalizeClass(E.value),onClick:K=>_(a.key)},[e.createVNode(u.default,{icon:"circle-xmark",class:"w-3 h-3"})],10,H)],2))),128))])],2)):e.createCommentVNode("",!0)]))}};exports.default=J;
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { ref as h, computed as r, watch as $, createElementBlock as c, openBlock as s, createElementVNode as l, createCommentVNode as m, normalizeClass as o, createVNode as d, withDirectives as T, vModelText as B, withCtx as y, Fragment as D, renderList as E, toDisplayString as b, renderSlot as O, createBlock as C, createTextVNode as w } from "vue";
|
|
2
|
+
import { cva as Q } from "class-variance-authority";
|
|
3
|
+
import { cn as W } from "../utils/cn.js";
|
|
4
|
+
import { _ as k } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
|
|
5
|
+
import R from "./Select.js";
|
|
6
|
+
import v from "./Icon.js";
|
|
7
|
+
const X = { class: "border-b" }, Y = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "flex items-center gap-3 min-w-64"
|
|
10
|
+
}, Z = { class: "relative flex-1" }, ee = { class: "relative flex-1" }, te = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "min-w-40"
|
|
13
|
+
}, ae = { class: "relative" }, le = {
|
|
14
|
+
key: 2,
|
|
15
|
+
class: "min-w-40"
|
|
16
|
+
}, se = { class: "relative" }, re = ["value"], oe = {
|
|
17
|
+
key: 3,
|
|
18
|
+
class: "flex items-center gap-2"
|
|
19
|
+
}, ne = { class: "flex items-center gap-3 ml-auto" }, ie = { class: "flex items-center gap-3 flex-wrap" }, ue = ["onClick"], he = {
|
|
20
|
+
__name: "GraphFilters",
|
|
21
|
+
props: {
|
|
22
|
+
showDateFilter: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
showChartTypeFilter: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
},
|
|
30
|
+
showExport: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
showRefresh: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !0
|
|
37
|
+
},
|
|
38
|
+
dataSources: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: () => []
|
|
41
|
+
},
|
|
42
|
+
variant: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "default",
|
|
45
|
+
validator: (n) => ["default", "minimal", "bordered"].includes(n)
|
|
46
|
+
},
|
|
47
|
+
padding: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "normal",
|
|
50
|
+
validator: (n) => ["compact", "normal", "comfortable"].includes(n)
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: [
|
|
54
|
+
"update:dateFrom",
|
|
55
|
+
"update:dateTo",
|
|
56
|
+
"update:chartType",
|
|
57
|
+
"update:dataSource",
|
|
58
|
+
"export",
|
|
59
|
+
"refresh",
|
|
60
|
+
"clear-filters"
|
|
61
|
+
],
|
|
62
|
+
setup(n, { emit: U }) {
|
|
63
|
+
const g = n, f = U, i = h(""), u = h(""), x = h("bar"), p = h(""), A = Q("flex flex-wrap items-center gap-4", {
|
|
64
|
+
variants: {
|
|
65
|
+
variant: {
|
|
66
|
+
default: "",
|
|
67
|
+
minimal: "bg-transparent",
|
|
68
|
+
bordered: ""
|
|
69
|
+
},
|
|
70
|
+
padding: {
|
|
71
|
+
compact: "px-4 py-3",
|
|
72
|
+
normal: "px-6 py-4",
|
|
73
|
+
comfortable: "px-8 py-6"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
defaultVariants: {
|
|
77
|
+
variant: "default",
|
|
78
|
+
padding: "normal"
|
|
79
|
+
}
|
|
80
|
+
}), N = r(() => i.value || u.value || p.value), F = r(() => {
|
|
81
|
+
const a = [];
|
|
82
|
+
if (i.value || u.value) {
|
|
83
|
+
let e = "";
|
|
84
|
+
i.value && u.value ? e = `${i.value} to ${u.value}` : i.value ? e = `From ${i.value}` : u.value && (e = `Until ${u.value}`), e && a.push({
|
|
85
|
+
key: "date",
|
|
86
|
+
label: "Date Range",
|
|
87
|
+
value: e,
|
|
88
|
+
icon: "calendar"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (p.value) {
|
|
92
|
+
const e = g.dataSources.find((t) => t.value === p.value);
|
|
93
|
+
a.push({
|
|
94
|
+
key: "dataSource",
|
|
95
|
+
label: "Data Source",
|
|
96
|
+
value: e?.label || p.value,
|
|
97
|
+
icon: "database"
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return a;
|
|
101
|
+
}), _ = r(
|
|
102
|
+
() => W(A({
|
|
103
|
+
variant: g.variant,
|
|
104
|
+
padding: g.padding
|
|
105
|
+
}))
|
|
106
|
+
), S = r(
|
|
107
|
+
() => "w-full pl-10 pr-3 py-2 border ui-border-strong rounded-lg focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:border-transparent text-sm ui-surface "
|
|
108
|
+
), V = r(
|
|
109
|
+
() => "w-full pr-8 appearance-none border ui-border-strong rounded-lg focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:border-transparent text-sm py-2 pl-3 ui-surface "
|
|
110
|
+
), L = r(
|
|
111
|
+
() => "ui-text hover:text-(--ui-text) border hover:brightness-105 px-3 py-2 rounded-lg text-sm font-medium transition-all"
|
|
112
|
+
), z = r(
|
|
113
|
+
() => "ui-text ui-primary-bg hover:bg-(--ui-primary-strong) border border-(--ui-primary) px-3 py-2 rounded-lg text-sm font-medium transition-all"
|
|
114
|
+
), G = r(
|
|
115
|
+
() => "ui-text hover:text-(--ui-text) border hover:brightness-105 px-3 py-2 rounded-lg text-sm font-medium transition-all"
|
|
116
|
+
), I = r(
|
|
117
|
+
() => "px-6 py-3 ui-primary-soft border-t border-(--ui-primary-soft)"
|
|
118
|
+
), M = r(
|
|
119
|
+
() => "text-sm font-semibold ui-primary"
|
|
120
|
+
), P = r(
|
|
121
|
+
() => "flex items-center gap-1.5 ui-surface border border-(--ui-primary-soft) ui-primary px-3 py-1.5 rounded-full text-sm font-medium"
|
|
122
|
+
), j = r(
|
|
123
|
+
() => "ui-primary hover:text-(--ui-primary) ml-1 hover:bg-(--ui-primary-soft) rounded-full p-0.5 transition-all"
|
|
124
|
+
), q = (a) => {
|
|
125
|
+
x.value = a.target.value, f("update:chartType", a.target.value);
|
|
126
|
+
}, H = (a) => {
|
|
127
|
+
p.value = a.target.value, f("update:dataSource", a.target.value);
|
|
128
|
+
}, J = () => {
|
|
129
|
+
i.value = "", u.value = "", p.value = "", f("clear-filters");
|
|
130
|
+
}, K = (a) => {
|
|
131
|
+
switch (a) {
|
|
132
|
+
case "date":
|
|
133
|
+
i.value = "", u.value = "";
|
|
134
|
+
break;
|
|
135
|
+
case "dataSource":
|
|
136
|
+
p.value = "";
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
return $(() => i.value, (a) => {
|
|
141
|
+
f("update:dateFrom", a);
|
|
142
|
+
}), $(() => u.value, (a) => {
|
|
143
|
+
f("update:dateTo", a);
|
|
144
|
+
}), (a, e) => (s(), c("div", X, [
|
|
145
|
+
l("div", {
|
|
146
|
+
class: o(_.value)
|
|
147
|
+
}, [
|
|
148
|
+
n.showDateFilter ? (s(), c("div", Y, [
|
|
149
|
+
l("div", Z, [
|
|
150
|
+
d(v, {
|
|
151
|
+
icon: "calendar",
|
|
152
|
+
class: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text"
|
|
153
|
+
}),
|
|
154
|
+
T(l("input", {
|
|
155
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => i.value = t),
|
|
156
|
+
type: "date",
|
|
157
|
+
class: o(S.value),
|
|
158
|
+
placeholder: "From date"
|
|
159
|
+
}, null, 2), [
|
|
160
|
+
[B, i.value]
|
|
161
|
+
])
|
|
162
|
+
]),
|
|
163
|
+
e[6] || (e[6] = l("span", { class: "ui-text text-sm" }, "to", -1)),
|
|
164
|
+
l("div", ee, [
|
|
165
|
+
d(v, {
|
|
166
|
+
icon: "calendar",
|
|
167
|
+
class: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text"
|
|
168
|
+
}),
|
|
169
|
+
T(l("input", {
|
|
170
|
+
"onUpdate:modelValue": e[1] || (e[1] = (t) => u.value = t),
|
|
171
|
+
type: "date",
|
|
172
|
+
class: o(S.value),
|
|
173
|
+
placeholder: "To date"
|
|
174
|
+
}, null, 2), [
|
|
175
|
+
[B, u.value]
|
|
176
|
+
])
|
|
177
|
+
])
|
|
178
|
+
])) : m("", !0),
|
|
179
|
+
n.showChartTypeFilter ? (s(), c("div", te, [
|
|
180
|
+
l("div", ae, [
|
|
181
|
+
d(R, {
|
|
182
|
+
modelValue: x.value,
|
|
183
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => x.value = t),
|
|
184
|
+
class: o(V.value),
|
|
185
|
+
onChange: q
|
|
186
|
+
}, {
|
|
187
|
+
default: y(() => [...e[7] || (e[7] = [
|
|
188
|
+
l("option", { value: "bar" }, " Bar Chart ", -1),
|
|
189
|
+
l("option", { value: "line" }, " Line Chart ", -1),
|
|
190
|
+
l("option", { value: "pie" }, " Pie Chart ", -1)
|
|
191
|
+
])]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["modelValue", "class"]),
|
|
194
|
+
d(v, {
|
|
195
|
+
icon: "chart-bar",
|
|
196
|
+
class: "absolute right-2 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text pointer-events-none"
|
|
197
|
+
})
|
|
198
|
+
])
|
|
199
|
+
])) : m("", !0),
|
|
200
|
+
n.dataSources.length > 0 ? (s(), c("div", le, [
|
|
201
|
+
l("div", se, [
|
|
202
|
+
d(R, {
|
|
203
|
+
modelValue: p.value,
|
|
204
|
+
"onUpdate:modelValue": e[3] || (e[3] = (t) => p.value = t),
|
|
205
|
+
class: o(V.value),
|
|
206
|
+
onChange: H
|
|
207
|
+
}, {
|
|
208
|
+
default: y(() => [
|
|
209
|
+
e[8] || (e[8] = l("option", { value: "" }, " All Sources ", -1)),
|
|
210
|
+
(s(!0), c(D, null, E(n.dataSources, (t) => (s(), c("option", {
|
|
211
|
+
key: t.value,
|
|
212
|
+
value: t.value
|
|
213
|
+
}, b(t.label), 9, re))), 128))
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
}, 8, ["modelValue", "class"]),
|
|
217
|
+
d(v, {
|
|
218
|
+
icon: "database",
|
|
219
|
+
class: "absolute right-2 top-1/2 transform -translate-y-1/2 w-4 h-4 ui-text pointer-events-none"
|
|
220
|
+
})
|
|
221
|
+
])
|
|
222
|
+
])) : m("", !0),
|
|
223
|
+
a.$slots.filters ? (s(), c("div", oe, [
|
|
224
|
+
O(a.$slots, "filters")
|
|
225
|
+
])) : m("", !0),
|
|
226
|
+
l("div", ne, [
|
|
227
|
+
N.value ? (s(), C(k, {
|
|
228
|
+
key: 0,
|
|
229
|
+
class: o(L.value),
|
|
230
|
+
onClick: J
|
|
231
|
+
}, {
|
|
232
|
+
default: y(() => [
|
|
233
|
+
d(v, {
|
|
234
|
+
icon: "rotate-left",
|
|
235
|
+
class: "w-4 h-4 mr-2"
|
|
236
|
+
}),
|
|
237
|
+
e[9] || (e[9] = w(" Clear Filters ", -1))
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["class"])) : m("", !0),
|
|
241
|
+
n.showExport ? (s(), C(k, {
|
|
242
|
+
key: 1,
|
|
243
|
+
class: o(z.value),
|
|
244
|
+
onClick: e[4] || (e[4] = (t) => a.$emit("export"))
|
|
245
|
+
}, {
|
|
246
|
+
default: y(() => [
|
|
247
|
+
d(v, {
|
|
248
|
+
icon: "download",
|
|
249
|
+
class: "w-4 h-4 mr-2"
|
|
250
|
+
}),
|
|
251
|
+
e[10] || (e[10] = w(" Export ", -1))
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
}, 8, ["class"])) : m("", !0),
|
|
255
|
+
n.showRefresh ? (s(), C(k, {
|
|
256
|
+
key: 2,
|
|
257
|
+
class: o(G.value),
|
|
258
|
+
onClick: e[5] || (e[5] = (t) => a.$emit("refresh"))
|
|
259
|
+
}, {
|
|
260
|
+
default: y(() => [
|
|
261
|
+
d(v, {
|
|
262
|
+
icon: "sync",
|
|
263
|
+
class: "w-4 h-4 mr-2"
|
|
264
|
+
}),
|
|
265
|
+
e[11] || (e[11] = w(" Refresh ", -1))
|
|
266
|
+
]),
|
|
267
|
+
_: 1
|
|
268
|
+
}, 8, ["class"])) : m("", !0)
|
|
269
|
+
])
|
|
270
|
+
], 2),
|
|
271
|
+
F.value.length > 0 ? (s(), c("div", {
|
|
272
|
+
key: 0,
|
|
273
|
+
class: o(I.value)
|
|
274
|
+
}, [
|
|
275
|
+
l("div", ie, [
|
|
276
|
+
l("span", {
|
|
277
|
+
class: o(M.value)
|
|
278
|
+
}, "Active filters:", 2),
|
|
279
|
+
(s(!0), c(D, null, E(F.value, (t) => (s(), c("div", {
|
|
280
|
+
key: t.key,
|
|
281
|
+
class: o(P.value)
|
|
282
|
+
}, [
|
|
283
|
+
d(v, {
|
|
284
|
+
icon: t.icon,
|
|
285
|
+
class: "w-3 h-3"
|
|
286
|
+
}, null, 8, ["icon"]),
|
|
287
|
+
l("span", null, b(t.label) + ": " + b(t.value), 1),
|
|
288
|
+
l("button", {
|
|
289
|
+
class: o(j.value),
|
|
290
|
+
onClick: (de) => K(t.key)
|
|
291
|
+
}, [
|
|
292
|
+
d(v, {
|
|
293
|
+
icon: "circle-xmark",
|
|
294
|
+
class: "w-3 h-3"
|
|
295
|
+
})
|
|
296
|
+
], 10, ue)
|
|
297
|
+
], 2))), 128))
|
|
298
|
+
])
|
|
299
|
+
], 2)) : m("", !0)
|
|
300
|
+
]));
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
export {
|
|
304
|
+
he as default
|
|
305
|
+
};
|