@lumx/react 4.3.2-alpha.17 → 4.3.2-alpha.18
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 -15
- package/index.js +156 -128
- package/index.js.map +1 -1
- package/package.json +3 -13
- package/utils/index.d.ts +1 -6
package/index.d.ts
CHANGED
|
@@ -6,6 +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, AriaAttributes, RefObject, CSSProperties, ImgHTMLAttributes, SetStateAction, Key, ElementType, ComponentProps } from 'react';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
|
+
import { Selector } from '@lumx/core/js/types/Selector';
|
|
9
10
|
|
|
10
11
|
/** LumX Component Type. */
|
|
11
12
|
type Comp<P, T = HTMLElement> = {
|
|
@@ -540,17 +541,6 @@ interface HasDisabled {
|
|
|
540
541
|
disabled?: boolean;
|
|
541
542
|
}
|
|
542
543
|
|
|
543
|
-
type FunctionSelector<TObject, TValue> = (o: TObject) => TValue;
|
|
544
|
-
type FieldSelector<TObject, TValue> = keyof {
|
|
545
|
-
[TKey in keyof TObject as TObject[TKey] extends TValue ? TKey : never]: TObject[TKey];
|
|
546
|
-
};
|
|
547
|
-
/**
|
|
548
|
-
* Value selector on an object
|
|
549
|
-
* - either via an object key
|
|
550
|
-
* - or a selector function
|
|
551
|
-
*/
|
|
552
|
-
type Selector<TObject, TValue = string> = FieldSelector<TObject, TValue> | FunctionSelector<TObject, TValue>;
|
|
553
|
-
|
|
554
544
|
/**
|
|
555
545
|
* Defines the props of the component.
|
|
556
546
|
*/
|
|
@@ -1668,22 +1658,37 @@ interface GridItemProps extends GenericProps {
|
|
|
1668
1658
|
*/
|
|
1669
1659
|
declare const GridItem: Comp<GridItemProps, HTMLDivElement>;
|
|
1670
1660
|
|
|
1671
|
-
type GridColumnGapSize = Extract<Size
|
|
1661
|
+
type GridColumnGapSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
1672
1662
|
/**
|
|
1673
1663
|
* Defines the props of the component.
|
|
1674
1664
|
*/
|
|
1675
|
-
interface GridColumnProps extends
|
|
1665
|
+
interface GridColumnProps$1 extends HasClassName {
|
|
1676
1666
|
/** Customize the root element. */
|
|
1677
|
-
as?:
|
|
1667
|
+
as?: any;
|
|
1678
1668
|
/** Children elements. */
|
|
1679
|
-
children?:
|
|
1669
|
+
children?: JSXElement;
|
|
1680
1670
|
/** Space between columns and rows. */
|
|
1681
1671
|
gap?: GridColumnGapSize;
|
|
1682
1672
|
/** Ideal number of columns. */
|
|
1683
1673
|
maxColumns?: number;
|
|
1684
1674
|
/** Minimum width for each item, reduce the number of column if there is not enough space. */
|
|
1685
1675
|
itemMinWidth?: number;
|
|
1676
|
+
/** Custom styles. */
|
|
1677
|
+
style?: any;
|
|
1678
|
+
/** reference to the root element */
|
|
1679
|
+
ref?: CommonRef;
|
|
1686
1680
|
}
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Defines the props of the component.
|
|
1684
|
+
*/
|
|
1685
|
+
interface GridColumnProps extends GenericProps, GridColumnProps$1 {
|
|
1686
|
+
/** Customize the root element. */
|
|
1687
|
+
as?: React.ElementType;
|
|
1688
|
+
/** Children elements. */
|
|
1689
|
+
children?: React.ReactNode;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1687
1692
|
/**
|
|
1688
1693
|
* The GridColumn is a layout component that can display children in a grid
|
|
1689
1694
|
* with custom display properties. It also comes with a responsive design,
|