Skip to content

Commit 32c99e7

Browse files
committed
chore: remove deprecated SIZES_MAP
1 parent de7358b commit 32c99e7

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

src/components/fields/ListBox/ListBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
Styles,
3838
tasty,
3939
} from '../../../tasty';
40-
import { SIZES, SIZES_MAP } from '../../../tokens';
40+
import { SIZE_NAME_TO_KEY, SIZES } from '../../../tokens';
4141
import { mergeProps, useCombinedRefs } from '../../../utils/react';
4242
import { useFocus } from '../../../utils/react/interactions';
4343
// Import Menu styled components for header and footer
@@ -793,7 +793,7 @@ export const ListBox = forwardRef(function ListBox<T extends object>(
793793
if (currentItem?.props?.description) {
794794
return SIZES.XL + 1;
795795
}
796-
return SIZES[SIZES_MAP[size] as keyof typeof SIZES] + 1;
796+
return SIZES[SIZE_NAME_TO_KEY[size] as keyof typeof SIZES] + 1;
797797
},
798798
measureElement: (el) => {
799799
return el.offsetHeight + 1;

src/tokens/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { BASE_TOKENS } from './base';
2020
import { COLOR_TOKENS } from './colors';
2121
import { LAYOUT_TOKENS } from './layout';
2222
import { SHADOW_TOKENS } from './shadows';
23-
import { SIZE_NAME_TO_KEY, SIZE_TOKENS, SIZES, SIZES_MAP } from './sizes';
23+
import { SIZE_NAME_TO_KEY, SIZE_TOKENS, SIZES } from './sizes';
2424
import { SPACE_TOKENS } from './spacing';
2525

2626
import type { Styles } from '../tasty/styles/types';
@@ -53,7 +53,7 @@ export const TOKENS: Styles = {
5353

5454
// Re-export category modules for direct access
5555
export { COLOR_TOKENS } from './colors';
56-
export { SIZES, SIZE_NAME_TO_KEY, SIZES_MAP, SIZE_TOKENS } from './sizes';
56+
export { SIZES, SIZE_NAME_TO_KEY, SIZE_TOKENS } from './sizes';
5757
export type { SizeKey, SizeName } from './sizes';
5858
export { SPACE_TOKENS } from './spacing';
5959
export { SHADOW_TOKENS } from './shadows';

src/tokens/sizes.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ export const SIZE_NAME_TO_KEY: Record<SizeName, SizeKey> = {
2929
xlarge: 'XL',
3030
};
3131

32-
/** @deprecated Use SIZE_NAME_TO_KEY instead */
33-
export const SIZES_MAP = SIZE_NAME_TO_KEY;
34-
3532
/**
3633
* Size tokens with $ prefix for CSS custom properties.
3734
* Creates tokens like `$size-xs`, `$size-sm`, etc.

0 commit comments

Comments
 (0)