diff --git a/src/modules/esl-footnotes/core/esl-footnotes.shape.ts b/src/modules/esl-footnotes/core/esl-footnotes.shape.ts new file mode 100644 index 000000000..1cb944262 --- /dev/null +++ b/src/modules/esl-footnotes/core/esl-footnotes.shape.ts @@ -0,0 +1,29 @@ +import type {ESLBaseElementShape} from '../../esl-base-element/core/esl-base-element.shape'; +import type {ESLFootnotes} from './esl-footnotes'; + +/** + * Tag declaration interface of ESL Footnotes element + * Used for TSX declaration + */ +export interface ESLFootnotesTagShape extends ESLBaseElementShape { + /** Label for 'return to note' button title */ + 'back-to-note-label'?: string; + + /** Grouping note instances with identical content enable/disable */ + 'grouping'?: string; + + /** Target element {@link ESLTraversingQuery} to define scope */ + 'scope-target'?: string; + + /** Children are not allowed for ESLShare */ + children?: never[]; +} + +declare global { + namespace JSX { + export interface IntrinsicElements { + /** {@link ESLFootnotes} custom tag */ + 'esl-footnotes': ESLFootnotesTagShape; + } + } +} diff --git a/src/modules/esl-footnotes/core/esl-note.shape.ts b/src/modules/esl-footnotes/core/esl-note.shape.ts new file mode 100644 index 000000000..7b07d4928 --- /dev/null +++ b/src/modules/esl-footnotes/core/esl-note.shape.ts @@ -0,0 +1,40 @@ +import type {ESLBaseElementShape} from '../../esl-base-element/core/esl-base-element.shape'; +import type {ESLNote} from './esl-note'; + +/** + * Tag declaration interface of ESL Note element + * Used for TSX declaration + */ +export interface ESLNoteTagShape extends ESLBaseElementShape { + /** Target to container element {@link ESLTraversingQuery} to define bounds of tooltip visibility (window by default) */ + 'container'?: string; + + /** Media query to specify that footnotes must ignore this note. Default: `not all` */ + 'ignore'?: string; + + /** Tooltip content */ + 'html'?: string; + + /** + * Note label in stand-alone mode (detached from footnotes), + * in the connected state it is a numeric index that is calculated automatically + */ + 'standalone-label'?: string; + + /** Define click event tracking media query */ + 'track-click'?: boolean | string; + /** Define hover event tracking media query */ + 'track-hover'?: boolean | string; + + /** Allowed children */ + children?: any; +} + +declare global { + namespace JSX { + export interface IntrinsicElements { + /** {@link ESLNote} custom tag */ + 'esl-note': ESLNoteTagShape; + } + } +}