@devgateway/dvz-ui-react
Version:
A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.
45 lines (44 loc) • 1.73 kB
TypeScript
export declare const htmlInputAttrs: string[];
export declare const htmlInputEvents: string[];
export declare const htmlInputProps: string[];
export declare const htmlImageProps: string[];
/**
* Returns an array of objects consisting of: props of html input element and rest.
* @param {object} props A ReactElement props object
* @param {Object} [options={}]
* @param {Array} [options.htmlProps] An array of html input props
* @param {boolean} [options.includeAria] Includes all input props that starts with "aria-"
* @returns {[{}, {}]} An array of objects
*/
export declare const partitionHTMLProps: (props: object, options?: {
htmlProps?: string[];
includeAria?: boolean;
}) => [{}, {}];
/**
* Props where only the prop key is used in the className.
* @param {*} val A props value
* @param {string} key A props key
*
* @example
* <Label tag />
* <div class="ui tag label"></div>
*/
export declare const useKeyOnly: <T extends any>(val: T, key: string) => string;
/**
* Props that require both a key and value to create a className.
* @param {*} val A props value
* @param {string} key A props key
*
* @example
* <Label corner='left' />
* <div class="ui left corner label"></div>
*/
export declare const useValueAndKey: <T extends any>(val: T, key: string) => string | false;
/**
* Returns an object consisting of props beyond the scope of the Component.
* Useful for getting and spreading unknown props from the user.
* @param {function} Component A function or ReactClass.
* @param {object} props A ReactElement props object
* @returns {{}} A shallow copy of the prop object
*/
export declare const getUnhandledProps: (Component: React.ComponentType<any>, props: Record<string, any>) => {};