diff --git a/packages/filter/src/theme/preset.ts b/packages/filter/src/theme/preset.ts index dc18124..ceab69a 100644 --- a/packages/filter/src/theme/preset.ts +++ b/packages/filter/src/theme/preset.ts @@ -1,8 +1,8 @@ import { ButtonView, InputView, - SingleSelectView, MultiSelectView, + SingleSelectView, } from "../views/components.js"; import { presetDataInputSpecs } from "../views/data-input-views.js"; import { FieldSelect } from "../views/field-select.js"; @@ -14,9 +14,9 @@ import { FilterSelect } from "../views/filter-select.js"; import { primitives } from "../views/primitives.js"; import { RuleJoiner } from "../views/rule-joiner.js"; import { SingleFilterContainer } from "../views/single-filter-container.js"; -import type { ThemeSpec } from "./index.js"; +import type { FilterTheme } from "./index.js"; -export const presetTheme: ThemeSpec = { +export const presetTheme: FilterTheme = { primitives, components: { Button: ButtonView, @@ -35,4 +35,4 @@ export const presetTheme: ThemeSpec = { SingleFilterContainer, }, dataInputViews: presetDataInputSpecs, -} satisfies ThemeSpec; +}; diff --git a/packages/filter/src/theme/types.ts b/packages/filter/src/theme/types.ts index d725106..6e49907 100644 --- a/packages/filter/src/theme/types.ts +++ b/packages/filter/src/theme/types.ts @@ -9,8 +9,8 @@ import type { } from "react"; import type { z } from "zod"; import type { - SingleSelectProps, MultiSelectProps, + SingleSelectProps, } from "../views/components.js"; import type { FieldSelectProps } from "../views/field-select.js"; import type { DataInputProps } from "../views/filter-data-input.js"; @@ -39,7 +39,7 @@ export type DataInputViewSpec = { view: ComponentType; }; -export type ThemeSpec = { +export type FilterTheme = { primitives: { button: ComponentType< ButtonHTMLAttributes & RefAttributes @@ -84,3 +84,8 @@ export type ThemeSpec = { }; dataInputViews: DataInputViewSpec[]; }; + +/** + * @deprecated use {@link FilterTheme} instead + */ +export type ThemeSpec = FilterTheme;