@lumx/react 4.2.1-alpha.11 → 4.2.1-alpha.12
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.
- package/index.d.ts +18 -13
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/utils/index.d.ts +1 -1
- package/utils/index.js +4 -4
- package/utils/index.js.map +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Size as Size$1, ColorPalette as ColorPalette$1,
|
|
1
|
+
import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Size as Size$1, ColorPalette as ColorPalette$1, Orientation as Orientation$1, Alignment as Alignment$1, AspectRatio, ColorWithVariants as ColorWithVariants$1, ColorVariant as ColorVariant$1, Typography as Typography$1, GenericProps as GenericProps$3, Emphasis as Emphasis$1, GlobalSize, TypographyInterface as TypographyInterface$1, Theme as Theme$1 } from '@lumx/core/js/constants';
|
|
2
2
|
export * from '@lumx/core/js/constants';
|
|
3
3
|
import * as _lumx_core_js_types from '@lumx/core/js/types';
|
|
4
4
|
import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf, HasAriaDisabled as HasAriaDisabled$1, HasCloseMode, Falsy, HasClassName as HasClassName$1, HeadingElement as HeadingElement$1, HasRequiredLinkHref, HasAriaLabelOrLabelledBy } from '@lumx/core/js/types';
|
|
@@ -6,7 +6,7 @@ export * from '@lumx/core/js/types';
|
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, InputHTMLAttributes, RefObject, CSSProperties, ImgHTMLAttributes, AriaAttributes as AriaAttributes$1, SetStateAction, Key, ElementType, ComponentProps } from 'react';
|
|
8
8
|
import { GenericProps } from '@lumx/core/js/types/GenericProps';
|
|
9
|
-
import { GenericProps as GenericProps$
|
|
9
|
+
import { GenericProps as GenericProps$2 } from '@lumx/core/js/utils/disabledState';
|
|
10
10
|
|
|
11
11
|
/** LumX Component Type. */
|
|
12
12
|
type Comp<P, T = HTMLElement> = {
|
|
@@ -549,9 +549,9 @@ interface AriaAttributes {
|
|
|
549
549
|
interface BaseClickableProps {
|
|
550
550
|
children?: JSXElement;
|
|
551
551
|
isDisabled?: boolean;
|
|
552
|
-
disabled?: boolean;
|
|
552
|
+
disabled?: boolean | null;
|
|
553
553
|
'aria-disabled'?: Booleanish;
|
|
554
|
-
onClick?: (event
|
|
554
|
+
onClick?: ((event: any) => void) | null;
|
|
555
555
|
ref?: CommonRef;
|
|
556
556
|
}
|
|
557
557
|
|
|
@@ -640,7 +640,7 @@ interface ButtonProps extends ButtonProps$1 {
|
|
|
640
640
|
* @param ref Component ref.
|
|
641
641
|
* @return React element.
|
|
642
642
|
*/
|
|
643
|
-
declare const Button: Comp<ButtonProps,
|
|
643
|
+
declare const Button: Comp<ButtonProps, HTMLAnchorElement | HTMLButtonElement>;
|
|
644
644
|
|
|
645
645
|
interface IconButtonProps$1 extends BaseButtonProps {
|
|
646
646
|
/**
|
|
@@ -664,7 +664,7 @@ interface IconButtonProps$1 extends BaseButtonProps {
|
|
|
664
664
|
title?: string;
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
interface IconButtonProps extends IconButtonProps$1 {
|
|
667
|
+
interface IconButtonProps extends Omit<IconButtonProps$1, 'children'> {
|
|
668
668
|
/**
|
|
669
669
|
* Any prop (particularly any supported prop for a HTML element).
|
|
670
670
|
*/
|
|
@@ -1316,7 +1316,12 @@ interface FlagProps$1 extends HasClassName, HasTheme {
|
|
|
1316
1316
|
Text: (props: TextProps$1) => any;
|
|
1317
1317
|
}
|
|
1318
1318
|
|
|
1319
|
-
interface FlagProps extends
|
|
1319
|
+
interface FlagProps extends Omit<FlagProps$1, 'children' | 'Text'> {
|
|
1320
|
+
/**
|
|
1321
|
+
* Any prop (particularly any supported prop for a HTML element).
|
|
1322
|
+
*/
|
|
1323
|
+
[propName: string]: any;
|
|
1324
|
+
/** Text label of the flag. */
|
|
1320
1325
|
label: React.ReactNode;
|
|
1321
1326
|
}
|
|
1322
1327
|
/**
|
|
@@ -1894,7 +1899,7 @@ interface InputHelperProps$1 extends HasClassName, HasTheme {
|
|
|
1894
1899
|
ref?: CommonRef;
|
|
1895
1900
|
}
|
|
1896
1901
|
|
|
1897
|
-
interface InputHelperProps extends InputHelperProps$1, GenericProps$
|
|
1902
|
+
interface InputHelperProps extends InputHelperProps$1, GenericProps$2 {
|
|
1898
1903
|
}
|
|
1899
1904
|
/**
|
|
1900
1905
|
* InputHelper component.
|
|
@@ -1918,7 +1923,7 @@ interface InputLabelProps$1 extends HasClassName, HasTheme {
|
|
|
1918
1923
|
ref?: CommonRef;
|
|
1919
1924
|
}
|
|
1920
1925
|
|
|
1921
|
-
interface InputLabelProps extends InputLabelProps$1, GenericProps$
|
|
1926
|
+
interface InputLabelProps extends InputLabelProps$1, GenericProps$3 {
|
|
1922
1927
|
}
|
|
1923
1928
|
/**
|
|
1924
1929
|
* InputLabel component.
|
|
@@ -1998,7 +2003,7 @@ interface LinkProps extends GenericProps$1, HasAriaDisabled$1 {
|
|
|
1998
2003
|
* @param ref Component ref.
|
|
1999
2004
|
* @return React element.
|
|
2000
2005
|
*/
|
|
2001
|
-
declare const Link: Comp<LinkProps,
|
|
2006
|
+
declare const Link: Comp<LinkProps, HTMLAnchorElement | HTMLButtonElement>;
|
|
2002
2007
|
|
|
2003
2008
|
/**
|
|
2004
2009
|
* Defines the props of the component.
|
|
@@ -2165,7 +2170,7 @@ interface MessageProps$1 extends HasClassName {
|
|
|
2165
2170
|
*/
|
|
2166
2171
|
closeButtonProps?: {
|
|
2167
2172
|
/** The callback called when the button is clicked */
|
|
2168
|
-
onClick: () => void;
|
|
2173
|
+
onClick: ((event: any) => void) | null;
|
|
2169
2174
|
/** The label of the close button. */
|
|
2170
2175
|
label: string;
|
|
2171
2176
|
};
|
|
@@ -2255,9 +2260,9 @@ interface NotificationProps extends GenericProps$1, HasTheme$1 {
|
|
|
2255
2260
|
/** Z-axis position. */
|
|
2256
2261
|
zIndex?: number;
|
|
2257
2262
|
/** On action button click callback. */
|
|
2258
|
-
onActionClick?(): void;
|
|
2263
|
+
onActionClick?(event: any): void | null;
|
|
2259
2264
|
/** On click callback. */
|
|
2260
|
-
onClick?(): void;
|
|
2265
|
+
onClick?(event: any): void | null;
|
|
2261
2266
|
/** Whether the notification should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */
|
|
2262
2267
|
usePortal?: boolean;
|
|
2263
2268
|
}
|
package/index.js
CHANGED
|
@@ -9298,7 +9298,7 @@ const Notification = forwardRef((props, ref) => {
|
|
|
9298
9298
|
const hasAction = Boolean(onActionClick) && Boolean(actionLabel);
|
|
9299
9299
|
const handleCallback = evt => {
|
|
9300
9300
|
if (isFunction(onActionClick)) {
|
|
9301
|
-
onActionClick();
|
|
9301
|
+
onActionClick(evt);
|
|
9302
9302
|
}
|
|
9303
9303
|
evt.stopPropagation();
|
|
9304
9304
|
};
|