From b86ff35b0c457870bbc0275872bd74d65169e7d8 Mon Sep 17 00:00:00 2001 From: Dennis Torres Date: Mon, 12 Feb 2024 04:56:53 -0500 Subject: [PATCH] Add support for Radix UI spacing variables (#109) --- .changeset/sharp-cows-pump.md | 5 ++++ packages/tailwind-config/src/index.ts | 40 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .changeset/sharp-cows-pump.md diff --git a/.changeset/sharp-cows-pump.md b/.changeset/sharp-cows-pump.md new file mode 100644 index 00000000..1305ffe1 --- /dev/null +++ b/.changeset/sharp-cows-pump.md @@ -0,0 +1,5 @@ +--- +"@spear-ai/tailwind-config": minor +--- + +Added support for Radix UI spacing variables. diff --git a/packages/tailwind-config/src/index.ts b/packages/tailwind-config/src/index.ts index 96556dd5..5d4af539 100644 --- a/packages/tailwind-config/src/index.ts +++ b/packages/tailwind-config/src/index.ts @@ -54,6 +54,46 @@ export const tailwindConfig: Config = { scale: { "-1": "-1", }, + spacing: { + "accordion-content-height": "var(--radix-accordion-content-height)", + "accordion-content-width": "var(--radix-accordion-content-width)", + "collapsible-content-height": "var(--radix-collapsible-content-height)", + "collapsible-content-width": "var(--radix-collapsible-content-width)", + "context-menu-content-available-height": "var(--radix-context-menu-content-available-height)", + "context-menu-content-available-width": "var(--radix-context-menu-content-available-width)", + "context-menu-trigger-height": "var(--radix-context-menu-trigger-height)", + "context-menu-trigger-width": "var(--radix-context-menu-trigger-width)", + "dropdown-menu-content-available-height": "var(--radix-dropdown-menu-content-available-height)", + "dropdown-menu-content-available-width": "var(--radix-dropdown-menu-content-available-width)", + "dropdown-menu-trigger-height": "var(--radix-dropdown-menu-trigger-width)", + "dropdown-menu-trigger-width": "var(--radix-dropdown-menu-trigger-width)", + "hover-card-content-available-height": "var(--radix-hover-card-content-available-height)", + "hover-card-content-available-width": "var(--radix-hover-card-content-available-width)", + "hover-card-trigger-height": "var(--radix-hover-card-trigger-width)", + "hover-card-trigger-width": "var(--radix-hover-card-trigger-width)", + "menubar-content-available-height": "var(--radix-menubar-content-available-height)", + "menubar-content-available-width": "var(--radix-menubar-content-available-width)", + "menubar-trigger-height": "var(--radix-menubar-trigger-width)", + "menubar-trigger-width": "var(--radix-menubar-trigger-width)", + "navigation-menu-viewport-height": "var(--radix-navigation-menu-viewport-height)", + "navigation-menu-viewport-width": "var(--radix-navigation-menu-viewport-width)", + "popover-content-available-height": "var(--radix-popover-content-available-height)", + "popover-content-available-width": "var(--radix-popover-content-available-width)", + "popover-trigger-height": "var(--radix-popover-trigger-height)", + "popover-trigger-width": "var(--radix-popover-trigger-width)", + "select-content-available-height": "var(--radix-select-content-available-height)", + "select-content-available-width": "var(--radix-select-content-available-width)", + "select-trigger-height": "var(--radix-select-trigger-height)", + "select-trigger-width": "var(--radix-select-trigger-width)", + "toast-swipe-end-x": "var(--radix-toast-swipe-end-x)", + "toast-swipe-end-y": "var(--radix-toast-swipe-end-y)", + "toast-swipe-move-x": "var(--radix-toast-swipe-move-x)", + "toast-swipe-move-y": "var(--radix-toast-swipe-move-y)", + "tooltip-content-available-height": "var(--radix-tooltip-content-available-height)", + "tooltip-content-available-width": "var(--radix-tooltip-content-available-width)", + "tooltip-trigger-height": "var(--radix-tooltip-trigger-height)", + "tooltip-trigger-width": "var(--radix-tooltip-trigger-width)", + }, typography: ({ theme }: { theme: (path: string) => string }) => ({ theme: { css: {