@lumx/react 3.1.5 → 3.2.1-alpha.0
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/_internal/types.d.ts +16 -5
- package/index.d.ts +45 -4
- package/index.js +632 -423
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/alert-dialog/AlertDialog.stories.tsx +96 -165
- package/src/components/alert-dialog/AlertDialog.test.tsx +15 -23
- package/src/components/avatar/Avatar.stories.tsx +91 -62
- package/src/components/avatar/Avatar.test.tsx +9 -24
- package/src/components/badge/Badge.stories.tsx +63 -38
- package/src/components/button/Button.stories.tsx +147 -139
- package/src/components/button/IconButton.stories.tsx +45 -0
- package/src/components/checkbox/Checkbox.stories.tsx +37 -30
- package/src/components/chip/Chip.stories.tsx +77 -15
- package/src/components/comment-block/CommentBlock.stories.tsx +90 -25
- package/src/components/comment-block/CommentBlock.test.tsx +12 -17
- package/src/components/date-picker/DatePickerField.stories.tsx +52 -83
- package/src/components/dialog/Dialog.stories.tsx +131 -293
- package/src/components/dialog/Dialog.test.tsx +0 -32
- package/src/components/dropdown/Dropdown.stories.tsx +1 -186
- package/src/components/flag/Flag.stories.tsx +33 -18
- package/src/components/flag/Flag.test.tsx +1 -8
- package/src/components/flex-box/FlexBox.stories.tsx +151 -238
- package/src/components/flex-box/FlexBox.test.tsx +9 -49
- package/src/components/generic-block/GenericBlock.stories.jsx +1 -1
- package/src/components/grid-column/GridColumn.stories.tsx +46 -0
- package/src/components/heading/Heading.stories.tsx +57 -95
- package/src/components/icon/Icon.stories.tsx +67 -70
- package/src/components/image-block/ImageBlock.stories.tsx +103 -47
- package/src/components/image-block/ImageBlock.test.tsx +12 -17
- package/src/components/inline-list/InlineList.stories.tsx +45 -29
- package/src/components/input-helper/InputHelper.stories.tsx +31 -25
- package/src/components/input-label/InputLabel.stories.tsx +33 -10
- package/src/components/lightbox/Lightbox.stories.tsx +39 -77
- package/src/components/lightbox/Lightbox.test.tsx +12 -17
- package/src/components/link/Link.stories.tsx +98 -128
- package/src/components/link-preview/LinkPreview.stories.tsx +48 -75
- package/src/components/list/List.stories.tsx +59 -84
- package/src/components/list/List.test.tsx +8 -17
- package/src/components/list/ListDivider.stories.tsx +9 -4
- package/src/components/list/ListDivider.test.tsx +12 -17
- package/src/components/list/ListItem.stories.tsx +97 -59
- package/src/components/list/ListItem.test.tsx +12 -17
- package/src/components/list/ListSubheader.stories.tsx +8 -5
- package/src/components/list/ListSubheader.test.tsx +12 -18
- package/src/components/message/Message.stories.tsx +51 -22
- package/src/components/mosaic/Mosaic.stories.tsx +78 -74
- package/src/components/mosaic/Mosaic.test.tsx +0 -31
- package/src/components/navigation/Navigation.stories.tsx +67 -0
- package/src/components/navigation/Navigation.test.tsx +58 -0
- package/src/components/navigation/Navigation.tsx +62 -0
- package/src/components/navigation/NavigationItem.test.tsx +37 -0
- package/src/components/navigation/NavigationItem.tsx +89 -0
- package/src/components/navigation/NavigationSection.test.tsx +126 -0
- package/src/components/navigation/NavigationSection.tsx +109 -0
- package/src/components/navigation/context.tsx +6 -0
- package/src/components/navigation/index.ts +1 -0
- package/src/components/notification/Notifications.stories.tsx +52 -47
- package/src/components/popover/Popover.stories.tsx +68 -201
- package/src/components/popover/Popover.tsx +7 -9
- package/src/components/popover-dialog/PopoverDialog.stories.tsx +26 -65
- package/src/components/post-block/PostBlock.test.tsx +12 -17
- package/src/components/progress/ProgressCircular.stories.tsx +24 -12
- package/src/components/progress/ProgressLinear.stories.tsx +6 -2
- package/src/components/radio-button/RadioButton.stories.tsx +35 -24
- package/src/components/select/Select.stories.tsx +19 -23
- package/src/components/select/SelectMultiple.stories.tsx +105 -2
- package/src/components/select/WithSelectContext.tsx +10 -4
- package/src/components/skeleton/SkeletonCircle.stories.tsx +37 -21
- package/src/components/skeleton/SkeletonCircle.test.tsx +12 -17
- package/src/components/skeleton/SkeletonRectangle.stories.tsx +74 -99
- package/src/components/skeleton/SkeletonRectangle.test.tsx +12 -17
- package/src/components/skeleton/SkeletonTypography.test.tsx +12 -17
- package/src/components/slider/Slider.stories.tsx +41 -25
- package/src/components/slider/Slider.test.tsx +12 -18
- package/src/components/slideshow/Slideshow.stories.tsx +31 -61
- package/src/components/slideshow/Slideshow.test.tsx +15 -23
- package/src/components/slideshow/SlideshowControls.stories.tsx +4 -6
- package/src/components/switch/Switch.stories.tsx +35 -32
- package/src/components/table/Table.test.tsx +12 -17
- package/src/components/tabs/Tabs.stories.tsx +4 -3
- package/src/components/text/Text.stories.tsx +130 -0
- package/src/components/text-field/TextField.stories.tsx +114 -148
- package/src/components/thumbnail/Thumbnail.stories.tsx +106 -255
- package/src/components/thumbnail/Thumbnail.test.tsx +12 -35
- package/src/components/tooltip/Tooltip.stories.tsx +51 -136
- package/src/components/user-block/UserBlock.stories.tsx +67 -56
- package/src/components/user-block/UserBlock.test.tsx +1 -5
- package/src/hooks/useFocusTrap.ts +2 -2
- package/src/index.ts +1 -0
- package/src/stories/controls/color.ts +6 -0
- package/src/stories/controls/element.ts +6 -0
- package/src/stories/controls/focusPoint.ts +1 -0
- package/src/stories/controls/icons.ts +6 -0
- package/src/stories/{knobs → controls}/image.ts +6 -16
- package/src/stories/controls/selectArgType.ts +4 -0
- package/src/stories/controls/theme.ts +3 -0
- package/src/stories/controls/typography.ts +5 -0
- package/src/stories/controls/withUndefined.ts +1 -0
- package/src/stories/decorators/withChromaticForceScreenSize.tsx +8 -0
- package/src/stories/decorators/withCombinations.tsx +99 -0
- package/src/stories/decorators/withNestedProps.tsx +23 -0
- package/src/stories/{withResizableBox.tsx → decorators/withResizableBox.tsx} +6 -10
- package/src/stories/decorators/withValueOnChange.tsx +18 -0
- package/src/stories/decorators/withWrapper.tsx +19 -0
- package/src/stories/utils/CustomLink.tsx +8 -2
- package/src/stories/{knobs → utils}/lorem.ts +9 -9
- package/src/testing/utils/commonTestsSuiteRTL.ts +2 -3
- package/src/testing/utils/index.ts +0 -2
- package/src/untypped-modules.d.ts +0 -2
- package/src/utils/MaterialThemeSwitcher/MaterialThemeSwitcher.tsx +1 -1
- package/src/utils/ThemeContext.ts +4 -0
- package/src/utils/forwardRefPolymorphic.ts +9 -0
- package/src/utils/type.ts +28 -4
- package/src/components/alert-dialog/__snapshots__/AlertDialog.test.tsx.snap +0 -558
- package/src/components/avatar/__snapshots__/Avatar.test.tsx.snap +0 -681
- package/src/components/comment-block/__snapshots__/CommentBlock.test.tsx.snap +0 -92
- package/src/components/dialog/__snapshots__/Dialog.test.tsx.snap +0 -1133
- package/src/components/expansion-panel/ExpansionPanel.stories.tsx +0 -65
- package/src/components/flag/__snapshots__/Flag.test.tsx.snap +0 -133
- package/src/components/flex-box/__snapshots__/FlexBox.test.tsx.snap +0 -492
- package/src/components/grid-column/GridColumn.stories.jsx +0 -56
- package/src/components/image-block/__snapshots__/ImageBlock.test.tsx.snap +0 -64
- package/src/components/lightbox/__snapshots__/Lightbox.test.tsx.snap +0 -194
- package/src/components/list/__snapshots__/List.test.tsx.snap +0 -360
- package/src/components/list/__snapshots__/ListDivider.test.tsx.snap +0 -7
- package/src/components/list/__snapshots__/ListItem.test.tsx.snap +0 -160
- package/src/components/list/__snapshots__/ListSubheader.test.tsx.snap +0 -9
- package/src/components/mosaic/__snapshots__/Mosaic.test.tsx.snap +0 -357
- package/src/components/post-block/__snapshots__/PostBlock.test.tsx.snap +0 -139
- package/src/components/skeleton/__snapshots__/SkeletonCircle.test.tsx.snap +0 -54
- package/src/components/skeleton/__snapshots__/SkeletonRectangle.test.tsx.snap +0 -177
- package/src/components/skeleton/__snapshots__/SkeletonTypography.test.tsx.snap +0 -174
- package/src/components/slider/__snapshots__/Slider.test.tsx.snap +0 -122
- package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +0 -157
- package/src/components/table/__snapshots__/Table.test.tsx.snap +0 -263
- package/src/components/text/Text.stories.jsx +0 -75
- package/src/components/thumbnail/__snapshots__/Thumbnail.test.tsx.snap +0 -130
- package/src/components/user-block/__snapshots__/UserBlock.test.tsx.snap +0 -362
- package/src/stories/chromaticForceScreenSize.tsx +0 -7
- package/src/stories/knobs/buttonKnob.ts +0 -9
- package/src/stories/knobs/emphasisKnob.ts +0 -8
- package/src/stories/knobs/enumKnob.ts +0 -14
- package/src/stories/knobs/focusKnob.ts +0 -3
- package/src/stories/knobs/sizeKnob.ts +0 -5
- package/src/stories/knobs/thumbnailsKnob.ts +0 -9
- package/src/testing/utils/itShouldRenderStories.tsx +0 -103
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Button, Dropdown, ExpansionPanel, List, ListItem, Placement, Size } from '@lumx/react';
|
|
4
|
-
|
|
5
|
-
export default { title: 'LumX components/expansion-panel/ExpansionPanel' };
|
|
6
|
-
|
|
7
|
-
export const ExpansionPanelInADropdown = () => {
|
|
8
|
-
const anchorDropdownButton = React.useRef(null);
|
|
9
|
-
|
|
10
|
-
const [isDropdownOpen, setIsDropdownOpen] = React.useState(false);
|
|
11
|
-
const toggleDropdown = () => setIsDropdownOpen(!isDropdownOpen);
|
|
12
|
-
const closeDropdown = () => setIsDropdownOpen(false);
|
|
13
|
-
|
|
14
|
-
const [isExpansionPanelOpen, setIsExpansionPanelOpen] = React.useState(false);
|
|
15
|
-
|
|
16
|
-
const toggleExpansionPanel = (shouldOpen: boolean, evt: React.MouseEvent) => {
|
|
17
|
-
evt.preventDefault();
|
|
18
|
-
evt.stopPropagation();
|
|
19
|
-
setIsExpansionPanelOpen(shouldOpen);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const onItemSelected = (item: string) => () => {
|
|
23
|
-
console.log('selected item', item);
|
|
24
|
-
closeDropdown();
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<>
|
|
29
|
-
<Button ref={anchorDropdownButton} onClick={toggleDropdown}>
|
|
30
|
-
Open dropdown
|
|
31
|
-
</Button>
|
|
32
|
-
<Dropdown
|
|
33
|
-
closeOnClickAway
|
|
34
|
-
closeOnEscape
|
|
35
|
-
isOpen={isDropdownOpen}
|
|
36
|
-
onClose={closeDropdown}
|
|
37
|
-
placement={Placement.BOTTOM_START}
|
|
38
|
-
anchorRef={anchorDropdownButton}
|
|
39
|
-
>
|
|
40
|
-
<List>
|
|
41
|
-
<ListItem onItemSelected={onItemSelected('paris')} size={Size.tiny}>
|
|
42
|
-
Paris
|
|
43
|
-
</ListItem>
|
|
44
|
-
<ExpansionPanel
|
|
45
|
-
label="Lorem ipsum"
|
|
46
|
-
isOpen={isExpansionPanelOpen}
|
|
47
|
-
onToggleOpen={(shouldOpen, event) => toggleExpansionPanel(shouldOpen, event)}
|
|
48
|
-
toggleButtonProps={{ label: 'Toggle' }}
|
|
49
|
-
>
|
|
50
|
-
<header>
|
|
51
|
-
<ListItem size={Size.tiny}>United States</ListItem>
|
|
52
|
-
</header>
|
|
53
|
-
<ListItem onItemSelected={onItemSelected('georgetown')} size={Size.tiny}>
|
|
54
|
-
Georgetown
|
|
55
|
-
</ListItem>
|
|
56
|
-
|
|
57
|
-
<ListItem onItemSelected={onItemSelected('newyork')} size={Size.tiny}>
|
|
58
|
-
New York
|
|
59
|
-
</ListItem>
|
|
60
|
-
</ExpansionPanel>
|
|
61
|
-
</List>
|
|
62
|
-
</Dropdown>
|
|
63
|
-
</>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<Flag /> Snapshots and structure should render story 'defaultProps' 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
className="lumx-flag lumx-flag--color-dark"
|
|
6
|
-
>
|
|
7
|
-
<span
|
|
8
|
-
className="lumx-flag__label"
|
|
9
|
-
>
|
|
10
|
-
hearing
|
|
11
|
-
</span>
|
|
12
|
-
</div>
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
exports[`<Flag /> Snapshots and structure should render story 'withColor' 1`] = `
|
|
16
|
-
[
|
|
17
|
-
<div
|
|
18
|
-
className="lumx-flag lumx-flag--color-blue"
|
|
19
|
-
>
|
|
20
|
-
<Icon
|
|
21
|
-
className="lumx-flag__icon"
|
|
22
|
-
icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
|
23
|
-
size="xxs"
|
|
24
|
-
/>
|
|
25
|
-
<span
|
|
26
|
-
className="lumx-flag__label"
|
|
27
|
-
>
|
|
28
|
-
blue
|
|
29
|
-
</span>
|
|
30
|
-
</div>,
|
|
31
|
-
<div
|
|
32
|
-
className="lumx-flag lumx-flag--color-dark"
|
|
33
|
-
>
|
|
34
|
-
<Icon
|
|
35
|
-
className="lumx-flag__icon"
|
|
36
|
-
icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
|
37
|
-
size="xxs"
|
|
38
|
-
/>
|
|
39
|
-
<span
|
|
40
|
-
className="lumx-flag__label"
|
|
41
|
-
>
|
|
42
|
-
dark
|
|
43
|
-
</span>
|
|
44
|
-
</div>,
|
|
45
|
-
<div
|
|
46
|
-
className="lumx-flag lumx-flag--color-green"
|
|
47
|
-
>
|
|
48
|
-
<Icon
|
|
49
|
-
className="lumx-flag__icon"
|
|
50
|
-
icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
|
51
|
-
size="xxs"
|
|
52
|
-
/>
|
|
53
|
-
<span
|
|
54
|
-
className="lumx-flag__label"
|
|
55
|
-
>
|
|
56
|
-
green
|
|
57
|
-
</span>
|
|
58
|
-
</div>,
|
|
59
|
-
<div
|
|
60
|
-
className="lumx-flag lumx-flag--color-primary"
|
|
61
|
-
>
|
|
62
|
-
<Icon
|
|
63
|
-
className="lumx-flag__icon"
|
|
64
|
-
icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
|
65
|
-
size="xxs"
|
|
66
|
-
/>
|
|
67
|
-
<span
|
|
68
|
-
className="lumx-flag__label"
|
|
69
|
-
>
|
|
70
|
-
primary
|
|
71
|
-
</span>
|
|
72
|
-
</div>,
|
|
73
|
-
<div
|
|
74
|
-
className="lumx-flag lumx-flag--color-red"
|
|
75
|
-
>
|
|
76
|
-
<Icon
|
|
77
|
-
className="lumx-flag__icon"
|
|
78
|
-
icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
|
79
|
-
size="xxs"
|
|
80
|
-
/>
|
|
81
|
-
<span
|
|
82
|
-
className="lumx-flag__label"
|
|
83
|
-
>
|
|
84
|
-
red
|
|
85
|
-
</span>
|
|
86
|
-
</div>,
|
|
87
|
-
<div
|
|
88
|
-
className="lumx-flag lumx-flag--color-secondary"
|
|
89
|
-
>
|
|
90
|
-
<Icon
|
|
91
|
-
className="lumx-flag__icon"
|
|
92
|
-
icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
|
93
|
-
size="xxs"
|
|
94
|
-
/>
|
|
95
|
-
<span
|
|
96
|
-
className="lumx-flag__label"
|
|
97
|
-
>
|
|
98
|
-
secondary
|
|
99
|
-
</span>
|
|
100
|
-
</div>,
|
|
101
|
-
<div
|
|
102
|
-
className="lumx-flag lumx-flag--color-yellow"
|
|
103
|
-
>
|
|
104
|
-
<Icon
|
|
105
|
-
className="lumx-flag__icon"
|
|
106
|
-
icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
|
107
|
-
size="xxs"
|
|
108
|
-
/>
|
|
109
|
-
<span
|
|
110
|
-
className="lumx-flag__label"
|
|
111
|
-
>
|
|
112
|
-
yellow
|
|
113
|
-
</span>
|
|
114
|
-
</div>,
|
|
115
|
-
]
|
|
116
|
-
`;
|
|
117
|
-
|
|
118
|
-
exports[`<Flag /> Snapshots and structure should render story 'withIcon' 1`] = `
|
|
119
|
-
<div
|
|
120
|
-
className="lumx-flag lumx-flag--color-dark"
|
|
121
|
-
>
|
|
122
|
-
<Icon
|
|
123
|
-
className="lumx-flag__icon"
|
|
124
|
-
icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
|
125
|
-
size="xxs"
|
|
126
|
-
/>
|
|
127
|
-
<span
|
|
128
|
-
className="lumx-flag__label"
|
|
129
|
-
>
|
|
130
|
-
hearing
|
|
131
|
-
</span>
|
|
132
|
-
</div>
|
|
133
|
-
`;
|
|
@@ -1,492 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<FlexBox> Snapshots and structure should render story 'Align' 1`] = `
|
|
4
|
-
[
|
|
5
|
-
<div
|
|
6
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--v-align-center lumx-flex-box--h-align-center"
|
|
7
|
-
>
|
|
8
|
-
<Button
|
|
9
|
-
emphasis="high"
|
|
10
|
-
size="m"
|
|
11
|
-
style={
|
|
12
|
-
{
|
|
13
|
-
"height": 200,
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
theme="light"
|
|
17
|
-
>
|
|
18
|
-
Button
|
|
19
|
-
</Button>
|
|
20
|
-
<FlexBox
|
|
21
|
-
style={
|
|
22
|
-
{
|
|
23
|
-
"height": "fit-content",
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
>
|
|
27
|
-
Some text
|
|
28
|
-
</FlexBox>
|
|
29
|
-
</div>,
|
|
30
|
-
<div
|
|
31
|
-
className="lumx-flex-box"
|
|
32
|
-
style={
|
|
33
|
-
{
|
|
34
|
-
"height": "fit-content",
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
>
|
|
38
|
-
Some text
|
|
39
|
-
</div>,
|
|
40
|
-
]
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
exports[`<FlexBox> Snapshots and structure should render story 'CustomizeElement' 1`] = `
|
|
44
|
-
<header
|
|
45
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--gap-regular"
|
|
46
|
-
>
|
|
47
|
-
<div>
|
|
48
|
-
Element 1
|
|
49
|
-
</div>
|
|
50
|
-
<div>
|
|
51
|
-
Element 2
|
|
52
|
-
</div>
|
|
53
|
-
<div>
|
|
54
|
-
Element 2
|
|
55
|
-
</div>
|
|
56
|
-
</header>
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
exports[`<FlexBox> Snapshots and structure should render story 'Distribution' 1`] = `
|
|
60
|
-
<div
|
|
61
|
-
className="lumx-flex-box lumx-flex-box--orientation-vertical lumx-flex-box--v-align-center lumx-flex-box--h-align-center lumx-flex-box--gap-regular"
|
|
62
|
-
style={
|
|
63
|
-
{
|
|
64
|
-
"border": "1px solid red",
|
|
65
|
-
"height": "300px",
|
|
66
|
-
"width": "720px",
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
>
|
|
70
|
-
<Button
|
|
71
|
-
emphasis="high"
|
|
72
|
-
size="m"
|
|
73
|
-
theme="light"
|
|
74
|
-
>
|
|
75
|
-
Button 1
|
|
76
|
-
</Button>
|
|
77
|
-
<Button
|
|
78
|
-
emphasis="high"
|
|
79
|
-
size="m"
|
|
80
|
-
theme="light"
|
|
81
|
-
>
|
|
82
|
-
Button 2
|
|
83
|
-
</Button>
|
|
84
|
-
<Button
|
|
85
|
-
emphasis="high"
|
|
86
|
-
size="m"
|
|
87
|
-
theme="light"
|
|
88
|
-
>
|
|
89
|
-
Button 3
|
|
90
|
-
</Button>
|
|
91
|
-
</div>
|
|
92
|
-
`;
|
|
93
|
-
|
|
94
|
-
exports[`<FlexBox> Snapshots and structure should render story 'Flex' 1`] = `
|
|
95
|
-
[
|
|
96
|
-
<div
|
|
97
|
-
className="lumx-flex-box"
|
|
98
|
-
>
|
|
99
|
-
<FlexBox>
|
|
100
|
-
<Icon
|
|
101
|
-
icon="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"
|
|
102
|
-
/>
|
|
103
|
-
</FlexBox>
|
|
104
|
-
<FlexBox>
|
|
105
|
-
Some text in a div
|
|
106
|
-
</FlexBox>
|
|
107
|
-
<FlexBox>
|
|
108
|
-
<Button
|
|
109
|
-
emphasis="high"
|
|
110
|
-
size="m"
|
|
111
|
-
theme="light"
|
|
112
|
-
>
|
|
113
|
-
OK
|
|
114
|
-
</Button>
|
|
115
|
-
</FlexBox>
|
|
116
|
-
</div>,
|
|
117
|
-
<div
|
|
118
|
-
className="lumx-flex-box"
|
|
119
|
-
>
|
|
120
|
-
<Icon
|
|
121
|
-
icon="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"
|
|
122
|
-
/>
|
|
123
|
-
</div>,
|
|
124
|
-
<div
|
|
125
|
-
className="lumx-flex-box"
|
|
126
|
-
>
|
|
127
|
-
Some text in a div
|
|
128
|
-
</div>,
|
|
129
|
-
<div
|
|
130
|
-
className="lumx-flex-box"
|
|
131
|
-
>
|
|
132
|
-
<Button
|
|
133
|
-
emphasis="high"
|
|
134
|
-
size="m"
|
|
135
|
-
theme="light"
|
|
136
|
-
>
|
|
137
|
-
OK
|
|
138
|
-
</Button>
|
|
139
|
-
</div>,
|
|
140
|
-
]
|
|
141
|
-
`;
|
|
142
|
-
|
|
143
|
-
exports[`<FlexBox> Snapshots and structure should render story 'GapSizeFlex' 1`] = `
|
|
144
|
-
[
|
|
145
|
-
<div
|
|
146
|
-
className="lumx-flex-box lumx-flex-box--orientation-vertical lumx-flex-box--gap-regular"
|
|
147
|
-
>
|
|
148
|
-
<Button
|
|
149
|
-
emphasis="high"
|
|
150
|
-
size="m"
|
|
151
|
-
theme="light"
|
|
152
|
-
>
|
|
153
|
-
Item 1
|
|
154
|
-
</Button>
|
|
155
|
-
<FlexBox
|
|
156
|
-
vAlign="left"
|
|
157
|
-
>
|
|
158
|
-
<Button
|
|
159
|
-
emphasis="high"
|
|
160
|
-
size="m"
|
|
161
|
-
theme="light"
|
|
162
|
-
>
|
|
163
|
-
Item 2
|
|
164
|
-
</Button>
|
|
165
|
-
</FlexBox>
|
|
166
|
-
<FlexBox>
|
|
167
|
-
<Button
|
|
168
|
-
emphasis="high"
|
|
169
|
-
size="m"
|
|
170
|
-
theme="light"
|
|
171
|
-
>
|
|
172
|
-
Item 3
|
|
173
|
-
</Button>
|
|
174
|
-
</FlexBox>
|
|
175
|
-
<FlexBox
|
|
176
|
-
vAlign="right"
|
|
177
|
-
>
|
|
178
|
-
<Button
|
|
179
|
-
emphasis="high"
|
|
180
|
-
size="m"
|
|
181
|
-
theme="light"
|
|
182
|
-
>
|
|
183
|
-
Item 4
|
|
184
|
-
</Button>
|
|
185
|
-
</FlexBox>
|
|
186
|
-
</div>,
|
|
187
|
-
<div
|
|
188
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--v-align-left"
|
|
189
|
-
>
|
|
190
|
-
<Button
|
|
191
|
-
emphasis="high"
|
|
192
|
-
size="m"
|
|
193
|
-
theme="light"
|
|
194
|
-
>
|
|
195
|
-
Item 2
|
|
196
|
-
</Button>
|
|
197
|
-
</div>,
|
|
198
|
-
<div
|
|
199
|
-
className="lumx-flex-box"
|
|
200
|
-
>
|
|
201
|
-
<Button
|
|
202
|
-
emphasis="high"
|
|
203
|
-
size="m"
|
|
204
|
-
theme="light"
|
|
205
|
-
>
|
|
206
|
-
Item 3
|
|
207
|
-
</Button>
|
|
208
|
-
</div>,
|
|
209
|
-
<div
|
|
210
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--v-align-right"
|
|
211
|
-
>
|
|
212
|
-
<Button
|
|
213
|
-
emphasis="high"
|
|
214
|
-
size="m"
|
|
215
|
-
theme="light"
|
|
216
|
-
>
|
|
217
|
-
Item 4
|
|
218
|
-
</Button>
|
|
219
|
-
</div>,
|
|
220
|
-
]
|
|
221
|
-
`;
|
|
222
|
-
|
|
223
|
-
exports[`<FlexBox> Snapshots and structure should render story 'HorizontalFlex' 1`] = `
|
|
224
|
-
[
|
|
225
|
-
<div
|
|
226
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal"
|
|
227
|
-
style={
|
|
228
|
-
{
|
|
229
|
-
"border": "1px solid red",
|
|
230
|
-
"height": "300px",
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
>
|
|
234
|
-
<Button
|
|
235
|
-
emphasis="high"
|
|
236
|
-
size="m"
|
|
237
|
-
theme="light"
|
|
238
|
-
>
|
|
239
|
-
Default
|
|
240
|
-
</Button>
|
|
241
|
-
<FlexBox
|
|
242
|
-
hAlign="top"
|
|
243
|
-
>
|
|
244
|
-
<Button
|
|
245
|
-
emphasis="high"
|
|
246
|
-
size="m"
|
|
247
|
-
theme="light"
|
|
248
|
-
>
|
|
249
|
-
Top
|
|
250
|
-
</Button>
|
|
251
|
-
</FlexBox>
|
|
252
|
-
<FlexBox
|
|
253
|
-
fillSpace={true}
|
|
254
|
-
hAlign="center"
|
|
255
|
-
vAlign="center"
|
|
256
|
-
>
|
|
257
|
-
<Button
|
|
258
|
-
emphasis="high"
|
|
259
|
-
size="m"
|
|
260
|
-
theme="light"
|
|
261
|
-
>
|
|
262
|
-
Center button
|
|
263
|
-
</Button>
|
|
264
|
-
</FlexBox>
|
|
265
|
-
<FlexBox
|
|
266
|
-
hAlign="bottom"
|
|
267
|
-
>
|
|
268
|
-
<Button
|
|
269
|
-
emphasis="high"
|
|
270
|
-
size="m"
|
|
271
|
-
theme="light"
|
|
272
|
-
>
|
|
273
|
-
Bottom
|
|
274
|
-
</Button>
|
|
275
|
-
</FlexBox>
|
|
276
|
-
</div>,
|
|
277
|
-
<div
|
|
278
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--h-align-top"
|
|
279
|
-
>
|
|
280
|
-
<Button
|
|
281
|
-
emphasis="high"
|
|
282
|
-
size="m"
|
|
283
|
-
theme="light"
|
|
284
|
-
>
|
|
285
|
-
Top
|
|
286
|
-
</Button>
|
|
287
|
-
</div>,
|
|
288
|
-
<div
|
|
289
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--v-align-center lumx-flex-box--h-align-center lumx-flex-box--fill-space"
|
|
290
|
-
>
|
|
291
|
-
<Button
|
|
292
|
-
emphasis="high"
|
|
293
|
-
size="m"
|
|
294
|
-
theme="light"
|
|
295
|
-
>
|
|
296
|
-
Center button
|
|
297
|
-
</Button>
|
|
298
|
-
</div>,
|
|
299
|
-
<div
|
|
300
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--h-align-bottom"
|
|
301
|
-
>
|
|
302
|
-
<Button
|
|
303
|
-
emphasis="high"
|
|
304
|
-
size="m"
|
|
305
|
-
theme="light"
|
|
306
|
-
>
|
|
307
|
-
Bottom
|
|
308
|
-
</Button>
|
|
309
|
-
</div>,
|
|
310
|
-
]
|
|
311
|
-
`;
|
|
312
|
-
|
|
313
|
-
exports[`<FlexBox> Snapshots and structure should render story 'NoShrinkFlex' 1`] = `
|
|
314
|
-
[
|
|
315
|
-
<div
|
|
316
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal"
|
|
317
|
-
style={
|
|
318
|
-
{
|
|
319
|
-
"border": "1px solid red",
|
|
320
|
-
"width": "150px",
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
>
|
|
324
|
-
<Button
|
|
325
|
-
emphasis="high"
|
|
326
|
-
size="m"
|
|
327
|
-
theme="light"
|
|
328
|
-
>
|
|
329
|
-
Button
|
|
330
|
-
</Button>
|
|
331
|
-
<FlexBox
|
|
332
|
-
noShrink={true}
|
|
333
|
-
>
|
|
334
|
-
Some long text
|
|
335
|
-
</FlexBox>
|
|
336
|
-
<Button
|
|
337
|
-
emphasis="high"
|
|
338
|
-
size="m"
|
|
339
|
-
theme="light"
|
|
340
|
-
>
|
|
341
|
-
Button
|
|
342
|
-
</Button>
|
|
343
|
-
</div>,
|
|
344
|
-
<div
|
|
345
|
-
className="lumx-flex-box lumx-flex-box--no-shrink"
|
|
346
|
-
>
|
|
347
|
-
Some long text
|
|
348
|
-
</div>,
|
|
349
|
-
]
|
|
350
|
-
`;
|
|
351
|
-
|
|
352
|
-
exports[`<FlexBox> Snapshots and structure should render story 'VerticalFlex' 1`] = `
|
|
353
|
-
[
|
|
354
|
-
<div
|
|
355
|
-
className="lumx-flex-box lumx-flex-box--orientation-vertical"
|
|
356
|
-
style={
|
|
357
|
-
{
|
|
358
|
-
"border": "1px solid red",
|
|
359
|
-
"height": "300px",
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
>
|
|
363
|
-
<Button
|
|
364
|
-
emphasis="high"
|
|
365
|
-
size="m"
|
|
366
|
-
theme="light"
|
|
367
|
-
>
|
|
368
|
-
Default
|
|
369
|
-
</Button>
|
|
370
|
-
<FlexBox
|
|
371
|
-
vAlign="left"
|
|
372
|
-
>
|
|
373
|
-
<Button
|
|
374
|
-
emphasis="high"
|
|
375
|
-
size="m"
|
|
376
|
-
theme="light"
|
|
377
|
-
>
|
|
378
|
-
Left
|
|
379
|
-
</Button>
|
|
380
|
-
</FlexBox>
|
|
381
|
-
<FlexBox
|
|
382
|
-
fillSpace={true}
|
|
383
|
-
hAlign="center"
|
|
384
|
-
vAlign="center"
|
|
385
|
-
>
|
|
386
|
-
<Button
|
|
387
|
-
emphasis="high"
|
|
388
|
-
size="m"
|
|
389
|
-
theme="light"
|
|
390
|
-
>
|
|
391
|
-
Center button
|
|
392
|
-
</Button>
|
|
393
|
-
</FlexBox>
|
|
394
|
-
<FlexBox
|
|
395
|
-
vAlign="right"
|
|
396
|
-
>
|
|
397
|
-
<Button
|
|
398
|
-
emphasis="high"
|
|
399
|
-
size="m"
|
|
400
|
-
theme="light"
|
|
401
|
-
>
|
|
402
|
-
Right
|
|
403
|
-
</Button>
|
|
404
|
-
</FlexBox>
|
|
405
|
-
</div>,
|
|
406
|
-
<div
|
|
407
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--v-align-left"
|
|
408
|
-
>
|
|
409
|
-
<Button
|
|
410
|
-
emphasis="high"
|
|
411
|
-
size="m"
|
|
412
|
-
theme="light"
|
|
413
|
-
>
|
|
414
|
-
Left
|
|
415
|
-
</Button>
|
|
416
|
-
</div>,
|
|
417
|
-
<div
|
|
418
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--v-align-center lumx-flex-box--h-align-center lumx-flex-box--fill-space"
|
|
419
|
-
>
|
|
420
|
-
<Button
|
|
421
|
-
emphasis="high"
|
|
422
|
-
size="m"
|
|
423
|
-
theme="light"
|
|
424
|
-
>
|
|
425
|
-
Center button
|
|
426
|
-
</Button>
|
|
427
|
-
</div>,
|
|
428
|
-
<div
|
|
429
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--v-align-right"
|
|
430
|
-
>
|
|
431
|
-
<Button
|
|
432
|
-
emphasis="high"
|
|
433
|
-
size="m"
|
|
434
|
-
theme="light"
|
|
435
|
-
>
|
|
436
|
-
Right
|
|
437
|
-
</Button>
|
|
438
|
-
</div>,
|
|
439
|
-
]
|
|
440
|
-
`;
|
|
441
|
-
|
|
442
|
-
exports[`<FlexBox> Snapshots and structure should render story 'WrapFlex' 1`] = `
|
|
443
|
-
[
|
|
444
|
-
<div
|
|
445
|
-
className="lumx-flex-box lumx-flex-box--orientation-horizontal lumx-flex-box--wrap"
|
|
446
|
-
style={
|
|
447
|
-
{
|
|
448
|
-
"border": "1px solid red",
|
|
449
|
-
"width": "150px",
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
>
|
|
453
|
-
<FlexBox
|
|
454
|
-
fillSpace={true}
|
|
455
|
-
orientation="vertical"
|
|
456
|
-
>
|
|
457
|
-
<Button
|
|
458
|
-
emphasis="high"
|
|
459
|
-
size="m"
|
|
460
|
-
theme="light"
|
|
461
|
-
>
|
|
462
|
-
Button
|
|
463
|
-
</Button>
|
|
464
|
-
</FlexBox>
|
|
465
|
-
<Button
|
|
466
|
-
emphasis="high"
|
|
467
|
-
size="m"
|
|
468
|
-
theme="light"
|
|
469
|
-
>
|
|
470
|
-
Button
|
|
471
|
-
</Button>
|
|
472
|
-
<Button
|
|
473
|
-
emphasis="high"
|
|
474
|
-
size="m"
|
|
475
|
-
theme="light"
|
|
476
|
-
>
|
|
477
|
-
Button
|
|
478
|
-
</Button>
|
|
479
|
-
</div>,
|
|
480
|
-
<div
|
|
481
|
-
className="lumx-flex-box lumx-flex-box--orientation-vertical lumx-flex-box--fill-space"
|
|
482
|
-
>
|
|
483
|
-
<Button
|
|
484
|
-
emphasis="high"
|
|
485
|
-
size="m"
|
|
486
|
-
theme="light"
|
|
487
|
-
>
|
|
488
|
-
Button
|
|
489
|
-
</Button>
|
|
490
|
-
</div>,
|
|
491
|
-
]
|
|
492
|
-
`;
|