@lumx/react 4.8.0-next.0 → 4.8.0-next.1
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 +20 -8
- package/index.js +48 -26
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Theme as Theme$1, Size as Size$1, Orientation as Orientation$1, Alignment as Alignment$1, AspectRatio as AspectRatio$1,
|
|
1
|
+
import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Theme as Theme$1, Size as Size$1, Orientation as Orientation$1, Alignment as Alignment$1, AspectRatio as AspectRatio$1, Emphasis as Emphasis$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 as ValueOf$1, PropsToOverride, HasCloseMode as HasCloseMode$1, HasClassName as HasClassName$1, JSXElement as JSXElement$1, CommonRef as CommonRef$1, Falsy, HeadingElement as HeadingElement$1, HasAriaDisabled as HasAriaDisabled$1, HasRequiredLinkHref as HasRequiredLinkHref$1, HasAriaLabelOrLabelledBy as HasAriaLabelOrLabelledBy$1 } from '@lumx/core/js/types';
|
|
@@ -787,7 +787,7 @@ interface ButtonProps extends GenericProps$1, ReactToJSX<ButtonProps$1> {
|
|
|
787
787
|
* @param ref Component ref.
|
|
788
788
|
* @return React element.
|
|
789
789
|
*/
|
|
790
|
-
declare const Button: Comp<ButtonProps,
|
|
790
|
+
declare const Button: Comp<ButtonProps, HTMLButtonElement | HTMLAnchorElement>;
|
|
791
791
|
|
|
792
792
|
interface IconButtonProps$1 extends BaseButtonProps {
|
|
793
793
|
/**
|
|
@@ -2235,23 +2235,35 @@ declare const ImageLightbox: Comp<ImageLightboxProps, HTMLDivElement> & {
|
|
|
2235
2235
|
/**
|
|
2236
2236
|
* Defines the props of the component.
|
|
2237
2237
|
*/
|
|
2238
|
-
interface InlineListProps extends
|
|
2238
|
+
interface InlineListProps$1 extends HasClassName {
|
|
2239
|
+
/**
|
|
2240
|
+
* List items to render.
|
|
2241
|
+
*/
|
|
2242
|
+
items?: JSXElement[];
|
|
2239
2243
|
/**
|
|
2240
2244
|
* Text color.
|
|
2241
2245
|
*/
|
|
2242
|
-
color?: ColorWithVariants
|
|
2246
|
+
color?: ColorWithVariants;
|
|
2243
2247
|
/**
|
|
2244
2248
|
* Lightened or darkened variant of the selected color.
|
|
2245
2249
|
*/
|
|
2246
|
-
colorVariant?: ColorVariant
|
|
2250
|
+
colorVariant?: ColorVariant;
|
|
2247
2251
|
/**
|
|
2248
2252
|
* Typography variant.
|
|
2249
2253
|
*/
|
|
2250
|
-
typography?: Typography
|
|
2254
|
+
typography?: Typography;
|
|
2251
2255
|
/**
|
|
2252
2256
|
* Activate line wrap on overflow.
|
|
2253
2257
|
*/
|
|
2254
2258
|
wrap?: boolean;
|
|
2259
|
+
/** reference to the root element */
|
|
2260
|
+
ref?: CommonRef;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
/**
|
|
2264
|
+
* Defines the props of the component.
|
|
2265
|
+
*/
|
|
2266
|
+
interface InlineListProps extends GenericProps$1, ReactToJSX<InlineListProps$1, 'items'> {
|
|
2255
2267
|
/**
|
|
2256
2268
|
* Children
|
|
2257
2269
|
*/
|
|
@@ -2264,7 +2276,7 @@ interface InlineListProps extends GenericProps$1 {
|
|
|
2264
2276
|
* @param ref Component ref.
|
|
2265
2277
|
* @return React element.
|
|
2266
2278
|
*/
|
|
2267
|
-
declare const InlineList: Comp<InlineListProps,
|
|
2279
|
+
declare const InlineList: Comp<InlineListProps, HTMLUListElement>;
|
|
2268
2280
|
|
|
2269
2281
|
/**
|
|
2270
2282
|
* Defines the props of the component.
|
|
@@ -2397,7 +2409,7 @@ interface LinkProps extends GenericProps$1, ReactToJSX<LinkProps$1> {
|
|
|
2397
2409
|
* @param ref Component ref.
|
|
2398
2410
|
* @return React element.
|
|
2399
2411
|
*/
|
|
2400
|
-
declare const Link: Comp<LinkProps,
|
|
2412
|
+
declare const Link: Comp<LinkProps, HTMLButtonElement | HTMLAnchorElement>;
|
|
2401
2413
|
|
|
2402
2414
|
/**
|
|
2403
2415
|
* Defines the props of the component.
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Kind as Kind$1, Size as Size$1, ColorPalette as ColorPalette$1, Emphasi
|
|
|
2
2
|
export * from '@lumx/core/js/constants';
|
|
3
3
|
export * from '@lumx/core/js/types';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import React__default, { useState, useEffect, useMemo, useRef, useCallback, Children, useLayoutEffect, cloneElement, createContext,
|
|
5
|
+
import React__default, { useState, useEffect, useMemo, useRef, useCallback, Children, useLayoutEffect, cloneElement, createContext, useContext, useReducer } from 'react';
|
|
6
6
|
import { mdiAlert } from '@lumx/icons/esm/alert.js';
|
|
7
7
|
import { mdiAlertCircle } from '@lumx/icons/esm/alert-circle.js';
|
|
8
8
|
import { mdiCheckCircle } from '@lumx/icons/esm/check-circle.js';
|
|
@@ -8838,7 +8838,7 @@ const CLASSNAME$O = 'lumx-inline-list';
|
|
|
8838
8838
|
const {
|
|
8839
8839
|
block: block$H,
|
|
8840
8840
|
element: element$x
|
|
8841
|
-
} =
|
|
8841
|
+
} = bem(CLASSNAME$O);
|
|
8842
8842
|
|
|
8843
8843
|
/**
|
|
8844
8844
|
* Component default props.
|
|
@@ -8849,17 +8849,17 @@ const DEFAULT_PROPS$N = {};
|
|
|
8849
8849
|
* InlineList component.
|
|
8850
8850
|
*
|
|
8851
8851
|
* @param props Component props.
|
|
8852
|
-
* @
|
|
8853
|
-
* @return React element.
|
|
8852
|
+
* @return JSX element.
|
|
8854
8853
|
*/
|
|
8855
|
-
const InlineList =
|
|
8854
|
+
const InlineList$1 = props => {
|
|
8856
8855
|
const {
|
|
8857
8856
|
className,
|
|
8858
8857
|
color,
|
|
8859
8858
|
colorVariant,
|
|
8860
|
-
typography,
|
|
8861
|
-
|
|
8859
|
+
typography: typography$1,
|
|
8860
|
+
items = [],
|
|
8862
8861
|
wrap,
|
|
8862
|
+
ref,
|
|
8863
8863
|
...forwardedProps
|
|
8864
8864
|
} = props;
|
|
8865
8865
|
return (
|
|
@@ -8868,31 +8868,53 @@ const InlineList = forwardRef((props, ref) => {
|
|
|
8868
8868
|
jsx("ul", {
|
|
8869
8869
|
...forwardedProps,
|
|
8870
8870
|
ref: ref,
|
|
8871
|
-
className:
|
|
8871
|
+
className: classnames(className, block$H({
|
|
8872
8872
|
wrap: Boolean(wrap)
|
|
8873
|
-
}), color &&
|
|
8873
|
+
}), color && font(color, colorVariant), typography$1 && typography(typography$1))
|
|
8874
8874
|
// Lists with removed bullet style can lose their a11y list role on some browsers
|
|
8875
8875
|
,
|
|
8876
8876
|
role: "list",
|
|
8877
|
-
children:
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
}), child]
|
|
8891
|
-
}, key)
|
|
8892
|
-
);
|
|
8893
|
-
})
|
|
8877
|
+
children: items.map((item, index) =>
|
|
8878
|
+
/*#__PURE__*/
|
|
8879
|
+
// We need to item is set as display: contents which removes the semantic.
|
|
8880
|
+
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
8881
|
+
jsxs("li", {
|
|
8882
|
+
role: "listitem",
|
|
8883
|
+
className: element$x('item'),
|
|
8884
|
+
children: [index !== 0 && /*#__PURE__*/jsx("span", {
|
|
8885
|
+
className: element$x('item-separator'),
|
|
8886
|
+
"aria-hidden": "true",
|
|
8887
|
+
children: '\u00A0•\u00A0'
|
|
8888
|
+
}), item]
|
|
8889
|
+
}, index))
|
|
8894
8890
|
})
|
|
8895
8891
|
);
|
|
8892
|
+
};
|
|
8893
|
+
InlineList$1.displayName = COMPONENT_NAME$N;
|
|
8894
|
+
InlineList$1.className = CLASSNAME$O;
|
|
8895
|
+
InlineList$1.defaultProps = DEFAULT_PROPS$N;
|
|
8896
|
+
|
|
8897
|
+
/**
|
|
8898
|
+
* Defines the props of the component.
|
|
8899
|
+
*/
|
|
8900
|
+
|
|
8901
|
+
/**
|
|
8902
|
+
* InlineList component.
|
|
8903
|
+
*
|
|
8904
|
+
* @param props Component props.
|
|
8905
|
+
* @param ref Component ref.
|
|
8906
|
+
* @return React element.
|
|
8907
|
+
*/
|
|
8908
|
+
const InlineList = forwardRef((props, ref) => {
|
|
8909
|
+
const {
|
|
8910
|
+
children,
|
|
8911
|
+
...rest
|
|
8912
|
+
} = props;
|
|
8913
|
+
return InlineList$1({
|
|
8914
|
+
...rest,
|
|
8915
|
+
ref,
|
|
8916
|
+
items: Children.toArray(children)
|
|
8917
|
+
});
|
|
8896
8918
|
});
|
|
8897
8919
|
InlineList.displayName = COMPONENT_NAME$N;
|
|
8898
8920
|
InlineList.className = CLASSNAME$O;
|