@empathyco/x-components
Version:
Empathy X Components
79 lines • 2.47 kB
TypeScript
/**
* Highlights the given part of the text. The component is smart enough to do matches
* between special characters like tilde, cedilla, eñe, capital letters...
*
* @public
*/
declare const _default: import("vue").DefineComponent<{
/** The text to highlight some part of it. */
text: {
type: StringConstructor;
default: string;
};
/** The part of the text to be highlighted. */
highlight: {
type: StringConstructor;
default: string;
};
/** CSS Class to add when the `text` string contains the `highlight` string. */
matchClass: {
type: StringConstructor;
default: string;
};
/** CSS Class to add when the given `text` doesn't contain the `highlight` string. */
noMatchClass: {
type: StringConstructor;
default: string;
};
/** CSS Class to add to the matching text. */
matchingPartClass: {
type: StringConstructor;
default: string;
};
}, {
hasMatch: import("vue").ComputedRef<boolean>;
matchParts: import("vue").ComputedRef<{
start: string;
match: string;
end: string;
}>;
dynamicCSSClasses: import("vue").ComputedRef<{
[x: string]: boolean;
'x-highlight--has-match': boolean;
'x-highlight-text': boolean;
}>;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/** The text to highlight some part of it. */
text: {
type: StringConstructor;
default: string;
};
/** The part of the text to be highlighted. */
highlight: {
type: StringConstructor;
default: string;
};
/** CSS Class to add when the `text` string contains the `highlight` string. */
matchClass: {
type: StringConstructor;
default: string;
};
/** CSS Class to add when the given `text` doesn't contain the `highlight` string. */
noMatchClass: {
type: StringConstructor;
default: string;
};
/** CSS Class to add to the matching text. */
matchingPartClass: {
type: StringConstructor;
default: string;
};
}>>, {
text: string;
highlight: string;
matchClass: string;
noMatchClass: string;
matchingPartClass: string;
}, {}>;
export default _default;
//# sourceMappingURL=highlight.vue?vue&type=script&lang.d.ts.map