@lumx/react 4.2.1-alpha.10 → 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 +27 -14
- 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
|
|
|
@@ -627,7 +627,11 @@ declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
|
627
627
|
*/
|
|
628
628
|
declare const DEFAULT_PROPS: Partial<ButtonProps$1>;
|
|
629
629
|
|
|
630
|
-
interface ButtonProps extends
|
|
630
|
+
interface ButtonProps extends ButtonProps$1 {
|
|
631
|
+
/**
|
|
632
|
+
* Any prop (particularly any supported prop for a HTML element).
|
|
633
|
+
*/
|
|
634
|
+
[propName: string]: any;
|
|
631
635
|
}
|
|
632
636
|
/**
|
|
633
637
|
* Button component.
|
|
@@ -636,7 +640,7 @@ interface ButtonProps extends GenericProps$2, ButtonProps$1 {
|
|
|
636
640
|
* @param ref Component ref.
|
|
637
641
|
* @return React element.
|
|
638
642
|
*/
|
|
639
|
-
declare const Button: Comp<ButtonProps,
|
|
643
|
+
declare const Button: Comp<ButtonProps, HTMLAnchorElement | HTMLButtonElement>;
|
|
640
644
|
|
|
641
645
|
interface IconButtonProps$1 extends BaseButtonProps {
|
|
642
646
|
/**
|
|
@@ -660,7 +664,11 @@ interface IconButtonProps$1 extends BaseButtonProps {
|
|
|
660
664
|
title?: string;
|
|
661
665
|
}
|
|
662
666
|
|
|
663
|
-
interface IconButtonProps extends
|
|
667
|
+
interface IconButtonProps extends Omit<IconButtonProps$1, 'children'> {
|
|
668
|
+
/**
|
|
669
|
+
* Any prop (particularly any supported prop for a HTML element).
|
|
670
|
+
*/
|
|
671
|
+
[propName: string]: any;
|
|
664
672
|
/**
|
|
665
673
|
* Props to pass to the tooltip.
|
|
666
674
|
* If undefined or if tooltipProps.label is undefined, the label prop will be used as tooltip label.
|
|
@@ -1308,7 +1316,12 @@ interface FlagProps$1 extends HasClassName, HasTheme {
|
|
|
1308
1316
|
Text: (props: TextProps$1) => any;
|
|
1309
1317
|
}
|
|
1310
1318
|
|
|
1311
|
-
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. */
|
|
1312
1325
|
label: React.ReactNode;
|
|
1313
1326
|
}
|
|
1314
1327
|
/**
|
|
@@ -1886,7 +1899,7 @@ interface InputHelperProps$1 extends HasClassName, HasTheme {
|
|
|
1886
1899
|
ref?: CommonRef;
|
|
1887
1900
|
}
|
|
1888
1901
|
|
|
1889
|
-
interface InputHelperProps extends InputHelperProps$1, GenericProps$
|
|
1902
|
+
interface InputHelperProps extends InputHelperProps$1, GenericProps$2 {
|
|
1890
1903
|
}
|
|
1891
1904
|
/**
|
|
1892
1905
|
* InputHelper component.
|
|
@@ -1910,7 +1923,7 @@ interface InputLabelProps$1 extends HasClassName, HasTheme {
|
|
|
1910
1923
|
ref?: CommonRef;
|
|
1911
1924
|
}
|
|
1912
1925
|
|
|
1913
|
-
interface InputLabelProps extends InputLabelProps$1, GenericProps$
|
|
1926
|
+
interface InputLabelProps extends InputLabelProps$1, GenericProps$3 {
|
|
1914
1927
|
}
|
|
1915
1928
|
/**
|
|
1916
1929
|
* InputLabel component.
|
|
@@ -1990,7 +2003,7 @@ interface LinkProps extends GenericProps$1, HasAriaDisabled$1 {
|
|
|
1990
2003
|
* @param ref Component ref.
|
|
1991
2004
|
* @return React element.
|
|
1992
2005
|
*/
|
|
1993
|
-
declare const Link: Comp<LinkProps,
|
|
2006
|
+
declare const Link: Comp<LinkProps, HTMLAnchorElement | HTMLButtonElement>;
|
|
1994
2007
|
|
|
1995
2008
|
/**
|
|
1996
2009
|
* Defines the props of the component.
|
|
@@ -2157,7 +2170,7 @@ interface MessageProps$1 extends HasClassName {
|
|
|
2157
2170
|
*/
|
|
2158
2171
|
closeButtonProps?: {
|
|
2159
2172
|
/** The callback called when the button is clicked */
|
|
2160
|
-
onClick: () => void;
|
|
2173
|
+
onClick: ((event: any) => void) | null;
|
|
2161
2174
|
/** The label of the close button. */
|
|
2162
2175
|
label: string;
|
|
2163
2176
|
};
|
|
@@ -2247,9 +2260,9 @@ interface NotificationProps extends GenericProps$1, HasTheme$1 {
|
|
|
2247
2260
|
/** Z-axis position. */
|
|
2248
2261
|
zIndex?: number;
|
|
2249
2262
|
/** On action button click callback. */
|
|
2250
|
-
onActionClick?(): void;
|
|
2263
|
+
onActionClick?(event: any): void | null;
|
|
2251
2264
|
/** On click callback. */
|
|
2252
|
-
onClick?(): void;
|
|
2265
|
+
onClick?(event: any): void | null;
|
|
2253
2266
|
/** Whether the notification should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */
|
|
2254
2267
|
usePortal?: boolean;
|
|
2255
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
|
};
|