@mmb-digital/ds-lilly 0.7.5 → 0.8.2
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/dist/ds-lilly.css +1 -1
- package/dist/ds-lilly.js +195 -160
- package/dist/types/src/components/Components/ContentTable/ContentTable.d.ts +28 -0
- package/dist/types/src/components/Components/ContentTable/ContentTableRow.d.ts +61 -0
- package/dist/types/src/components/Components/ContentTable/index.d.ts +3 -0
- package/dist/types/src/components/Components/index.d.ts +1 -1
- package/dist/types/src/contexts/ContentTableContext.d.ts +30 -0
- package/package.json +1 -1
- package/dist/types/src/components/Components/ContentCard/ContentCard.d.ts +0 -35
- package/dist/types/src/components/Components/ContentCard/ContentCardGroup.d.ts +0 -11
- package/dist/types/src/components/Components/ContentCard/index.d.ts +0 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ContentTableAlignContentType, ContentTableColumnType } from '../../../contexts/ContentTableContext';
|
|
3
|
+
import { ComponentPropsType } from '../../../utils';
|
|
4
|
+
export interface ContentTablePropsType extends ComponentPropsType {
|
|
5
|
+
/** Table caption */
|
|
6
|
+
caption?: ReactNode;
|
|
7
|
+
/** Flag whether table has leading icons/avatars */
|
|
8
|
+
hasIcons?: boolean;
|
|
9
|
+
/** Flag whether hide subtitle on expand */
|
|
10
|
+
hideSubtitleOnExpand?: boolean;
|
|
11
|
+
/** Columns definitions */
|
|
12
|
+
columns: ContentTableColumnType[];
|
|
13
|
+
/** Content to display on expand */
|
|
14
|
+
children: ReactNode | ReactNode[];
|
|
15
|
+
/** Flag whether table caption is hidden */
|
|
16
|
+
isCaptionHidden?: boolean;
|
|
17
|
+
/** Title column header */
|
|
18
|
+
titleHeader?: ReactNode;
|
|
19
|
+
/** Title column content alignment */
|
|
20
|
+
titleAlignContent?: ContentTableAlignContentType;
|
|
21
|
+
/** Flag whether collapsible rows are without opener icon */
|
|
22
|
+
withoutOpeners?: boolean;
|
|
23
|
+
/** Flag whether rows are collapsible */
|
|
24
|
+
isCollapsible?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const getTextAlignClass: (align?: string | undefined) => string | undefined;
|
|
27
|
+
export declare const ContentTable: ({ caption, columns, hasIcons, hideSubtitleOnExpand, children, isCaptionHidden, isCollapsible, titleHeader, titleAlignContent, withoutOpeners }: ContentTablePropsType) => JSX.Element;
|
|
28
|
+
//# sourceMappingURL=ContentTable.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { BackgroundColorType, IconNameType } from '../../..';
|
|
3
|
+
import { ComponentPropsType } from '../../../utils';
|
|
4
|
+
import { TextType, TitleSize } from '../../Typography';
|
|
5
|
+
import { IconBadgePosition } from '..';
|
|
6
|
+
export interface ContentTableRowPropsType extends ComponentPropsType {
|
|
7
|
+
/** Row aria-label */
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
/** Columns content */
|
|
10
|
+
columns?: ReactNode[][];
|
|
11
|
+
/** Amount column content */
|
|
12
|
+
amount?: number;
|
|
13
|
+
/** Amount currency code */
|
|
14
|
+
amountCurrencyCode?: string;
|
|
15
|
+
/** Amount locale */
|
|
16
|
+
amountLocale?: string;
|
|
17
|
+
/** The maximum number of amount fraction digits */
|
|
18
|
+
amountMaximumFractionDigits?: number;
|
|
19
|
+
/** The minimum number of amount fraction digits */
|
|
20
|
+
amountMinimumFractionDigits?: number;
|
|
21
|
+
/** Amount subtitle */
|
|
22
|
+
amountSubtitle?: ReactNode;
|
|
23
|
+
/** Amount subtitle type */
|
|
24
|
+
amountSubtitleType?: TextType;
|
|
25
|
+
/** Buttons column content */
|
|
26
|
+
buttons?: ReactElement[];
|
|
27
|
+
/** Custom row icon */
|
|
28
|
+
customIcon?: ReactNode;
|
|
29
|
+
/** Content to render on expand */
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
/** Row icon background color */
|
|
32
|
+
iconBackgroundColor?: BackgroundColorType;
|
|
33
|
+
/** Row icon badge position (for mobile view) */
|
|
34
|
+
iconBadgePosition?: IconBadgePosition;
|
|
35
|
+
/** Row icon name */
|
|
36
|
+
iconName?: IconNameType;
|
|
37
|
+
/** Row ID */
|
|
38
|
+
id?: string;
|
|
39
|
+
/** Flag whether row is expanded */
|
|
40
|
+
isOpen?: boolean;
|
|
41
|
+
/** Callback called on expand/collapse */
|
|
42
|
+
onToggle?: (isOpened: boolean) => void;
|
|
43
|
+
/** Title column content */
|
|
44
|
+
title: ReactNode;
|
|
45
|
+
/** Title size */
|
|
46
|
+
titleSize?: TitleSize;
|
|
47
|
+
/** Title visual size */
|
|
48
|
+
titleVisual?: TitleSize;
|
|
49
|
+
/** Title subtitles */
|
|
50
|
+
subtitles?: ReactNode[];
|
|
51
|
+
/** Subtitle tag icon background color */
|
|
52
|
+
subtitleTagIconBackgroundColor?: BackgroundColorType;
|
|
53
|
+
/** Subtitle tag icon name */
|
|
54
|
+
subtitleTagIconName?: IconNameType;
|
|
55
|
+
/** Subtitle tag icon image url */
|
|
56
|
+
subtitleTagIconImageUrl?: string;
|
|
57
|
+
/** Subtitle tag content */
|
|
58
|
+
subtitleTagText?: ReactNode;
|
|
59
|
+
}
|
|
60
|
+
export declare const ContentTableRow: ({ amount, amountCurrencyCode, amountLocale, amountMaximumFractionDigits, amountMinimumFractionDigits, amountSubtitle, amountSubtitleType, ariaLabel, buttons, columns, customIcon, children, iconName, iconBackgroundColor, iconBadgePosition, id, isOpen, onToggle, subtitles, subtitleTagIconBackgroundColor, subtitleTagIconName, subtitleTagIconImageUrl, subtitleTagText, title, titleSize, titleVisual }: ContentTableRowPropsType) => JSX.Element;
|
|
61
|
+
//# sourceMappingURL=ContentTableRow.d.ts.map
|
|
@@ -6,7 +6,7 @@ export * from './ButtonTooltip';
|
|
|
6
6
|
export * from './Card';
|
|
7
7
|
export * from './Collapse';
|
|
8
8
|
export * from './CompactButtons';
|
|
9
|
-
export * from './
|
|
9
|
+
export * from './ContentTable';
|
|
10
10
|
export * from './Divider';
|
|
11
11
|
export * from './Dropdown';
|
|
12
12
|
export * from './Icon';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
export declare type ContentTableAlignContentType = 'left' | 'center' | 'right';
|
|
4
|
+
export interface ContentTableColumnType {
|
|
5
|
+
/** Column content alignment */
|
|
6
|
+
alignContent?: ContentTableAlignContentType;
|
|
7
|
+
/** Column header */
|
|
8
|
+
header?: ReactNode;
|
|
9
|
+
/** Flag whether column header is hidden */
|
|
10
|
+
isHeaderHidden?: boolean;
|
|
11
|
+
/** CSS theme */
|
|
12
|
+
theme?: Theme;
|
|
13
|
+
/** Flag whether hide column content on expand */
|
|
14
|
+
hideOnExpand?: boolean;
|
|
15
|
+
/** Flag whether render column on mobile device */
|
|
16
|
+
hideOnMobile?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface ContentTableContextType {
|
|
19
|
+
hasIcons?: boolean;
|
|
20
|
+
hideSubtitleOnExpand?: boolean;
|
|
21
|
+
titleHeader?: ReactNode;
|
|
22
|
+
titleAlignContent?: ContentTableAlignContentType;
|
|
23
|
+
columns: ContentTableColumnType[];
|
|
24
|
+
isMobileDeviceView: boolean;
|
|
25
|
+
withoutOpeners?: boolean;
|
|
26
|
+
isCollapsible?: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare const ContentTableContext: import("react").Context<ContentTableContextType>;
|
|
29
|
+
export default ContentTableContext;
|
|
30
|
+
//# sourceMappingURL=ContentTableContext.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { KeyboardEvent, ReactElement, ReactNode, SyntheticEvent } from 'react';
|
|
2
|
-
import { BackgroundColorType, IconNameType } from '../../..';
|
|
3
|
-
import { ComponentPropsType } from '../../../utils';
|
|
4
|
-
import { TextType, TitleSize } from '../../Typography';
|
|
5
|
-
import { CardSize, IconBadgePosition } from '..';
|
|
6
|
-
export interface ContentCardPropsType extends ComponentPropsType {
|
|
7
|
-
amount?: number;
|
|
8
|
-
amountSubtitle?: ReactNode;
|
|
9
|
-
amountSubtitleType?: TextType;
|
|
10
|
-
buttons?: ReactElement[];
|
|
11
|
-
currencyCode?: string;
|
|
12
|
-
customIcon?: ReactNode;
|
|
13
|
-
children?: ReactNode;
|
|
14
|
-
iconBackgroundColor?: BackgroundColorType;
|
|
15
|
-
iconBadgePosition?: IconBadgePosition;
|
|
16
|
-
iconName?: IconNameType;
|
|
17
|
-
isCollapsible?: boolean;
|
|
18
|
-
isCompact?: boolean;
|
|
19
|
-
isInteractive?: boolean;
|
|
20
|
-
isOpen?: boolean;
|
|
21
|
-
parameters?: ReactNode[];
|
|
22
|
-
title: ReactNode;
|
|
23
|
-
titleSize?: TitleSize;
|
|
24
|
-
titleVisual?: TitleSize;
|
|
25
|
-
size?: CardSize;
|
|
26
|
-
subtitles?: ReactNode[];
|
|
27
|
-
subtitleTagBackgroundColor?: BackgroundColorType;
|
|
28
|
-
subtitleTagIcon?: IconNameType;
|
|
29
|
-
subtitleTagImageUrl?: string;
|
|
30
|
-
subtitleTagText?: ReactNode;
|
|
31
|
-
withoutOpener?: boolean;
|
|
32
|
-
onToggle?: (state: boolean, event: SyntheticEvent | KeyboardEvent) => void;
|
|
33
|
-
}
|
|
34
|
-
export declare const ContentCard: ({ amount, amountSubtitle, amountSubtitleType, buttons, currencyCode, customIcon, children, isCollapsible, isCompact, isInteractive, isOpen, iconBackgroundColor, iconBadgePosition, iconName, parameters, size, subtitles, subtitleTagBackgroundColor, subtitleTagIcon, subtitleTagImageUrl, subtitleTagText, theme, title, titleSize, titleVisual, withoutOpener, onToggle }: ContentCardPropsType) => JSX.Element;
|
|
35
|
-
//# sourceMappingURL=ContentCard.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsType } from '../../../utils';
|
|
2
|
-
import { ContentCardPropsType } from '.';
|
|
3
|
-
export interface ContentCardGroupPropsType extends ComponentPropsType {
|
|
4
|
-
items: (ContentCardPropsType & {
|
|
5
|
-
key: string;
|
|
6
|
-
})[];
|
|
7
|
-
accordion?: boolean;
|
|
8
|
-
withoutShadow?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const ContentCardGroup: ({ accordion, items, theme, withoutShadow }: ContentCardGroupPropsType) => JSX.Element;
|
|
11
|
-
//# sourceMappingURL=ContentCardGroup.d.ts.map
|