@lumx/core 4.14.0-next.0 → 4.14.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/js/components/AlertDialog/Stories.d.ts +115 -0
- package/js/components/AlertDialog/index.d.ts +91 -0
- package/js/components/Avatar/Stories.d.ts +52 -0
- package/js/components/Avatar/index.d.ts +50 -0
- package/js/components/Badge/BadgeWrapper.d.ts +13 -0
- package/js/components/Badge/BadgeWrapperStories.d.ts +29 -0
- package/js/components/Badge/Stories.d.ts +46 -0
- package/js/components/Badge/index.d.ts +37 -0
- package/js/components/Button/ButtonGroup.d.ts +36 -0
- package/js/components/Button/ButtonGroupStories.d.ts +33 -0
- package/js/components/Button/IconButtonStories.d.ts +210 -0
- package/js/components/Button/Stories.d.ts +302 -0
- package/js/components/Checkbox/Stories.d.ts +89 -0
- package/js/components/Chip/ChipGroupStories.d.ts +17 -0
- package/js/components/Chip/SelectionChipGroupStories.d.ts +54 -0
- package/js/components/Chip/Stories.d.ts +127 -0
- package/js/components/Combobox/ComboboxOptionTests.d.ts +24 -0
- package/js/components/Combobox/Stories.d.ts +167 -0
- package/js/components/Combobox/TestStories.d.ts +143 -0
- package/js/components/Combobox/Tests.d.ts +168 -0
- package/js/components/Dialog/Stories.d.ts +97 -0
- package/js/components/Dialog/index.d.ts +99 -0
- package/js/components/Divider/Stories.d.ts +21 -0
- package/js/components/DragHandle/Stories.d.ts +18 -0
- package/js/components/ExpansionPanel/Stories.d.ts +67 -0
- package/js/components/Flag/Stories.d.ts +120 -0
- package/js/components/FlexBox/Stories.d.ts +116 -0
- package/js/components/FlexBox/constants.d.ts +3 -3
- package/js/components/GenericBlock/Stories.d.ts +74 -0
- package/js/components/GenericBlock/constants.d.ts +1 -1
- package/js/components/GenericBlock/index.d.ts +85 -0
- package/js/components/GridColumn/GridColumnStories.d.ts +45 -0
- package/js/components/GridColumn/index.d.ts +2 -0
- package/js/components/Heading/Stories.d.ts +90 -0
- package/js/components/Icon/Stories.d.ts +156 -0
- package/js/components/ImageBlock/Stories.d.ts +187 -0
- package/js/components/InlineList/Stories.d.ts +64 -0
- package/js/components/InlineList/index.d.ts +53 -0
- package/js/components/InputHelper/Stories.d.ts +35 -0
- package/js/components/InputLabel/Stories.d.ts +34 -0
- package/js/components/Lightbox/Stories.d.ts +40 -0
- package/js/components/Lightbox/index.d.ts +68 -0
- package/js/components/Link/Stories.d.ts +282 -0
- package/js/components/Link/index.d.ts +47 -0
- package/js/components/LinkPreview/Stories.d.ts +61 -0
- package/js/components/LinkPreview/index.d.ts +53 -0
- package/js/components/List/ListDivider.d.ts +33 -0
- package/js/components/List/ListDividerStories.d.ts +17 -0
- package/js/components/List/ListItemStories.d.ts +53 -0
- package/js/components/List/ListSection.d.ts +45 -0
- package/js/components/List/ListSectionStories.d.ts +125 -0
- package/js/components/List/ListStories.d.ts +34 -0
- package/js/components/Message/Stories.d.ts +119 -0
- package/js/components/Mosaic/Stories.d.ts +102 -0
- package/js/components/Mosaic/index.d.ts +40 -0
- package/js/components/Popover/Stories.d.ts +139 -0
- package/js/components/Popover/index.d.ts +119 -0
- package/js/components/PopoverDialog/Stories.d.ts +44 -0
- package/js/components/PopoverDialog/index.d.ts +22 -0
- package/js/components/RadioButton/Stories.d.ts +78 -0
- package/js/components/RadioGroup/index.d.ts +34 -0
- package/js/components/SelectButton/Stories.d.ts +135 -0
- package/js/components/SelectButton/TestStories.d.ts +37 -0
- package/js/components/SelectButton/Tests.d.ts +34 -0
- package/js/components/SelectButton/index.d.ts +85 -0
- package/js/components/SelectTextField/Stories.d.ts +192 -0
- package/js/components/SelectTextField/TestStories.d.ts +39 -0
- package/js/components/SelectTextField/Tests.d.ts +38 -0
- package/js/components/SelectTextField/index.d.ts +87 -0
- package/js/components/Skeleton/SkeletonCircleStories.d.ts +43 -0
- package/js/components/Skeleton/SkeletonRectangleStories.d.ts +83 -0
- package/js/components/Skeleton/SkeletonTypographyStories.d.ts +53 -0
- package/js/components/Switch/Stories.d.ts +94 -0
- package/js/components/Table/Stories.d.ts +30 -0
- package/js/components/Table/TableBody.d.ts +25 -0
- package/js/components/Table/TableCellStories.d.ts +47 -0
- package/js/components/Table/TableHeader.d.ts +29 -0
- package/js/components/Table/TableRow.d.ts +35 -0
- package/js/components/Table/TableRowStories.d.ts +23 -0
- package/js/components/Table/index.d.ts +27 -0
- package/js/components/Tabs/Tab.d.ts +70 -0
- package/js/components/Tabs/TabPanel.d.ts +43 -0
- package/js/components/Text/Stories.d.ts +164 -0
- package/js/components/TextField/RawInputText.d.ts +22 -0
- package/js/components/TextField/RawInputTextStories.d.ts +16 -0
- package/js/components/TextField/RawInputTextareaStories.d.ts +21 -0
- package/js/components/TextField/Stories.d.ts +101 -0
- package/js/components/TextField/TextField.d.ts +84 -0
- package/js/components/Thumbnail/Stories.d.ts +178 -0
- package/js/components/Toolbar/Stories.d.ts +29 -0
- package/js/components/Toolbar/index.d.ts +33 -0
- package/js/components/Tooltip/Stories.d.ts +61 -0
- package/js/components/Tooltip/TestStories.d.ts +72 -0
- package/js/components/Tooltip/index.d.ts +65 -0
- package/js/components/Uploader/Stories.d.ts +116 -0
- package/js/components/Uploader/index.d.ts +79 -0
- package/js/components/UserBlock/Stories.d.ts +153 -0
- package/js/components/UserBlock/index.d.ts +145 -0
- package/js/utils/ClickAway/TestStories.d.ts +36 -0
- package/js/utils/InfiniteScroll/TestStories.d.ts +50 -0
- package/js/utils/InfiniteScroll/index.d.ts +21 -0
- package/js/utils/Portal/Stories.d.ts +29 -0
- package/js/utils/action-area/Stories.d.ts +38 -0
- package/js/utils/select/renderSelectOptions.d.ts +7 -0
- package/package.json +2 -2
- package/stories/utils/CombinationsTable.d.ts +26 -0
- package/stories/utils/ThemingVariablesTable.d.ts +29 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup InputHelper stories for a specific framework (React or Vue).
|
|
4
|
+
* This function creates all the stories with the appropriate decorators.
|
|
5
|
+
* Framework-specific render functions or args can be injected via `overrides`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setup({ component: InputHelper, decorators: { withCombinations }, }: SetupStoriesOptions<{
|
|
8
|
+
decorators: 'withCombinations';
|
|
9
|
+
}>): {
|
|
10
|
+
meta: {
|
|
11
|
+
component: any;
|
|
12
|
+
render: ({ children, ...args }: any) => import("react").JSX.Element;
|
|
13
|
+
argTypes: {
|
|
14
|
+
kind: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "select" | "inline-radio";
|
|
17
|
+
};
|
|
18
|
+
options: ("info" | "success" | "warning" | "error")[];
|
|
19
|
+
mapping: Record<string, "info" | "success" | "warning" | "error"> | undefined;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
args: any;
|
|
23
|
+
};
|
|
24
|
+
/** Default input helper */
|
|
25
|
+
Default: {};
|
|
26
|
+
/** All `kind` variants */
|
|
27
|
+
AllKinds: {
|
|
28
|
+
argTypes: {
|
|
29
|
+
kind: {
|
|
30
|
+
control: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
decorators: ((story: any, context: any) => any)[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup InputLabel stories for a specific framework (React or Vue).
|
|
4
|
+
* This function creates all the stories with the appropriate decorators.
|
|
5
|
+
* Framework-specific render functions or args can be injected via `overrides`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setup({ component: InputLabel }: SetupStoriesOptions): {
|
|
8
|
+
meta: {
|
|
9
|
+
component: any;
|
|
10
|
+
render: ({ children, ...args }: any) => import("react").JSX.Element;
|
|
11
|
+
args: {
|
|
12
|
+
children: string;
|
|
13
|
+
};
|
|
14
|
+
argTypes: {
|
|
15
|
+
isRequired: {
|
|
16
|
+
control: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
/** Default input label */
|
|
21
|
+
Default: {};
|
|
22
|
+
/** Required input label */
|
|
23
|
+
IsRequired: {
|
|
24
|
+
args: {
|
|
25
|
+
isRequired: boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/** Default input label with custom typography */
|
|
29
|
+
WithCustomTypography: {
|
|
30
|
+
args: {
|
|
31
|
+
typography: "subtitle1";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Core stories for the Lightbox component.
|
|
4
|
+
*
|
|
5
|
+
* Lightbox is interactive (open/close state, focus trap, etc.) and requires
|
|
6
|
+
* framework-specific rendering for refs and state management.
|
|
7
|
+
* A `render` function is provided per framework to handle this.
|
|
8
|
+
*/
|
|
9
|
+
export declare function setup({ component: Lightbox, render, components: { ImageBlock }, }: SetupStoriesOptions<{
|
|
10
|
+
components: {
|
|
11
|
+
ImageBlock: any;
|
|
12
|
+
};
|
|
13
|
+
}>): {
|
|
14
|
+
meta: {
|
|
15
|
+
component: any;
|
|
16
|
+
render: any;
|
|
17
|
+
play: ({ canvas }: any) => Promise<void>;
|
|
18
|
+
argTypes: {
|
|
19
|
+
children: {
|
|
20
|
+
control: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
Image: {
|
|
25
|
+
render: ({ children, ...args }: any) => any;
|
|
26
|
+
args: {
|
|
27
|
+
'aria-label': string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
WithCloseButton: {
|
|
31
|
+
render: ({ children, ...args }: any) => any;
|
|
32
|
+
args: {
|
|
33
|
+
closeButtonProps: {
|
|
34
|
+
label: string;
|
|
35
|
+
};
|
|
36
|
+
'aria-label': string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
play: ({ canvas }: any) => Promise<void>;
|
|
40
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { AriaAttributes, CommonRef, HasClassName, LumxClassName, HasTheme, JSXElement } from '../../types';
|
|
2
|
+
export interface BaseLightboxProps extends HasClassName, HasTheme, Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> {
|
|
3
|
+
/** Whether the component is open or not. */
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
/** Whether to keep the dialog open on clickaway or escape press. */
|
|
6
|
+
preventAutoClose?: boolean;
|
|
7
|
+
/** Z-axis position. */
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Defines the props of the component.
|
|
12
|
+
*/
|
|
13
|
+
export interface LightboxProps extends BaseLightboxProps {
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `aria-label` instead.
|
|
16
|
+
*/
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `aria-labelledby` instead.
|
|
20
|
+
*/
|
|
21
|
+
ariaLabelledBy?: string;
|
|
22
|
+
/** Props to pass to the close button (minus those already set by the Lightbox props). */
|
|
23
|
+
closeButtonProps?: any;
|
|
24
|
+
/** Whether the component is still visible (e.g. during the close transition). */
|
|
25
|
+
isVisible?: boolean;
|
|
26
|
+
/** Reference to the element that triggered modal opening to set focus on. */
|
|
27
|
+
parentElement?: CommonRef;
|
|
28
|
+
/** Reference to the element that should get the focus when the lightbox opens. By default, the close button or the lightbox itself will take focus. */
|
|
29
|
+
focusElement?: CommonRef;
|
|
30
|
+
/** On close callback. */
|
|
31
|
+
handleClose?(): void;
|
|
32
|
+
/** Children */
|
|
33
|
+
children?: JSXElement;
|
|
34
|
+
/** Reference to the lightbox root element. */
|
|
35
|
+
ref?: CommonRef;
|
|
36
|
+
/** Reference to the wrapper div containing the children. */
|
|
37
|
+
childrenRef?: CommonRef;
|
|
38
|
+
/** Refs used for click-away detection. */
|
|
39
|
+
clickAwayRefs?: any;
|
|
40
|
+
/** Reference to the close button element. */
|
|
41
|
+
closeButtonRef?: CommonRef;
|
|
42
|
+
/** Portal component for rendering the lightbox outside the DOM hierarchy. */
|
|
43
|
+
Portal: any;
|
|
44
|
+
/** HeadingLevelProvider component injected by the framework wrapper. */
|
|
45
|
+
HeadingLevelProvider: any;
|
|
46
|
+
/** ThemeProvider component injected by the framework wrapper. */
|
|
47
|
+
ThemeProvider: any;
|
|
48
|
+
/** ClickAwayProvider component injected by the framework wrapper. */
|
|
49
|
+
ClickAwayProvider: any;
|
|
50
|
+
/** IconButton component injected by the framework wrapper. */
|
|
51
|
+
IconButton: any;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Component display name.
|
|
55
|
+
*/
|
|
56
|
+
export declare const COMPONENT_NAME = "Lightbox";
|
|
57
|
+
/**
|
|
58
|
+
* Component default class name and class prefix.
|
|
59
|
+
*/
|
|
60
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
61
|
+
/**
|
|
62
|
+
* Lightbox component.
|
|
63
|
+
*
|
|
64
|
+
* @param props Component props.
|
|
65
|
+
* @param ref Component ref.
|
|
66
|
+
* @return React element.
|
|
67
|
+
*/
|
|
68
|
+
export declare const Lightbox: (props: LightboxProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
import { ColorVariant, Typography } from '@lumx/core/js/constants';
|
|
3
|
+
/**
|
|
4
|
+
* Setup Link stories for a specific framework (React or Vue).
|
|
5
|
+
* Framework-specific components (Link, Text, Icon, etc.) are injected via `components`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setup({ component: Link, components: { Text, Icon, CustomLink, FlexBox }, decorators: { withCombinations, withThemedBackground, withWrapper }, }: SetupStoriesOptions<{
|
|
8
|
+
decorators: 'withCombinations' | 'withThemedBackground' | 'withWrapper';
|
|
9
|
+
components: {
|
|
10
|
+
Text: any;
|
|
11
|
+
Icon: any;
|
|
12
|
+
CustomLink: any;
|
|
13
|
+
FlexBox: any;
|
|
14
|
+
};
|
|
15
|
+
}>): {
|
|
16
|
+
meta: {
|
|
17
|
+
component: any;
|
|
18
|
+
render: ({ children, ...args }: any) => import("react").JSX.Element;
|
|
19
|
+
argTypes: {
|
|
20
|
+
onClick: {
|
|
21
|
+
action: boolean;
|
|
22
|
+
};
|
|
23
|
+
typography: {
|
|
24
|
+
control: {
|
|
25
|
+
type: "select" | "inline-radio";
|
|
26
|
+
};
|
|
27
|
+
options: ("caption" | "title" | "overline" | "body1" | "body2" | "subtitle1" | "subtitle2" | "headline" | "display1" | "custom-title1" | "custom-title2" | "custom-title3" | "custom-title4" | "custom-title5" | "custom-title6")[];
|
|
28
|
+
mapping: Record<string, "caption" | "title" | "overline" | "body1" | "body2" | "subtitle1" | "subtitle2" | "headline" | "display1" | "custom-title1" | "custom-title2" | "custom-title3" | "custom-title4" | "custom-title5" | "custom-title6"> | undefined;
|
|
29
|
+
};
|
|
30
|
+
color: {
|
|
31
|
+
control: {
|
|
32
|
+
type: "select" | "inline-radio";
|
|
33
|
+
};
|
|
34
|
+
options: ("light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined)[];
|
|
35
|
+
mapping: Record<string, "light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined> | undefined;
|
|
36
|
+
};
|
|
37
|
+
colorVariant: {
|
|
38
|
+
control: {
|
|
39
|
+
type: "select" | "inline-radio";
|
|
40
|
+
};
|
|
41
|
+
options: ("D1" | "D2" | "L1" | "L2" | "L3" | "L4" | "L5" | "L6" | "N")[];
|
|
42
|
+
mapping: Record<string, "D1" | "D2" | "L1" | "L2" | "L3" | "L4" | "L5" | "L6" | "N"> | undefined;
|
|
43
|
+
};
|
|
44
|
+
rightIcon: {
|
|
45
|
+
control: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
options: {
|
|
49
|
+
undefined: undefined;
|
|
50
|
+
mdiAbTesting: string;
|
|
51
|
+
mdiAbjadArabic: string;
|
|
52
|
+
mdiAccount: string;
|
|
53
|
+
mdiAccountBox: string;
|
|
54
|
+
mdiAlert: string;
|
|
55
|
+
mdiAlertCircle: string;
|
|
56
|
+
mdiArrowDown: string;
|
|
57
|
+
mdiArrowUp: string;
|
|
58
|
+
mdiAtom: string;
|
|
59
|
+
mdiBee: string;
|
|
60
|
+
mdiBell: string;
|
|
61
|
+
mdiBullhornOutline: string;
|
|
62
|
+
mdiCheck: string;
|
|
63
|
+
mdiCheckCircle: string;
|
|
64
|
+
mdiChevronDown: string;
|
|
65
|
+
mdiChevronLeft: string;
|
|
66
|
+
mdiChevronRight: string;
|
|
67
|
+
mdiChevronUp: string;
|
|
68
|
+
mdiClose: string;
|
|
69
|
+
mdiCloseCircle: string;
|
|
70
|
+
mdiDelete: string;
|
|
71
|
+
mdiDotsHorizontal: string;
|
|
72
|
+
mdiDragVertical: string;
|
|
73
|
+
mdiEarth: string;
|
|
74
|
+
mdiEmail: string;
|
|
75
|
+
mdiEye: string;
|
|
76
|
+
mdiFileEdit: string;
|
|
77
|
+
mdiFlag: string;
|
|
78
|
+
mdiFolder: string;
|
|
79
|
+
mdiFolderGoogleDrive: string;
|
|
80
|
+
mdiFoodApple: string;
|
|
81
|
+
mdiGoogleCirclesExtended: string;
|
|
82
|
+
mdiHeart: string;
|
|
83
|
+
mdiHome: string;
|
|
84
|
+
mdiImageBroken: string;
|
|
85
|
+
mdiInformation: string;
|
|
86
|
+
mdiLink: string;
|
|
87
|
+
mdiMagnifyMinusOutline: string;
|
|
88
|
+
mdiMagnifyPlusOutline: string;
|
|
89
|
+
mdiMenuDown: string;
|
|
90
|
+
mdiMessageTextOutline: string;
|
|
91
|
+
mdiMinus: string;
|
|
92
|
+
mdiOpenInNew: string;
|
|
93
|
+
mdiPauseCircleOutline: string;
|
|
94
|
+
mdiPencil: string;
|
|
95
|
+
mdiPlay: string;
|
|
96
|
+
mdiPlayCircleOutline: string;
|
|
97
|
+
mdiPlus: string;
|
|
98
|
+
mdiRadioboxBlank: string;
|
|
99
|
+
mdiRadioboxMarked: string;
|
|
100
|
+
mdiReply: string;
|
|
101
|
+
mdiSend: string;
|
|
102
|
+
mdiStar: string;
|
|
103
|
+
mdiTextBox: string;
|
|
104
|
+
mdiTextBoxPlus: string;
|
|
105
|
+
mdiTram: string;
|
|
106
|
+
mdiTranslate: string;
|
|
107
|
+
mdiViewList: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
leftIcon: {
|
|
111
|
+
control: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
options: {
|
|
115
|
+
undefined: undefined;
|
|
116
|
+
mdiAbTesting: string;
|
|
117
|
+
mdiAbjadArabic: string;
|
|
118
|
+
mdiAccount: string;
|
|
119
|
+
mdiAccountBox: string;
|
|
120
|
+
mdiAlert: string;
|
|
121
|
+
mdiAlertCircle: string;
|
|
122
|
+
mdiArrowDown: string;
|
|
123
|
+
mdiArrowUp: string;
|
|
124
|
+
mdiAtom: string;
|
|
125
|
+
mdiBee: string;
|
|
126
|
+
mdiBell: string;
|
|
127
|
+
mdiBullhornOutline: string;
|
|
128
|
+
mdiCheck: string;
|
|
129
|
+
mdiCheckCircle: string;
|
|
130
|
+
mdiChevronDown: string;
|
|
131
|
+
mdiChevronLeft: string;
|
|
132
|
+
mdiChevronRight: string;
|
|
133
|
+
mdiChevronUp: string;
|
|
134
|
+
mdiClose: string;
|
|
135
|
+
mdiCloseCircle: string;
|
|
136
|
+
mdiDelete: string;
|
|
137
|
+
mdiDotsHorizontal: string;
|
|
138
|
+
mdiDragVertical: string;
|
|
139
|
+
mdiEarth: string;
|
|
140
|
+
mdiEmail: string;
|
|
141
|
+
mdiEye: string;
|
|
142
|
+
mdiFileEdit: string;
|
|
143
|
+
mdiFlag: string;
|
|
144
|
+
mdiFolder: string;
|
|
145
|
+
mdiFolderGoogleDrive: string;
|
|
146
|
+
mdiFoodApple: string;
|
|
147
|
+
mdiGoogleCirclesExtended: string;
|
|
148
|
+
mdiHeart: string;
|
|
149
|
+
mdiHome: string;
|
|
150
|
+
mdiImageBroken: string;
|
|
151
|
+
mdiInformation: string;
|
|
152
|
+
mdiLink: string;
|
|
153
|
+
mdiMagnifyMinusOutline: string;
|
|
154
|
+
mdiMagnifyPlusOutline: string;
|
|
155
|
+
mdiMenuDown: string;
|
|
156
|
+
mdiMessageTextOutline: string;
|
|
157
|
+
mdiMinus: string;
|
|
158
|
+
mdiOpenInNew: string;
|
|
159
|
+
mdiPauseCircleOutline: string;
|
|
160
|
+
mdiPencil: string;
|
|
161
|
+
mdiPlay: string;
|
|
162
|
+
mdiPlayCircleOutline: string;
|
|
163
|
+
mdiPlus: string;
|
|
164
|
+
mdiRadioboxBlank: string;
|
|
165
|
+
mdiRadioboxMarked: string;
|
|
166
|
+
mdiReply: string;
|
|
167
|
+
mdiSend: string;
|
|
168
|
+
mdiStar: string;
|
|
169
|
+
mdiTextBox: string;
|
|
170
|
+
mdiTextBoxPlus: string;
|
|
171
|
+
mdiTram: string;
|
|
172
|
+
mdiTranslate: string;
|
|
173
|
+
mdiViewList: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
args: {
|
|
178
|
+
children: string;
|
|
179
|
+
color?: import("@lumx/core/js/constants").ColorWithVariants | undefined;
|
|
180
|
+
colorVariant?: ColorVariant | undefined;
|
|
181
|
+
href?: string | undefined;
|
|
182
|
+
isDisabled?: boolean | undefined;
|
|
183
|
+
linkAs?: string | any;
|
|
184
|
+
handleClick?: ((event: any) => void) | undefined;
|
|
185
|
+
target?: string | undefined;
|
|
186
|
+
typography?: Typography | undefined;
|
|
187
|
+
ref?: import("../../types").CommonRef;
|
|
188
|
+
className?: string | undefined;
|
|
189
|
+
'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
|
|
190
|
+
disabled?: boolean | undefined;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
Default: {
|
|
194
|
+
args: {
|
|
195
|
+
href: string;
|
|
196
|
+
target: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
AsButton: {
|
|
200
|
+
args: {
|
|
201
|
+
children: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
WithTypography: {
|
|
205
|
+
args: {
|
|
206
|
+
href: string;
|
|
207
|
+
typography: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
WithColor: {
|
|
211
|
+
args: {
|
|
212
|
+
href: string;
|
|
213
|
+
color: "primary";
|
|
214
|
+
colorVariant: "D1";
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
Disabled: {
|
|
218
|
+
argTypes: {
|
|
219
|
+
isDisabled: {
|
|
220
|
+
control: boolean;
|
|
221
|
+
};
|
|
222
|
+
'aria-disabled': {
|
|
223
|
+
control: boolean;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
args: {
|
|
227
|
+
children: string;
|
|
228
|
+
};
|
|
229
|
+
decorators: ((story: any, context: any) => any)[];
|
|
230
|
+
};
|
|
231
|
+
LinkAs: {
|
|
232
|
+
args: {
|
|
233
|
+
linkAs: any;
|
|
234
|
+
children: string;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
WithCustomizableTypography: {
|
|
238
|
+
args: {
|
|
239
|
+
typography: "custom-title1";
|
|
240
|
+
children: string;
|
|
241
|
+
};
|
|
242
|
+
render: ({ children, ...args }: any) => import("react").JSX.Element;
|
|
243
|
+
};
|
|
244
|
+
AllStates: {
|
|
245
|
+
argTypes: {
|
|
246
|
+
isDisabled: {
|
|
247
|
+
control: boolean;
|
|
248
|
+
};
|
|
249
|
+
onClick: {
|
|
250
|
+
action: boolean;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
decorators: ((story: any, context: any) => any)[];
|
|
254
|
+
};
|
|
255
|
+
AllTypography: {
|
|
256
|
+
render: ({ children, ...args }: any) => import("react").JSX.Element;
|
|
257
|
+
argTypes: {
|
|
258
|
+
typography: {
|
|
259
|
+
control: boolean;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
decorators: ((story: any, context: any) => any)[];
|
|
263
|
+
};
|
|
264
|
+
AllColors: {
|
|
265
|
+
args: {
|
|
266
|
+
children: string;
|
|
267
|
+
};
|
|
268
|
+
argTypes: {
|
|
269
|
+
color: {
|
|
270
|
+
control: boolean;
|
|
271
|
+
};
|
|
272
|
+
colorVariant: {
|
|
273
|
+
control: boolean;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
decorators: ((story: any, context: any) => any)[];
|
|
277
|
+
};
|
|
278
|
+
ParentTypographyAndColor: {
|
|
279
|
+
render: ({ children, ...args }: any) => import("react").JSX.Element;
|
|
280
|
+
decorators: ((story: any, context: any) => any)[];
|
|
281
|
+
};
|
|
282
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { CommonRef, HasDisabled, JSXElement, LumxClassName } from '../../types';
|
|
2
|
+
import { HasAriaDisabled, HasClassName } from '../../types';
|
|
3
|
+
import { ColorVariant, ColorWithVariants, Typography } from '../../constants';
|
|
4
|
+
/**
|
|
5
|
+
* Defines the props of the component.
|
|
6
|
+
*/
|
|
7
|
+
export interface LinkProps extends HasClassName, HasAriaDisabled, HasDisabled {
|
|
8
|
+
/** Children content */
|
|
9
|
+
children?: JSXElement;
|
|
10
|
+
/** Color variant. */
|
|
11
|
+
color?: ColorWithVariants;
|
|
12
|
+
/** Lightened or darkened variant of the selected icon color. */
|
|
13
|
+
colorVariant?: ColorVariant;
|
|
14
|
+
/** Link href. */
|
|
15
|
+
href?: string;
|
|
16
|
+
/** Whether the component is disabled or not. */
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
/** Custom element/component for the link. */
|
|
19
|
+
linkAs?: string | any;
|
|
20
|
+
/** Click handler (framework wrappers convert onClick to handleClick). */
|
|
21
|
+
handleClick?: (event: any) => void;
|
|
22
|
+
/** Link target. */
|
|
23
|
+
target?: string;
|
|
24
|
+
/** Typography variant. */
|
|
25
|
+
typography?: Typography;
|
|
26
|
+
/** Element ref. */
|
|
27
|
+
ref?: CommonRef;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Component display name.
|
|
31
|
+
*/
|
|
32
|
+
export declare const COMPONENT_NAME = "Link";
|
|
33
|
+
/**
|
|
34
|
+
* Component default class name and class prefix.
|
|
35
|
+
*/
|
|
36
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
37
|
+
/**
|
|
38
|
+
* Component default props.
|
|
39
|
+
*/
|
|
40
|
+
export declare const DEFAULT_PROPS: Partial<LinkProps>;
|
|
41
|
+
/**
|
|
42
|
+
* Link component.
|
|
43
|
+
*
|
|
44
|
+
* @param props Component props.
|
|
45
|
+
* @return JSX element.
|
|
46
|
+
*/
|
|
47
|
+
export declare const Link: (props: LinkProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup LinkPreview stories for a specific framework (React or Vue).
|
|
4
|
+
*/
|
|
5
|
+
export declare function setup({ component: LinkPreview, decorators: { withNestedProps, withWrapper }, }: SetupStoriesOptions<{
|
|
6
|
+
decorators: 'withNestedProps' | 'withWrapper';
|
|
7
|
+
}>): {
|
|
8
|
+
meta: {
|
|
9
|
+
component: any;
|
|
10
|
+
decorators: ((story: any, context: any) => any)[];
|
|
11
|
+
args: {
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
link: string;
|
|
15
|
+
size: "regular";
|
|
16
|
+
titleHeading: "h2";
|
|
17
|
+
};
|
|
18
|
+
argTypes: {
|
|
19
|
+
size: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "select" | "inline-radio";
|
|
22
|
+
};
|
|
23
|
+
options: ("big" | "regular")[];
|
|
24
|
+
mapping: Record<string, "big" | "regular"> | undefined;
|
|
25
|
+
};
|
|
26
|
+
titleHeading: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "select" | "inline-radio";
|
|
29
|
+
};
|
|
30
|
+
options: import("../../types").HeadingElement[];
|
|
31
|
+
mapping: Record<string, import("../../types").HeadingElement> | undefined;
|
|
32
|
+
if: {
|
|
33
|
+
arg: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
Default: {};
|
|
39
|
+
TitleAndDescription: {
|
|
40
|
+
args: {
|
|
41
|
+
title: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
AllFields: {
|
|
46
|
+
args: {
|
|
47
|
+
'thumbnailProps.image': string;
|
|
48
|
+
title: string;
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
Big: {
|
|
53
|
+
decorators: ((story: any, context: any) => any)[];
|
|
54
|
+
args: {
|
|
55
|
+
size: "big";
|
|
56
|
+
'thumbnailProps.image': string;
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Size } from '../../constants';
|
|
2
|
+
import type { CommonRef, HasClassName, LumxClassName, GenericProps, HasTheme } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the props of the component.
|
|
5
|
+
*/
|
|
6
|
+
export interface LinkPreviewProps extends HasClassName, HasTheme {
|
|
7
|
+
/** Description. */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Link URL. */
|
|
10
|
+
link: string;
|
|
11
|
+
/** Custom component for the link (can be used to inject a router Link). */
|
|
12
|
+
linkAs?: 'a' | any;
|
|
13
|
+
/** Props to pass to the link (minus those already set by the LinkPreview props). */
|
|
14
|
+
linkProps?: GenericProps;
|
|
15
|
+
/** Size variant. */
|
|
16
|
+
size?: Extract<Size, 'regular' | 'big'>;
|
|
17
|
+
/** Thumbnail for the link preview. */
|
|
18
|
+
thumbnailProps?: GenericProps;
|
|
19
|
+
/** Title. */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Ref forwarded to the root article element. */
|
|
22
|
+
ref?: CommonRef;
|
|
23
|
+
/** Heading element used to wrap the title. */
|
|
24
|
+
TitleHeading: any;
|
|
25
|
+
/** Link component injected by the framework wrapper. */
|
|
26
|
+
Link: any;
|
|
27
|
+
/** Thumbnail component injected by the framework wrapper. */
|
|
28
|
+
Thumbnail: any;
|
|
29
|
+
}
|
|
30
|
+
export type LinkPreviewPropsToOverride = 'linkProps' | 'TitleHeading' | 'Link' | 'Thumbnail' | 'thumbnailProps';
|
|
31
|
+
/**
|
|
32
|
+
* Component display name.
|
|
33
|
+
*/
|
|
34
|
+
export declare const COMPONENT_NAME = "LinkPreview";
|
|
35
|
+
/**
|
|
36
|
+
* Component default class name and class prefix.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
39
|
+
/**
|
|
40
|
+
* Component default props.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_PROPS: {
|
|
43
|
+
readonly size: "regular";
|
|
44
|
+
readonly titleHeading: "h2";
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* LinkPreview component.
|
|
48
|
+
*
|
|
49
|
+
* @param props Component props.
|
|
50
|
+
* @param ref Component ref.
|
|
51
|
+
* @return React element.
|
|
52
|
+
*/
|
|
53
|
+
export declare const LinkPreview: (props: LinkPreviewProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CommonRef, HasClassName, LumxClassName } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the props of the component.
|
|
4
|
+
*/
|
|
5
|
+
export interface ListDividerProps extends HasClassName {
|
|
6
|
+
/** ref to the root element */
|
|
7
|
+
ref?: CommonRef;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Component display name.
|
|
11
|
+
*/
|
|
12
|
+
export declare const COMPONENT_NAME = "ListDivider";
|
|
13
|
+
/**
|
|
14
|
+
* Component default class name and class prefix.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
17
|
+
/**
|
|
18
|
+
* Component default props.
|
|
19
|
+
*/
|
|
20
|
+
export declare const DEFAULT_PROPS: Partial<ListDividerProps>;
|
|
21
|
+
/**
|
|
22
|
+
* ListDivider component.
|
|
23
|
+
* Purely decorative, consider a `ListSection` with label for a better list structure.
|
|
24
|
+
*
|
|
25
|
+
* @param props Component props.
|
|
26
|
+
* @return JSX element.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ListDivider: {
|
|
29
|
+
(props: ListDividerProps): import("react").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
className: "lumx-list-divider";
|
|
32
|
+
defaultProps: Partial<ListDividerProps>;
|
|
33
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup ListDivider stories for a specific framework (React or Vue).
|
|
4
|
+
* Framework-specific components are injected via `components`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function setup({ component: ListDivider, components: { List }, decorators: { withWrapper }, }: SetupStoriesOptions<{
|
|
7
|
+
decorators: 'withWrapper';
|
|
8
|
+
components: {
|
|
9
|
+
List: any;
|
|
10
|
+
};
|
|
11
|
+
}>): {
|
|
12
|
+
meta: {
|
|
13
|
+
component: any;
|
|
14
|
+
decorators: ((story: any, context: any) => any)[];
|
|
15
|
+
};
|
|
16
|
+
Default: {};
|
|
17
|
+
};
|