From 4c17904ac4a831e8fa7e7ea3d0c031a3ae523ec6 Mon Sep 17 00:00:00 2001 From: Jordan Phillips Date: Sun, 19 May 2024 16:50:01 +1000 Subject: [PATCH] fix: combo box component not exported (#96) * fix(combo-box): combo-box component not exported * refactor: remove unused useDomRef hook * refactor: rename theme utils directory to utilities --- packages/react/src/hooks/use-dom-ref.ts | 13 ------------- packages/react/src/index.ts | 1 + packages/theme/src/colors/semantic.ts | 2 +- packages/theme/src/components/chip.ts | 2 +- packages/theme/src/{utils => utilities}/flip.ts | 0 5 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 packages/react/src/hooks/use-dom-ref.ts rename packages/theme/src/{utils => utilities}/flip.ts (100%) diff --git a/packages/react/src/hooks/use-dom-ref.ts b/packages/react/src/hooks/use-dom-ref.ts deleted file mode 100644 index 7065da5..0000000 --- a/packages/react/src/hooks/use-dom-ref.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Ref, RefObject } from 'react' - -import { useImperativeHandle, useRef } from 'react' - -export const useDomRef = (ref?: RefObject | Ref) => { - const domRef = useRef(null) - - useImperativeHandle(ref, () => domRef.current) - - return domRef -} - -export type UseDomRefReturn = ReturnType diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 38fc1e6..5dea3e6 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -6,6 +6,7 @@ export * from '@/components/button' export * from '@/components/card' export * from '@/components/checkbox' export * from '@/components/chip' +export * from '@/components/combo-box' export * from '@/components/dialog' export * from '@/components/divider' export * from '@/components/form' diff --git a/packages/theme/src/colors/semantic.ts b/packages/theme/src/colors/semantic.ts index 7f97ddd..30d4c02 100644 --- a/packages/theme/src/colors/semantic.ts +++ b/packages/theme/src/colors/semantic.ts @@ -3,7 +3,7 @@ import colors from 'tailwindcss/colors' import { brand } from '@/colors/brand' import { seashell } from '@/colors/seashell' import { shark } from '@/colors/shark' -import { flip } from '@/utils/flip' +import { flip } from '@/utilities/flip' export const semantic = { light: { diff --git a/packages/theme/src/components/chip.ts b/packages/theme/src/components/chip.ts index a0f7926..4b587d7 100644 --- a/packages/theme/src/components/chip.ts +++ b/packages/theme/src/components/chip.ts @@ -9,7 +9,7 @@ export const chip = tv({ variants: { color: { neutral: { - chip: ['text-subtitle', 'bg-shark/20', 'border-partition'], + chip: ['text-subtitle', 'bg-shark/20', 'border-subtitle'], }, brand: { chip: ['text-brand', 'bg-brand/20', 'border-brand'], diff --git a/packages/theme/src/utils/flip.ts b/packages/theme/src/utilities/flip.ts similarity index 100% rename from packages/theme/src/utils/flip.ts rename to packages/theme/src/utilities/flip.ts