From 77c6a1604052d382d819d84f2b4986a2efcc7cc4 Mon Sep 17 00:00:00 2001
From: zernonia <59365435+zernonia@users.noreply.github.com>
Date: Wed, 1 May 2024 11:34:58 +0800
Subject: [PATCH] feat: Charts (#166)
* chore: update unovis deps
* chore: update color to use the themePrimary
* docs: use gradient for overview component
* docs: add themePopover to MainLayout
* docs: enable global theme on every page
* feat: introduce area, line, bar, donut chart
* feat: add more props
* fix: revert old pipeline
* fix: patch @unovis/vue deps
* fix: patch @unovis/vue deps again
* chore: revert unovis/ts to 1.2.1
* chore: wip
* docs: add alpha tag, fix tooltipo styling
* docs: add charts installations step
* feat: use generic, add better color
* chore: build registry
* feat: improve generic props
* chore: build registry
* docs: add alpha label
* fix: collapsible not open correctly
* docs: add badge to mobile nav
* chore: better types
* chore: run registry
* chore: wip
* fix: crosshair issue
* chore: fix type, import missing error
* chore: build registry
* chore: arrange interface, expose margin, slot
* chore: build registry
* docs: guide page
feat: add prop to barchart
* chore: fix pnpm-lock
* chore: add feature
* chore: run build registry
* refactor: change color var
* feat: codegen
* chore: add meta tables
* feat: add line, area example
* feat: bar and donut examples
* docs: codege
* chore: build registry
* docs: improve chart doc
* chore: fix missing icon package
---
.../.vitepress/theme/components/APITable.vue | 26 ++
.../.vitepress/theme/components/MobileNav.vue | 18 +-
.../theme/components/ThemePopover.vue | 47 +++
apps/www/.vitepress/theme/components/index.ts | 1 +
.../theme/components/theming/Theming.vue | 4 +-
.../theme/components/theming/utils/data.ts | 30 ++
apps/www/.vitepress/theme/config/docs.ts | 61 +---
.../.vitepress/theme/layout/DocsLayout.vue | 15 +-
.../.vitepress/theme/layout/MainLayout.vue | 3 +
apps/www/.vitepress/theme/style.css | 17 +-
apps/www/.vitepress/theme/styles/vp-doc.css | 4 +-
apps/www/__registry__/index.ts | 210 +++++++++++++
apps/www/package.json | 9 +-
apps/www/scripts/autogen.ts | 150 +++++++++
apps/www/src/content/docs/charts.md | 107 +++++++
apps/www/src/content/docs/charts/area.md | 46 +++
apps/www/src/content/docs/charts/bar.md | 50 +++
apps/www/src/content/docs/charts/donut.md | 52 ++++
apps/www/src/content/docs/charts/line.md | 46 +++
apps/www/src/content/docs/components/toast.md | 2 +-
apps/www/src/content/meta/AreaChart.md | 116 +++++++
apps/www/src/content/meta/BarChart.md | 116 +++++++
apps/www/src/content/meta/ChartCrosshair.md | 29 ++
apps/www/src/content/meta/ChartLegend.md | 22 ++
.../src/content/meta/ChartSingleTooltip.md | 43 +++
apps/www/src/content/meta/ChartTooltip.md | 16 +
apps/www/src/content/meta/DonutChart.md | 82 +++++
apps/www/src/content/meta/LineChart.md | 109 +++++++
.../dashboard/components/Overview.vue | 28 +-
.../example/AreaChartCustomTooltip.vue | 23 ++
.../default/example/AreaChartDemo.vue | 17 ++
.../default/example/AreaChartSparkline.vue | 33 ++
.../default/example/BarChartCustomTooltip.vue | 28 ++
.../registry/default/example/BarChartDemo.vue | 26 ++
.../default/example/BarChartRounded.vue | 27 ++
.../default/example/BarChartStacked.vue | 27 ++
.../registry/default/example/CardStats.vue | 11 +-
.../default/example/Cards/ActivityGoal.vue | 11 +-
.../registry/default/example/Cards/Metric.vue | 7 +-
.../default/example/CustomChartTooltip.vue | 26 ++
.../default/example/DonutChartColor.vue | 24 ++
.../example/DonutChartCustomTooltip.vue | 22 ++
.../default/example/DonutChartDemo.vue | 20 ++
.../default/example/DonutChartPie.vue | 21 ++
.../example/LineChartCustomTooltip.vue | 281 +++++++++++++++++
.../default/example/LineChartDemo.vue | 279 +++++++++++++++++
.../default/example/LineChartSparkline.vue | 285 ++++++++++++++++++
.../lib/registry/default/ui/button/index.ts | 1 +
.../default/ui/chart-area/AreaChart.vue | 135 +++++++++
.../registry/default/ui/chart-area/index.ts | 1 +
.../default/ui/chart-bar/BarChart.vue | 114 +++++++
.../registry/default/ui/chart-bar/index.ts | 1 +
.../default/ui/chart-donut/DonutChart.vue | 99 ++++++
.../registry/default/ui/chart-donut/index.ts | 1 +
.../default/ui/chart-line/LineChart.vue | 104 +++++++
.../registry/default/ui/chart-line/index.ts | 1 +
.../default/ui/chart/ChartCrosshair.vue | 44 +++
.../registry/default/ui/chart/ChartLegend.vue | 50 +++
.../default/ui/chart/ChartSingleTooltip.vue | 63 ++++
.../default/ui/chart/ChartTooltip.vue | 40 +++
.../lib/registry/default/ui/chart/index.ts | 18 ++
.../registry/default/ui/chart/interface.ts | 64 ++++
.../example/AreaChartCustomTooltip.vue | 23 ++
.../new-york/example/AreaChartDemo.vue | 17 ++
.../new-york/example/AreaChartSparkline.vue | 33 ++
.../example/BarChartCustomTooltip.vue | 28 ++
.../new-york/example/BarChartDemo.vue | 26 ++
.../new-york/example/BarChartRounded.vue | 27 ++
.../new-york/example/BarChartStacked.vue | 27 ++
.../registry/new-york/example/CardStats.vue | 77 ++---
.../new-york/example/Cards/ActivityGoal.vue | 8 +-
.../new-york/example/Cards/Metric.vue | 7 +-
.../new-york/example/CustomChartTooltip.vue | 26 ++
.../new-york/example/DonutChartColor.vue | 24 ++
.../example/DonutChartCustomTooltip.vue | 22 ++
.../new-york/example/DonutChartDemo.vue | 23 ++
.../new-york/example/DonutChartPie.vue | 21 ++
.../example/LineChartCustomTooltip.vue | 281 +++++++++++++++++
.../new-york/example/LineChartDemo.vue | 279 +++++++++++++++++
.../new-york/example/LineChartSparkline.vue | 285 ++++++++++++++++++
.../lib/registry/new-york/ui/button/index.ts | 1 +
.../new-york/ui/chart-area/AreaChart.vue | 135 +++++++++
.../registry/new-york/ui/chart-area/index.ts | 1 +
.../new-york/ui/chart-bar/BarChart.vue | 115 +++++++
.../registry/new-york/ui/chart-bar/index.ts | 1 +
.../new-york/ui/chart-donut/DonutChart.vue | 99 ++++++
.../registry/new-york/ui/chart-donut/index.ts | 1 +
.../new-york/ui/chart-line/LineChart.vue | 104 +++++++
.../registry/new-york/ui/chart-line/index.ts | 1 +
.../new-york/ui/chart/ChartCrosshair.vue | 44 +++
.../new-york/ui/chart/ChartLegend.vue | 51 ++++
.../new-york/ui/chart/ChartSingleTooltip.vue | 63 ++++
.../new-york/ui/chart/ChartTooltip.vue | 40 +++
.../lib/registry/new-york/ui/chart/index.ts | 18 ++
.../registry/new-york/ui/chart/interface.ts | 64 ++++
apps/www/src/lib/registry/registry.ts | 1 +
apps/www/src/public/registry/colors/gray.json | 2 +-
.../www/src/public/registry/colors/index.json | 2 +-
apps/www/src/public/registry/colors/lime.json | 2 +-
.../src/public/registry/colors/neutral.json | 2 +-
.../www/src/public/registry/colors/slate.json | 2 +-
.../www/src/public/registry/colors/stone.json | 2 +-
apps/www/src/public/registry/colors/zinc.json | 2 +-
apps/www/src/public/registry/index.json | 89 ++++++
.../registry/styles/default/accordion.json | 2 +-
.../registry/styles/default/alert-dialog.json | 2 +-
.../public/registry/styles/default/alert.json | 2 +-
.../registry/styles/default/area-chart.json | 19 ++
.../registry/styles/default/aspect-ratio.json | 2 +-
.../registry/styles/default/avatar.json | 2 +-
.../public/registry/styles/default/badge.json | 2 +-
.../registry/styles/default/breadcrumb.json | 2 +-
.../registry/styles/default/button.json | 4 +-
.../public/registry/styles/default/card.json | 2 +-
.../registry/styles/default/carousel.json | 2 +-
.../registry/styles/default/chart-area.json | 23 ++
.../registry/styles/default/chart-bar.json | 23 ++
.../registry/styles/default/chart-donut.json | 23 ++
.../registry/styles/default/chart-line.json | 23 ++
.../public/registry/styles/default/chart.json | 39 +++
.../registry/styles/default/checkbox.json | 2 +-
.../registry/styles/default/collapsible.json | 2 +-
.../registry/styles/default/command.json | 2 +-
.../registry/styles/default/context-menu.json | 2 +-
.../registry/styles/default/dialog.json | 2 +-
.../registry/styles/default/drawer.json | 2 +-
.../styles/default/dropdown-menu.json | 2 +-
.../public/registry/styles/default/form.json | 2 +-
.../registry/styles/default/hover-card.json | 2 +-
.../public/registry/styles/default/input.json | 2 +-
.../public/registry/styles/default/label.json | 2 +-
.../registry/styles/default/menubar.json | 2 +-
.../styles/default/navigation-menu.json | 2 +-
.../registry/styles/default/pagination.json | 2 +-
.../registry/styles/default/pin-input.json | 2 +-
.../registry/styles/default/popover.json | 2 +-
.../registry/styles/default/progress.json | 2 +-
.../registry/styles/default/radio-group.json | 2 +-
.../registry/styles/default/resizable.json | 2 +-
.../registry/styles/default/scroll-area.json | 2 +-
.../registry/styles/default/select.json | 2 +-
.../registry/styles/default/separator.json | 2 +-
.../public/registry/styles/default/sheet.json | 2 +-
.../registry/styles/default/skeleton.json | 2 +-
.../registry/styles/default/slider.json | 2 +-
.../registry/styles/default/sonner.json | 2 +-
.../registry/styles/default/switch.json | 2 +-
.../public/registry/styles/default/table.json | 2 +-
.../public/registry/styles/default/tabs.json | 2 +-
.../registry/styles/default/tags-input.json | 2 +-
.../registry/styles/default/textarea.json | 2 +-
.../public/registry/styles/default/toast.json | 2 +-
.../registry/styles/default/toggle-group.json | 2 +-
.../registry/styles/default/toggle.json | 2 +-
.../registry/styles/default/tooltip.json | 2 +-
.../registry/styles/default/v-calendar.json | 2 +-
.../www/src/public/registry/styles/index.json | 2 +-
.../registry/styles/new-york/accordion.json | 2 +-
.../styles/new-york/alert-dialog.json | 2 +-
.../registry/styles/new-york/alert.json | 2 +-
.../registry/styles/new-york/area-chart.json | 19 ++
.../styles/new-york/aspect-ratio.json | 2 +-
.../registry/styles/new-york/avatar.json | 2 +-
.../registry/styles/new-york/badge.json | 2 +-
.../registry/styles/new-york/breadcrumb.json | 2 +-
.../registry/styles/new-york/button.json | 4 +-
.../public/registry/styles/new-york/card.json | 2 +-
.../registry/styles/new-york/carousel.json | 2 +-
.../registry/styles/new-york/chart-area.json | 23 ++
.../registry/styles/new-york/chart-bar.json | 23 ++
.../registry/styles/new-york/chart-donut.json | 23 ++
.../registry/styles/new-york/chart-line.json | 23 ++
.../registry/styles/new-york/chart.json | 39 +++
.../registry/styles/new-york/checkbox.json | 2 +-
.../registry/styles/new-york/collapsible.json | 2 +-
.../registry/styles/new-york/command.json | 2 +-
.../styles/new-york/context-menu.json | 2 +-
.../registry/styles/new-york/dialog.json | 2 +-
.../registry/styles/new-york/drawer.json | 2 +-
.../styles/new-york/dropdown-menu.json | 2 +-
.../registry/styles/new-york/hover-card.json | 2 +-
.../registry/styles/new-york/input.json | 2 +-
.../registry/styles/new-york/label.json | 2 +-
.../registry/styles/new-york/menubar.json | 2 +-
.../styles/new-york/navigation-menu.json | 2 +-
.../registry/styles/new-york/pagination.json | 2 +-
.../registry/styles/new-york/pin-input.json | 2 +-
.../registry/styles/new-york/popover.json | 2 +-
.../registry/styles/new-york/progress.json | 2 +-
.../registry/styles/new-york/radio-group.json | 2 +-
.../registry/styles/new-york/resizable.json | 2 +-
.../registry/styles/new-york/scroll-area.json | 2 +-
.../registry/styles/new-york/select.json | 2 +-
.../registry/styles/new-york/separator.json | 2 +-
.../registry/styles/new-york/sheet.json | 2 +-
.../registry/styles/new-york/skeleton.json | 2 +-
.../registry/styles/new-york/slider.json | 2 +-
.../registry/styles/new-york/sonner.json | 2 +-
.../registry/styles/new-york/switch.json | 2 +-
.../registry/styles/new-york/table.json | 2 +-
.../public/registry/styles/new-york/tabs.json | 2 +-
.../registry/styles/new-york/tags-input.json | 2 +-
.../registry/styles/new-york/textarea.json | 2 +-
.../registry/styles/new-york/toast.json | 2 +-
.../styles/new-york/toggle-group.json | 2 +-
.../registry/styles/new-york/toggle.json | 2 +-
.../registry/styles/new-york/tooltip.json | 2 +-
.../registry/styles/new-york/v-calendar.json | 2 +-
apps/www/src/stores/config.ts | 5 +-
pnpm-lock.yaml | 90 ++++++
210 files changed, 5753 insertions(+), 269 deletions(-)
create mode 100644 apps/www/.vitepress/theme/components/APITable.vue
create mode 100644 apps/www/.vitepress/theme/components/ThemePopover.vue
create mode 100644 apps/www/scripts/autogen.ts
create mode 100644 apps/www/src/content/docs/charts.md
create mode 100644 apps/www/src/content/docs/charts/area.md
create mode 100644 apps/www/src/content/docs/charts/bar.md
create mode 100644 apps/www/src/content/docs/charts/donut.md
create mode 100644 apps/www/src/content/docs/charts/line.md
create mode 100644 apps/www/src/content/meta/AreaChart.md
create mode 100644 apps/www/src/content/meta/BarChart.md
create mode 100644 apps/www/src/content/meta/ChartCrosshair.md
create mode 100644 apps/www/src/content/meta/ChartLegend.md
create mode 100644 apps/www/src/content/meta/ChartSingleTooltip.md
create mode 100644 apps/www/src/content/meta/ChartTooltip.md
create mode 100644 apps/www/src/content/meta/DonutChart.md
create mode 100644 apps/www/src/content/meta/LineChart.md
create mode 100644 apps/www/src/lib/registry/default/example/AreaChartCustomTooltip.vue
create mode 100644 apps/www/src/lib/registry/default/example/AreaChartDemo.vue
create mode 100644 apps/www/src/lib/registry/default/example/AreaChartSparkline.vue
create mode 100644 apps/www/src/lib/registry/default/example/BarChartCustomTooltip.vue
create mode 100644 apps/www/src/lib/registry/default/example/BarChartDemo.vue
create mode 100644 apps/www/src/lib/registry/default/example/BarChartRounded.vue
create mode 100644 apps/www/src/lib/registry/default/example/BarChartStacked.vue
create mode 100644 apps/www/src/lib/registry/default/example/CustomChartTooltip.vue
create mode 100644 apps/www/src/lib/registry/default/example/DonutChartColor.vue
create mode 100644 apps/www/src/lib/registry/default/example/DonutChartCustomTooltip.vue
create mode 100644 apps/www/src/lib/registry/default/example/DonutChartDemo.vue
create mode 100644 apps/www/src/lib/registry/default/example/DonutChartPie.vue
create mode 100644 apps/www/src/lib/registry/default/example/LineChartCustomTooltip.vue
create mode 100644 apps/www/src/lib/registry/default/example/LineChartDemo.vue
create mode 100644 apps/www/src/lib/registry/default/example/LineChartSparkline.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart-area/AreaChart.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart-area/index.ts
create mode 100644 apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart-bar/index.ts
create mode 100644 apps/www/src/lib/registry/default/ui/chart-donut/DonutChart.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart-donut/index.ts
create mode 100644 apps/www/src/lib/registry/default/ui/chart-line/LineChart.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart-line/index.ts
create mode 100644 apps/www/src/lib/registry/default/ui/chart/ChartCrosshair.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart/ChartLegend.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart/ChartSingleTooltip.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart/ChartTooltip.vue
create mode 100644 apps/www/src/lib/registry/default/ui/chart/index.ts
create mode 100644 apps/www/src/lib/registry/default/ui/chart/interface.ts
create mode 100644 apps/www/src/lib/registry/new-york/example/AreaChartCustomTooltip.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/AreaChartDemo.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/AreaChartSparkline.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/BarChartCustomTooltip.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/BarChartDemo.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/BarChartRounded.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/BarChartStacked.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/CustomChartTooltip.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/DonutChartColor.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/DonutChartCustomTooltip.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/DonutChartDemo.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/DonutChartPie.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/LineChartCustomTooltip.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/LineChartDemo.vue
create mode 100644 apps/www/src/lib/registry/new-york/example/LineChartSparkline.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart-area/AreaChart.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart-area/index.ts
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart-bar/BarChart.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart-bar/index.ts
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart-donut/DonutChart.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart-donut/index.ts
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart-line/LineChart.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart-line/index.ts
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart/ChartCrosshair.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart/ChartLegend.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart/ChartTooltip.vue
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart/index.ts
create mode 100644 apps/www/src/lib/registry/new-york/ui/chart/interface.ts
create mode 100644 apps/www/src/public/registry/styles/default/area-chart.json
create mode 100644 apps/www/src/public/registry/styles/default/chart-area.json
create mode 100644 apps/www/src/public/registry/styles/default/chart-bar.json
create mode 100644 apps/www/src/public/registry/styles/default/chart-donut.json
create mode 100644 apps/www/src/public/registry/styles/default/chart-line.json
create mode 100644 apps/www/src/public/registry/styles/default/chart.json
create mode 100644 apps/www/src/public/registry/styles/new-york/area-chart.json
create mode 100644 apps/www/src/public/registry/styles/new-york/chart-area.json
create mode 100644 apps/www/src/public/registry/styles/new-york/chart-bar.json
create mode 100644 apps/www/src/public/registry/styles/new-york/chart-donut.json
create mode 100644 apps/www/src/public/registry/styles/new-york/chart-line.json
create mode 100644 apps/www/src/public/registry/styles/new-york/chart.json
diff --git a/apps/www/.vitepress/theme/components/APITable.vue b/apps/www/.vitepress/theme/components/APITable.vue
new file mode 100644
index 00000000..c128797d
--- /dev/null
+++ b/apps/www/.vitepress/theme/components/APITable.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
{{ capitalize(type) }}
+
+
+
+
+ {{ item.name }}
+
+ {{ item.type }}
+ Required*
+
+
+
+
+
+
diff --git a/apps/www/.vitepress/theme/components/MobileNav.vue b/apps/www/.vitepress/theme/components/MobileNav.vue
index 8de06dd2..1d1c1819 100644
--- a/apps/www/.vitepress/theme/components/MobileNav.vue
+++ b/apps/www/.vitepress/theme/components/MobileNav.vue
@@ -5,6 +5,7 @@ import Logo from './Logo.vue'
import { Sheet, SheetContent, SheetTrigger } from '@/lib/registry/default/ui/sheet'
import { Button } from '@/lib/registry/default/ui/button'
import { ScrollArea } from '@/lib/registry/default/ui/scroll-area'
+import { Badge } from '@/lib/registry/new-york/ui/badge'
const open = ref(false)
@@ -63,17 +64,26 @@ const open = ref(false)
diff --git a/apps/www/.vitepress/theme/components/ThemePopover.vue b/apps/www/.vitepress/theme/components/ThemePopover.vue
new file mode 100644
index 00000000..d862ec98
--- /dev/null
+++ b/apps/www/.vitepress/theme/components/ThemePopover.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/.vitepress/theme/components/index.ts b/apps/www/.vitepress/theme/components/index.ts
index 8e6df429..ec426bc3 100644
--- a/apps/www/.vitepress/theme/components/index.ts
+++ b/apps/www/.vitepress/theme/components/index.ts
@@ -1,5 +1,6 @@
export { default as CodeWrapper } from './CodeWrapper'
export { default as ComponentPreview } from './ComponentPreview.vue'
+export { default as APITable } from './APITable.vue'
export { default as TabPreview } from './TabPreview.vue'
export { default as TabMarkdown } from './TabMarkdown.vue'
export { default as TabsMarkdown } from './TabsMarkdown.vue'
diff --git a/apps/www/.vitepress/theme/components/theming/Theming.vue b/apps/www/.vitepress/theme/components/theming/Theming.vue
index bf3b949e..e4d36786 100644
--- a/apps/www/.vitepress/theme/components/theming/Theming.vue
+++ b/apps/www/.vitepress/theme/components/theming/Theming.vue
@@ -18,9 +18,7 @@ import Metric from '@/lib/registry/new-york/example/Cards/Metric.vue'
import DataTable from '@/lib/registry/new-york/example/Cards/DataTable.vue'
import CardStats from '@/lib/registry/new-york/example/CardStats.vue'
-import {
- Card,
-} from '@/lib/registry/new-york/ui/card'
+import { Card } from '@/lib/registry/new-york/ui/card'
import { RangeCalendar } from '@/lib/registry/new-york/ui/range-calendar'
const now = today(getLocalTimeZone())
diff --git a/apps/www/.vitepress/theme/components/theming/utils/data.ts b/apps/www/.vitepress/theme/components/theming/utils/data.ts
index 3da4424d..1ef53ce0 100644
--- a/apps/www/.vitepress/theme/components/theming/utils/data.ts
+++ b/apps/www/.vitepress/theme/components/theming/utils/data.ts
@@ -2,6 +2,36 @@ import { CreditCard } from 'lucide-vue-next'
import RiAppleFill from '~icons/ri/apple-fill'
import RiPaypalFill from '~icons/ri/paypal-fill'
+type Color =
+ | 'zinc'
+ | 'slate'
+ | 'stone'
+ | 'gray'
+ | 'neutral'
+ | 'red'
+ | 'rose'
+ | 'orange'
+ | 'green'
+ | 'blue'
+ | 'yellow'
+ | 'violet'
+
+// Create an array of color values
+export const allColors: Color[] = [
+ 'zinc',
+ 'rose',
+ 'blue',
+ 'green',
+ 'orange',
+ 'red',
+ 'slate',
+ 'stone',
+ 'gray',
+ 'neutral',
+ 'yellow',
+ 'violet',
+]
+
interface Payment {
status: string
email: string
diff --git a/apps/www/.vitepress/theme/config/docs.ts b/apps/www/.vitepress/theme/config/docs.ts
index e0907468..1f211383 100644
--- a/apps/www/.vitepress/theme/config/docs.ts
+++ b/apps/www/.vitepress/theme/config/docs.ts
@@ -12,7 +12,7 @@ export type SidebarNavItem = NavItem & {
}
export type NavItemWithChildren = NavItem & {
- items: NavItemWithChildren[]
+ items?: NavItemWithChildren[]
}
interface DocsConfig {
@@ -55,22 +55,18 @@ export const docsConfig: DocsConfig = {
{
title: 'Introduction',
href: '/docs/introduction',
- items: [],
},
{
title: 'Installation',
href: '/docs/installation',
- items: [],
},
{
title: 'components.json',
href: '/docs/components-json',
- items: [],
},
{
title: 'Theming',
href: '/docs/theming',
- items: [],
},
{
title: 'Dark Mode',
@@ -80,27 +76,22 @@ export const docsConfig: DocsConfig = {
{
title: 'CLI',
href: '/docs/cli',
- items: [],
},
{
title: 'Typography',
href: '/docs/typography',
- items: [],
},
{
title: 'Figma',
href: '/docs/figma',
- items: [],
},
{
title: 'Changelog',
href: '/docs/changelog',
- items: [],
},
{
title: 'About',
href: '/docs/about',
- items: [],
},
{
title: 'Contribution',
@@ -115,22 +106,18 @@ export const docsConfig: DocsConfig = {
{
title: 'Vite',
href: '/docs/installation/vite',
- items: [],
},
{
title: 'Nuxt',
href: '/docs/installation/nuxt',
- items: [],
},
{
title: 'Astro',
href: '/docs/installation/astro',
- items: [],
},
{
title: 'Laravel',
href: '/docs/installation/laravel',
- items: [],
},
],
},
@@ -142,6 +129,12 @@ export const docsConfig: DocsConfig = {
href: '/docs/components/auto-form',
items: [],
},
+ {
+ title: 'Charts',
+ href: '/docs/charts',
+ label: 'Alpha',
+ items: [],
+ },
],
},
{
@@ -150,32 +143,26 @@ export const docsConfig: DocsConfig = {
{
title: 'Accordion',
href: '/docs/components/accordion',
- items: [],
},
{
title: 'Alert',
href: '/docs/components/alert',
- items: [],
},
{
title: 'Alert Dialog',
href: '/docs/components/alert-dialog',
- items: [],
},
{
title: 'Aspect Ratio',
href: '/docs/components/aspect-ratio',
- items: [],
},
{
title: 'Avatar',
href: '/docs/components/avatar',
- items: [],
},
{
title: 'Badge',
href: '/docs/components/badge',
- items: [],
},
{
title: 'Breadcrumb',
@@ -185,7 +172,6 @@ export const docsConfig: DocsConfig = {
{
title: 'Button',
href: '/docs/components/button',
- items: [],
},
{
title: 'Calendar',
@@ -196,7 +182,6 @@ export const docsConfig: DocsConfig = {
{
title: 'Card',
href: '/docs/components/card',
- items: [],
},
{
title: 'Carousel',
@@ -206,32 +191,26 @@ export const docsConfig: DocsConfig = {
{
title: 'Checkbox',
href: '/docs/components/checkbox',
- items: [],
},
{
title: 'Collapsible',
href: '/docs/components/collapsible',
- items: [],
},
{
title: 'Combobox',
href: '/docs/components/combobox',
- items: [],
},
{
title: 'Command',
href: '/docs/components/command',
- items: [],
},
{
title: 'Context Menu',
href: '/docs/components/context-menu',
- items: [],
},
{
title: 'Data Table',
href: '/docs/components/data-table',
- items: [],
},
{
title: 'Date Picker',
@@ -242,7 +221,6 @@ export const docsConfig: DocsConfig = {
{
title: 'Dialog',
href: '/docs/components/dialog',
- items: [],
},
{
title: 'Drawer',
@@ -252,42 +230,34 @@ export const docsConfig: DocsConfig = {
{
title: 'Dropdown Menu',
href: '/docs/components/dropdown-menu',
- items: [],
},
{
title: 'Form',
href: '/docs/components/form',
- items: [],
},
{
title: 'Hover Card',
href: '/docs/components/hover-card',
- items: [],
},
{
title: 'Input',
href: '/docs/components/input',
- items: [],
},
{
title: 'Label',
href: '/docs/components/label',
- items: [],
},
{
title: 'Menubar',
href: '/docs/components/menubar',
- items: [],
},
{
title: 'Navigation Menu',
href: '/docs/components/navigation-menu',
- items: [],
},
{
title: 'Pagination',
href: '/docs/components/pagination',
- items: [],
},
{
title: 'Pin Input',
@@ -297,17 +267,14 @@ export const docsConfig: DocsConfig = {
{
title: 'Popover',
href: '/docs/components/popover',
- items: [],
},
{
title: 'Progress',
href: '/docs/components/progress',
- items: [],
},
{
title: 'Radio Group',
href: '/docs/components/radio-group',
- items: [],
},
{
title: 'Range Calendar',
@@ -323,32 +290,26 @@ export const docsConfig: DocsConfig = {
{
title: 'Scroll Area',
href: '/docs/components/scroll-area',
- items: [],
},
{
title: 'Select',
href: '/docs/components/select',
- items: [],
},
{
title: 'Separator',
href: '/docs/components/separator',
- items: [],
},
{
title: 'Sheet',
href: '/docs/components/sheet',
- items: [],
},
{
title: 'Skeleton',
href: '/docs/components/skeleton',
- items: [],
},
{
title: 'Slider',
href: '/docs/components/slider',
- items: [],
},
{
title: 'Sonner',
@@ -358,17 +319,14 @@ export const docsConfig: DocsConfig = {
{
title: 'Switch',
href: '/docs/components/switch',
- items: [],
},
{
title: 'Table',
href: '/docs/components/table',
- items: [],
},
{
title: 'Tabs',
href: '/docs/components/tabs',
- items: [],
},
{
title: 'Tags Input',
@@ -378,27 +336,22 @@ export const docsConfig: DocsConfig = {
{
title: 'Textarea',
href: '/docs/components/textarea',
- items: [],
},
{
title: 'Toast',
href: '/docs/components/toast',
- items: [],
},
{
title: 'Toggle',
href: '/docs/components/toggle',
- items: [],
},
{
title: 'Toggle Group',
href: '/docs/components/toggle-group',
- items: [],
},
{
title: 'Tooltip',
href: '/docs/components/tooltip',
- items: [],
},
],
},
diff --git a/apps/www/.vitepress/theme/layout/DocsLayout.vue b/apps/www/.vitepress/theme/layout/DocsLayout.vue
index b0c0b559..195c5db7 100644
--- a/apps/www/.vitepress/theme/layout/DocsLayout.vue
+++ b/apps/www/.vitepress/theme/layout/DocsLayout.vue
@@ -27,6 +27,10 @@ const sourceLink = 'https://github.com/radix-vue/shadcn-vue/tree/dev/'
class="mb-1 rounded-md px-2 py-1 text-sm font-semibold"
>
{{ docsGroup.title }}
+
+
+ {{ docsGroup.label }}
+
-
- {{ frontmatter.title }}
-
+
+
+ {{ frontmatter.title }}
+
+
+ {{ frontmatter.label }}
+
+
{{ frontmatter.description }}
diff --git a/apps/www/.vitepress/theme/layout/MainLayout.vue b/apps/www/.vitepress/theme/layout/MainLayout.vue
index 4f21004b..13ebeaf7 100644
--- a/apps/www/.vitepress/theme/layout/MainLayout.vue
+++ b/apps/www/.vitepress/theme/layout/MainLayout.vue
@@ -8,6 +8,7 @@ import MobileNav from '../components/MobileNav.vue'
import CodeConfigCustomizer from '../components/CodeConfigCustomizer.vue'
import Kbd from '../components/Kbd.vue'
+import ThemePopover from '../components/ThemePopover.vue'
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/lib/registry/default/ui/command'
import { Button } from '@/lib/registry/default/ui/button'
@@ -133,6 +134,8 @@ watch(() => $route.path, (n) => {
@@ -91,7 +86,7 @@ const lineY = (d: Data) => d.revenue
:x="lineX"
:y="(d: Data) => d.subscription"
:bar-padding="0.1"
- :rounded-corners="0" color="var(--theme-primary)"
+ :rounded-corners="0" color="hsl(var(--primary))"
/>
diff --git a/apps/www/src/lib/registry/default/example/Cards/ActivityGoal.vue b/apps/www/src/lib/registry/default/example/Cards/ActivityGoal.vue
index f2445fa8..40a994c7 100644
--- a/apps/www/src/lib/registry/default/example/Cards/ActivityGoal.vue
+++ b/apps/www/src/lib/registry/default/example/Cards/ActivityGoal.vue
@@ -16,10 +16,6 @@ import {
import { themes } from '@/lib/registry/themes'
import { useConfigStore } from '@/stores/config'
-const { isDark } = useData()
-const cfg = useConfigStore()
-const theme = computed(() => themes.find(theme => theme.name === cfg.config.value.theme))
-
const goal = ref(350)
type Data = typeof data[number]
@@ -84,16 +80,13 @@ const data = [
:data="data"
height="60px"
:style="{
- 'opacity': 0.2,
- '--theme-primary': `hsl(${
- theme?.cssVars[isDark ? 'dark' : 'light'].primary
- })`,
+ opacity: 0.2,
}"
>
diff --git a/apps/www/src/lib/registry/default/example/Cards/Metric.vue b/apps/www/src/lib/registry/default/example/Cards/Metric.vue
index c734edb2..457a2a26 100644
--- a/apps/www/src/lib/registry/default/example/Cards/Metric.vue
+++ b/apps/www/src/lib/registry/default/example/Cards/Metric.vue
@@ -10,8 +10,6 @@ import {
} from '@/lib/registry/default/ui/card'
import { useConfigStore } from '@/stores/config'
-const { themePrimary } = useConfigStore()
-
type Data = typeof data[number]
const data = [
{ average: 400, today: 240 },
@@ -74,15 +72,14 @@ function computeLineOpacity(val: any, index: number) {
bottom: 0,
}"
:style="{
- '--theme-primary': themePrimary,
'--vis-tooltip-padding': '0px',
'--vis-tooltip-background-color': 'transparent',
'--vis-tooltip-border-color': 'transparent',
}"
>
-
-
+
+
diff --git a/apps/www/src/lib/registry/default/example/CustomChartTooltip.vue b/apps/www/src/lib/registry/default/example/CustomChartTooltip.vue
new file mode 100644
index 00000000..86f72173
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/CustomChartTooltip.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
{{ item.value }}
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/example/DonutChartColor.vue b/apps/www/src/lib/registry/default/example/DonutChartColor.vue
new file mode 100644
index 00000000..0ae5b157
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/DonutChartColor.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/example/DonutChartCustomTooltip.vue b/apps/www/src/lib/registry/default/example/DonutChartCustomTooltip.vue
new file mode 100644
index 00000000..2e927858
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/DonutChartCustomTooltip.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/example/DonutChartDemo.vue b/apps/www/src/lib/registry/default/example/DonutChartDemo.vue
new file mode 100644
index 00000000..ad8b9844
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/DonutChartDemo.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/example/DonutChartPie.vue b/apps/www/src/lib/registry/default/example/DonutChartPie.vue
new file mode 100644
index 00000000..cf3de170
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/DonutChartPie.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/example/LineChartCustomTooltip.vue b/apps/www/src/lib/registry/default/example/LineChartCustomTooltip.vue
new file mode 100644
index 00000000..fbd20dfa
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/LineChartCustomTooltip.vue
@@ -0,0 +1,281 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/example/LineChartDemo.vue b/apps/www/src/lib/registry/default/example/LineChartDemo.vue
new file mode 100644
index 00000000..f5a2714b
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/LineChartDemo.vue
@@ -0,0 +1,279 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/example/LineChartSparkline.vue b/apps/www/src/lib/registry/default/example/LineChartSparkline.vue
new file mode 100644
index 00000000..6aa2ef6c
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/LineChartSparkline.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/button/index.ts b/apps/www/src/lib/registry/default/ui/button/index.ts
index e18f26bb..1b00c326 100644
--- a/apps/www/src/lib/registry/default/ui/button/index.ts
+++ b/apps/www/src/lib/registry/default/ui/button/index.ts
@@ -19,6 +19,7 @@ export const buttonVariants = cva(
},
size: {
default: 'h-10 px-4 py-2',
+ xs: 'h-7 rounded px-2',
sm: 'h-9 rounded-md px-3',
lg: 'h-11 rounded-md px-8',
icon: 'h-10 w-10',
diff --git a/apps/www/src/lib/registry/default/ui/chart-area/AreaChart.vue b/apps/www/src/lib/registry/default/ui/chart-area/AreaChart.vue
new file mode 100644
index 00000000..5d3bf2ae
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart-area/AreaChart.vue
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/chart-area/index.ts b/apps/www/src/lib/registry/default/ui/chart-area/index.ts
new file mode 100644
index 00000000..81345fd8
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart-area/index.ts
@@ -0,0 +1 @@
+export { default as AreaChart } from './AreaChart.vue'
diff --git a/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue b/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue
new file mode 100644
index 00000000..31cd512f
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart-bar/BarChart.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/chart-bar/index.ts b/apps/www/src/lib/registry/default/ui/chart-bar/index.ts
new file mode 100644
index 00000000..805149a5
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart-bar/index.ts
@@ -0,0 +1 @@
+export { default as BarChart } from './BarChart.vue'
diff --git a/apps/www/src/lib/registry/default/ui/chart-donut/DonutChart.vue b/apps/www/src/lib/registry/default/ui/chart-donut/DonutChart.vue
new file mode 100644
index 00000000..9ab5f652
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart-donut/DonutChart.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/chart-donut/index.ts b/apps/www/src/lib/registry/default/ui/chart-donut/index.ts
new file mode 100644
index 00000000..b42413a0
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart-donut/index.ts
@@ -0,0 +1 @@
+export { default as DonutChart } from './DonutChart.vue'
diff --git a/apps/www/src/lib/registry/default/ui/chart-line/LineChart.vue b/apps/www/src/lib/registry/default/ui/chart-line/LineChart.vue
new file mode 100644
index 00000000..05025f49
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart-line/LineChart.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/chart-line/index.ts b/apps/www/src/lib/registry/default/ui/chart-line/index.ts
new file mode 100644
index 00000000..5d827c88
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart-line/index.ts
@@ -0,0 +1 @@
+export { default as LineChart } from './LineChart.vue'
diff --git a/apps/www/src/lib/registry/default/ui/chart/ChartCrosshair.vue b/apps/www/src/lib/registry/default/ui/chart/ChartCrosshair.vue
new file mode 100644
index 00000000..4440c5ee
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart/ChartCrosshair.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/chart/ChartLegend.vue b/apps/www/src/lib/registry/default/ui/chart/ChartLegend.vue
new file mode 100644
index 00000000..9a959b56
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart/ChartLegend.vue
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/chart/ChartSingleTooltip.vue b/apps/www/src/lib/registry/default/ui/chart/ChartSingleTooltip.vue
new file mode 100644
index 00000000..23ce7a70
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart/ChartSingleTooltip.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/chart/ChartTooltip.vue b/apps/www/src/lib/registry/default/ui/chart/ChartTooltip.vue
new file mode 100644
index 00000000..8f2be084
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart/ChartTooltip.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
{{ item.name }}
+
+
{{ item.value }}
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/chart/index.ts b/apps/www/src/lib/registry/default/ui/chart/index.ts
new file mode 100644
index 00000000..e2d64c17
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart/index.ts
@@ -0,0 +1,18 @@
+export { default as ChartTooltip } from './ChartTooltip.vue'
+export { default as ChartSingleTooltip } from './ChartSingleTooltip.vue'
+export { default as ChartLegend } from './ChartLegend.vue'
+export { default as ChartCrosshair } from './ChartCrosshair.vue'
+
+export function defaultColors(count: number = 3) {
+ const quotient = Math.floor(count / 2)
+ const remainder = count % 2
+
+ const primaryCount = quotient + remainder
+ const secondaryCount = quotient
+ return [
+ ...Array.from(Array(primaryCount).keys()).map(i => `hsl(var(--vis-primary-color) / ${1 - (1 / primaryCount) * i})`),
+ ...Array.from(Array(secondaryCount).keys()).map(i => `hsl(var(--vis-secondary-color) / ${1 - (1 / secondaryCount) * i})`),
+ ]
+}
+
+export * from './interface'
diff --git a/apps/www/src/lib/registry/default/ui/chart/interface.ts b/apps/www/src/lib/registry/default/ui/chart/interface.ts
new file mode 100644
index 00000000..c3838afc
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/chart/interface.ts
@@ -0,0 +1,64 @@
+import type { Spacing } from '@unovis/ts'
+
+type KeyOf> = Extract
+
+export interface BaseChartProps> {
+ /**
+ * The source data, in which each entry is a dictionary.
+ */
+ data: T[]
+ /**
+ * Select the categories from your data. Used to populate the legend and toolip.
+ */
+ categories: KeyOf[]
+ /**
+ * Sets the key to map the data to the axis.
+ */
+ index: KeyOf
+ /**
+ * Change the default colors.
+ */
+ colors?: string[]
+ /**
+ * Margin of each the container
+ */
+ margin?: Spacing
+ /**
+ * Change the opacity of the non-selected field
+ * @default 0.2
+ */
+ filterOpacity?: number
+ /**
+ * Function to format X label
+ */
+ xFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string
+ /**
+ * Function to format Y label
+ */
+ yFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string
+ /**
+ * Controls the visibility of the X axis.
+ * @default true
+ */
+ showXAxis?: boolean
+ /**
+ * Controls the visibility of the Y axis.
+ * @default true
+ */
+ showYAxis?: boolean
+ /**
+ * Controls the visibility of tooltip.
+ * @default true
+ */
+ showTooltip?: boolean
+ /**
+ * Controls the visibility of legend.
+ * @default true
+ */
+ showLegend?: boolean
+ /**
+ * Controls the visibility of gridline.
+ * @default true
+ */
+ showGridLine?: boolean
+}
diff --git a/apps/www/src/lib/registry/new-york/example/AreaChartCustomTooltip.vue b/apps/www/src/lib/registry/new-york/example/AreaChartCustomTooltip.vue
new file mode 100644
index 00000000..80e76039
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/AreaChartCustomTooltip.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/AreaChartDemo.vue b/apps/www/src/lib/registry/new-york/example/AreaChartDemo.vue
new file mode 100644
index 00000000..105be1cb
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/AreaChartDemo.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/AreaChartSparkline.vue b/apps/www/src/lib/registry/new-york/example/AreaChartSparkline.vue
new file mode 100644
index 00000000..96e557db
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/AreaChartSparkline.vue
@@ -0,0 +1,33 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/BarChartCustomTooltip.vue b/apps/www/src/lib/registry/new-york/example/BarChartCustomTooltip.vue
new file mode 100644
index 00000000..0e514127
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/BarChartCustomTooltip.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/BarChartDemo.vue b/apps/www/src/lib/registry/new-york/example/BarChartDemo.vue
new file mode 100644
index 00000000..0d68f9b3
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/BarChartDemo.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/BarChartRounded.vue b/apps/www/src/lib/registry/new-york/example/BarChartRounded.vue
new file mode 100644
index 00000000..e5e4280d
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/BarChartRounded.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/BarChartStacked.vue b/apps/www/src/lib/registry/new-york/example/BarChartStacked.vue
new file mode 100644
index 00000000..c139d47c
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/BarChartStacked.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/CardStats.vue b/apps/www/src/lib/registry/new-york/example/CardStats.vue
index e95ebb2c..cfb00c9f 100644
--- a/apps/www/src/lib/registry/new-york/example/CardStats.vue
+++ b/apps/www/src/lib/registry/new-york/example/CardStats.vue
@@ -1,10 +1,8 @@
@@ -44,23 +34,27 @@ const lineY = (d: Data) => d.revenue
-
-
-
-
+
+
@@ -80,20 +74,27 @@ const lineY = (d: Data) => d.revenue
-
+
diff --git a/apps/www/src/lib/registry/new-york/example/Cards/ActivityGoal.vue b/apps/www/src/lib/registry/new-york/example/Cards/ActivityGoal.vue
index 85aba6f3..f82cbc9c 100644
--- a/apps/www/src/lib/registry/new-york/example/Cards/ActivityGoal.vue
+++ b/apps/www/src/lib/registry/new-york/example/Cards/ActivityGoal.vue
@@ -12,9 +12,6 @@ import {
CardHeader,
CardTitle,
} from '@/lib/registry/new-york/ui/card'
-import { useConfigStore } from '@/stores/config'
-
-const { themePrimary } = useConfigStore()
const goal = ref(350)
@@ -80,14 +77,13 @@ const data = [
:data="data"
height="60px"
:style="{
- 'opacity': 0.2,
- '--theme-primary': themePrimary,
+ opacity: 0.2,
}"
>
diff --git a/apps/www/src/lib/registry/new-york/example/Cards/Metric.vue b/apps/www/src/lib/registry/new-york/example/Cards/Metric.vue
index 6b513287..18fc688b 100644
--- a/apps/www/src/lib/registry/new-york/example/Cards/Metric.vue
+++ b/apps/www/src/lib/registry/new-york/example/Cards/Metric.vue
@@ -10,8 +10,6 @@ import {
} from '@/lib/registry/new-york/ui/card'
import { useConfigStore } from '@/stores/config'
-const { themePrimary } = useConfigStore()
-
type Data = typeof data[number]
const data = [
{ average: 400, today: 240 },
@@ -74,15 +72,14 @@ function computeLineOpacity(val: any, index: number) {
bottom: 0,
}"
:style="{
- '--theme-primary': themePrimary,
'--vis-tooltip-padding': '0px',
'--vis-tooltip-background-color': 'transparent',
'--vis-tooltip-border-color': 'transparent',
}"
>
-
-
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/CustomChartTooltip.vue b/apps/www/src/lib/registry/new-york/example/CustomChartTooltip.vue
new file mode 100644
index 00000000..86f72173
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/CustomChartTooltip.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
{{ item.value }}
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/DonutChartColor.vue b/apps/www/src/lib/registry/new-york/example/DonutChartColor.vue
new file mode 100644
index 00000000..0ae5b157
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/DonutChartColor.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/DonutChartCustomTooltip.vue b/apps/www/src/lib/registry/new-york/example/DonutChartCustomTooltip.vue
new file mode 100644
index 00000000..06bca323
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/DonutChartCustomTooltip.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/DonutChartDemo.vue b/apps/www/src/lib/registry/new-york/example/DonutChartDemo.vue
new file mode 100644
index 00000000..cf0e3753
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/DonutChartDemo.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/DonutChartPie.vue b/apps/www/src/lib/registry/new-york/example/DonutChartPie.vue
new file mode 100644
index 00000000..9f29aea4
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/DonutChartPie.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/LineChartCustomTooltip.vue b/apps/www/src/lib/registry/new-york/example/LineChartCustomTooltip.vue
new file mode 100644
index 00000000..5fd45957
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/LineChartCustomTooltip.vue
@@ -0,0 +1,281 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/LineChartDemo.vue b/apps/www/src/lib/registry/new-york/example/LineChartDemo.vue
new file mode 100644
index 00000000..ec6fe7a7
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/LineChartDemo.vue
@@ -0,0 +1,279 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/LineChartSparkline.vue b/apps/www/src/lib/registry/new-york/example/LineChartSparkline.vue
new file mode 100644
index 00000000..86f074ae
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/LineChartSparkline.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/button/index.ts b/apps/www/src/lib/registry/new-york/ui/button/index.ts
index 4bb4bdb9..89f21fea 100644
--- a/apps/www/src/lib/registry/new-york/ui/button/index.ts
+++ b/apps/www/src/lib/registry/new-york/ui/button/index.ts
@@ -19,6 +19,7 @@ export const buttonVariants = cva(
},
size: {
default: 'h-9 px-4 py-2',
+ xs: 'h-7 rounded px-2',
sm: 'h-8 rounded-md px-3 text-xs',
lg: 'h-10 rounded-md px-8',
icon: 'h-9 w-9',
diff --git a/apps/www/src/lib/registry/new-york/ui/chart-area/AreaChart.vue b/apps/www/src/lib/registry/new-york/ui/chart-area/AreaChart.vue
new file mode 100644
index 00000000..2f45162f
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart-area/AreaChart.vue
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/chart-area/index.ts b/apps/www/src/lib/registry/new-york/ui/chart-area/index.ts
new file mode 100644
index 00000000..81345fd8
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart-area/index.ts
@@ -0,0 +1 @@
+export { default as AreaChart } from './AreaChart.vue'
diff --git a/apps/www/src/lib/registry/new-york/ui/chart-bar/BarChart.vue b/apps/www/src/lib/registry/new-york/ui/chart-bar/BarChart.vue
new file mode 100644
index 00000000..516e8b47
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart-bar/BarChart.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/chart-bar/index.ts b/apps/www/src/lib/registry/new-york/ui/chart-bar/index.ts
new file mode 100644
index 00000000..805149a5
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart-bar/index.ts
@@ -0,0 +1 @@
+export { default as BarChart } from './BarChart.vue'
diff --git a/apps/www/src/lib/registry/new-york/ui/chart-donut/DonutChart.vue b/apps/www/src/lib/registry/new-york/ui/chart-donut/DonutChart.vue
new file mode 100644
index 00000000..21f399b5
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart-donut/DonutChart.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/chart-donut/index.ts b/apps/www/src/lib/registry/new-york/ui/chart-donut/index.ts
new file mode 100644
index 00000000..b42413a0
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart-donut/index.ts
@@ -0,0 +1 @@
+export { default as DonutChart } from './DonutChart.vue'
diff --git a/apps/www/src/lib/registry/new-york/ui/chart-line/LineChart.vue b/apps/www/src/lib/registry/new-york/ui/chart-line/LineChart.vue
new file mode 100644
index 00000000..e342fd3c
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart-line/LineChart.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/chart-line/index.ts b/apps/www/src/lib/registry/new-york/ui/chart-line/index.ts
new file mode 100644
index 00000000..5d827c88
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart-line/index.ts
@@ -0,0 +1 @@
+export { default as LineChart } from './LineChart.vue'
diff --git a/apps/www/src/lib/registry/new-york/ui/chart/ChartCrosshair.vue b/apps/www/src/lib/registry/new-york/ui/chart/ChartCrosshair.vue
new file mode 100644
index 00000000..46e5e62b
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart/ChartCrosshair.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/chart/ChartLegend.vue b/apps/www/src/lib/registry/new-york/ui/chart/ChartLegend.vue
new file mode 100644
index 00000000..255abb2e
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart/ChartLegend.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue b/apps/www/src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue
new file mode 100644
index 00000000..412ac0c1
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/chart/ChartTooltip.vue b/apps/www/src/lib/registry/new-york/ui/chart/ChartTooltip.vue
new file mode 100644
index 00000000..1f8e6e98
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart/ChartTooltip.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
{{ item.name }}
+
+
{{ item.value }}
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/chart/index.ts b/apps/www/src/lib/registry/new-york/ui/chart/index.ts
new file mode 100644
index 00000000..e2d64c17
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart/index.ts
@@ -0,0 +1,18 @@
+export { default as ChartTooltip } from './ChartTooltip.vue'
+export { default as ChartSingleTooltip } from './ChartSingleTooltip.vue'
+export { default as ChartLegend } from './ChartLegend.vue'
+export { default as ChartCrosshair } from './ChartCrosshair.vue'
+
+export function defaultColors(count: number = 3) {
+ const quotient = Math.floor(count / 2)
+ const remainder = count % 2
+
+ const primaryCount = quotient + remainder
+ const secondaryCount = quotient
+ return [
+ ...Array.from(Array(primaryCount).keys()).map(i => `hsl(var(--vis-primary-color) / ${1 - (1 / primaryCount) * i})`),
+ ...Array.from(Array(secondaryCount).keys()).map(i => `hsl(var(--vis-secondary-color) / ${1 - (1 / secondaryCount) * i})`),
+ ]
+}
+
+export * from './interface'
diff --git a/apps/www/src/lib/registry/new-york/ui/chart/interface.ts b/apps/www/src/lib/registry/new-york/ui/chart/interface.ts
new file mode 100644
index 00000000..c3838afc
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/chart/interface.ts
@@ -0,0 +1,64 @@
+import type { Spacing } from '@unovis/ts'
+
+type KeyOf> = Extract
+
+export interface BaseChartProps> {
+ /**
+ * The source data, in which each entry is a dictionary.
+ */
+ data: T[]
+ /**
+ * Select the categories from your data. Used to populate the legend and toolip.
+ */
+ categories: KeyOf[]
+ /**
+ * Sets the key to map the data to the axis.
+ */
+ index: KeyOf
+ /**
+ * Change the default colors.
+ */
+ colors?: string[]
+ /**
+ * Margin of each the container
+ */
+ margin?: Spacing
+ /**
+ * Change the opacity of the non-selected field
+ * @default 0.2
+ */
+ filterOpacity?: number
+ /**
+ * Function to format X label
+ */
+ xFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string
+ /**
+ * Function to format Y label
+ */
+ yFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string
+ /**
+ * Controls the visibility of the X axis.
+ * @default true
+ */
+ showXAxis?: boolean
+ /**
+ * Controls the visibility of the Y axis.
+ * @default true
+ */
+ showYAxis?: boolean
+ /**
+ * Controls the visibility of tooltip.
+ * @default true
+ */
+ showTooltip?: boolean
+ /**
+ * Controls the visibility of legend.
+ * @default true
+ */
+ showLegend?: boolean
+ /**
+ * Controls the visibility of gridline.
+ * @default true
+ */
+ showGridLine?: boolean
+}
diff --git a/apps/www/src/lib/registry/registry.ts b/apps/www/src/lib/registry/registry.ts
index cd758c25..cbe19276 100644
--- a/apps/www/src/lib/registry/registry.ts
+++ b/apps/www/src/lib/registry/registry.ts
@@ -11,6 +11,7 @@ const DEPENDENCIES = new Map([
['vaul-vue', []],
['v-calendar', []],
['@tanstack/vue-table', []],
+ ['@unovis/vue', ['@unovis/ts']],
['embla-carousel-vue', ['embla-carousel']],
['vee-validate', ['@vee-validate/zod', 'zod']],
])
diff --git a/apps/www/src/public/registry/colors/gray.json b/apps/www/src/public/registry/colors/gray.json
index 8a1d9438..1f5c04f6 100644
--- a/apps/www/src/public/registry/colors/gray.json
+++ b/apps/www/src/public/registry/colors/gray.json
@@ -89,4 +89,4 @@
},
"inlineColorsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n",
"cssVarsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n \n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 224 71.4% 4.1%;\n \n --muted: 220 14.3% 95.9%;\n --muted-foreground: 220 8.9% 46.1%;\n \n --popover: 0 0% 100%;\n --popover-foreground: 224 71.4% 4.1%;\n \n --card: 0 0% 100%;\n --card-foreground: 224 71.4% 4.1%;\n \n --border: 220 13% 91%;\n --input: 220 13% 91%;\n \n --primary: 220.9 39.3% 11%;\n --primary-foreground: 210 20% 98%;\n \n --secondary: 220 14.3% 95.9%;\n --secondary-foreground: 220.9 39.3% 11%;\n \n --accent: 220 14.3% 95.9%;\n --accent-foreground: 220.9 39.3% 11%;\n \n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 210 20% 98%;\n \n --ring: 224 71.4% 4.1%;\n \n --radius: 0.5rem;\n }\n \n .dark {\n --background: 224 71.4% 4.1%;\n --foreground: 210 20% 98%;\n \n --muted: 215 27.9% 16.9%;\n --muted-foreground: 217.9 10.6% 64.9%;\n \n --popover: 224 71.4% 4.1%;\n --popover-foreground: 210 20% 98%;\n \n --card: 224 71.4% 4.1%;\n --card-foreground: 210 20% 98%;\n \n --border: 215 27.9% 16.9%;\n --input: 215 27.9% 16.9%;\n \n --primary: 210 20% 98%;\n --primary-foreground: 220.9 39.3% 11%;\n \n --secondary: 215 27.9% 16.9%;\n --secondary-foreground: 210 20% 98%;\n \n --accent: 215 27.9% 16.9%;\n --accent-foreground: 210 20% 98%;\n \n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 210 20% 98%;\n \n --ring: 216 12.2% 83.9%;\n }\n}\n \n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply bg-background text-foreground;\n }\n}"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/colors/index.json b/apps/www/src/public/registry/colors/index.json
index c25158ef..6b70773e 100644
--- a/apps/www/src/public/registry/colors/index.json
+++ b/apps/www/src/public/registry/colors/index.json
@@ -1996,4 +1996,4 @@
"hslChannel": "343.1 87.7% 15.9%"
}
]
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/colors/lime.json b/apps/www/src/public/registry/colors/lime.json
index e36faf45..cec9a36d 100644
--- a/apps/www/src/public/registry/colors/lime.json
+++ b/apps/www/src/public/registry/colors/lime.json
@@ -89,4 +89,4 @@
},
"inlineColorsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n",
"cssVarsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n \n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 89.3 80.4% 10%;\n \n --muted: 79.6 89.1% 89.2%;\n --muted-foreground: 83.7 80.5% 44.3%;\n \n --popover: 0 0% 100%;\n --popover-foreground: 89.3 80.4% 10%;\n \n --card: 0 0% 100%;\n --card-foreground: 89.3 80.4% 10%;\n \n --border: 80.9 88.5% 79.6%;\n --input: 80.9 88.5% 79.6%;\n \n --primary: 87.6 61.2% 20.2%;\n --primary-foreground: 78.3 92% 95.1%;\n \n --secondary: 79.6 89.1% 89.2%;\n --secondary-foreground: 87.6 61.2% 20.2%;\n \n --accent: 79.6 89.1% 89.2%;\n --accent-foreground: 87.6 61.2% 20.2%;\n \n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 78.3 92% 95.1%;\n \n --ring: 89.3 80.4% 10%;\n \n --radius: 0.5rem;\n }\n \n .dark {\n --background: 89.3 80.4% 10%;\n --foreground: 78.3 92% 95.1%;\n \n --muted: 86.3 69% 22.7%;\n --muted-foreground: 82.7 78% 55.5%;\n \n --popover: 89.3 80.4% 10%;\n --popover-foreground: 78.3 92% 95.1%;\n \n --card: 89.3 80.4% 10%;\n --card-foreground: 78.3 92% 95.1%;\n \n --border: 86.3 69% 22.7%;\n --input: 86.3 69% 22.7%;\n \n --primary: 78.3 92% 95.1%;\n --primary-foreground: 87.6 61.2% 20.2%;\n \n --secondary: 86.3 69% 22.7%;\n --secondary-foreground: 78.3 92% 95.1%;\n \n --accent: 86.3 69% 22.7%;\n --accent-foreground: 78.3 92% 95.1%;\n \n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 78.3 92% 95.1%;\n \n --ring: 82 84.5% 67.1%;\n }\n}\n \n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply bg-background text-foreground;\n }\n}"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/colors/neutral.json b/apps/www/src/public/registry/colors/neutral.json
index 3deb3deb..0a65056e 100644
--- a/apps/www/src/public/registry/colors/neutral.json
+++ b/apps/www/src/public/registry/colors/neutral.json
@@ -89,4 +89,4 @@
},
"inlineColorsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n",
"cssVarsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n \n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 0 0% 3.9%;\n \n --muted: 0 0% 96.1%;\n --muted-foreground: 0 0% 45.1%;\n \n --popover: 0 0% 100%;\n --popover-foreground: 0 0% 3.9%;\n \n --card: 0 0% 100%;\n --card-foreground: 0 0% 3.9%;\n \n --border: 0 0% 89.8%;\n --input: 0 0% 89.8%;\n \n --primary: 0 0% 9%;\n --primary-foreground: 0 0% 98%;\n \n --secondary: 0 0% 96.1%;\n --secondary-foreground: 0 0% 9%;\n \n --accent: 0 0% 96.1%;\n --accent-foreground: 0 0% 9%;\n \n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 0 0% 98%;\n \n --ring: 0 0% 3.9%;\n \n --radius: 0.5rem;\n }\n \n .dark {\n --background: 0 0% 3.9%;\n --foreground: 0 0% 98%;\n \n --muted: 0 0% 14.9%;\n --muted-foreground: 0 0% 63.9%;\n \n --popover: 0 0% 3.9%;\n --popover-foreground: 0 0% 98%;\n \n --card: 0 0% 3.9%;\n --card-foreground: 0 0% 98%;\n \n --border: 0 0% 14.9%;\n --input: 0 0% 14.9%;\n \n --primary: 0 0% 98%;\n --primary-foreground: 0 0% 9%;\n \n --secondary: 0 0% 14.9%;\n --secondary-foreground: 0 0% 98%;\n \n --accent: 0 0% 14.9%;\n --accent-foreground: 0 0% 98%;\n \n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n \n --ring: 0 0% 83.1%;\n }\n}\n \n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply bg-background text-foreground;\n }\n}"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/colors/slate.json b/apps/www/src/public/registry/colors/slate.json
index 19a86b72..bf5be7ff 100644
--- a/apps/www/src/public/registry/colors/slate.json
+++ b/apps/www/src/public/registry/colors/slate.json
@@ -89,4 +89,4 @@
},
"inlineColorsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n",
"cssVarsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n \n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 222.2 84% 4.9%;\n \n --muted: 210 40% 96.1%;\n --muted-foreground: 215.4 16.3% 46.9%;\n \n --popover: 0 0% 100%;\n --popover-foreground: 222.2 84% 4.9%;\n \n --card: 0 0% 100%;\n --card-foreground: 222.2 84% 4.9%;\n \n --border: 214.3 31.8% 91.4%;\n --input: 214.3 31.8% 91.4%;\n \n --primary: 222.2 47.4% 11.2%;\n --primary-foreground: 210 40% 98%;\n \n --secondary: 210 40% 96.1%;\n --secondary-foreground: 222.2 47.4% 11.2%;\n \n --accent: 210 40% 96.1%;\n --accent-foreground: 222.2 47.4% 11.2%;\n \n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 210 40% 98%;\n \n --ring: 222.2 84% 4.9%;\n \n --radius: 0.5rem;\n }\n \n .dark {\n --background: 222.2 84% 4.9%;\n --foreground: 210 40% 98%;\n \n --muted: 217.2 32.6% 17.5%;\n --muted-foreground: 215 20.2% 65.1%;\n \n --popover: 222.2 84% 4.9%;\n --popover-foreground: 210 40% 98%;\n \n --card: 222.2 84% 4.9%;\n --card-foreground: 210 40% 98%;\n \n --border: 217.2 32.6% 17.5%;\n --input: 217.2 32.6% 17.5%;\n \n --primary: 210 40% 98%;\n --primary-foreground: 222.2 47.4% 11.2%;\n \n --secondary: 217.2 32.6% 17.5%;\n --secondary-foreground: 210 40% 98%;\n \n --accent: 217.2 32.6% 17.5%;\n --accent-foreground: 210 40% 98%;\n \n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 210 40% 98%;\n \n --ring: 212.7 26.8% 83.9%;\n }\n}\n \n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply bg-background text-foreground;\n }\n}"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/colors/stone.json b/apps/www/src/public/registry/colors/stone.json
index bd31d945..d31a29ae 100644
--- a/apps/www/src/public/registry/colors/stone.json
+++ b/apps/www/src/public/registry/colors/stone.json
@@ -89,4 +89,4 @@
},
"inlineColorsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n",
"cssVarsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n \n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 20 14.3% 4.1%;\n \n --muted: 60 4.8% 95.9%;\n --muted-foreground: 25 5.3% 44.7%;\n \n --popover: 0 0% 100%;\n --popover-foreground: 20 14.3% 4.1%;\n \n --card: 0 0% 100%;\n --card-foreground: 20 14.3% 4.1%;\n \n --border: 20 5.9% 90%;\n --input: 20 5.9% 90%;\n \n --primary: 24 9.8% 10%;\n --primary-foreground: 60 9.1% 97.8%;\n \n --secondary: 60 4.8% 95.9%;\n --secondary-foreground: 24 9.8% 10%;\n \n --accent: 60 4.8% 95.9%;\n --accent-foreground: 24 9.8% 10%;\n \n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 60 9.1% 97.8%;\n \n --ring: 20 14.3% 4.1%;\n \n --radius: 0.5rem;\n }\n \n .dark {\n --background: 20 14.3% 4.1%;\n --foreground: 60 9.1% 97.8%;\n \n --muted: 12 6.5% 15.1%;\n --muted-foreground: 24 5.4% 63.9%;\n \n --popover: 20 14.3% 4.1%;\n --popover-foreground: 60 9.1% 97.8%;\n \n --card: 20 14.3% 4.1%;\n --card-foreground: 60 9.1% 97.8%;\n \n --border: 12 6.5% 15.1%;\n --input: 12 6.5% 15.1%;\n \n --primary: 60 9.1% 97.8%;\n --primary-foreground: 24 9.8% 10%;\n \n --secondary: 12 6.5% 15.1%;\n --secondary-foreground: 60 9.1% 97.8%;\n \n --accent: 12 6.5% 15.1%;\n --accent-foreground: 60 9.1% 97.8%;\n \n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 60 9.1% 97.8%;\n \n --ring: 24 5.7% 82.9%;\n }\n}\n \n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply bg-background text-foreground;\n }\n}"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/colors/zinc.json b/apps/www/src/public/registry/colors/zinc.json
index 72484fec..9fcf1311 100644
--- a/apps/www/src/public/registry/colors/zinc.json
+++ b/apps/www/src/public/registry/colors/zinc.json
@@ -89,4 +89,4 @@
},
"inlineColorsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n",
"cssVarsTemplate": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n \n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 240 10% 3.9%;\n \n --muted: 240 4.8% 95.9%;\n --muted-foreground: 240 3.8% 46.1%;\n \n --popover: 0 0% 100%;\n --popover-foreground: 240 10% 3.9%;\n \n --card: 0 0% 100%;\n --card-foreground: 240 10% 3.9%;\n \n --border: 240 5.9% 90%;\n --input: 240 5.9% 90%;\n \n --primary: 240 5.9% 10%;\n --primary-foreground: 0 0% 98%;\n \n --secondary: 240 4.8% 95.9%;\n --secondary-foreground: 240 5.9% 10%;\n \n --accent: 240 4.8% 95.9%;\n --accent-foreground: 240 5.9% 10%;\n \n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 0 0% 98%;\n \n --ring: 240 10% 3.9%;\n \n --radius: 0.5rem;\n }\n \n .dark {\n --background: 240 10% 3.9%;\n --foreground: 0 0% 98%;\n \n --muted: 240 3.7% 15.9%;\n --muted-foreground: 240 5% 64.9%;\n \n --popover: 240 10% 3.9%;\n --popover-foreground: 0 0% 98%;\n \n --card: 240 10% 3.9%;\n --card-foreground: 0 0% 98%;\n \n --border: 240 3.7% 15.9%;\n --input: 240 3.7% 15.9%;\n \n --primary: 0 0% 98%;\n --primary-foreground: 240 5.9% 10%;\n \n --secondary: 240 3.7% 15.9%;\n --secondary-foreground: 0 0% 98%;\n \n --accent: 240 3.7% 15.9%;\n --accent-foreground: 0 0% 98%;\n \n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n \n --ring: 240 4.9% 83.9%;\n }\n}\n \n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply bg-background text-foreground;\n }\n}"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/index.json b/apps/www/src/public/registry/index.json
index d212a4bb..012240fb 100644
--- a/apps/www/src/public/registry/index.json
+++ b/apps/www/src/public/registry/index.json
@@ -222,6 +222,95 @@
],
"type": "components:ui"
},
+ {
+ "name": "chart",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts"
+ ],
+ "registryDependencies": [
+ "chart",
+ "button",
+ "card"
+ ],
+ "files": [
+ "ui/chart/ChartCrosshair.vue",
+ "ui/chart/ChartLegend.vue",
+ "ui/chart/ChartSingleTooltip.vue",
+ "ui/chart/ChartTooltip.vue",
+ "ui/chart/index.ts",
+ "ui/chart/interface.ts"
+ ],
+ "type": "components:ui"
+ },
+ {
+ "name": "chart-area",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ "ui/chart-area/AreaChart.vue",
+ "ui/chart-area/index.ts"
+ ],
+ "type": "components:ui"
+ },
+ {
+ "name": "chart-bar",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ "ui/chart-bar/BarChart.vue",
+ "ui/chart-bar/index.ts"
+ ],
+ "type": "components:ui"
+ },
+ {
+ "name": "chart-donut",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ "ui/chart-donut/DonutChart.vue",
+ "ui/chart-donut/index.ts"
+ ],
+ "type": "components:ui"
+ },
+ {
+ "name": "chart-line",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ "ui/chart-line/LineChart.vue",
+ "ui/chart-line/index.ts"
+ ],
+ "type": "components:ui"
+ },
{
"name": "checkbox",
"dependencies": [],
diff --git a/apps/www/src/public/registry/styles/default/accordion.json b/apps/www/src/public/registry/styles/default/accordion.json
index a9cc9e42..be4913a4 100644
--- a/apps/www/src/public/registry/styles/default/accordion.json
+++ b/apps/www/src/public/registry/styles/default/accordion.json
@@ -27,4 +27,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/alert-dialog.json b/apps/www/src/public/registry/styles/default/alert-dialog.json
index c569742a..18ef194a 100644
--- a/apps/www/src/public/registry/styles/default/alert-dialog.json
+++ b/apps/www/src/public/registry/styles/default/alert-dialog.json
@@ -48,4 +48,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/alert.json b/apps/www/src/public/registry/styles/default/alert.json
index 7bc3f44c..54bb63e9 100644
--- a/apps/www/src/public/registry/styles/default/alert.json
+++ b/apps/www/src/public/registry/styles/default/alert.json
@@ -23,4 +23,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/area-chart.json b/apps/www/src/public/registry/styles/default/area-chart.json
new file mode 100644
index 00000000..891c5dce
--- /dev/null
+++ b/apps/www/src/public/registry/styles/default/area-chart.json
@@ -0,0 +1,19 @@
+{
+ "name": "area-chart",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts"
+ ],
+ "registryDependencies": [],
+ "files": [
+ {
+ "name": "AreaChart.vue",
+ "content": "\n\n\n \n \n\n i\"\n :y=\"(d: Data) => d.total\"\n color=\"auto\"\n :attributes=\"{\n [Area.selectors.area]: {\n fill: 'url(#colorUv)',\n },\n }\"\n :rounded-corners=\"4\"\n :bar-padding=\"0.15\"\n />\n i\"\n :y=\"(d: Data) => d.total\"\n color=\"hsl(var(--primary))\"\n />\n data[index]?.name\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n tick-text-color=\"hsl(var(--muted-foreground))\"\n />\n data[index]?.name\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n :domain-line=\"false\"\n tick-text-color=\"hsl(var(--muted-foreground))\"\n />\n \n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as AreaChart } from './AreaChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
\ No newline at end of file
diff --git a/apps/www/src/public/registry/styles/default/aspect-ratio.json b/apps/www/src/public/registry/styles/default/aspect-ratio.json
index f8534f00..54f7608c 100644
--- a/apps/www/src/public/registry/styles/default/aspect-ratio.json
+++ b/apps/www/src/public/registry/styles/default/aspect-ratio.json
@@ -13,4 +13,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/avatar.json b/apps/www/src/public/registry/styles/default/avatar.json
index a3be030c..4a5c7da8 100644
--- a/apps/www/src/public/registry/styles/default/avatar.json
+++ b/apps/www/src/public/registry/styles/default/avatar.json
@@ -23,4 +23,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/badge.json b/apps/www/src/public/registry/styles/default/badge.json
index b964534b..2c7f9d83 100644
--- a/apps/www/src/public/registry/styles/default/badge.json
+++ b/apps/www/src/public/registry/styles/default/badge.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/breadcrumb.json b/apps/www/src/public/registry/styles/default/breadcrumb.json
index ce3008c8..d9baa9cd 100644
--- a/apps/www/src/public/registry/styles/default/breadcrumb.json
+++ b/apps/www/src/public/registry/styles/default/breadcrumb.json
@@ -39,4 +39,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/button.json b/apps/www/src/public/registry/styles/default/button.json
index 6e6f2f43..6804e1e3 100644
--- a/apps/www/src/public/registry/styles/default/button.json
+++ b/apps/www/src/public/registry/styles/default/button.json
@@ -11,8 +11,8 @@
},
{
"name": "index.ts",
- "content": "import { type VariantProps, cva } from 'class-variance-authority'\n\nexport { default as Button } from './Button.vue'\n\nexport const buttonVariants = cva(\n 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline:\n 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-10 px-4 py-2',\n sm: 'h-9 rounded-md px-3',\n lg: 'h-11 rounded-md px-8',\n icon: 'h-10 w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n)\n\nexport type ButtonVariants = VariantProps\n"
+ "content": "import { type VariantProps, cva } from 'class-variance-authority'\n\nexport { default as Button } from './Button.vue'\n\nexport const buttonVariants = cva(\n 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline:\n 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-10 px-4 py-2',\n xs: 'h-7 rounded px-2',\n sm: 'h-9 rounded-md px-3',\n lg: 'h-11 rounded-md px-8',\n icon: 'h-10 w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n)\n\nexport type ButtonVariants = VariantProps\n"
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/card.json b/apps/www/src/public/registry/styles/default/card.json
index a9a8f43b..139bac3a 100644
--- a/apps/www/src/public/registry/styles/default/card.json
+++ b/apps/www/src/public/registry/styles/default/card.json
@@ -35,4 +35,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/carousel.json b/apps/www/src/public/registry/styles/default/carousel.json
index e74a7edc..5ca5575d 100644
--- a/apps/www/src/public/registry/styles/default/carousel.json
+++ b/apps/www/src/public/registry/styles/default/carousel.json
@@ -44,4 +44,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/chart-area.json b/apps/www/src/public/registry/styles/default/chart-area.json
new file mode 100644
index 00000000..000bdeda
--- /dev/null
+++ b/apps/www/src/public/registry/styles/default/chart-area.json
@@ -0,0 +1,23 @@
+{
+ "name": "chart-area",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "AreaChart.vue",
+ "content": "\n\n\n \n \n\n \n \n\n \n\n \n i\"\n :y=\"(d: Data) => d[category]\"\n color=\"auto\"\n :curve-type=\"curveType\"\n :attributes=\"{\n [Area.selectors.area]: {\n fill: `url(#color-${i})`,\n },\n }\"\n :opacity=\"legendItems.find(item => item.name === category)?.inactive ? filterOpacity : 1\"\n />\n \n\n \n i\"\n :y=\"(d: Data) => d[category]\"\n :color=\"colors[i]\"\n :curve-type=\"curveType\"\n :attributes=\"{\n [Line.selectors.line]: {\n opacity: legendItems.find(item => item.name === category)?.inactive ? filterOpacity : 1,\n },\n }\"\n />\n \n\n data[v]?.[index])\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n tick-text-color=\"hsl(var(--vis-text-color))\"\n />\n \n\n \n \n
\n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as AreaChart } from './AreaChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/default/chart-bar.json b/apps/www/src/public/registry/styles/default/chart-bar.json
new file mode 100644
index 00000000..e3905d42
--- /dev/null
+++ b/apps/www/src/public/registry/styles/default/chart-bar.json
@@ -0,0 +1,23 @@
+{
+ "name": "chart-bar",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "BarChart.vue",
+ "content": "\n\n\n \n \n\n \n \n\n i\"\n :y=\"categories.map(category => (d: Data) => d[category]) \"\n :color=\"colors\"\n :rounded-corners=\"roundedCorners\"\n :bar-padding=\"0.05\"\n :attributes=\"{\n [selectorsBar]: {\n opacity: (d: Data, i:number) => {\n const pos = i % categories.length\n return legendItems[pos]?.inactive ? filterOpacity : 1\n },\n },\n }\"\n />\n\n data[v]?.[index])\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n tick-text-color=\"hsl(var(--vis-text-color))\"\n />\n \n\n \n \n
\n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as BarChart } from './BarChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/default/chart-donut.json b/apps/www/src/public/registry/styles/default/chart-donut.json
new file mode 100644
index 00000000..bf3ecd0f
--- /dev/null
+++ b/apps/www/src/public/registry/styles/default/chart-donut.json
@@ -0,0 +1,23 @@
+{
+ "name": "chart-donut",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "DonutChart.vue",
+ "content": "\n\n\n \n \n \n\n d[category]\"\n :sort-function=\"sortFunction\"\n :color=\"colors\"\n :arc-width=\"type === 'donut' ? 20 : 0\"\n :show-background=\"false\"\n :central-label=\"type === 'donut' ? valueFormatter(totalValue) : ''\"\n :events=\"{\n [Donut.selectors.segment]: {\n click: (d: Data, ev: PointerEvent, i: number, elements: HTMLElement[]) => {\n if (d?.data?.[index] === activeSegmentKey) {\n activeSegmentKey = undefined\n elements.forEach(el => el.style.opacity = '1')\n }\n else {\n activeSegmentKey = d?.data?.[index]\n elements.forEach(el => el.style.opacity = `${filterOpacity}`)\n elements[i].style.opacity = '1'\n }\n },\n },\n }\"\n />\n\n \n \n
\n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as DonutChart } from './DonutChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/default/chart-line.json b/apps/www/src/public/registry/styles/default/chart-line.json
new file mode 100644
index 00000000..2b08ea7f
--- /dev/null
+++ b/apps/www/src/public/registry/styles/default/chart-line.json
@@ -0,0 +1,23 @@
+{
+ "name": "chart-line",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "LineChart.vue",
+ "content": "\n\n\n \n \n\n \n \n\n \n i\"\n :y=\"(d: Data) => d[category]\"\n :curve-type=\"curveType\"\n :color=\"colors[i]\"\n :attributes=\"{\n [Line.selectors.line]: {\n opacity: legendItems.find(item => item.name === category)?.inactive ? filterOpacity : 1,\n },\n }\"\n />\n \n\n data[v]?.[index])\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n tick-text-color=\"hsl(var(--vis-text-color))\"\n />\n \n\n \n \n
\n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as LineChart } from './LineChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/default/chart.json b/apps/www/src/public/registry/styles/default/chart.json
new file mode 100644
index 00000000..e8094acd
--- /dev/null
+++ b/apps/www/src/public/registry/styles/default/chart.json
@@ -0,0 +1,39 @@
+{
+ "name": "chart",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts"
+ ],
+ "registryDependencies": [
+ "chart",
+ "button",
+ "card"
+ ],
+ "files": [
+ {
+ "name": "ChartCrosshair.vue",
+ "content": "\n\n\n \n \n\n"
+ },
+ {
+ "name": "ChartLegend.vue",
+ "content": "\n\n\n \n \n
\n\n"
+ },
+ {
+ "name": "ChartSingleTooltip.vue",
+ "content": "\n\n\n \n\n"
+ },
+ {
+ "name": "ChartTooltip.vue",
+ "content": "\n\n\n \n \n \n {{ title }}\n \n \n \n \n
\n
\n \n \n
{{ item.name }}\n
\n
{{ item.value }}\n
\n \n \n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as ChartTooltip } from './ChartTooltip.vue'\nexport { default as ChartSingleTooltip } from './ChartSingleTooltip.vue'\nexport { default as ChartLegend } from './ChartLegend.vue'\nexport { default as ChartCrosshair } from './ChartCrosshair.vue'\n\nexport function defaultColors(count: number = 3) {\n const quotient = Math.floor(count / 2)\n const remainder = count % 2\n\n const primaryCount = quotient + remainder\n const secondaryCount = quotient\n return [\n ...Array.from(Array(primaryCount).keys()).map(i => `hsl(var(--vis-primary-color) / ${1 - (1 / primaryCount) * i})`),\n ...Array.from(Array(secondaryCount).keys()).map(i => `hsl(var(--vis-secondary-color) / ${1 - (1 / secondaryCount) * i})`),\n ]\n}\n\nexport * from './interface'\n"
+ },
+ {
+ "name": "interface.ts",
+ "content": "import type { Spacing } from '@unovis/ts'\n\ntype KeyOf> = Extract\n\nexport interface BaseChartProps> {\n /**\n * The source data, in which each entry is a dictionary.\n */\n data: T[]\n /**\n * Select the categories from your data. Used to populate the legend and toolip.\n */\n categories: KeyOf[]\n /**\n * Sets the key to map the data to the axis.\n */\n index: KeyOf\n /**\n * Change the default colors.\n */\n colors?: string[]\n /**\n * Margin of each the container\n */\n margin?: Spacing\n /**\n * Change the opacity of the non-selected field\n * @default 0.2\n */\n filterOpacity?: number\n /**\n * Function to format X label\n */\n xFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string\n /**\n * Function to format Y label\n */\n yFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string\n /**\n * Controls the visibility of the X axis.\n * @default true\n */\n showXAxis?: boolean\n /**\n * Controls the visibility of the Y axis.\n * @default true\n */\n showYAxis?: boolean\n /**\n * Controls the visibility of tooltip.\n * @default true\n */\n showTooltip?: boolean\n /**\n * Controls the visibility of legend.\n * @default true\n */\n showLegend?: boolean\n /**\n * Controls the visibility of gridline.\n * @default true\n */\n showGridLine?: boolean\n}\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/default/checkbox.json b/apps/www/src/public/registry/styles/default/checkbox.json
index 86d0a16e..2efd9229 100644
--- a/apps/www/src/public/registry/styles/default/checkbox.json
+++ b/apps/www/src/public/registry/styles/default/checkbox.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/collapsible.json b/apps/www/src/public/registry/styles/default/collapsible.json
index 39e79fca..0c8ac927 100644
--- a/apps/www/src/public/registry/styles/default/collapsible.json
+++ b/apps/www/src/public/registry/styles/default/collapsible.json
@@ -21,4 +21,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/command.json b/apps/www/src/public/registry/styles/default/command.json
index b9f15c83..a999b1a0 100644
--- a/apps/www/src/public/registry/styles/default/command.json
+++ b/apps/www/src/public/registry/styles/default/command.json
@@ -48,4 +48,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/context-menu.json b/apps/www/src/public/registry/styles/default/context-menu.json
index 51dcd6d8..4d2b2cce 100644
--- a/apps/www/src/public/registry/styles/default/context-menu.json
+++ b/apps/www/src/public/registry/styles/default/context-menu.json
@@ -71,4 +71,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/dialog.json b/apps/www/src/public/registry/styles/default/dialog.json
index c2f2df4d..754ae8e9 100644
--- a/apps/www/src/public/registry/styles/default/dialog.json
+++ b/apps/www/src/public/registry/styles/default/dialog.json
@@ -47,4 +47,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/drawer.json b/apps/www/src/public/registry/styles/default/drawer.json
index 6c60eae7..8982181d 100644
--- a/apps/www/src/public/registry/styles/default/drawer.json
+++ b/apps/www/src/public/registry/styles/default/drawer.json
@@ -41,4 +41,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/dropdown-menu.json b/apps/www/src/public/registry/styles/default/dropdown-menu.json
index 0198694c..1afc9343 100644
--- a/apps/www/src/public/registry/styles/default/dropdown-menu.json
+++ b/apps/www/src/public/registry/styles/default/dropdown-menu.json
@@ -67,4 +67,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/form.json b/apps/www/src/public/registry/styles/default/form.json
index 5e61096e..19a29433 100644
--- a/apps/www/src/public/registry/styles/default/form.json
+++ b/apps/www/src/public/registry/styles/default/form.json
@@ -40,4 +40,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/hover-card.json b/apps/www/src/public/registry/styles/default/hover-card.json
index 5883a52e..7dfb7f47 100644
--- a/apps/www/src/public/registry/styles/default/hover-card.json
+++ b/apps/www/src/public/registry/styles/default/hover-card.json
@@ -23,4 +23,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/input.json b/apps/www/src/public/registry/styles/default/input.json
index 7f500be6..249a6657 100644
--- a/apps/www/src/public/registry/styles/default/input.json
+++ b/apps/www/src/public/registry/styles/default/input.json
@@ -17,4 +17,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/label.json b/apps/www/src/public/registry/styles/default/label.json
index 0cfedee1..d827d8be 100644
--- a/apps/www/src/public/registry/styles/default/label.json
+++ b/apps/www/src/public/registry/styles/default/label.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/menubar.json b/apps/www/src/public/registry/styles/default/menubar.json
index 9c9e9c98..d3a44c54 100644
--- a/apps/www/src/public/registry/styles/default/menubar.json
+++ b/apps/www/src/public/registry/styles/default/menubar.json
@@ -71,4 +71,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/navigation-menu.json b/apps/www/src/public/registry/styles/default/navigation-menu.json
index ecda26c9..501c88c9 100644
--- a/apps/www/src/public/registry/styles/default/navigation-menu.json
+++ b/apps/www/src/public/registry/styles/default/navigation-menu.json
@@ -43,4 +43,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/pagination.json b/apps/www/src/public/registry/styles/default/pagination.json
index 6d25fc6f..77a558de 100644
--- a/apps/www/src/public/registry/styles/default/pagination.json
+++ b/apps/www/src/public/registry/styles/default/pagination.json
@@ -32,4 +32,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/pin-input.json b/apps/www/src/public/registry/styles/default/pin-input.json
index 894719f4..654672e8 100644
--- a/apps/www/src/public/registry/styles/default/pin-input.json
+++ b/apps/www/src/public/registry/styles/default/pin-input.json
@@ -27,4 +27,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/popover.json b/apps/www/src/public/registry/styles/default/popover.json
index 916e0eab..5d8069ce 100644
--- a/apps/www/src/public/registry/styles/default/popover.json
+++ b/apps/www/src/public/registry/styles/default/popover.json
@@ -23,4 +23,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/progress.json b/apps/www/src/public/registry/styles/default/progress.json
index cd2edde9..65493f42 100644
--- a/apps/www/src/public/registry/styles/default/progress.json
+++ b/apps/www/src/public/registry/styles/default/progress.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/radio-group.json b/apps/www/src/public/registry/styles/default/radio-group.json
index beae81f5..e1bf9019 100644
--- a/apps/www/src/public/registry/styles/default/radio-group.json
+++ b/apps/www/src/public/registry/styles/default/radio-group.json
@@ -19,4 +19,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/resizable.json b/apps/www/src/public/registry/styles/default/resizable.json
index 96622614..53b405a0 100644
--- a/apps/www/src/public/registry/styles/default/resizable.json
+++ b/apps/www/src/public/registry/styles/default/resizable.json
@@ -19,4 +19,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/scroll-area.json b/apps/www/src/public/registry/styles/default/scroll-area.json
index 4d7a79fa..2647bf53 100644
--- a/apps/www/src/public/registry/styles/default/scroll-area.json
+++ b/apps/www/src/public/registry/styles/default/scroll-area.json
@@ -19,4 +19,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/select.json b/apps/www/src/public/registry/styles/default/select.json
index cafc7f97..d4d4ca10 100644
--- a/apps/www/src/public/registry/styles/default/select.json
+++ b/apps/www/src/public/registry/styles/default/select.json
@@ -55,4 +55,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/separator.json b/apps/www/src/public/registry/styles/default/separator.json
index da6dd655..2d5d85df 100644
--- a/apps/www/src/public/registry/styles/default/separator.json
+++ b/apps/www/src/public/registry/styles/default/separator.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/sheet.json b/apps/www/src/public/registry/styles/default/sheet.json
index 33287e21..d347764a 100644
--- a/apps/www/src/public/registry/styles/default/sheet.json
+++ b/apps/www/src/public/registry/styles/default/sheet.json
@@ -43,4 +43,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/skeleton.json b/apps/www/src/public/registry/styles/default/skeleton.json
index 13be9875..019e0486 100644
--- a/apps/www/src/public/registry/styles/default/skeleton.json
+++ b/apps/www/src/public/registry/styles/default/skeleton.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/slider.json b/apps/www/src/public/registry/styles/default/slider.json
index ece41b77..036c32f9 100644
--- a/apps/www/src/public/registry/styles/default/slider.json
+++ b/apps/www/src/public/registry/styles/default/slider.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/sonner.json b/apps/www/src/public/registry/styles/default/sonner.json
index ae170e52..3a164849 100644
--- a/apps/www/src/public/registry/styles/default/sonner.json
+++ b/apps/www/src/public/registry/styles/default/sonner.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/switch.json b/apps/www/src/public/registry/styles/default/switch.json
index 3b09a00e..006f0b0a 100644
--- a/apps/www/src/public/registry/styles/default/switch.json
+++ b/apps/www/src/public/registry/styles/default/switch.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/table.json b/apps/www/src/public/registry/styles/default/table.json
index cd605e4f..9b2e8ab7 100644
--- a/apps/www/src/public/registry/styles/default/table.json
+++ b/apps/www/src/public/registry/styles/default/table.json
@@ -47,4 +47,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/tabs.json b/apps/www/src/public/registry/styles/default/tabs.json
index cc0e099d..c3fb9437 100644
--- a/apps/www/src/public/registry/styles/default/tabs.json
+++ b/apps/www/src/public/registry/styles/default/tabs.json
@@ -27,4 +27,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/tags-input.json b/apps/www/src/public/registry/styles/default/tags-input.json
index 01060323..ca31d56c 100644
--- a/apps/www/src/public/registry/styles/default/tags-input.json
+++ b/apps/www/src/public/registry/styles/default/tags-input.json
@@ -31,4 +31,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/textarea.json b/apps/www/src/public/registry/styles/default/textarea.json
index 4236a997..cc38a39e 100644
--- a/apps/www/src/public/registry/styles/default/textarea.json
+++ b/apps/www/src/public/registry/styles/default/textarea.json
@@ -17,4 +17,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/toast.json b/apps/www/src/public/registry/styles/default/toast.json
index 3cc32c77..d901ad1a 100644
--- a/apps/www/src/public/registry/styles/default/toast.json
+++ b/apps/www/src/public/registry/styles/default/toast.json
@@ -47,4 +47,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/toggle-group.json b/apps/www/src/public/registry/styles/default/toggle-group.json
index b0909535..71b4c12a 100644
--- a/apps/www/src/public/registry/styles/default/toggle-group.json
+++ b/apps/www/src/public/registry/styles/default/toggle-group.json
@@ -20,4 +20,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/toggle.json b/apps/www/src/public/registry/styles/default/toggle.json
index 5ae5563a..5dca88ac 100644
--- a/apps/www/src/public/registry/styles/default/toggle.json
+++ b/apps/www/src/public/registry/styles/default/toggle.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/tooltip.json b/apps/www/src/public/registry/styles/default/tooltip.json
index ab74ed0f..fbafb977 100644
--- a/apps/www/src/public/registry/styles/default/tooltip.json
+++ b/apps/www/src/public/registry/styles/default/tooltip.json
@@ -27,4 +27,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/default/v-calendar.json b/apps/www/src/public/registry/styles/default/v-calendar.json
index 660d94c2..e89b70ab 100644
--- a/apps/www/src/public/registry/styles/default/v-calendar.json
+++ b/apps/www/src/public/registry/styles/default/v-calendar.json
@@ -19,4 +19,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/index.json b/apps/www/src/public/registry/styles/index.json
index bbefdacf..2002ac50 100644
--- a/apps/www/src/public/registry/styles/index.json
+++ b/apps/www/src/public/registry/styles/index.json
@@ -7,4 +7,4 @@
"name": "new-york",
"label": "New York"
}
-]
\ No newline at end of file
+]
diff --git a/apps/www/src/public/registry/styles/new-york/accordion.json b/apps/www/src/public/registry/styles/new-york/accordion.json
index ecf40bab..4d354d57 100644
--- a/apps/www/src/public/registry/styles/new-york/accordion.json
+++ b/apps/www/src/public/registry/styles/new-york/accordion.json
@@ -27,4 +27,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/alert-dialog.json b/apps/www/src/public/registry/styles/new-york/alert-dialog.json
index 934099ea..283c1d01 100644
--- a/apps/www/src/public/registry/styles/new-york/alert-dialog.json
+++ b/apps/www/src/public/registry/styles/new-york/alert-dialog.json
@@ -48,4 +48,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/alert.json b/apps/www/src/public/registry/styles/new-york/alert.json
index 43eaad08..72872a7a 100644
--- a/apps/www/src/public/registry/styles/new-york/alert.json
+++ b/apps/www/src/public/registry/styles/new-york/alert.json
@@ -23,4 +23,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/area-chart.json b/apps/www/src/public/registry/styles/new-york/area-chart.json
new file mode 100644
index 00000000..891c5dce
--- /dev/null
+++ b/apps/www/src/public/registry/styles/new-york/area-chart.json
@@ -0,0 +1,19 @@
+{
+ "name": "area-chart",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts"
+ ],
+ "registryDependencies": [],
+ "files": [
+ {
+ "name": "AreaChart.vue",
+ "content": "\n\n\n \n \n\n i\"\n :y=\"(d: Data) => d.total\"\n color=\"auto\"\n :attributes=\"{\n [Area.selectors.area]: {\n fill: 'url(#colorUv)',\n },\n }\"\n :rounded-corners=\"4\"\n :bar-padding=\"0.15\"\n />\n i\"\n :y=\"(d: Data) => d.total\"\n color=\"hsl(var(--primary))\"\n />\n data[index]?.name\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n tick-text-color=\"hsl(var(--muted-foreground))\"\n />\n data[index]?.name\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n :domain-line=\"false\"\n tick-text-color=\"hsl(var(--muted-foreground))\"\n />\n \n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as AreaChart } from './AreaChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
\ No newline at end of file
diff --git a/apps/www/src/public/registry/styles/new-york/aspect-ratio.json b/apps/www/src/public/registry/styles/new-york/aspect-ratio.json
index f8534f00..54f7608c 100644
--- a/apps/www/src/public/registry/styles/new-york/aspect-ratio.json
+++ b/apps/www/src/public/registry/styles/new-york/aspect-ratio.json
@@ -13,4 +13,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/avatar.json b/apps/www/src/public/registry/styles/new-york/avatar.json
index a3be030c..4a5c7da8 100644
--- a/apps/www/src/public/registry/styles/new-york/avatar.json
+++ b/apps/www/src/public/registry/styles/new-york/avatar.json
@@ -23,4 +23,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/badge.json b/apps/www/src/public/registry/styles/new-york/badge.json
index 1057abff..d20934b6 100644
--- a/apps/www/src/public/registry/styles/new-york/badge.json
+++ b/apps/www/src/public/registry/styles/new-york/badge.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/breadcrumb.json b/apps/www/src/public/registry/styles/new-york/breadcrumb.json
index 7e70d173..094ff22e 100644
--- a/apps/www/src/public/registry/styles/new-york/breadcrumb.json
+++ b/apps/www/src/public/registry/styles/new-york/breadcrumb.json
@@ -39,4 +39,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/button.json b/apps/www/src/public/registry/styles/new-york/button.json
index b3526f5b..47aea8e3 100644
--- a/apps/www/src/public/registry/styles/new-york/button.json
+++ b/apps/www/src/public/registry/styles/new-york/button.json
@@ -11,8 +11,8 @@
},
{
"name": "index.ts",
- "content": "import { type VariantProps, cva } from 'class-variance-authority'\n\nexport { default as Button } from './Button.vue'\n\nexport const buttonVariants = cva(\n 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n)\n\nexport type ButtonVariants = VariantProps\n"
+ "content": "import { type VariantProps, cva } from 'class-variance-authority'\n\nexport { default as Button } from './Button.vue'\n\nexport const buttonVariants = cva(\n 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2',\n xs: 'h-7 rounded px-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n)\n\nexport type ButtonVariants = VariantProps\n"
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/card.json b/apps/www/src/public/registry/styles/new-york/card.json
index b2ccbb05..8446eff0 100644
--- a/apps/www/src/public/registry/styles/new-york/card.json
+++ b/apps/www/src/public/registry/styles/new-york/card.json
@@ -35,4 +35,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/carousel.json b/apps/www/src/public/registry/styles/new-york/carousel.json
index 43543e79..e3c0edd3 100644
--- a/apps/www/src/public/registry/styles/new-york/carousel.json
+++ b/apps/www/src/public/registry/styles/new-york/carousel.json
@@ -44,4 +44,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/chart-area.json b/apps/www/src/public/registry/styles/new-york/chart-area.json
new file mode 100644
index 00000000..90920ca8
--- /dev/null
+++ b/apps/www/src/public/registry/styles/new-york/chart-area.json
@@ -0,0 +1,23 @@
+{
+ "name": "chart-area",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "AreaChart.vue",
+ "content": "\n\n\n \n \n\n \n \n\n \n\n \n i\"\n :y=\"(d: Data) => d[category]\"\n color=\"auto\"\n :curve-type=\"curveType\"\n :attributes=\"{\n [Area.selectors.area]: {\n fill: `url(#color-${i})`,\n },\n }\"\n :opacity=\"legendItems.find(item => item.name === category)?.inactive ? filterOpacity : 1\"\n />\n \n\n \n i\"\n :y=\"(d: Data) => d[category]\"\n :color=\"colors[i]\"\n :curve-type=\"curveType\"\n :attributes=\"{\n [Line.selectors.line]: {\n opacity: legendItems.find(item => item.name === category)?.inactive ? filterOpacity : 1,\n },\n }\"\n />\n \n\n data[v]?.[index])\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n tick-text-color=\"hsl(var(--vis-text-color))\"\n />\n \n\n \n \n
\n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as AreaChart } from './AreaChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/new-york/chart-bar.json b/apps/www/src/public/registry/styles/new-york/chart-bar.json
new file mode 100644
index 00000000..8a33d773
--- /dev/null
+++ b/apps/www/src/public/registry/styles/new-york/chart-bar.json
@@ -0,0 +1,23 @@
+{
+ "name": "chart-bar",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "BarChart.vue",
+ "content": "\n\n\n \n \n\n \n \n\n i\"\n :y=\"categories.map(category => (d: Data) => d[category]) \"\n :color=\"colors\"\n :rounded-corners=\"roundedCorners\"\n :bar-padding=\"0.05\"\n :attributes=\"{\n [selectorsBar]: {\n opacity: (d: Data, i:number) => {\n const pos = i % categories.length\n return legendItems[pos]?.inactive ? filterOpacity : 1\n },\n },\n }\"\n />\n\n data[v]?.[index])\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n tick-text-color=\"hsl(var(--vis-text-color))\"\n />\n \n\n \n \n
\n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as BarChart } from './BarChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/new-york/chart-donut.json b/apps/www/src/public/registry/styles/new-york/chart-donut.json
new file mode 100644
index 00000000..5482628d
--- /dev/null
+++ b/apps/www/src/public/registry/styles/new-york/chart-donut.json
@@ -0,0 +1,23 @@
+{
+ "name": "chart-donut",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "DonutChart.vue",
+ "content": "\n\n\n \n \n \n\n d[category]\"\n :sort-function=\"sortFunction\"\n :color=\"colors\"\n :arc-width=\"type === 'donut' ? 20 : 0\"\n :show-background=\"false\"\n :central-label=\"type === 'donut' ? valueFormatter(totalValue) : ''\"\n :events=\"{\n [Donut.selectors.segment]: {\n click: (d: Data, ev: PointerEvent, i: number, elements: HTMLElement[]) => {\n if (d?.data?.[index] === activeSegmentKey) {\n activeSegmentKey = undefined\n elements.forEach(el => el.style.opacity = '1')\n }\n else {\n activeSegmentKey = d?.data?.[index]\n elements.forEach(el => el.style.opacity = `${filterOpacity}`)\n elements[i].style.opacity = '1'\n }\n },\n },\n }\"\n />\n\n \n \n
\n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as DonutChart } from './DonutChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/new-york/chart-line.json b/apps/www/src/public/registry/styles/new-york/chart-line.json
new file mode 100644
index 00000000..fdc55a8d
--- /dev/null
+++ b/apps/www/src/public/registry/styles/new-york/chart-line.json
@@ -0,0 +1,23 @@
+{
+ "name": "chart-line",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts",
+ "@vueuse/core"
+ ],
+ "registryDependencies": [
+ "chart",
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "LineChart.vue",
+ "content": "\n\n\n \n \n\n \n \n\n \n i\"\n :y=\"(d: Data) => d[category]\"\n :curve-type=\"curveType\"\n :color=\"colors[i]\"\n :attributes=\"{\n [Line.selectors.line]: {\n opacity: legendItems.find(item => item.name === category)?.inactive ? filterOpacity : 1,\n },\n }\"\n />\n \n\n data[v]?.[index])\"\n :grid-line=\"false\"\n :tick-line=\"false\"\n tick-text-color=\"hsl(var(--vis-text-color))\"\n />\n \n\n \n \n
\n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as LineChart } from './LineChart.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/new-york/chart.json b/apps/www/src/public/registry/styles/new-york/chart.json
new file mode 100644
index 00000000..6195cd48
--- /dev/null
+++ b/apps/www/src/public/registry/styles/new-york/chart.json
@@ -0,0 +1,39 @@
+{
+ "name": "chart",
+ "dependencies": [
+ "@unovis/vue",
+ "@unovis/ts"
+ ],
+ "registryDependencies": [
+ "chart",
+ "button",
+ "card"
+ ],
+ "files": [
+ {
+ "name": "ChartCrosshair.vue",
+ "content": "\n\n\n \n \n\n"
+ },
+ {
+ "name": "ChartLegend.vue",
+ "content": "\n\n\n \n \n
\n\n"
+ },
+ {
+ "name": "ChartSingleTooltip.vue",
+ "content": "\n\n\n \n\n"
+ },
+ {
+ "name": "ChartTooltip.vue",
+ "content": "\n\n\n \n \n \n {{ title }}\n \n \n \n \n
\n
\n \n \n
{{ item.name }}\n
\n
{{ item.value }}\n
\n \n \n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as ChartTooltip } from './ChartTooltip.vue'\nexport { default as ChartSingleTooltip } from './ChartSingleTooltip.vue'\nexport { default as ChartLegend } from './ChartLegend.vue'\nexport { default as ChartCrosshair } from './ChartCrosshair.vue'\n\nexport function defaultColors(count: number = 3) {\n const quotient = Math.floor(count / 2)\n const remainder = count % 2\n\n const primaryCount = quotient + remainder\n const secondaryCount = quotient\n return [\n ...Array.from(Array(primaryCount).keys()).map(i => `hsl(var(--vis-primary-color) / ${1 - (1 / primaryCount) * i})`),\n ...Array.from(Array(secondaryCount).keys()).map(i => `hsl(var(--vis-secondary-color) / ${1 - (1 / secondaryCount) * i})`),\n ]\n}\n\nexport * from './interface'\n"
+ },
+ {
+ "name": "interface.ts",
+ "content": "import type { Spacing } from '@unovis/ts'\n\ntype KeyOf> = Extract\n\nexport interface BaseChartProps> {\n /**\n * The source data, in which each entry is a dictionary.\n */\n data: T[]\n /**\n * Select the categories from your data. Used to populate the legend and toolip.\n */\n categories: KeyOf[]\n /**\n * Sets the key to map the data to the axis.\n */\n index: KeyOf\n /**\n * Change the default colors.\n */\n colors?: string[]\n /**\n * Margin of each the container\n */\n margin?: Spacing\n /**\n * Change the opacity of the non-selected field\n * @default 0.2\n */\n filterOpacity?: number\n /**\n * Function to format X label\n */\n xFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string\n /**\n * Function to format Y label\n */\n yFormatter?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string\n /**\n * Controls the visibility of the X axis.\n * @default true\n */\n showXAxis?: boolean\n /**\n * Controls the visibility of the Y axis.\n * @default true\n */\n showYAxis?: boolean\n /**\n * Controls the visibility of tooltip.\n * @default true\n */\n showTooltip?: boolean\n /**\n * Controls the visibility of legend.\n * @default true\n */\n showLegend?: boolean\n /**\n * Controls the visibility of gridline.\n * @default true\n */\n showGridLine?: boolean\n}\n"
+ }
+ ],
+ "type": "components:ui"
+}
diff --git a/apps/www/src/public/registry/styles/new-york/checkbox.json b/apps/www/src/public/registry/styles/new-york/checkbox.json
index 35fa7f1d..dc3c2cd0 100644
--- a/apps/www/src/public/registry/styles/new-york/checkbox.json
+++ b/apps/www/src/public/registry/styles/new-york/checkbox.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/collapsible.json b/apps/www/src/public/registry/styles/new-york/collapsible.json
index 39e79fca..0c8ac927 100644
--- a/apps/www/src/public/registry/styles/new-york/collapsible.json
+++ b/apps/www/src/public/registry/styles/new-york/collapsible.json
@@ -21,4 +21,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/command.json b/apps/www/src/public/registry/styles/new-york/command.json
index 42c34759..ffcbdb03 100644
--- a/apps/www/src/public/registry/styles/new-york/command.json
+++ b/apps/www/src/public/registry/styles/new-york/command.json
@@ -48,4 +48,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/context-menu.json b/apps/www/src/public/registry/styles/new-york/context-menu.json
index f27e8dca..38d07d10 100644
--- a/apps/www/src/public/registry/styles/new-york/context-menu.json
+++ b/apps/www/src/public/registry/styles/new-york/context-menu.json
@@ -71,4 +71,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/dialog.json b/apps/www/src/public/registry/styles/new-york/dialog.json
index fcc6ca4c..b7e8da2f 100644
--- a/apps/www/src/public/registry/styles/new-york/dialog.json
+++ b/apps/www/src/public/registry/styles/new-york/dialog.json
@@ -47,4 +47,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/drawer.json b/apps/www/src/public/registry/styles/new-york/drawer.json
index 6c60eae7..8982181d 100644
--- a/apps/www/src/public/registry/styles/new-york/drawer.json
+++ b/apps/www/src/public/registry/styles/new-york/drawer.json
@@ -41,4 +41,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/dropdown-menu.json b/apps/www/src/public/registry/styles/new-york/dropdown-menu.json
index e834d04c..3c2ab614 100644
--- a/apps/www/src/public/registry/styles/new-york/dropdown-menu.json
+++ b/apps/www/src/public/registry/styles/new-york/dropdown-menu.json
@@ -67,4 +67,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/hover-card.json b/apps/www/src/public/registry/styles/new-york/hover-card.json
index 5883a52e..7dfb7f47 100644
--- a/apps/www/src/public/registry/styles/new-york/hover-card.json
+++ b/apps/www/src/public/registry/styles/new-york/hover-card.json
@@ -23,4 +23,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/input.json b/apps/www/src/public/registry/styles/new-york/input.json
index 7b840496..a7e9c552 100644
--- a/apps/www/src/public/registry/styles/new-york/input.json
+++ b/apps/www/src/public/registry/styles/new-york/input.json
@@ -17,4 +17,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/label.json b/apps/www/src/public/registry/styles/new-york/label.json
index 0cfedee1..d827d8be 100644
--- a/apps/www/src/public/registry/styles/new-york/label.json
+++ b/apps/www/src/public/registry/styles/new-york/label.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/menubar.json b/apps/www/src/public/registry/styles/new-york/menubar.json
index 9602ca23..578ebe84 100644
--- a/apps/www/src/public/registry/styles/new-york/menubar.json
+++ b/apps/www/src/public/registry/styles/new-york/menubar.json
@@ -71,4 +71,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/navigation-menu.json b/apps/www/src/public/registry/styles/new-york/navigation-menu.json
index fa0996a5..055569f9 100644
--- a/apps/www/src/public/registry/styles/new-york/navigation-menu.json
+++ b/apps/www/src/public/registry/styles/new-york/navigation-menu.json
@@ -43,4 +43,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/pagination.json b/apps/www/src/public/registry/styles/new-york/pagination.json
index e07f0b04..4dd33388 100644
--- a/apps/www/src/public/registry/styles/new-york/pagination.json
+++ b/apps/www/src/public/registry/styles/new-york/pagination.json
@@ -32,4 +32,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/pin-input.json b/apps/www/src/public/registry/styles/new-york/pin-input.json
index 041f1411..617f41a3 100644
--- a/apps/www/src/public/registry/styles/new-york/pin-input.json
+++ b/apps/www/src/public/registry/styles/new-york/pin-input.json
@@ -27,4 +27,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/popover.json b/apps/www/src/public/registry/styles/new-york/popover.json
index 034bb416..00f53e9c 100644
--- a/apps/www/src/public/registry/styles/new-york/popover.json
+++ b/apps/www/src/public/registry/styles/new-york/popover.json
@@ -23,4 +23,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/progress.json b/apps/www/src/public/registry/styles/new-york/progress.json
index 03f8fe71..0df36278 100644
--- a/apps/www/src/public/registry/styles/new-york/progress.json
+++ b/apps/www/src/public/registry/styles/new-york/progress.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/radio-group.json b/apps/www/src/public/registry/styles/new-york/radio-group.json
index 1a38f59a..1a415d84 100644
--- a/apps/www/src/public/registry/styles/new-york/radio-group.json
+++ b/apps/www/src/public/registry/styles/new-york/radio-group.json
@@ -19,4 +19,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/resizable.json b/apps/www/src/public/registry/styles/new-york/resizable.json
index 8d9ab3c7..eb2ccc2b 100644
--- a/apps/www/src/public/registry/styles/new-york/resizable.json
+++ b/apps/www/src/public/registry/styles/new-york/resizable.json
@@ -19,4 +19,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/scroll-area.json b/apps/www/src/public/registry/styles/new-york/scroll-area.json
index 4d7a79fa..2647bf53 100644
--- a/apps/www/src/public/registry/styles/new-york/scroll-area.json
+++ b/apps/www/src/public/registry/styles/new-york/scroll-area.json
@@ -19,4 +19,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/select.json b/apps/www/src/public/registry/styles/new-york/select.json
index 01409a08..da8076e4 100644
--- a/apps/www/src/public/registry/styles/new-york/select.json
+++ b/apps/www/src/public/registry/styles/new-york/select.json
@@ -55,4 +55,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/separator.json b/apps/www/src/public/registry/styles/new-york/separator.json
index da6dd655..2d5d85df 100644
--- a/apps/www/src/public/registry/styles/new-york/separator.json
+++ b/apps/www/src/public/registry/styles/new-york/separator.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/sheet.json b/apps/www/src/public/registry/styles/new-york/sheet.json
index 215d8f67..8fd739e1 100644
--- a/apps/www/src/public/registry/styles/new-york/sheet.json
+++ b/apps/www/src/public/registry/styles/new-york/sheet.json
@@ -43,4 +43,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/skeleton.json b/apps/www/src/public/registry/styles/new-york/skeleton.json
index 1487c9e2..ceb9997d 100644
--- a/apps/www/src/public/registry/styles/new-york/skeleton.json
+++ b/apps/www/src/public/registry/styles/new-york/skeleton.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/slider.json b/apps/www/src/public/registry/styles/new-york/slider.json
index dbe372c5..6f1c60fd 100644
--- a/apps/www/src/public/registry/styles/new-york/slider.json
+++ b/apps/www/src/public/registry/styles/new-york/slider.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/sonner.json b/apps/www/src/public/registry/styles/new-york/sonner.json
index ae170e52..3a164849 100644
--- a/apps/www/src/public/registry/styles/new-york/sonner.json
+++ b/apps/www/src/public/registry/styles/new-york/sonner.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/switch.json b/apps/www/src/public/registry/styles/new-york/switch.json
index 7cc55c5b..14e290e0 100644
--- a/apps/www/src/public/registry/styles/new-york/switch.json
+++ b/apps/www/src/public/registry/styles/new-york/switch.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/table.json b/apps/www/src/public/registry/styles/new-york/table.json
index 27805556..d7f98df7 100644
--- a/apps/www/src/public/registry/styles/new-york/table.json
+++ b/apps/www/src/public/registry/styles/new-york/table.json
@@ -47,4 +47,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/tabs.json b/apps/www/src/public/registry/styles/new-york/tabs.json
index f238ee00..8c2cef7c 100644
--- a/apps/www/src/public/registry/styles/new-york/tabs.json
+++ b/apps/www/src/public/registry/styles/new-york/tabs.json
@@ -27,4 +27,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/tags-input.json b/apps/www/src/public/registry/styles/new-york/tags-input.json
index 3eaa3f7e..247c32ce 100644
--- a/apps/www/src/public/registry/styles/new-york/tags-input.json
+++ b/apps/www/src/public/registry/styles/new-york/tags-input.json
@@ -31,4 +31,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/textarea.json b/apps/www/src/public/registry/styles/new-york/textarea.json
index 40b5b596..72d2929a 100644
--- a/apps/www/src/public/registry/styles/new-york/textarea.json
+++ b/apps/www/src/public/registry/styles/new-york/textarea.json
@@ -17,4 +17,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/toast.json b/apps/www/src/public/registry/styles/new-york/toast.json
index 99669a77..185a083e 100644
--- a/apps/www/src/public/registry/styles/new-york/toast.json
+++ b/apps/www/src/public/registry/styles/new-york/toast.json
@@ -47,4 +47,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/toggle-group.json b/apps/www/src/public/registry/styles/new-york/toggle-group.json
index c1e79760..7d1e77a8 100644
--- a/apps/www/src/public/registry/styles/new-york/toggle-group.json
+++ b/apps/www/src/public/registry/styles/new-york/toggle-group.json
@@ -20,4 +20,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/toggle.json b/apps/www/src/public/registry/styles/new-york/toggle.json
index 4ccde5ca..52151f2d 100644
--- a/apps/www/src/public/registry/styles/new-york/toggle.json
+++ b/apps/www/src/public/registry/styles/new-york/toggle.json
@@ -15,4 +15,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/tooltip.json b/apps/www/src/public/registry/styles/new-york/tooltip.json
index 975435fe..5b08bfaf 100644
--- a/apps/www/src/public/registry/styles/new-york/tooltip.json
+++ b/apps/www/src/public/registry/styles/new-york/tooltip.json
@@ -27,4 +27,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/public/registry/styles/new-york/v-calendar.json b/apps/www/src/public/registry/styles/new-york/v-calendar.json
index 47ba04d0..ebe89eb5 100644
--- a/apps/www/src/public/registry/styles/new-york/v-calendar.json
+++ b/apps/www/src/public/registry/styles/new-york/v-calendar.json
@@ -19,4 +19,4 @@
}
],
"type": "components:ui"
-}
\ No newline at end of file
+}
diff --git a/apps/www/src/stores/config.ts b/apps/www/src/stores/config.ts
index 4285141f..c8649388 100644
--- a/apps/www/src/stores/config.ts
+++ b/apps/www/src/stores/config.ts
@@ -1,5 +1,5 @@
import { computed } from 'vue'
-import { useSessionStorage, useStorage } from '@vueuse/core'
+import { useStorage } from '@vueuse/core'
import { useData } from 'vitepress'
import { type Theme, themes } from './../lib/registry/themes'
import { type Style, styles } from '@/lib/registry/styles'
@@ -20,7 +20,8 @@ export const RADII = [0, 0.25, 0.5, 0.75, 1]
export function useConfigStore() {
const { isDark } = useData()
- const config = useSessionStorage('config', {
+ const config = useStorage('config', {
+ theme: 'zinc',
radius: 0.5,
style: styles[0].name,
})
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c451da07..606864f6 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -123,6 +123,12 @@ importers:
specifier: ^3.23.3
version: 3.23.3
devDependencies:
+ '@babel/traverse':
+ specifier: ^7.24.1
+ version: 7.24.1
+ '@iconify-json/gravity-ui':
+ specifier: ^1.1.2
+ version: 1.1.2
'@iconify-json/lucide':
specifier: ^1.1.180
version: 1.1.184
@@ -132,6 +138,9 @@ importers:
'@iconify-json/radix-icons':
specifier: ^1.1.14
version: 1.1.14
+ '@iconify-json/ri':
+ specifier: ^1.1.18
+ version: 1.1.20
'@iconify-json/simple-icons':
specifier: ^1.1.94
version: 1.1.100
@@ -171,9 +180,15 @@ importers:
autoprefixer:
specifier: ^10.4.19
version: 10.4.19(postcss@8.4.38)
+ fast-glob:
+ specifier: ^3.3.2
+ version: 3.3.2
lodash-es:
specifier: ^4.17.21
version: 4.17.21
+ markdown-it:
+ specifier: ^14.1.0
+ version: 14.1.0
pathe:
specifier: ^1.1.2
version: 1.1.2
@@ -201,6 +216,9 @@ importers:
vitepress:
specifier: ^1.1.3
version: 1.1.3(@algolia/client-search@4.23.3)(@types/node@20.12.7)(axios@0.18.1)(postcss@8.4.38)(search-insights@2.13.0)(terser@5.30.4)(typescript@5.4.5)
+ vue-component-meta:
+ specifier: ^2.0.13
+ version: 2.0.14(typescript@5.4.5)
vue-tsc:
specifier: ^2.0.14
version: 2.0.14(typescript@5.4.5)
@@ -1262,6 +1280,9 @@ packages:
resolution: {integrity: sha512-X38nUbachlb01YMlvPFojKoiXq+LzZvuSce70KPMPdeM1Rj03k4dR7lDslhbqXn3Ang4EU3+EAmwEAsbrjHW3g==}
engines: {node: '>=18.18'}
+ '@iconify-json/gravity-ui@1.1.2':
+ resolution: {integrity: sha512-1xDGuR/pxZJqQNxx7lA3a1gRxus9UwLgdBJpLHP/FNdLER1iwIPA5X5jNMYUp7Z34y6OkwHrb2ULz/bybTewuA==}
+
'@iconify-json/lucide@1.1.184':
resolution: {integrity: sha512-vptROqbT+ilOBZXncJzYFx5hLtbpA/jxiWGRyNdFBxJokXfJ8k09FWDIPweGvbW0V8MUQYlh0FDfV1qpyZGW3w==}
@@ -1271,6 +1292,9 @@ packages:
'@iconify-json/radix-icons@1.1.14':
resolution: {integrity: sha512-AYBOyhnJ2hXlg3aIn8Ekphrr7zHRyz1l8x6bidM3PDUuTL+aRt8r6cpCvN3GeuTHy2JOhmihbVJRF0bt2FF7Ag==}
+ '@iconify-json/ri@1.1.20':
+ resolution: {integrity: sha512-yScIGjLFBCJKWKskQTWRjNI2Awoq+VRDkRxEsCQvSfdz41n+xkRtFG2K6J1OVI90ClRHfjFC8VJ2+WzxxyFjTQ==}
+
'@iconify-json/simple-icons@1.1.100':
resolution: {integrity: sha512-PoRbJcGMv2IQ0LMotLBFIiDhSdR3LjNFo/c4T2vCJjOl24I/DMtWt4ccUWEcAA5GJCt4/LTi8zlfztAeh1Jedw==}
@@ -4840,6 +4864,9 @@ packages:
lines-and-columns@1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
+ linkify-it@5.0.0:
+ resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
+
lint-staged@15.2.2:
resolution: {integrity: sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==}
engines: {node: '>=18.12.0'}
@@ -4995,6 +5022,10 @@ packages:
mark.js@8.11.1:
resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==}
+ markdown-it@14.1.0:
+ resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
+ hasBin: true
+
mdast-util-from-markdown@0.8.5:
resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==}
@@ -5007,6 +5038,9 @@ packages:
mdn-data@2.0.30:
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
+ mdurl@2.0.0:
+ resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
+
meow@12.1.1:
resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==}
engines: {node: '>=16.10'}
@@ -5911,6 +5945,10 @@ packages:
pumpify@1.5.1:
resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==}
+ punycode.js@2.3.1:
+ resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
+ engines: {node: '>=6'}
+
punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -6755,6 +6793,9 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
+ uc.micro@2.1.0:
+ resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
+
ufo@1.5.3:
resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==}
@@ -7218,6 +7259,17 @@ packages:
vue-bundle-renderer@2.0.0:
resolution: {integrity: sha512-oYATTQyh8XVkUWe2kaKxhxKVuuzK2Qcehe+yr3bGiaQAhK3ry2kYE4FWOfL+KO3hVFwCdLmzDQTzYhTi9C+R2A==}
+ vue-component-meta@2.0.14:
+ resolution: {integrity: sha512-6ycN+5bkLLNsjno5pX+OFmFxrAXllJo95lk7jPD7g7cbtWsZY5F+pg+/YMXldHA36STrBHTfCu5QoklDV9Gynw==}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+
+ vue-component-type-helpers@2.0.14:
+ resolution: {integrity: sha512-DInfgOyXlMyliyqAAD9frK28tTfch0+tMi4qoWJcZlRxUf+NFAtraJBnAsKLep+FOyLMiajkhfyEb3xLK08i7w==}
+
vue-demi@0.14.7:
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
engines: {node: '>=12'}
@@ -8332,6 +8384,10 @@ snapshots:
'@humanwhocodes/retry@0.2.3': {}
+ '@iconify-json/gravity-ui@1.1.2':
+ dependencies:
+ '@iconify/types': 2.0.0
+
'@iconify-json/lucide@1.1.184':
dependencies:
'@iconify/types': 2.0.0
@@ -8344,6 +8400,10 @@ snapshots:
dependencies:
'@iconify/types': 2.0.0
+ '@iconify-json/ri@1.1.20':
+ dependencies:
+ '@iconify/types': 2.0.0
+
'@iconify-json/simple-icons@1.1.100':
dependencies:
'@iconify/types': 2.0.0
@@ -12706,6 +12766,10 @@ snapshots:
lines-and-columns@1.2.4: {}
+ linkify-it@5.0.0:
+ dependencies:
+ uc.micro: 2.1.0
+
lint-staged@15.2.2:
dependencies:
chalk: 5.3.0
@@ -12931,6 +12995,15 @@ snapshots:
mark.js@8.11.1: {}
+ markdown-it@14.1.0:
+ dependencies:
+ argparse: 2.0.1
+ entities: 4.5.0
+ linkify-it: 5.0.0
+ mdurl: 2.0.0
+ punycode.js: 2.3.1
+ uc.micro: 2.1.0
+
mdast-util-from-markdown@0.8.5:
dependencies:
'@types/mdast': 3.0.15
@@ -12947,6 +13020,8 @@ snapshots:
mdn-data@2.0.30: {}
+ mdurl@2.0.0: {}
+
meow@12.1.1: {}
merge-stream@2.0.0: {}
@@ -14062,6 +14137,8 @@ snapshots:
inherits: 2.0.4
pump: 2.0.1
+ punycode.js@2.3.1: {}
+
punycode@2.3.1: {}
queue-microtask@1.2.3: {}
@@ -14947,6 +15024,8 @@ snapshots:
typescript@5.4.5: {}
+ uc.micro@2.1.0: {}
+
ufo@1.5.3: {}
ultrahtml@1.5.3: {}
@@ -15577,6 +15656,17 @@ snapshots:
dependencies:
ufo: 1.5.3
+ vue-component-meta@2.0.14(typescript@5.4.5):
+ dependencies:
+ '@volar/typescript': 2.2.0-alpha.10
+ '@vue/language-core': 2.0.14(typescript@5.4.5)
+ path-browserify: 1.0.1
+ vue-component-type-helpers: 2.0.14
+ optionalDependencies:
+ typescript: 5.4.5
+
+ vue-component-type-helpers@2.0.14: {}
+
vue-demi@0.14.7(vue@3.4.24(typescript@5.4.5)):
dependencies:
vue: 3.4.24(typescript@5.4.5)