@elliemae/ds-utilities 3.14.0-next.8 → 3.14.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/types/algorithms/crossTypeSort.d.ts +5 -0
  2. package/dist/types/capitalize.d.ts +1 -0
  3. package/dist/types/compose.d.ts +13 -0
  4. package/dist/types/deprecated/deprecatedMsg.d.ts +1 -0
  5. package/dist/types/deprecated/index.d.ts +6 -0
  6. package/dist/types/deprecated/reactTypesUtility.d.ts +5 -0
  7. package/dist/types/deprecated/scrollingTimer.d.ts +1 -0
  8. package/dist/types/deprecated/useParentElement.d.ts +2 -0
  9. package/dist/types/deprecated/useSetRef.d.ts +2 -0
  10. package/dist/types/deprecated/useUncontrolled.d.ts +1 -0
  11. package/dist/types/deprecated/useWindowSize.d.ts +2 -0
  12. package/dist/types/getComponentFromProps.d.ts +4 -0
  13. package/dist/types/hooks/index.d.ts +22 -0
  14. package/dist/types/hooks/useCallbackAfterRender.d.ts +3 -0
  15. package/dist/types/hooks/useCancellableDelayedCallback.d.ts +3 -0
  16. package/dist/types/hooks/useDerivedStateFromProps.d.ts +14 -0
  17. package/dist/types/hooks/useDimensions.d.ts +1 -0
  18. package/dist/types/hooks/useExecutionTimer.d.ts +3 -0
  19. package/dist/types/hooks/useExpandState.d.ts +26 -0
  20. package/dist/types/hooks/useFocusTrap.d.ts +16 -0
  21. package/dist/types/hooks/useHotkeys.d.ts +15 -0
  22. package/dist/types/hooks/useHoverHandlersDelay.d.ts +11 -0
  23. package/dist/types/hooks/useIsMobile.d.ts +1 -0
  24. package/dist/types/hooks/useIsShowingEllipsis.d.ts +5 -0
  25. package/dist/types/hooks/useMakeMutable.d.ts +4 -0
  26. package/dist/types/hooks/useOnBlurOut.d.ts +10 -0
  27. package/dist/types/hooks/useOnElementResize.d.ts +2 -0
  28. package/dist/types/hooks/useOnFirstFocusIn.d.ts +16 -0
  29. package/dist/types/hooks/useOnSpecificFocus.d.ts +10 -0
  30. package/dist/types/hooks/usePrevious.d.ts +2 -0
  31. package/dist/types/hooks/useResizeObserver.d.ts +7 -0
  32. package/dist/types/hooks/useShouldRecalculate.d.ts +2 -0
  33. package/dist/types/hooks/useWindowScrollerList.d.ts +7 -0
  34. package/dist/types/index.d.ts +16 -0
  35. package/dist/types/objectUtilities.d.ts +2 -0
  36. package/dist/types/onClickHandlerForNonInteractiveElements.d.ts +8 -0
  37. package/dist/types/operators.d.ts +14 -0
  38. package/dist/types/platform.d.ts +2 -0
  39. package/dist/types/props-helpers/defaultProps/index.d.ts +1 -0
  40. package/dist/types/props-helpers/defaultProps/useMemoMergePropsWithDefault.d.ts +1 -0
  41. package/dist/types/props-helpers/getProps/index.d.ts +2 -0
  42. package/dist/types/props-helpers/globalProps/constants.d.ts +3 -0
  43. package/dist/types/props-helpers/globalProps/getGlobalAttributes.d.ts +6 -0
  44. package/dist/types/props-helpers/globalProps/globalAttributesPropTypes.d.ts +363 -0
  45. package/dist/types/props-helpers/globalProps/index.d.ts +3 -0
  46. package/dist/types/props-helpers/globalProps/useGetGlobalAttributes.d.ts +3 -0
  47. package/dist/types/props-helpers/index.d.ts +7 -0
  48. package/dist/types/props-helpers/propTypes/PropTypes.d.ts +3 -0
  49. package/dist/types/props-helpers/propTypes/customPropTypes.d.ts +2 -0
  50. package/dist/types/props-helpers/propTypes/describe.d.ts +3 -0
  51. package/dist/types/props-helpers/propTypes/describeConversions.d.ts +3 -0
  52. package/dist/types/props-helpers/propTypes/describeGuards.d.ts +9 -0
  53. package/dist/types/props-helpers/propTypes/index.d.ts +4 -0
  54. package/dist/types/props-helpers/propTypes/toTypescript.d.ts +3 -0
  55. package/dist/types/props-helpers/propTypes/types.d.ts +116 -0
  56. package/dist/types/props-helpers/tests/globalProps/TestComponent.d.ts +1 -0
  57. package/dist/types/props-helpers/tests/globalProps/globalAttributes.test.d.ts +1 -0
  58. package/dist/types/props-helpers/tests/validation/any.validation.test.d.ts +1 -0
  59. package/dist/types/props-helpers/tests/validation/array.validation.test.d.ts +1 -0
  60. package/dist/types/props-helpers/tests/validation/boolean.validation.test.d.ts +1 -0
  61. package/dist/types/props-helpers/tests/validation/function.validation.test.d.ts +1 -0
  62. package/dist/types/props-helpers/tests/validation/isRequiredIf.validation.test.d.ts +1 -0
  63. package/dist/types/props-helpers/tests/validation/number.validation.test.d.ts +1 -0
  64. package/dist/types/props-helpers/tests/validation/object.validation.test.d.ts +1 -0
  65. package/dist/types/props-helpers/tests/validation/schema.validation.test.d.ts +1 -0
  66. package/dist/types/props-helpers/tests/validation/string.validation.test.d.ts +1 -0
  67. package/dist/types/props-helpers/tests/validation/test.schema.d.ts +1 -0
  68. package/dist/types/props-helpers/tests/validation/union.validation.test.d.ts +1 -0
  69. package/dist/types/props-helpers/tests/xstyledProps/TestComponent.d.ts +1 -0
  70. package/dist/types/props-helpers/tests/xstyledProps/xstyledProps.test.d.ts +1 -0
  71. package/dist/types/props-helpers/useDeprecateComponent/index.d.ts +6 -0
  72. package/dist/types/props-helpers/validation/errorTemplates.d.ts +2 -0
  73. package/dist/types/props-helpers/validation/index.d.ts +2 -0
  74. package/dist/types/props-helpers/validation/typescriptGuards.d.ts +12 -0
  75. package/dist/types/props-helpers/validation/typescriptParsers.d.ts +1 -0
  76. package/dist/types/props-helpers/validation/typescriptValidator.d.ts +4 -0
  77. package/dist/types/props-helpers/xstyledProps/constants.d.ts +7 -0
  78. package/dist/types/props-helpers/xstyledProps/index.d.ts +2 -0
  79. package/dist/types/props-helpers/xstyledProps/useGetXstyledProps.d.ts +6 -0
  80. package/dist/types/props-helpers/xstyledProps/xstyledPropTypes.d.ts +84 -0
  81. package/dist/types/reactTypesUtility.d.ts +1 -0
  82. package/dist/types/system.d.ts +7 -0
  83. package/dist/types/timeUtils.d.ts +7 -0
  84. package/dist/types/utils.d.ts +28 -0
  85. package/dist/types/validations.d.ts +27 -0
  86. package/package.json +2 -2
@@ -0,0 +1,5 @@
1
+ type ComparisonTerm = string | number | null | undefined;
2
+ type Direction = 'ASC' | 'DESC';
3
+ type SortCB = Required<Parameters<(typeof Array.prototype)['sort']>>[0];
4
+ export declare const crossTypeSort: (a: ComparisonTerm, b: ComparisonTerm, direction?: Direction) => ReturnType<SortCB>;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare const capitalize: (string: string) => string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Composes single-argument functions from right to left. The rightmost
3
+ * function can take multiple arguments as it provides the signature for
4
+ * the resulting composite function. [From redux v4.0.5]
5
+ *
6
+ * @param {...Function} funcs The functions to compose.
7
+ * @returns {Function} A function obtained by composing the argument functions
8
+ * from right to left. For example, compose(f, g, h) is identical to doing
9
+ * (...args) => f(g(h(...args))).
10
+ */
11
+ type UnknownFunctionT = (...args: unknown[]) => unknown;
12
+ export declare const compose: (...funcs: UnknownFunctionT[]) => UnknownFunctionT;
13
+ export default compose;
@@ -0,0 +1 @@
1
+ export declare const deprecatedMsg = "is going to be deprecated, please consider removing it from your project";
@@ -0,0 +1,6 @@
1
+ export * from './reactTypesUtility';
2
+ export * from './scrollingTimer';
3
+ export * from './useParentElement';
4
+ export * from './useSetRef';
5
+ export * from './useUncontrolled';
6
+ export * from './useWindowSize';
@@ -0,0 +1,5 @@
1
+ export declare function isClassComponent(component: any): boolean;
2
+ export declare function isFunctionComponent(component: any): boolean;
3
+ export declare function isReactComponent(component: any): boolean;
4
+ export declare function isElement(element: Record<string, unknown> | null | undefined): boolean;
5
+ export declare function isCompositeTypeElement(element: Record<string, unknown> | null | undefined): boolean;
@@ -0,0 +1 @@
1
+ export declare const resetTimer: (func: (...args: unknown[]) => unknown) => (this: any, ...args: unknown[]) => void;
@@ -0,0 +1,2 @@
1
+ import type React from 'react';
2
+ export declare const useParentElement: (ref: React.RefObject<HTMLElement>) => ParentNode | null;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const useSetRef: (initial: unknown) => (import("react").MutableRefObject<unknown> | ((node: any) => void))[];
@@ -0,0 +1 @@
1
+ export declare const useUncontrolled: (...args: any[]) => any;
@@ -0,0 +1,2 @@
1
+ export declare const useWindowSize: () => number[] | (() => void);
2
+ export default useWindowSize;
@@ -0,0 +1,4 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ import React from 'react';
3
+ export declare const getComponentFromProps: (Component: React.ReactElement<PropsWithChildren<unknown>> | React.ComponentType<unknown>, props: Record<string, unknown>, children?: never[]) => JSX.Element | null;
4
+ export default getComponentFromProps;
@@ -0,0 +1,22 @@
1
+ export { default as useMeasure } from 'use-measure';
2
+ export { default as useForceUpdate } from 'use-force-update';
3
+ export { default as useOnClickOutside } from 'use-onclickoutside';
4
+ export { useCallbackAfterRender } from './useCallbackAfterRender';
5
+ export { useCancellableDelayedCallback } from './useCancellableDelayedCallback';
6
+ export { useDerivedStateFromProps } from './useDerivedStateFromProps';
7
+ export { useExecutionTimer } from './useExecutionTimer';
8
+ export { useExpandState } from './useExpandState';
9
+ export { useFocusTrap, UseFocusTrapWithSchema } from './useFocusTrap';
10
+ export { useHotkeys } from './useHotkeys';
11
+ export { useHoverHandlersDelay } from './useHoverHandlersDelay';
12
+ export { useIsMobile } from './useIsMobile';
13
+ export { useIsShowingEllipsis } from './useIsShowingEllipsis';
14
+ export { useMakeMutable } from './useMakeMutable';
15
+ export { useOnBlurOut, UseOnBlurOutWithSchema } from './useOnBlurOut';
16
+ export { useOnElementResize } from './useOnElementResize';
17
+ export { useOnFirstFocusIn, UseOnFirstFocusInWithSchema } from './useOnFirstFocusIn';
18
+ export { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from './useOnSpecificFocus';
19
+ export { usePrevious } from './usePrevious';
20
+ export { useResizeObserver } from './useResizeObserver';
21
+ export { useShouldRecalculate } from './useShouldRecalculate';
22
+ export { useWindowScrollerList } from './useWindowScrollerList';
@@ -0,0 +1,3 @@
1
+ type Callback = (callback: () => void) => void;
2
+ export declare const useCallbackAfterRender: (isLayout?: boolean) => Callback;
3
+ export {};
@@ -0,0 +1,3 @@
1
+ type Callback = (...args: unknown[]) => unknown;
2
+ export declare const useCancellableDelayedCallback: (cb: Callback, delay: number) => Callback[];
3
+ export default useCancellableDelayedCallback;
@@ -0,0 +1,14 @@
1
+ import type React from 'react';
2
+ interface ShouldUpdateArg {
3
+ prop: unknown;
4
+ prevProp: unknown;
5
+ stateValue: unknown;
6
+ }
7
+ type OnUpdateT<T> = (prop: T, prevProp?: T | Record<string, never>) => T;
8
+ interface OptionsT<T> {
9
+ onUpdate?: OnUpdateT<T>;
10
+ shouldUpdate?: (arg: ShouldUpdateArg) => boolean;
11
+ updateOnStateChange?: boolean;
12
+ }
13
+ export declare const useDerivedStateFromProps: <T>(prop: T, options?: OptionsT<T>) => [T, React.Dispatch<React.SetStateAction<T>>];
14
+ export default useDerivedStateFromProps;
@@ -0,0 +1 @@
1
+ export declare const useDimensions: (domNode: HTMLElement) => DOMRectReadOnly | undefined;
@@ -0,0 +1,3 @@
1
+ type Callback = (...args: unknown[]) => unknown;
2
+ export declare const useExecutionTimer: (startFn: Callback, cleanFn: Callback, delayTime: number) => Callback[];
3
+ export default useExecutionTimer;
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ type ItemT = Record<string, string>;
3
+ interface UseExpandStateArg {
4
+ items?: ItemT[];
5
+ itemKey?: keyof ItemT;
6
+ expanded?: Record<string, boolean>;
7
+ onExpand: (item: ItemT) => void;
8
+ onExpandChange: (nextState: Record<string, boolean>, item?: ItemT) => void;
9
+ onExpandAll: (nextState: Record<string, boolean>) => void;
10
+ onToggleExpand: (item: ItemT) => void;
11
+ onCollapse: (item: ItemT) => void;
12
+ }
13
+ export declare const useExpandState: ({ items, itemKey, expanded: expandedProp, onExpand, onExpandChange, onExpandAll, onToggleExpand, onCollapse, }: UseExpandStateArg) => {
14
+ state: {
15
+ expanded: Record<string, boolean>;
16
+ isExpandedAll: boolean;
17
+ };
18
+ actions: {
19
+ expand: (item: ItemT, stateData?: boolean) => void;
20
+ toggleExpandAll: (stateData?: boolean) => void;
21
+ toggleExpand: (item: ItemT, stateData?: boolean) => void;
22
+ collapse: (item: ItemT) => void;
23
+ };
24
+ setExpanded: import("react").Dispatch<import("react").SetStateAction<Record<string, boolean>>>;
25
+ };
26
+ export default useExpandState;
@@ -0,0 +1,16 @@
1
+ import type React from 'react';
2
+ type UseFocusTrapFunctionT = <T extends HTMLElement = HTMLElement, K extends HTMLElement = HTMLElement>({ firstElementRef, lastElementRef, onKeyDown, }: {
3
+ firstElementRef: React.MutableRefObject<T | null>;
4
+ lastElementRef: React.MutableRefObject<K | null>;
5
+ onKeyDown?: (e: KeyboardEvent) => void;
6
+ }) => (e: KeyboardEvent) => void;
7
+ interface UseFocusTrapT extends UseFocusTrapFunctionT {
8
+ displayName: 'useFocusTrap';
9
+ }
10
+ declare const useFocusTrap: UseFocusTrapT;
11
+ declare const UseFocusTrapWithSchema: import("../props-helpers/propTypes/types").DocumentedReactComponent<{
12
+ firstElementRef: React.MutableRefObject<HTMLElement | null>;
13
+ lastElementRef: React.MutableRefObject<HTMLElement | null>;
14
+ onKeyDown?: ((e: KeyboardEvent) => void) | undefined;
15
+ }>;
16
+ export { useFocusTrap, UseFocusTrapWithSchema };
@@ -0,0 +1,15 @@
1
+ import type { KeyHandler } from 'hotkeys-js';
2
+ type Options = {
3
+ scope?: string;
4
+ element?: HTMLElement | null;
5
+ keyup?: boolean | null;
6
+ keydown?: boolean | null;
7
+ splitKey?: string;
8
+ };
9
+ interface UseHotKeysArg {
10
+ keys: string;
11
+ options?: Options;
12
+ handler: KeyHandler;
13
+ }
14
+ export declare const useHotkeys: ({ keys, handler, options }: UseHotKeysArg, deps?: unknown[]) => void;
15
+ export default useHotkeys;
@@ -0,0 +1,11 @@
1
+ interface UseHoverHandlersDelayArg {
2
+ onMouseOver: () => void;
3
+ onMouseLeave: () => void;
4
+ hideDelay?: number;
5
+ showDelay?: number;
6
+ }
7
+ export declare const useHoverHandlersDelay: ({ onMouseOver, onMouseLeave, hideDelay, showDelay, }: UseHoverHandlersDelayArg) => {
8
+ onMouseOver: () => void;
9
+ onMouseLeave: () => void;
10
+ };
11
+ export default useHoverHandlersDelay;
@@ -0,0 +1 @@
1
+ export declare const useIsMobile: () => boolean;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const useIsShowingEllipsis: <T extends HTMLElement | null = HTMLElement | null>() => {
3
+ setElement: import("react").Dispatch<import("react").SetStateAction<T | undefined>>;
4
+ isShowingEllipsis: boolean;
5
+ };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ type UseMakeMutable = <T>(referenceVar: T) => React.MutableRefObject<T>;
3
+ export declare const useMakeMutable: UseMakeMutable;
4
+ export {};
@@ -0,0 +1,10 @@
1
+ import type React from 'react';
2
+ type OnBlurCb = (e: React.FocusEvent, ...args: unknown[]) => void;
3
+ type UseOnBlurOut = ({ onBlur }: {
4
+ onBlur: OnBlurCb;
5
+ }) => OnBlurCb;
6
+ declare const useOnBlurOut: UseOnBlurOut;
7
+ declare const UseOnBlurOutWithSchema: import("../props-helpers/propTypes/types").DocumentedReactComponent<{
8
+ onBlur: OnBlurCb;
9
+ }>;
10
+ export { useOnBlurOut, UseOnBlurOutWithSchema };
@@ -0,0 +1,2 @@
1
+ import type React from 'react';
2
+ export declare const useOnElementResize: <T extends HTMLElement>(targetRef: React.RefObject<T>) => Record<'width' | 'height', number>;
@@ -0,0 +1,16 @@
1
+ import type React from 'react';
2
+ type OnBlurCb = (e: React.FocusEvent, ...args: unknown[]) => void;
3
+ type OnFirstFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;
4
+ type UseFirstFocusIn = ({ onFirstFocus, onBlur }: {
5
+ onFirstFocus: OnFirstFocusCb;
6
+ onBlur: OnBlurCb;
7
+ }) => {
8
+ onFirstFocus: OnFirstFocusCb;
9
+ onBlur: OnBlurCb;
10
+ };
11
+ declare const useOnFirstFocusIn: UseFirstFocusIn;
12
+ declare const UseOnFirstFocusInWithSchema: import("../props-helpers/propTypes/types").DocumentedReactComponent<{
13
+ onFirstFocus: OnFirstFocusCb;
14
+ onBlur: OnBlurCb;
15
+ }>;
16
+ export { useOnFirstFocusIn, UseOnFirstFocusInWithSchema };
@@ -0,0 +1,10 @@
1
+ import type React from 'react';
2
+ type OnFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;
3
+ type UseOnBlurOut = ({ onFocus }: {
4
+ onFocus: OnFocusCb;
5
+ }) => OnFocusCb;
6
+ declare const useOnSpecificFocus: UseOnBlurOut;
7
+ declare const UseOnSpecificFocusWithSchema: import("../props-helpers/propTypes/types").DocumentedReactComponent<{
8
+ onFocus: OnFocusCb;
9
+ }>;
10
+ export { useOnSpecificFocus, UseOnSpecificFocusWithSchema };
@@ -0,0 +1,2 @@
1
+ export declare const usePrevious: (value: unknown) => unknown;
2
+ export default usePrevious;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ type HandlerT = (measures: {
3
+ width: number;
4
+ height: number;
5
+ }, element: Element) => void;
6
+ export declare const useResizeObserver: (handler: HandlerT, el: HTMLElement) => import("react").Dispatch<import("react").SetStateAction<HTMLElement>>[];
7
+ export default useResizeObserver;
@@ -0,0 +1,2 @@
1
+ export declare const useShouldRecalculate: (bool: boolean) => number;
2
+ export default useShouldRecalculate;
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ interface UseWindowScrollerListArg {
3
+ listInstance: React.RefObject<HTMLElement>;
4
+ outerListRef: React.RefObject<HTMLElement>;
5
+ }
6
+ export declare const useWindowScrollerList: ({ listInstance, outerListRef }: UseWindowScrollerListArg) => void;
7
+ export default useWindowScrollerList;
@@ -0,0 +1,16 @@
1
+ export { default as getComponentFromProps } from './getComponentFromProps';
2
+ export { default as onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements';
3
+ export { capitalize } from './capitalize';
4
+ export { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities';
5
+ export { checkNotEmpty, checkEmpty, greaterThan, validDate, equal, notEqual, isNull, isNotNull, isIn, isNotIn, greaterThanOrEquals, lessThanOrEquals, startsWith, contains, } from './operators';
6
+ export { cx, runAll, hashArray, safeCall, removeUndefinedProperties, isObject, curry, arrayMove, uniq, filter, uniqBy, groupBy, property, get, set, cloneDeep, debounce, findIndex, isEmpty, isString, isEqual, maxBy, meanBy, noop, omit, orderBy, pull, sortBy, sumBy, transform, isFunction, range, parseInt, padStart, isNaN, values, throttle, toggleInObject, toggleInArray, pick, pickBy, differenceBy, differenceWith, addOrRemove, isEqualWith, isBoolean, } from './utils';
7
+ export { setRef, mergeRefs, setMultipleRefs, logger } from './system';
8
+ export { useMeasure, useForceUpdate, useOnClickOutside, useExecutionTimer, useExpandState, useHotkeys, useHoverHandlersDelay, useResizeObserver, useShouldRecalculate, useWindowScrollerList, usePrevious, useCancellableDelayedCallback, useDerivedStateFromProps, useOnElementResize, useIsShowingEllipsis, useMakeMutable, useCallbackAfterRender, useFocusTrap, UseFocusTrapWithSchema, useIsMobile, useOnBlurOut, UseOnBlurOutWithSchema, useOnFirstFocusIn, UseOnFirstFocusInWithSchema, useOnSpecificFocus, UseOnSpecificFocusWithSchema, } from './hooks';
9
+ export { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils';
10
+ export { compose } from './compose';
11
+ export { DOCUMENT, WINDOW } from './platform';
12
+ export { isDOMTypeElement } from './reactTypesUtility';
13
+ export { isRequired, isGreaterThan, isValidDate } from './validations';
14
+ export { crossTypeSort } from './algorithms/crossTypeSort';
15
+ export * from './deprecated';
16
+ export * from './props-helpers';
@@ -0,0 +1,2 @@
1
+ export declare const getObjectValuesToArray: (obj: Record<string, unknown>) => string[] | null;
2
+ export declare const getObjectKeysToArray: (obj: Record<string, unknown>) => string[] | null;
@@ -0,0 +1,8 @@
1
+ import type React from 'react';
2
+ export declare const onClickHandlerForNonInteractiveElements: (onClickHandler: React.MouseEventHandler & React.KeyboardEventHandler) => {
3
+ role: string;
4
+ tabIndex: string;
5
+ onClick: React.MouseEventHandler<Element> & React.KeyboardEventHandler<Element>;
6
+ onKeyPress: (event: React.KeyboardEvent) => void;
7
+ };
8
+ export default onClickHandlerForNonInteractiveElements;
@@ -0,0 +1,14 @@
1
+ export declare const checkNotEmpty: (value: unknown) => boolean;
2
+ export declare const checkEmpty: (value: unknown) => boolean;
3
+ export declare const greaterThan: (value: number, comparator: number) => boolean;
4
+ export declare const validDate: (value: string) => boolean;
5
+ export declare const equal: (a: unknown, b: unknown) => boolean;
6
+ export declare const notEqual: (a: unknown, b: unknown) => boolean;
7
+ export declare const isNull: (a: unknown) => boolean;
8
+ export declare const isNotNull: (a: unknown) => boolean;
9
+ export declare const isIn: <T>(a: T, b: T[]) => boolean;
10
+ export declare const isNotIn: <T>(a: T, b: T[]) => boolean;
11
+ export declare const greaterThanOrEquals: (value: number, comparator: number) => boolean;
12
+ export declare const lessThanOrEquals: (value: number, comparator: number) => boolean;
13
+ export declare const startsWith: (value: unknown, comparator: string) => boolean;
14
+ export declare const contains: (value: unknown, comparator: string) => boolean;
@@ -0,0 +1,2 @@
1
+ export declare const DOCUMENT: Document | null;
2
+ export declare const WINDOW: (Window & typeof globalThis) | null;
@@ -0,0 +1 @@
1
+ export * from './useMemoMergePropsWithDefault';
@@ -0,0 +1 @@
1
+ export declare const useMemoMergePropsWithDefault: <T = Record<string, any>>(props: Partial<T>, defaultProps: Partial<T>, compare?: (a: any, b: any) => boolean) => T;
@@ -0,0 +1,2 @@
1
+ export declare const getAriaProps: <T extends Record<string, unknown> = Record<string, unknown>>(props: T) => Record<string, unknown>;
2
+ export declare const getDataProps: <T extends Record<string, unknown> = Record<string, unknown>>(props: T) => Record<string, unknown>;
@@ -0,0 +1,3 @@
1
+ import type { AriaAttributes, DOMAttributes, HTMLAttributes } from 'react';
2
+ export type GlobalAttributes<T = true> = Record<keyof (AriaAttributes & DOMAttributes<Element> & HTMLAttributes<Element>), T>;
3
+ export declare const globalAttributes: GlobalAttributes<true>;
@@ -0,0 +1,6 @@
1
+ import type { AllHTMLAttributes, AriaAttributes, DOMAttributes, HTMLAttributes } from 'react';
2
+ import type { GlobalAttributes } from './constants';
3
+ export type GlobalAttributesT<T = Element> = AriaAttributes & DOMAttributes<T> & HTMLAttributes<T> & Omit<AllHTMLAttributes<T>, 'as'> & {
4
+ tabIndex?: WCAGTabIndex;
5
+ };
6
+ export declare const getGlobalAttributes: <T, S = Element>(props: T, overrides?: Partial<GlobalAttributes<CallableFunction>>) => GlobalAttributesT<S>;