@synergy-design-system/components
Version:
47 lines (46 loc) • 2.61 kB
TypeScript
import { type IconLibrary } from './library.js';
import { type AvailableSystemIcons } from './library.system.js';
/**
* The icon migration state:
* - DISABLED: No migration is performed.
* - ENABLED: Migration is performed and logs a warning when an icon is migrated.
* - ENABLED_WITHOUT_LOGGING: Migration is performed without logging warnings.
*/
type IconMigrationState = 'DISABLED' | 'ENABLED' | 'ENABLED_WITHOUT_LOGGING';
/**
* Get the migrated icon name for a given old icon name.
* @param {string} iconName The old icon name
* @param {boolean} enableLogging? Whether to enable logging for unmapped icons
* @returns {string} The new icon name
* @deprecated Consider moving to synergy 2025 icons directly. See https://synergy-design-system.github.io/?path=/docs/migration--docs for further details.
*/
export declare const migrateIconName: (iconName: string, enableLogging?: boolean) => string;
/**
* Get the migrated icon name for a given old icon name in its filled state.
* @param {string} iconName The old icon name
* @param {boolean} enableLogging? Whether to enable logging for unmapped icons
* @returns {string} The new icon name
* @deprecated Consider moving to synergy 2025 icons directly. See https://synergy-design-system.github.io/?path=/docs/migration--docs for further details.
*/
export declare const migrateIconNameFilled: (iconName: string, enableLogging?: boolean) => string;
/**
* Create an icon library for migrating old icon names to new icon names.
* @param {IconMigrationState} withState The icon migration state
* @returns {IconLibrary} The migration icon library
* @deprecated Consider moving to synergy 2025 icons directly. See https://synergy-design-system.github.io/?path=/docs/migration--docs for further details.
*/
export declare const createMigrationLibrary: (withState?: IconMigrationState) => IconLibrary;
/**
* Default icon library for migrating old icon names to new icon names.
* @deprecated Consider moving to synergy 2025 icons directly. See https://synergy-design-system.github.io/?path=/docs/migration--docs for further details.
*/
export declare const migrationLibrary: IconLibrary;
/**
* Setup the system icon library.
* @param iconset The system icon set to use
* @param enableLogging Enable logging of migrated icons?
* @returns The icon library used
* @deprecated Consider moving to synergy 2025 icons directly. See https://synergy-design-system.github.io/?path=/docs/migration--docs for further details.
*/
export declare const setupIcons: (iconset?: AvailableSystemIcons, enableLogging?: boolean) => IconLibrary;
export {};