export interface SelectorManagerConfig { /** * Style prefix. * @default 'clm-' */ stylePrefix?: string; /** * Specify the element to use as a container, string (query) or HTMLElement. * With the empty value, nothing will be rendered. * @default '' */ appendTo?: string | HTMLElement; /** * Default selectors. * @default [] */ selectors?: any[]; /** * Default states. * @default [{ name: 'hover' }, { name: 'active' }, { name: 'nth-of-type(2n)' }] */ states?: any[]; /** * Custom selector name escaping strategy. * @example * escapeName: name => name.replace(' ', '_'), */ escapeName?: (name: string) => string; /** * Custom selected name strategy (the string you see after 'Selected'). * @example * selectedName: ({ result, state, target }) => `${result} - ID: ${target.getId()}`, */ selectedName?: (props: { result: string; state: any; target: any }) => string; /** * Icon used to add new selector */ iconAdd?: string; /** * Icon used to sync styles. */ iconSync?: string; /** * Icon to show when the selector is enabled. */ iconTagOn?: string; /** * Icon to show when the selector is disabled. */ iconTagOff?: string; /** * Icon used to remove the selector. */ iconTagRemove?: string; /** * Custom render function for the Selector Manager. * @example * render: ({ el, labelHead, labelStates, labelInfo, }) => { * // You can use the default `el` to extend/edit the current * // DOM element of the Selector Manager * const someEl = document.createElement('div'); * // ... * el.appendChild(someEl); * // no need to return anything from the function * * // Create and return a new DOM element * const newEl = document.createElement('div'); * // ... * return newEl; * * // Return an HTML string for a completely different layout. * // Use `data-*` attributes to make the module recognize some elements: * // `data-states` - Where to append state `