From 0c5f355b78384576bb7942c2f6dbce9d42428f87 Mon Sep 17 00:00:00 2001 From: SethSharp <58869086+SethSharp@users.noreply.github.com> Date: Mon, 3 Nov 2025 12:50:21 +1000 Subject: [PATCH] cooking --- documentation/src/App.vue | 3 + documentation/src/router/index.ts | 11 ++++ documentation/src/views/code/KpiCode.vue | 71 ++++++++++++++++++++++ documentation/src/views/components/Kpi.vue | 11 ++++ documentation/src/views/index.ts | 1 + ui/src/components/kpi/Kpi.vue | 24 ++++++++ ui/src/components/kpi/KpiContent.vue | 7 +++ ui/src/components/kpi/KpiCount.vue | 7 +++ ui/src/components/kpi/KpiIcon.vue | 14 +++++ ui/src/components/kpi/KpiTitle.vue | 7 +++ ui/src/components/kpi/index.ts | 26 ++++++++ ui/src/index.ts | 1 + 12 files changed, 183 insertions(+) create mode 100644 documentation/src/views/code/KpiCode.vue create mode 100644 documentation/src/views/components/Kpi.vue create mode 100644 ui/src/components/kpi/Kpi.vue create mode 100644 ui/src/components/kpi/KpiContent.vue create mode 100644 ui/src/components/kpi/KpiCount.vue create mode 100644 ui/src/components/kpi/KpiIcon.vue create mode 100644 ui/src/components/kpi/KpiTitle.vue create mode 100644 ui/src/components/kpi/index.ts diff --git a/documentation/src/App.vue b/documentation/src/App.vue index 0a75439..c9a2cc9 100644 --- a/documentation/src/App.vue +++ b/documentation/src/App.vue @@ -77,6 +77,9 @@ const routes = router.getRoutes().filter((route) => route.children.length > 0) Alpha + + New + diff --git a/documentation/src/router/index.ts b/documentation/src/router/index.ts index 23670f8..0f57e34 100644 --- a/documentation/src/router/index.ts +++ b/documentation/src/router/index.ts @@ -19,6 +19,7 @@ import { DropdownMenu, Empty, Inputs, + Kpi, Pagination, Popover, Select, @@ -203,6 +204,16 @@ const routes = [ label: 'Collection of Shadcn Components' }, }, + { + path: '/components/kpi', + name: 'Kpi', + component: Kpi, + meta: { + layout: ComponentLayout, + contributor: 'lumuix', + new: true, + }, + }, { path: '/components/pagination', name: 'Pagination', diff --git a/documentation/src/views/code/KpiCode.vue b/documentation/src/views/code/KpiCode.vue new file mode 100644 index 0000000..c5fcbb5 --- /dev/null +++ b/documentation/src/views/code/KpiCode.vue @@ -0,0 +1,71 @@ + + + + diff --git a/documentation/src/views/components/Kpi.vue b/documentation/src/views/components/Kpi.vue new file mode 100644 index 0000000..e2e38c2 --- /dev/null +++ b/documentation/src/views/components/Kpi.vue @@ -0,0 +1,11 @@ + + + diff --git a/documentation/src/views/index.ts b/documentation/src/views/index.ts index efc75ba..61d5f72 100644 --- a/documentation/src/views/index.ts +++ b/documentation/src/views/index.ts @@ -16,6 +16,7 @@ export { default as Draggable } from './components/Draggable.vue' export { default as DropdownMenu } from './components/DropdownMenu.vue' export { default as Empty } from './components/Empty.vue' export { default as Inputs } from './components/Inputs.vue' +export { default as Kpi } from './components/Kpi.vue' export { default as Pagination } from './components/Pagination.vue' export { default as Popover } from './components/Popover.vue' export { default as Lumuix } from './components/Lumuix.vue' diff --git a/ui/src/components/kpi/Kpi.vue b/ui/src/components/kpi/Kpi.vue new file mode 100644 index 0000000..95454f0 --- /dev/null +++ b/ui/src/components/kpi/Kpi.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/ui/src/components/kpi/KpiContent.vue b/ui/src/components/kpi/KpiContent.vue new file mode 100644 index 0000000..6524560 --- /dev/null +++ b/ui/src/components/kpi/KpiContent.vue @@ -0,0 +1,7 @@ + + + diff --git a/ui/src/components/kpi/KpiCount.vue b/ui/src/components/kpi/KpiCount.vue new file mode 100644 index 0000000..52fad2d --- /dev/null +++ b/ui/src/components/kpi/KpiCount.vue @@ -0,0 +1,7 @@ + + + diff --git a/ui/src/components/kpi/KpiIcon.vue b/ui/src/components/kpi/KpiIcon.vue new file mode 100644 index 0000000..214f421 --- /dev/null +++ b/ui/src/components/kpi/KpiIcon.vue @@ -0,0 +1,14 @@ + + + diff --git a/ui/src/components/kpi/KpiTitle.vue b/ui/src/components/kpi/KpiTitle.vue new file mode 100644 index 0000000..05e01cf --- /dev/null +++ b/ui/src/components/kpi/KpiTitle.vue @@ -0,0 +1,7 @@ + + + diff --git a/ui/src/components/kpi/index.ts b/ui/src/components/kpi/index.ts new file mode 100644 index 0000000..747286c --- /dev/null +++ b/ui/src/components/kpi/index.ts @@ -0,0 +1,26 @@ +import { cva, type VariantProps } from 'class-variance-authority' + +export { default as Kpi } from './Kpi.vue' +export { default as KpiContent } from './KpiContent.vue' +export { default as KpiCount } from './KpiCount.vue' +export { default as KpiIcon } from './KpiIcon.vue' +export { default as KpiTitle } from './KpiTitle.vue' + +export const kpiVariants = cva( + 'p-4 rounded-md flex-shrink-0 flex justify-center items-center', + { + variants: { + variant: { + primary: 'bg-primary/10 text-primary shadow-sm hover:bg-primary/80', + destructive: 'bg-destructive/10 text-destructive hover:bg-destructive/70', + warning: 'bg-warning/10 text-warning hover:bg-warning/70', + success: 'bg-green-500/10 text-green-500 hover:bg-green-500/70', + }, + }, + defaultVariants: { + variant: 'primary', + }, + }, +) + +export type KpiVariants = VariantProps \ No newline at end of file diff --git a/ui/src/index.ts b/ui/src/index.ts index b9f3854..e8cd1c9 100644 --- a/ui/src/index.ts +++ b/ui/src/index.ts @@ -16,6 +16,7 @@ export * from '@/components/dropdown-menu' export * from '@/components/empty' export * from '@/components/form' export * from '@/components/inputs' +export * from '@/components/kpi' export * from '@/components/chart' export * from '@/components/pagination' export * from '@/components/popover'