@lumx/core 4.13.0 → 4.14.0-alpha.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 +5 -4
- package/stories/utils/CombinationsTable.d.ts +26 -0
- package/stories/utils/ThemingVariablesTable.d.ts +29 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
import { type ListItemSize } from './ListItem';
|
|
3
|
+
/**
|
|
4
|
+
* Setup ListItem stories for a specific framework (React or Vue).
|
|
5
|
+
* Framework-specific components are injected via `components`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setup({ component, render: ListItem, components: { List, ListItemAction, Button, IconButton, Text, FlexBox, Thumbnail }, decorators: { withWrapper, withCombinations }, }: SetupStoriesOptions<{
|
|
8
|
+
decorators: 'withWrapper' | 'withCombinations';
|
|
9
|
+
components: {
|
|
10
|
+
List: any;
|
|
11
|
+
ListItemAction: any;
|
|
12
|
+
Button: any;
|
|
13
|
+
IconButton: any;
|
|
14
|
+
Text: any;
|
|
15
|
+
FlexBox: any;
|
|
16
|
+
Thumbnail: any;
|
|
17
|
+
};
|
|
18
|
+
}>): {
|
|
19
|
+
meta: {
|
|
20
|
+
args: Partial<import("./ListItem").ListItemProps>;
|
|
21
|
+
argTypes: {
|
|
22
|
+
size: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "select" | "inline-radio";
|
|
25
|
+
};
|
|
26
|
+
options: ListItemSize[];
|
|
27
|
+
mapping: Record<string, ListItemSize> | undefined;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
render?: any;
|
|
31
|
+
component: any;
|
|
32
|
+
};
|
|
33
|
+
Default: {
|
|
34
|
+
args: {
|
|
35
|
+
children: string;
|
|
36
|
+
};
|
|
37
|
+
decorators: ((story: any, context: any) => any)[];
|
|
38
|
+
};
|
|
39
|
+
AllStates: {
|
|
40
|
+
args: {
|
|
41
|
+
children: string;
|
|
42
|
+
};
|
|
43
|
+
decorators: ((story: any, context: any) => any)[];
|
|
44
|
+
};
|
|
45
|
+
ActionArea: {
|
|
46
|
+
argTypes: {
|
|
47
|
+
onClick: {
|
|
48
|
+
action: boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
render({ onClick, size }: any): import("react").JSX.Element;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';
|
|
2
|
+
import { TextProps } from '../Text';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the props of the component.
|
|
5
|
+
*/
|
|
6
|
+
export interface ListSectionProps extends HasClassName {
|
|
7
|
+
/** Section label displayed as the group title. Accepts a plain string or custom JSX content. */
|
|
8
|
+
label?: string | JSXElement;
|
|
9
|
+
/** Section icon */
|
|
10
|
+
icon?: string;
|
|
11
|
+
/** List items (should be ListItem, ListDivider, etc.). */
|
|
12
|
+
children: JSXElement;
|
|
13
|
+
/** Items wrapper forwarded props */
|
|
14
|
+
itemsWrapperProps?: Record<string, any>;
|
|
15
|
+
/** ID for the label element (used for aria-labelledby). */
|
|
16
|
+
id: string;
|
|
17
|
+
/** ref to the root element */
|
|
18
|
+
ref?: CommonRef;
|
|
19
|
+
/** Text component to use for rendering the label */
|
|
20
|
+
Text: (props: TextProps & Record<string, any>) => any;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Component display name.
|
|
24
|
+
*/
|
|
25
|
+
export declare const COMPONENT_NAME = "ListSection";
|
|
26
|
+
/**
|
|
27
|
+
* Component default class name and class prefix.
|
|
28
|
+
*/
|
|
29
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
30
|
+
/**
|
|
31
|
+
* Component default props.
|
|
32
|
+
*/
|
|
33
|
+
export declare const DEFAULT_PROPS: Partial<ListSectionProps>;
|
|
34
|
+
/**
|
|
35
|
+
* ListSection component.
|
|
36
|
+
*
|
|
37
|
+
* @param props Component props.
|
|
38
|
+
* @return JSX element.
|
|
39
|
+
*/
|
|
40
|
+
export declare const ListSection: {
|
|
41
|
+
(props: ListSectionProps): import("react").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
className: "lumx-list-section";
|
|
44
|
+
defaultProps: Partial<ListSectionProps>;
|
|
45
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup ListSection stories for a specific framework (React or Vue).
|
|
4
|
+
* Framework-specific components are injected via `components`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function setup({ component: ListSection, components: { List, ListItem, ListDivider, FlexBox }, decorators: { withWrapper }, }: SetupStoriesOptions<{
|
|
7
|
+
decorators: 'withWrapper';
|
|
8
|
+
components: {
|
|
9
|
+
List: any;
|
|
10
|
+
ListItem: any;
|
|
11
|
+
ListDivider: any;
|
|
12
|
+
FlexBox: any;
|
|
13
|
+
};
|
|
14
|
+
}>): {
|
|
15
|
+
meta: {
|
|
16
|
+
component: any;
|
|
17
|
+
argTypes: {
|
|
18
|
+
icon: {
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
options: {
|
|
23
|
+
undefined: undefined;
|
|
24
|
+
mdiAbTesting: string;
|
|
25
|
+
mdiAbjadArabic: string;
|
|
26
|
+
mdiAccount: string;
|
|
27
|
+
mdiAccountBox: string;
|
|
28
|
+
mdiAlert: string;
|
|
29
|
+
mdiAlertCircle: string;
|
|
30
|
+
mdiArrowDown: string;
|
|
31
|
+
mdiArrowUp: string;
|
|
32
|
+
mdiAtom: string;
|
|
33
|
+
mdiBee: string;
|
|
34
|
+
mdiBell: string;
|
|
35
|
+
mdiBullhornOutline: string;
|
|
36
|
+
mdiCheck: string;
|
|
37
|
+
mdiCheckCircle: string;
|
|
38
|
+
mdiChevronDown: string;
|
|
39
|
+
mdiChevronLeft: string;
|
|
40
|
+
mdiChevronRight: string;
|
|
41
|
+
mdiChevronUp: string;
|
|
42
|
+
mdiClose: string;
|
|
43
|
+
mdiCloseCircle: string;
|
|
44
|
+
mdiDelete: string;
|
|
45
|
+
mdiDotsHorizontal: string;
|
|
46
|
+
mdiDragVertical: string;
|
|
47
|
+
mdiEarth: string;
|
|
48
|
+
mdiEmail: string;
|
|
49
|
+
mdiEye: string;
|
|
50
|
+
mdiFileEdit: string;
|
|
51
|
+
mdiFlag: string;
|
|
52
|
+
mdiFolder: string;
|
|
53
|
+
mdiFolderGoogleDrive: string;
|
|
54
|
+
mdiFoodApple: string;
|
|
55
|
+
mdiGoogleCirclesExtended: string;
|
|
56
|
+
mdiHeart: string;
|
|
57
|
+
mdiHome: string;
|
|
58
|
+
mdiImageBroken: string;
|
|
59
|
+
mdiInformation: string;
|
|
60
|
+
mdiLink: string;
|
|
61
|
+
mdiMagnifyMinusOutline: string;
|
|
62
|
+
mdiMagnifyPlusOutline: string;
|
|
63
|
+
mdiMenuDown: string;
|
|
64
|
+
mdiMessageTextOutline: string;
|
|
65
|
+
mdiMinus: string;
|
|
66
|
+
mdiOpenInNew: string;
|
|
67
|
+
mdiPauseCircleOutline: string;
|
|
68
|
+
mdiPencil: string;
|
|
69
|
+
mdiPlay: string;
|
|
70
|
+
mdiPlayCircleOutline: string;
|
|
71
|
+
mdiPlus: string;
|
|
72
|
+
mdiRadioboxBlank: string;
|
|
73
|
+
mdiRadioboxMarked: string;
|
|
74
|
+
mdiReply: string;
|
|
75
|
+
mdiSend: string;
|
|
76
|
+
mdiStar: string;
|
|
77
|
+
mdiTextBox: string;
|
|
78
|
+
mdiTextBoxPlus: string;
|
|
79
|
+
mdiTram: string;
|
|
80
|
+
mdiTranslate: string;
|
|
81
|
+
mdiViewList: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
'list.itemPadding': {
|
|
85
|
+
control: {
|
|
86
|
+
type: "select" | "inline-radio";
|
|
87
|
+
};
|
|
88
|
+
options: ("big" | "huge" | undefined)[];
|
|
89
|
+
mapping: Record<string, "big" | "huge" | undefined> | undefined;
|
|
90
|
+
};
|
|
91
|
+
'listItem.size': {
|
|
92
|
+
control: {
|
|
93
|
+
type: "select" | "inline-radio";
|
|
94
|
+
};
|
|
95
|
+
options: ("big" | "tiny" | "regular" | undefined)[];
|
|
96
|
+
mapping: Record<string, "big" | "tiny" | "regular" | undefined> | undefined;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
Default: {
|
|
101
|
+
args: {
|
|
102
|
+
label: string;
|
|
103
|
+
};
|
|
104
|
+
render({ "list.itemPadding": itemPadding, "listItem.size": itemSize, ...args }: any): import("react").JSX.Element;
|
|
105
|
+
};
|
|
106
|
+
AutoDividerEdgeCases: {
|
|
107
|
+
render({ "list.itemPadding": itemPadding, "listItem.size": itemSize }: any): import("react").JSX.Element;
|
|
108
|
+
};
|
|
109
|
+
LabelVariants: {
|
|
110
|
+
render({ "list.itemPadding": itemPadding, "listItem.size": itemSize }: any): import("react").JSX.Element;
|
|
111
|
+
decorators: ((story: any, context: any) => any)[];
|
|
112
|
+
};
|
|
113
|
+
ClickableItems: {
|
|
114
|
+
argTypes: {
|
|
115
|
+
onClick: {
|
|
116
|
+
action: boolean;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
args: {
|
|
120
|
+
'list.itemPadding': "big";
|
|
121
|
+
'listItem.size': "tiny";
|
|
122
|
+
};
|
|
123
|
+
render({ onClick, "list.itemPadding": itemPadding, "listItem.size": itemSize }: any): import("react").JSX.Element;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup List stories for a specific framework (React or Vue).
|
|
4
|
+
* Framework-specific components are injected via `components`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function setup({ component: List, components: { ListItem }, decorators: { withCombinations }, }: SetupStoriesOptions<{
|
|
7
|
+
decorators: 'withCombinations';
|
|
8
|
+
components: {
|
|
9
|
+
ListItem: any;
|
|
10
|
+
};
|
|
11
|
+
}>): {
|
|
12
|
+
meta: {
|
|
13
|
+
component: any;
|
|
14
|
+
render: (args: any) => import("react").JSX.Element;
|
|
15
|
+
argTypes: {
|
|
16
|
+
itemPadding: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select" | "inline-radio";
|
|
19
|
+
};
|
|
20
|
+
options: ("big" | "huge" | undefined)[];
|
|
21
|
+
mapping: Record<string, "big" | "huge" | undefined> | undefined;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
Default: {};
|
|
26
|
+
ItemPadding: {
|
|
27
|
+
argTypes: {
|
|
28
|
+
itemPadding: {
|
|
29
|
+
control: boolean;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
decorators: ((story: any, context: any) => any)[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup Message stories for a specific framework (React or Vue).
|
|
4
|
+
* This function creates all the stories with the appropriate decorators.
|
|
5
|
+
* Framework-specific components are injected via `components`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setup({ component: Message, decorators: { withCombinations }, overrides, }: SetupStoriesOptions<{
|
|
8
|
+
overrides: 'ClosableMessage';
|
|
9
|
+
decorators: 'withCombinations';
|
|
10
|
+
}>): {
|
|
11
|
+
meta: {
|
|
12
|
+
component: any;
|
|
13
|
+
render: ({ children, ...args }: any) => import("react").JSX.Element;
|
|
14
|
+
argTypes: {
|
|
15
|
+
kind: {
|
|
16
|
+
control: {
|
|
17
|
+
type: "select" | "inline-radio";
|
|
18
|
+
};
|
|
19
|
+
options: ("info" | "success" | "warning" | "error")[];
|
|
20
|
+
mapping: Record<string, "info" | "success" | "warning" | "error"> | undefined;
|
|
21
|
+
};
|
|
22
|
+
hasBackground: {
|
|
23
|
+
control: string;
|
|
24
|
+
};
|
|
25
|
+
icon: {
|
|
26
|
+
control: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
options: {
|
|
30
|
+
undefined: undefined;
|
|
31
|
+
mdiAbTesting: string;
|
|
32
|
+
mdiAbjadArabic: string;
|
|
33
|
+
mdiAccount: string;
|
|
34
|
+
mdiAccountBox: string;
|
|
35
|
+
mdiAlert: string;
|
|
36
|
+
mdiAlertCircle: string;
|
|
37
|
+
mdiArrowDown: string;
|
|
38
|
+
mdiArrowUp: string;
|
|
39
|
+
mdiAtom: string;
|
|
40
|
+
mdiBee: string;
|
|
41
|
+
mdiBell: string;
|
|
42
|
+
mdiBullhornOutline: string;
|
|
43
|
+
mdiCheck: string;
|
|
44
|
+
mdiCheckCircle: string;
|
|
45
|
+
mdiChevronDown: string;
|
|
46
|
+
mdiChevronLeft: string;
|
|
47
|
+
mdiChevronRight: string;
|
|
48
|
+
mdiChevronUp: string;
|
|
49
|
+
mdiClose: string;
|
|
50
|
+
mdiCloseCircle: string;
|
|
51
|
+
mdiDelete: string;
|
|
52
|
+
mdiDotsHorizontal: string;
|
|
53
|
+
mdiDragVertical: string;
|
|
54
|
+
mdiEarth: string;
|
|
55
|
+
mdiEmail: string;
|
|
56
|
+
mdiEye: string;
|
|
57
|
+
mdiFileEdit: string;
|
|
58
|
+
mdiFlag: string;
|
|
59
|
+
mdiFolder: string;
|
|
60
|
+
mdiFolderGoogleDrive: string;
|
|
61
|
+
mdiFoodApple: string;
|
|
62
|
+
mdiGoogleCirclesExtended: string;
|
|
63
|
+
mdiHeart: string;
|
|
64
|
+
mdiHome: string;
|
|
65
|
+
mdiImageBroken: string;
|
|
66
|
+
mdiInformation: string;
|
|
67
|
+
mdiLink: string;
|
|
68
|
+
mdiMagnifyMinusOutline: string;
|
|
69
|
+
mdiMagnifyPlusOutline: string;
|
|
70
|
+
mdiMenuDown: string;
|
|
71
|
+
mdiMessageTextOutline: string;
|
|
72
|
+
mdiMinus: string;
|
|
73
|
+
mdiOpenInNew: string;
|
|
74
|
+
mdiPauseCircleOutline: string;
|
|
75
|
+
mdiPencil: string;
|
|
76
|
+
mdiPlay: string;
|
|
77
|
+
mdiPlayCircleOutline: string;
|
|
78
|
+
mdiPlus: string;
|
|
79
|
+
mdiRadioboxBlank: string;
|
|
80
|
+
mdiRadioboxMarked: string;
|
|
81
|
+
mdiReply: string;
|
|
82
|
+
mdiSend: string;
|
|
83
|
+
mdiStar: string;
|
|
84
|
+
mdiTextBox: string;
|
|
85
|
+
mdiTextBoxPlus: string;
|
|
86
|
+
mdiTram: string;
|
|
87
|
+
mdiTranslate: string;
|
|
88
|
+
mdiViewList: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
args: {
|
|
93
|
+
children: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
/** Default message */
|
|
97
|
+
Default: {};
|
|
98
|
+
/** All `kind` variants */
|
|
99
|
+
AllKinds: {
|
|
100
|
+
decorators: ((story: any, context: any) => any)[];
|
|
101
|
+
};
|
|
102
|
+
/** All `kind` variants with `hasBackground` */
|
|
103
|
+
AllKindsWithBackground: {
|
|
104
|
+
args: {
|
|
105
|
+
hasBackground: boolean;
|
|
106
|
+
};
|
|
107
|
+
decorators: ((story: any, context: any) => any)[];
|
|
108
|
+
};
|
|
109
|
+
/** With custom icon */
|
|
110
|
+
CustomIcon: {
|
|
111
|
+
args: {
|
|
112
|
+
icon: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
/** With close button (has background and kind info) */
|
|
116
|
+
ClosableMessage: {
|
|
117
|
+
args: any;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup Mosaic stories for a specific framework (React or Vue).
|
|
4
|
+
* Framework-specific decorators are injected via `decorators`.
|
|
5
|
+
* Per-story overrides (e.g. framework-specific argTypes) are injected via `overrides`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setup({ component: Mosaic, decorators: { withWrapper }, overrides, }: SetupStoriesOptions<{
|
|
8
|
+
decorators: 'withWrapper';
|
|
9
|
+
overrides: 'OneThumbnailClickable' | 'TwoThumbnailClickable' | 'ThreeThumbnailClickable' | 'FourThumbnailClickable' | 'FiveThumbnailClickable' | 'SixThumbnailClickable';
|
|
10
|
+
}>): {
|
|
11
|
+
meta: {
|
|
12
|
+
component: any;
|
|
13
|
+
render: (args: any) => import("react").JSX.Element;
|
|
14
|
+
args: Partial<import(".").MosaicProps>;
|
|
15
|
+
argTypes: {};
|
|
16
|
+
decorators: ((story: any, context: any) => any)[];
|
|
17
|
+
};
|
|
18
|
+
OneThumbnail: {
|
|
19
|
+
args: {
|
|
20
|
+
thumbnails: {
|
|
21
|
+
image: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
OneThumbnailClickable: {
|
|
26
|
+
args: {
|
|
27
|
+
thumbnails: {
|
|
28
|
+
image: string;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
TwoThumbnail: {
|
|
33
|
+
args: {
|
|
34
|
+
thumbnails: {
|
|
35
|
+
image: string;
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
TwoThumbnailClickable: {
|
|
40
|
+
args: {
|
|
41
|
+
thumbnails: {
|
|
42
|
+
image: string;
|
|
43
|
+
}[];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
ThreeThumbnail: {
|
|
47
|
+
args: {
|
|
48
|
+
thumbnails: {
|
|
49
|
+
image: string;
|
|
50
|
+
}[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
ThreeThumbnailClickable: {
|
|
54
|
+
args: {
|
|
55
|
+
thumbnails: {
|
|
56
|
+
image: string;
|
|
57
|
+
}[];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
FourThumbnail: {
|
|
61
|
+
args: {
|
|
62
|
+
thumbnails: {
|
|
63
|
+
image: string;
|
|
64
|
+
}[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
FourThumbnailClickable: {
|
|
68
|
+
args: {
|
|
69
|
+
thumbnails: {
|
|
70
|
+
image: string;
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
FiveThumbnail: {
|
|
75
|
+
args: {
|
|
76
|
+
thumbnails: {
|
|
77
|
+
image: string;
|
|
78
|
+
}[];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
FiveThumbnailClickable: {
|
|
82
|
+
args: {
|
|
83
|
+
thumbnails: {
|
|
84
|
+
image: string;
|
|
85
|
+
}[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
SixThumbnail: {
|
|
89
|
+
args: {
|
|
90
|
+
thumbnails: {
|
|
91
|
+
image: string;
|
|
92
|
+
}[];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
SixThumbnailClickable: {
|
|
96
|
+
args: {
|
|
97
|
+
thumbnails: {
|
|
98
|
+
image: string;
|
|
99
|
+
}[];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CommonRef, HasClassName, LumxClassName, HasTheme } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the props of the component.
|
|
4
|
+
*/
|
|
5
|
+
export interface MosaicProps extends HasClassName, HasTheme {
|
|
6
|
+
/** Thumbnails. */
|
|
7
|
+
thumbnails: any[];
|
|
8
|
+
/** On image click callback. */
|
|
9
|
+
handleClick?(index: number): void;
|
|
10
|
+
Thumbnail: any;
|
|
11
|
+
ref?: CommonRef;
|
|
12
|
+
}
|
|
13
|
+
export type MosaicPropsToOverride = 'Thumbnail' | 'thumbnails';
|
|
14
|
+
/**
|
|
15
|
+
* Component display name.
|
|
16
|
+
*/
|
|
17
|
+
export declare const COMPONENT_NAME = "Mosaic";
|
|
18
|
+
/**
|
|
19
|
+
* Component default class name and class prefix.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
22
|
+
export declare const block: {
|
|
23
|
+
(additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
|
|
24
|
+
(modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
|
|
25
|
+
}, element: {
|
|
26
|
+
(elem: string, additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
|
|
27
|
+
(elem: string, modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Component default props.
|
|
31
|
+
*/
|
|
32
|
+
export declare const DEFAULT_PROPS: Partial<MosaicProps>;
|
|
33
|
+
/**
|
|
34
|
+
* Mosaic component.
|
|
35
|
+
*
|
|
36
|
+
* @param props Component props.
|
|
37
|
+
* @param ref Component ref.
|
|
38
|
+
* @return React element.
|
|
39
|
+
*/
|
|
40
|
+
export declare const Mosaic: (props: MosaicProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
import { Placement, type Elevation, FitAnchorWidth } from './constants';
|
|
3
|
+
/**
|
|
4
|
+
* Core stories for the Popover component.
|
|
5
|
+
*
|
|
6
|
+
* A default `render` function is provided per framework to handle anchor ref creation
|
|
7
|
+
* and framework-specific JSX. Story variations are expressed as `args` and shared here.
|
|
8
|
+
*
|
|
9
|
+
* The render function receives all args, including story display args:
|
|
10
|
+
* - `anchorText`: Label for the anchor button (default: 'Anchor')
|
|
11
|
+
* - `anchorClassName`: CSS class for the anchor button (default: 'lumx-spacing-margin-big')
|
|
12
|
+
* - `popoverClassName`: Extra CSS class for the popover (default: undefined)
|
|
13
|
+
* - `textColor`: Text color prop for popover content (default: undefined)
|
|
14
|
+
* - `fitAnchorWidth`: When set, popover content renders as plain text instead of wrapped in Text
|
|
15
|
+
*/
|
|
16
|
+
export declare function setup({ component: Popover, render, decorators: { withCombinations, withChromaticForceScreenSize }, }: SetupStoriesOptions<{
|
|
17
|
+
decorators: 'withCombinations' | 'withChromaticForceScreenSize';
|
|
18
|
+
}>): {
|
|
19
|
+
meta: {
|
|
20
|
+
component: any;
|
|
21
|
+
render: any;
|
|
22
|
+
args: {
|
|
23
|
+
isOpen: boolean;
|
|
24
|
+
anchorText: string;
|
|
25
|
+
anchorClassName: string;
|
|
26
|
+
anchorRef?: import("../../types").CommonRef;
|
|
27
|
+
as?: string | undefined;
|
|
28
|
+
boundaryRef?: import("../../types").CommonRef;
|
|
29
|
+
closeOnClickAway?: boolean | undefined;
|
|
30
|
+
closeOnEscape?: boolean | undefined;
|
|
31
|
+
elevation?: Elevation | undefined;
|
|
32
|
+
fitToAnchorWidth?: (FitAnchorWidth | boolean) | undefined;
|
|
33
|
+
fitWithinViewportHeight?: boolean | undefined;
|
|
34
|
+
focusElement?: import("../../types").CommonRef;
|
|
35
|
+
focusAnchorOnClose?: boolean | undefined;
|
|
36
|
+
hasArrow?: boolean | undefined;
|
|
37
|
+
offset?: import("./constants").Offset | undefined;
|
|
38
|
+
parentElement?: import("../../types").CommonRef;
|
|
39
|
+
placement?: Placement | undefined;
|
|
40
|
+
usePortal?: boolean | undefined;
|
|
41
|
+
focusTrapZoneElement?: import("../../types").CommonRef;
|
|
42
|
+
zIndex?: number | undefined;
|
|
43
|
+
withFocusTrap?: boolean | undefined;
|
|
44
|
+
handleClose?: (() => void) | undefined;
|
|
45
|
+
className?: string | undefined;
|
|
46
|
+
theme?: import("../../constants").Theme | undefined;
|
|
47
|
+
closeMode?: "hide" | "unmount" | undefined;
|
|
48
|
+
};
|
|
49
|
+
argTypes: {
|
|
50
|
+
closeMode: {
|
|
51
|
+
control: {
|
|
52
|
+
type: "select" | "inline-radio";
|
|
53
|
+
};
|
|
54
|
+
options: string[];
|
|
55
|
+
mapping: Record<string, string> | undefined;
|
|
56
|
+
};
|
|
57
|
+
isOpen: {
|
|
58
|
+
control: string;
|
|
59
|
+
};
|
|
60
|
+
hasArrow: {
|
|
61
|
+
control: string;
|
|
62
|
+
};
|
|
63
|
+
placement: {
|
|
64
|
+
control: {
|
|
65
|
+
type: "select" | "inline-radio";
|
|
66
|
+
};
|
|
67
|
+
options: ("top" | "right" | "bottom" | "left" | "auto" | "bottom-end" | "auto-end" | "auto-start" | "top-end" | "top-start" | "right-end" | "right-start" | "bottom-start" | "left-end" | "left-start")[];
|
|
68
|
+
mapping: Record<string, "top" | "right" | "bottom" | "left" | "auto" | "bottom-end" | "auto-end" | "auto-start" | "top-end" | "top-start" | "right-end" | "right-start" | "bottom-start" | "left-end" | "left-start"> | undefined;
|
|
69
|
+
};
|
|
70
|
+
elevation: {
|
|
71
|
+
control: {
|
|
72
|
+
type: "select" | "inline-radio";
|
|
73
|
+
};
|
|
74
|
+
options: Elevation[];
|
|
75
|
+
mapping: Record<string, Elevation> | undefined;
|
|
76
|
+
};
|
|
77
|
+
ref: {
|
|
78
|
+
control: boolean;
|
|
79
|
+
};
|
|
80
|
+
parentElement: {
|
|
81
|
+
control: boolean;
|
|
82
|
+
};
|
|
83
|
+
focusElement: {
|
|
84
|
+
control: boolean;
|
|
85
|
+
};
|
|
86
|
+
anchorRef: {
|
|
87
|
+
control: boolean;
|
|
88
|
+
};
|
|
89
|
+
boundaryRef: {
|
|
90
|
+
control: boolean;
|
|
91
|
+
};
|
|
92
|
+
children: {
|
|
93
|
+
control: boolean;
|
|
94
|
+
};
|
|
95
|
+
anchorText: {
|
|
96
|
+
control: boolean;
|
|
97
|
+
};
|
|
98
|
+
anchorClassName: {
|
|
99
|
+
control: boolean;
|
|
100
|
+
};
|
|
101
|
+
popoverClassName: {
|
|
102
|
+
control: boolean;
|
|
103
|
+
};
|
|
104
|
+
textColor: {
|
|
105
|
+
control: boolean;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
decorators: ((story: any, context: any) => any)[];
|
|
109
|
+
};
|
|
110
|
+
Simple: {};
|
|
111
|
+
DarkTheme: {
|
|
112
|
+
args: {
|
|
113
|
+
theme: string;
|
|
114
|
+
hasArrow: boolean;
|
|
115
|
+
textColor: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
WithoutPortal: {
|
|
119
|
+
args: {
|
|
120
|
+
usePortal: boolean;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
Placements: {
|
|
124
|
+
argTypes: {
|
|
125
|
+
placement: {
|
|
126
|
+
control: boolean;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
decorators: ((story: any, context: any) => any)[];
|
|
130
|
+
};
|
|
131
|
+
FitToAnchorWidth: {
|
|
132
|
+
args: {
|
|
133
|
+
anchorClassName: string;
|
|
134
|
+
popoverClassName: string;
|
|
135
|
+
placement: "bottom";
|
|
136
|
+
};
|
|
137
|
+
decorators: ((story: any, context: any) => any)[];
|
|
138
|
+
};
|
|
139
|
+
};
|