@lumx/core 4.14.0-next.0 → 4.14.0-next.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/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,97 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Core stories for the Dialog component.
|
|
4
|
+
*
|
|
5
|
+
* Dialog 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: Dialog, render, decorators: { withChromaticForceScreenSize }, }: SetupStoriesOptions<{
|
|
10
|
+
decorators: 'withChromaticForceScreenSize';
|
|
11
|
+
}>): {
|
|
12
|
+
meta: {
|
|
13
|
+
component: any;
|
|
14
|
+
render: any;
|
|
15
|
+
parameters: {
|
|
16
|
+
chromatic: {
|
|
17
|
+
pauseAnimationAtEnd: boolean;
|
|
18
|
+
delay: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
decorators: ((story: any, context: any) => any)[];
|
|
22
|
+
args: Partial<import(".").DialogProps>;
|
|
23
|
+
argTypes: {
|
|
24
|
+
size: {
|
|
25
|
+
control: {
|
|
26
|
+
type: "select" | "inline-radio";
|
|
27
|
+
};
|
|
28
|
+
options: ("big" | "tiny" | "regular" | "huge")[];
|
|
29
|
+
mapping: Record<string, "big" | "tiny" | "regular" | "huge"> | undefined;
|
|
30
|
+
};
|
|
31
|
+
onVisibilityChange: {
|
|
32
|
+
action: boolean;
|
|
33
|
+
};
|
|
34
|
+
children: {
|
|
35
|
+
control: boolean;
|
|
36
|
+
};
|
|
37
|
+
closeMode: {
|
|
38
|
+
control: {
|
|
39
|
+
type: "inline-radio";
|
|
40
|
+
};
|
|
41
|
+
options: string[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
Default: {
|
|
46
|
+
args: {
|
|
47
|
+
children: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
Loading: {
|
|
51
|
+
args: {
|
|
52
|
+
isLoading: boolean;
|
|
53
|
+
children: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
WithHeaderFooter: {
|
|
57
|
+
args: {
|
|
58
|
+
header: string;
|
|
59
|
+
footer: string;
|
|
60
|
+
children: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
ForceDivider: {
|
|
64
|
+
args: {
|
|
65
|
+
forceFooterDivider: boolean;
|
|
66
|
+
forceHeaderDivider: boolean;
|
|
67
|
+
header: string;
|
|
68
|
+
footer: string;
|
|
69
|
+
children: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
LongContent: {
|
|
73
|
+
args: {
|
|
74
|
+
children: string;
|
|
75
|
+
header: string;
|
|
76
|
+
footer: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
PreventAutoClose: {
|
|
80
|
+
args: {
|
|
81
|
+
preventAutoClose: boolean;
|
|
82
|
+
children: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
PreventCloseOnEscape: {
|
|
86
|
+
args: {
|
|
87
|
+
preventCloseOnEscape: boolean;
|
|
88
|
+
children: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
PreventCloseOnClick: {
|
|
92
|
+
args: {
|
|
93
|
+
preventCloseOnClick: boolean;
|
|
94
|
+
children: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { CommonRef, HasClassName, JSXElement, LumxClassName, GenericProps } from '../../types';
|
|
2
|
+
import { Size } from '../../constants';
|
|
3
|
+
export interface BaseDialogProps {
|
|
4
|
+
/** Footer content. */
|
|
5
|
+
footer?: JSXElement;
|
|
6
|
+
/** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
|
|
7
|
+
forceFooterDivider?: boolean;
|
|
8
|
+
/** Header content. */
|
|
9
|
+
header?: JSXElement;
|
|
10
|
+
/** Whether the divider between the dialog content and the header is always displayed (instead of showing it on scroll). */
|
|
11
|
+
forceHeaderDivider?: boolean;
|
|
12
|
+
/** Whether the indefinite progress indicator over the dialog content is displayed or not. */
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
/** Whether the component is open or not. */
|
|
15
|
+
isOpen?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Defines the props of the component.
|
|
19
|
+
*/
|
|
20
|
+
export interface DialogProps extends HasClassName, BaseDialogProps {
|
|
21
|
+
/** Reference to the root element. */
|
|
22
|
+
ref?: CommonRef;
|
|
23
|
+
/** Whether the component is still visible (e.g. during close animation). */
|
|
24
|
+
isVisible?: boolean;
|
|
25
|
+
/** Reference to the dialog content element. */
|
|
26
|
+
contentRef?: CommonRef;
|
|
27
|
+
/** Size variant. */
|
|
28
|
+
size?: DialogSizes;
|
|
29
|
+
/** Z-axis position. */
|
|
30
|
+
zIndex?: number;
|
|
31
|
+
/** Additional props for the dialog container element. */
|
|
32
|
+
dialogProps?: GenericProps;
|
|
33
|
+
/** On close callback. */
|
|
34
|
+
handleClose?(): void;
|
|
35
|
+
/** Whether to prevent closing on click away. */
|
|
36
|
+
shouldPreventCloseOnClickAway?: boolean;
|
|
37
|
+
/** Refs used for click-away detection. */
|
|
38
|
+
clickAwayRefs?: any;
|
|
39
|
+
/** Ref for the root wrapper element. */
|
|
40
|
+
rootRef?: CommonRef;
|
|
41
|
+
/** Ref for the inner section element. */
|
|
42
|
+
wrapperRef?: CommonRef;
|
|
43
|
+
/** Whether the header sentinel is out of view (controls header divider). */
|
|
44
|
+
hasTopIntersection: boolean | null;
|
|
45
|
+
/** Whether the footer sentinel is out of view (controls footer divider). */
|
|
46
|
+
hasBottomIntersection: boolean | null;
|
|
47
|
+
/** Props forwarded from a child <header> element. */
|
|
48
|
+
headerChildProps?: GenericProps;
|
|
49
|
+
/** Content extracted from a child <header> element. */
|
|
50
|
+
headerChildContent?: JSXElement;
|
|
51
|
+
/** Props forwarded from a child <footer> element. */
|
|
52
|
+
footerChildProps?: GenericProps;
|
|
53
|
+
/** Content extracted from a child <footer> element. */
|
|
54
|
+
footerChildContent?: JSXElement;
|
|
55
|
+
/** Dialog body content. */
|
|
56
|
+
content?: JSXElement;
|
|
57
|
+
/** Ref setter for the top scroll sentinel element. */
|
|
58
|
+
setSentinelTop?: any;
|
|
59
|
+
/** Ref setter for the bottom scroll sentinel element. */
|
|
60
|
+
setSentinelBottom?: any;
|
|
61
|
+
/** Portal component for rendering outside the DOM hierarchy. */
|
|
62
|
+
Portal: any;
|
|
63
|
+
/** HeadingLevelProvider component. */
|
|
64
|
+
HeadingLevelProvider: any;
|
|
65
|
+
/** ThemeProvider component. */
|
|
66
|
+
ThemeProvider: any;
|
|
67
|
+
/** ClickAwayProvider component. */
|
|
68
|
+
ClickAwayProvider: any;
|
|
69
|
+
/** ProgressCircular component */
|
|
70
|
+
ProgressCircular: any;
|
|
71
|
+
}
|
|
72
|
+
export type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
73
|
+
/**
|
|
74
|
+
* Component display name.
|
|
75
|
+
*/
|
|
76
|
+
export declare const COMPONENT_NAME = "Dialog";
|
|
77
|
+
/**
|
|
78
|
+
* Component default class name and class prefix.
|
|
79
|
+
*/
|
|
80
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
81
|
+
export declare const block: {
|
|
82
|
+
(additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
|
|
83
|
+
(modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
|
|
84
|
+
}, element: {
|
|
85
|
+
(elem: string, additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
|
|
86
|
+
(elem: string, modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Component default props.
|
|
90
|
+
*/
|
|
91
|
+
export declare const DEFAULT_PROPS: Partial<DialogProps>;
|
|
92
|
+
/**
|
|
93
|
+
* Dialog component.
|
|
94
|
+
*
|
|
95
|
+
* @param props Component props.
|
|
96
|
+
* @param ref Component ref.
|
|
97
|
+
* @return React element.
|
|
98
|
+
*/
|
|
99
|
+
export declare const Dialog: (props: DialogProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup Divider 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: Divider, }: SetupStoriesOptions<{
|
|
8
|
+
decorators?: never;
|
|
9
|
+
}>): {
|
|
10
|
+
meta: {
|
|
11
|
+
component: any;
|
|
12
|
+
render: (args: any) => import("react").JSX.Element;
|
|
13
|
+
args: {
|
|
14
|
+
ref?: import("../../types").CommonRef;
|
|
15
|
+
theme?: import("../../constants").Theme | undefined;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/** Default divider */
|
|
20
|
+
Default: {};
|
|
21
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
export declare function setup({ component: DragHandle, decorators: { withCombinations }, }: SetupStoriesOptions<{
|
|
3
|
+
decorators: 'withCombinations';
|
|
4
|
+
}>): {
|
|
5
|
+
meta: {
|
|
6
|
+
component: any;
|
|
7
|
+
render: (args: any) => import("react").JSX.Element;
|
|
8
|
+
args: {
|
|
9
|
+
ref?: import("../../types").CommonRef;
|
|
10
|
+
theme?: import("../../constants").Theme | undefined;
|
|
11
|
+
className?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
Default: {};
|
|
15
|
+
AllThemes: {
|
|
16
|
+
decorators: ((story: any, context: any) => any)[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup ExpansionPanel stories for a specific framework (React or Vue).
|
|
4
|
+
* Framework-specific components (Text, StatefulExpansionPanel, etc.) are injected via `components`.
|
|
5
|
+
* StatefulExpansionPanel is a framework-specific wrapper that manages isOpen state per instance,
|
|
6
|
+
* enabling each panel to toggle independently.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setup({ component: ExpansionPanel, components: { Text, StatefulExpansionPanel }, decorators: { withNestedProps }, }: SetupStoriesOptions<{
|
|
9
|
+
decorators: 'withNestedProps';
|
|
10
|
+
components: {
|
|
11
|
+
Text: any;
|
|
12
|
+
StatefulExpansionPanel: any;
|
|
13
|
+
};
|
|
14
|
+
}>): {
|
|
15
|
+
meta: {
|
|
16
|
+
component: any;
|
|
17
|
+
render: ({ children, ...args }: any) => import("react").JSX.Element;
|
|
18
|
+
args: {
|
|
19
|
+
'toggleButtonProps.label': string;
|
|
20
|
+
label: string;
|
|
21
|
+
hasBackground?: boolean | undefined;
|
|
22
|
+
hasHeaderDivider?: boolean | undefined;
|
|
23
|
+
isOpen?: boolean | undefined;
|
|
24
|
+
handleOpen?: ((event: any) => void) | undefined;
|
|
25
|
+
handleClose?: ((event: any) => void) | undefined;
|
|
26
|
+
toggleButtonProps?: any;
|
|
27
|
+
handleToggleOpen?: ((shouldOpen: boolean, event: any) => void) | undefined;
|
|
28
|
+
children?: import("react").ReactNode;
|
|
29
|
+
ref?: import("../../types").CommonRef;
|
|
30
|
+
wrapperRef?: import("../../types").CommonRef;
|
|
31
|
+
headerProps?: import("../../types").GenericProps | undefined;
|
|
32
|
+
headerContent?: import("react").ReactNode;
|
|
33
|
+
dragHandle?: import("react").ReactNode;
|
|
34
|
+
content?: import("react").ReactNode;
|
|
35
|
+
footer?: import("react").ReactNode;
|
|
36
|
+
IconButton?: any;
|
|
37
|
+
isChildrenVisible?: boolean | undefined;
|
|
38
|
+
className?: string | undefined;
|
|
39
|
+
closeMode?: "hide" | "unmount" | undefined;
|
|
40
|
+
theme?: import("../../constants").Theme | undefined;
|
|
41
|
+
};
|
|
42
|
+
decorators: ((story: any, context: any) => any)[];
|
|
43
|
+
};
|
|
44
|
+
Default: {};
|
|
45
|
+
HasBackground: {
|
|
46
|
+
args: {
|
|
47
|
+
hasBackground: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
HasHeaderDivider: {
|
|
51
|
+
args: {
|
|
52
|
+
isOpen: boolean;
|
|
53
|
+
hasBackground: boolean;
|
|
54
|
+
hasHeaderDivider: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
Nested: {
|
|
58
|
+
args: {};
|
|
59
|
+
render: ({ children, isOpen, ...args }: any) => import("react").JSX.Element;
|
|
60
|
+
};
|
|
61
|
+
HideChildren: {
|
|
62
|
+
args: {
|
|
63
|
+
hasBackground: boolean;
|
|
64
|
+
closeMode: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup Flag 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: Flag, render, decorators: { withCombinations, withResizableBox }, }: SetupStoriesOptions<{
|
|
8
|
+
decorators: 'withCombinations' | 'withResizableBox';
|
|
9
|
+
}>): {
|
|
10
|
+
meta: {
|
|
11
|
+
component: any;
|
|
12
|
+
render: any;
|
|
13
|
+
argTypes: {
|
|
14
|
+
color: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "select" | "inline-radio";
|
|
17
|
+
};
|
|
18
|
+
options: ("light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined)[];
|
|
19
|
+
mapping: Record<string, "light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined> | undefined;
|
|
20
|
+
};
|
|
21
|
+
icon: {
|
|
22
|
+
control: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
options: {
|
|
26
|
+
undefined: undefined;
|
|
27
|
+
mdiAbTesting: string;
|
|
28
|
+
mdiAbjadArabic: string;
|
|
29
|
+
mdiAccount: string;
|
|
30
|
+
mdiAccountBox: string;
|
|
31
|
+
mdiAlert: string;
|
|
32
|
+
mdiAlertCircle: string;
|
|
33
|
+
mdiArrowDown: string;
|
|
34
|
+
mdiArrowUp: string;
|
|
35
|
+
mdiAtom: string;
|
|
36
|
+
mdiBee: string;
|
|
37
|
+
mdiBell: string;
|
|
38
|
+
mdiBullhornOutline: string;
|
|
39
|
+
mdiCheck: string;
|
|
40
|
+
mdiCheckCircle: string;
|
|
41
|
+
mdiChevronDown: string;
|
|
42
|
+
mdiChevronLeft: string;
|
|
43
|
+
mdiChevronRight: string;
|
|
44
|
+
mdiChevronUp: string;
|
|
45
|
+
mdiClose: string;
|
|
46
|
+
mdiCloseCircle: string;
|
|
47
|
+
mdiDelete: string;
|
|
48
|
+
mdiDotsHorizontal: string;
|
|
49
|
+
mdiDragVertical: string;
|
|
50
|
+
mdiEarth: string;
|
|
51
|
+
mdiEmail: string;
|
|
52
|
+
mdiEye: string;
|
|
53
|
+
mdiFileEdit: string;
|
|
54
|
+
mdiFlag: string;
|
|
55
|
+
mdiFolder: string;
|
|
56
|
+
mdiFolderGoogleDrive: string;
|
|
57
|
+
mdiFoodApple: string;
|
|
58
|
+
mdiGoogleCirclesExtended: string;
|
|
59
|
+
mdiHeart: string;
|
|
60
|
+
mdiHome: string;
|
|
61
|
+
mdiImageBroken: string;
|
|
62
|
+
mdiInformation: string;
|
|
63
|
+
mdiLink: string;
|
|
64
|
+
mdiMagnifyMinusOutline: string;
|
|
65
|
+
mdiMagnifyPlusOutline: string;
|
|
66
|
+
mdiMenuDown: string;
|
|
67
|
+
mdiMessageTextOutline: string;
|
|
68
|
+
mdiMinus: string;
|
|
69
|
+
mdiOpenInNew: string;
|
|
70
|
+
mdiPauseCircleOutline: string;
|
|
71
|
+
mdiPencil: string;
|
|
72
|
+
mdiPlay: string;
|
|
73
|
+
mdiPlayCircleOutline: string;
|
|
74
|
+
mdiPlus: string;
|
|
75
|
+
mdiRadioboxBlank: string;
|
|
76
|
+
mdiRadioboxMarked: string;
|
|
77
|
+
mdiReply: string;
|
|
78
|
+
mdiSend: string;
|
|
79
|
+
mdiStar: string;
|
|
80
|
+
mdiTextBox: string;
|
|
81
|
+
mdiTextBoxPlus: string;
|
|
82
|
+
mdiTram: string;
|
|
83
|
+
mdiTranslate: string;
|
|
84
|
+
mdiViewList: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
args: {
|
|
89
|
+
label: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/** Default flag with label */
|
|
93
|
+
Default: {};
|
|
94
|
+
/** With icon */
|
|
95
|
+
WithIcon: {
|
|
96
|
+
args: {
|
|
97
|
+
icon: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/** All `color` variants */
|
|
101
|
+
AllColors: {
|
|
102
|
+
args: {
|
|
103
|
+
icon: string;
|
|
104
|
+
};
|
|
105
|
+
argTypes: {
|
|
106
|
+
color: {
|
|
107
|
+
control: boolean;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
decorators: ((story: any, context: any) => any)[];
|
|
111
|
+
};
|
|
112
|
+
/** Truncate text option */
|
|
113
|
+
Truncate: {
|
|
114
|
+
args: {
|
|
115
|
+
label: string;
|
|
116
|
+
truncate: boolean;
|
|
117
|
+
};
|
|
118
|
+
decorators: ((story: any, context: any) => any)[];
|
|
119
|
+
};
|
|
120
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
/**
|
|
3
|
+
* Setup FlexBox stories for a specific framework (React or Vue).
|
|
4
|
+
* Framework-specific components (Button, Text, IconButton) are injected via `components`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function setup({ component: FlexBox, components: { Button, Text, IconButton }, decorators: { withWrapper, withCombinations }, argsConverter, }: SetupStoriesOptions<{
|
|
7
|
+
decorators: 'withCombinations' | 'withWrapper';
|
|
8
|
+
components: {
|
|
9
|
+
Button: any;
|
|
10
|
+
Text: any;
|
|
11
|
+
IconButton: any;
|
|
12
|
+
};
|
|
13
|
+
argsConverter: (args: any) => any;
|
|
14
|
+
}>): {
|
|
15
|
+
meta: {
|
|
16
|
+
component: any;
|
|
17
|
+
render: (args: any) => import("react").JSX.Element;
|
|
18
|
+
args: {
|
|
19
|
+
style: {
|
|
20
|
+
width: string;
|
|
21
|
+
height: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
argTypes: {
|
|
25
|
+
orientation: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "select" | "inline-radio";
|
|
28
|
+
};
|
|
29
|
+
options: ("vertical" | "horizontal")[];
|
|
30
|
+
mapping: Record<string, "vertical" | "horizontal"> | undefined;
|
|
31
|
+
};
|
|
32
|
+
fillSpace: {
|
|
33
|
+
control: string;
|
|
34
|
+
};
|
|
35
|
+
wrap: {
|
|
36
|
+
control: string;
|
|
37
|
+
};
|
|
38
|
+
noShrink: {
|
|
39
|
+
control: string;
|
|
40
|
+
};
|
|
41
|
+
hAlign: {
|
|
42
|
+
control: {
|
|
43
|
+
type: "select" | "inline-radio";
|
|
44
|
+
};
|
|
45
|
+
options: ("center" | "top" | "bottom" | "space-around" | "space-between" | "space-evenly")[];
|
|
46
|
+
mapping: Record<string, "center" | "top" | "bottom" | "space-around" | "space-between" | "space-evenly"> | undefined;
|
|
47
|
+
};
|
|
48
|
+
vAlign: {
|
|
49
|
+
control: {
|
|
50
|
+
type: "select" | "inline-radio";
|
|
51
|
+
};
|
|
52
|
+
options: ("center" | "right" | "left" | "space-around" | "space-between" | "space-evenly")[];
|
|
53
|
+
mapping: Record<string, "center" | "right" | "left" | "space-around" | "space-between" | "space-evenly"> | undefined;
|
|
54
|
+
};
|
|
55
|
+
gap: {
|
|
56
|
+
control: {
|
|
57
|
+
type: "select" | "inline-radio";
|
|
58
|
+
};
|
|
59
|
+
options: ("medium" | "big" | "tiny" | "regular" | "huge")[];
|
|
60
|
+
mapping: Record<string, "medium" | "big" | "tiny" | "regular" | "huge"> | undefined;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
NoConfig: {
|
|
65
|
+
decorators: ((story: any, context: any) => any)[];
|
|
66
|
+
};
|
|
67
|
+
Horizontal: {
|
|
68
|
+
args: {
|
|
69
|
+
orientation: "horizontal";
|
|
70
|
+
};
|
|
71
|
+
decorators: ((story: any, context: any) => any)[];
|
|
72
|
+
};
|
|
73
|
+
Vertical: {
|
|
74
|
+
args: {
|
|
75
|
+
orientation: "vertical";
|
|
76
|
+
};
|
|
77
|
+
decorators: ((story: any, context: any) => any)[];
|
|
78
|
+
};
|
|
79
|
+
GapSizes: {
|
|
80
|
+
args: {
|
|
81
|
+
orientation: "horizontal";
|
|
82
|
+
};
|
|
83
|
+
argTypes: {
|
|
84
|
+
gap: {
|
|
85
|
+
control: boolean;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
decorators: ((story: any, context: any) => any)[];
|
|
89
|
+
};
|
|
90
|
+
Wrap: {
|
|
91
|
+
args: {
|
|
92
|
+
orientation: "horizontal";
|
|
93
|
+
wrap: boolean;
|
|
94
|
+
};
|
|
95
|
+
argTypes: {
|
|
96
|
+
wrap: {
|
|
97
|
+
control: boolean;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
decorators: ((story: any, context: any) => any)[];
|
|
101
|
+
};
|
|
102
|
+
NoShrink: {
|
|
103
|
+
render: (args: any) => import("react").JSX.Element;
|
|
104
|
+
args: {
|
|
105
|
+
noShrink: boolean;
|
|
106
|
+
};
|
|
107
|
+
decorators: ((story: any, context: any) => any)[];
|
|
108
|
+
};
|
|
109
|
+
MarginAuto: {
|
|
110
|
+
render: (args: any) => import("react").JSX.Element;
|
|
111
|
+
args: {
|
|
112
|
+
style: undefined;
|
|
113
|
+
};
|
|
114
|
+
decorators: ((story: any, context: any) => any)[];
|
|
115
|
+
};
|
|
116
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const GAP_SIZES: ("
|
|
1
|
+
export declare const GAP_SIZES: ("medium" | "big" | "tiny" | "regular" | "huge")[];
|
|
2
2
|
export declare const SPACE_ALIGNMENTS: ("space-around" | "space-between" | "space-evenly")[];
|
|
3
|
-
export declare const VERTICAL_ALIGNMENTS: ("center" | "bottom" | "space-around" | "space-between" | "space-evenly"
|
|
4
|
-
export declare const HORIZONTAL_ALIGNMENTS: ("center" | "
|
|
3
|
+
export declare const VERTICAL_ALIGNMENTS: ("center" | "top" | "bottom" | "space-around" | "space-between" | "space-evenly")[];
|
|
4
|
+
export declare const HORIZONTAL_ALIGNMENTS: ("center" | "right" | "left" | "space-around" | "space-between" | "space-evenly")[];
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
+
export declare function setup({ component: GenericBlock, components: { Icon, Button, Thumbnail }, }: SetupStoriesOptions<{
|
|
3
|
+
components: {
|
|
4
|
+
Icon: any;
|
|
5
|
+
Button: any;
|
|
6
|
+
Thumbnail: any;
|
|
7
|
+
};
|
|
8
|
+
}>): {
|
|
9
|
+
meta: {
|
|
10
|
+
component: any;
|
|
11
|
+
};
|
|
12
|
+
SectionsInProps: {
|
|
13
|
+
render: (args: any) => import("react").JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
SectionsInChildren: {
|
|
16
|
+
render: (args: any) => import("react").JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
Vertical: {
|
|
19
|
+
render: (args: any) => import("react").JSX.Element;
|
|
20
|
+
args: {
|
|
21
|
+
orientation: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
VerticalAlignCenter: {
|
|
25
|
+
render: (args: any) => import("react").JSX.Element;
|
|
26
|
+
args: {
|
|
27
|
+
orientation: string;
|
|
28
|
+
vAlign: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
VerticalOverflow: {
|
|
32
|
+
render: (args: any) => import("react").JSX.Element;
|
|
33
|
+
args: {
|
|
34
|
+
orientation: string;
|
|
35
|
+
style: {
|
|
36
|
+
width: number;
|
|
37
|
+
};
|
|
38
|
+
content: import("react").JSX.Element;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
Horizontal: {
|
|
42
|
+
render: (args: any) => import("react").JSX.Element;
|
|
43
|
+
args: {
|
|
44
|
+
orientation: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
HorizontalAlignRightBottom: {
|
|
48
|
+
render: (args: any) => import("react").JSX.Element;
|
|
49
|
+
args: {
|
|
50
|
+
orientation: string;
|
|
51
|
+
vAlign: string;
|
|
52
|
+
hAlign: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
HorizontalOverflow: {
|
|
56
|
+
render: (args: any) => import("react").JSX.Element;
|
|
57
|
+
args: {
|
|
58
|
+
orientation: string;
|
|
59
|
+
style: {
|
|
60
|
+
width: number;
|
|
61
|
+
};
|
|
62
|
+
content: import("react").JSX.Element;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
GapSizes: {
|
|
66
|
+
render: (args: any) => import("react").JSX.Element[];
|
|
67
|
+
};
|
|
68
|
+
AsAFigure: {
|
|
69
|
+
render: () => import("react").JSX.Element;
|
|
70
|
+
};
|
|
71
|
+
AsAnArticle: {
|
|
72
|
+
render: () => import("react").JSX.Element;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -15,5 +15,5 @@ export declare const GenericBlockGapSize: Pick<{
|
|
|
15
15
|
readonly medium: "medium";
|
|
16
16
|
readonly big: "big";
|
|
17
17
|
readonly huge: "huge";
|
|
18
|
-
}, "
|
|
18
|
+
}, "medium" | "big" | "tiny" | "regular" | "huge">;
|
|
19
19
|
export type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;
|