@lumx/react 2.0.0-alpha.0 → 2.0.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/esm/_internal/AlertDialog.js +15 -5
- package/esm/_internal/AlertDialog.js.map +1 -1
- package/esm/_internal/AutocompleteMultiple.js +6 -2
- package/esm/_internal/AutocompleteMultiple.js.map +1 -1
- package/esm/_internal/ButtonRoot.js +1 -0
- package/esm/_internal/ButtonRoot.js.map +1 -1
- package/esm/_internal/ClickAwayProvider.js +31 -30
- package/esm/_internal/ClickAwayProvider.js.map +1 -1
- package/esm/_internal/Dialog2.js +6 -3
- package/esm/_internal/Dialog2.js.map +1 -1
- package/esm/_internal/Dropdown2.js +6 -2
- package/esm/_internal/Dropdown2.js.map +1 -1
- package/esm/_internal/Icon2.js +1 -1
- package/esm/_internal/Icon2.js.map +1 -1
- package/esm/_internal/Lightbox2.js +4 -2
- package/esm/_internal/Lightbox2.js.map +1 -1
- package/esm/_internal/Message2.js +4 -3
- package/esm/_internal/Message2.js.map +1 -1
- package/esm/_internal/Popover2.js +4 -2
- package/esm/_internal/Popover2.js.map +1 -1
- package/esm/_internal/SelectMultiple.js +39 -61
- package/esm/_internal/SelectMultiple.js.map +1 -1
- package/esm/_internal/SlideshowControls.js +93 -44
- package/esm/_internal/SlideshowControls.js.map +1 -1
- package/esm/_internal/Switch2.js +2 -0
- package/esm/_internal/Switch2.js.map +1 -1
- package/esm/_internal/alert-dialog.js +1 -1
- package/esm/_internal/autocomplete.js +1 -2
- package/esm/_internal/autocomplete.js.map +1 -1
- package/esm/_internal/button.js +1 -2
- package/esm/_internal/button.js.map +1 -1
- package/esm/_internal/date-picker.js +1 -2
- package/esm/_internal/date-picker.js.map +1 -1
- package/esm/_internal/dialog.js +1 -1
- package/esm/_internal/dropdown.js +1 -1
- package/esm/_internal/expansion-panel.js +1 -2
- package/esm/_internal/expansion-panel.js.map +1 -1
- package/esm/_internal/getRootClassName.js +78 -68
- package/esm/_internal/getRootClassName.js.map +1 -1
- package/esm/_internal/lightbox.js +1 -2
- package/esm/_internal/lightbox.js.map +1 -1
- package/esm/_internal/popover.js +1 -1
- package/esm/_internal/select.js +1 -2
- package/esm/_internal/select.js.map +1 -1
- package/esm/_internal/side-navigation.js +1 -2
- package/esm/_internal/side-navigation.js.map +1 -1
- package/esm/_internal/slideshow.js +1 -2
- package/esm/_internal/slideshow.js.map +1 -1
- package/esm/_internal/text-field.js +1 -2
- package/esm/_internal/text-field.js.map +1 -1
- package/esm/_internal/tooltip.js +1 -2
- package/esm/_internal/tooltip.js.map +1 -1
- package/esm/_internal/useDelayedVisibility.js +16 -2
- package/esm/_internal/useDelayedVisibility.js.map +1 -1
- package/esm/_internal/useDisableBodyScroll.js +205 -7
- package/esm/_internal/useDisableBodyScroll.js.map +1 -1
- package/esm/index.js +1 -2
- package/esm/index.js.map +1 -1
- package/package.json +6 -6
- package/src/components/alert-dialog/AlertDialog.stories.tsx +29 -0
- package/src/components/alert-dialog/AlertDialog.tsx +29 -9
- package/src/components/alert-dialog/__snapshots__/AlertDialog.test.tsx.snap +91 -0
- package/src/components/autocomplete/Autocomplete.test.tsx +2 -0
- package/src/components/autocomplete/Autocomplete.tsx +7 -0
- package/src/components/autocomplete/AutocompleteMultiple.test.tsx +2 -0
- package/src/components/autocomplete/AutocompleteMultiple.tsx +2 -0
- package/src/components/autocomplete/__snapshots__/Autocomplete.test.tsx.snap +2 -0
- package/src/components/autocomplete/__snapshots__/AutocompleteMultiple.test.tsx.snap +2 -0
- package/src/components/button/Button.stories.tsx +8 -2
- package/src/components/button/ButtonRoot.tsx +1 -1
- package/src/components/comment-block/CommentBlock.stories.tsx +3 -2
- package/src/components/comment-block/__snapshots__/CommentBlock.test.tsx.snap +1 -1
- package/src/components/dialog/Dialog.stories.tsx +62 -22
- package/src/components/dialog/Dialog.tsx +8 -2
- package/src/components/dialog/__snapshots__/Dialog.test.tsx.snap +99 -35
- package/src/components/icon/Icon.tsx +1 -0
- package/src/components/icon/__snapshots__/Icon.test.tsx.snap +2 -2
- package/src/components/lightbox/Lightbox.tsx +4 -1
- package/src/components/lightbox/__snapshots__/Lightbox.test.tsx.snap +7 -5
- package/src/components/message/Message.stories.tsx +8 -0
- package/src/components/message/Message.tsx +4 -2
- package/src/components/popover/Popover.tsx +4 -1
- package/src/components/popover/__snapshots__/Popover.test.tsx.snap +100 -80
- package/src/components/select/WithSelectContext.tsx +3 -60
- package/src/components/slideshow/Slideshow.stories.tsx +47 -7
- package/src/components/slideshow/Slideshow.test.tsx +4 -1
- package/src/components/slideshow/Slideshow.tsx +51 -26
- package/src/components/slideshow/SlideshowControls.stories.tsx +0 -4
- package/src/components/slideshow/SlideshowControls.tsx +23 -8
- package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +0 -5
- package/src/components/slideshow/useKeyNavigate.ts +28 -0
- package/src/components/slideshow/useSwipeNavigate.ts +18 -0
- package/src/components/switch/Switch.tsx +2 -0
- package/src/components/switch/__snapshots__/Switch.test.tsx.snap +8 -0
- package/src/hooks/useClickAway.tsx +6 -5
- package/src/hooks/useDelayedVisibility.tsx +22 -2
- package/src/hooks/useDisableBodyScroll.ts +16 -1
- package/src/hooks/useInfiniteScroll.tsx +14 -3
- package/src/hooks/useListenFocus.tsx +26 -0
- package/src/utils/ClickAwayProvider/ClickAwayProvider.tsx +23 -32
- package/types.d.ts +17 -8
- package/src/components/slideshow/useKeyOrSwipeNavigate.ts +0 -37
|
@@ -54,6 +54,8 @@ export interface DialogProps extends GenericProps {
|
|
|
54
54
|
dialogProps?: GenericProps;
|
|
55
55
|
/** On close callback. */
|
|
56
56
|
onClose?(): void;
|
|
57
|
+
/** Callback called when the open animation starts and the close animation finishes. */
|
|
58
|
+
onVisibilityChange?(isVisible: boolean): void;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
export type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
@@ -108,6 +110,7 @@ export const Dialog: Comp<DialogProps, HTMLDivElement> = forwardRef((props, ref)
|
|
|
108
110
|
size,
|
|
109
111
|
zIndex,
|
|
110
112
|
dialogProps,
|
|
113
|
+
onVisibilityChange,
|
|
111
114
|
...forwardedProps
|
|
112
115
|
} = props;
|
|
113
116
|
|
|
@@ -158,7 +161,10 @@ export const Dialog: Comp<DialogProps, HTMLDivElement> = forwardRef((props, ref)
|
|
|
158
161
|
const footerChildContent = footerChildProps?.children;
|
|
159
162
|
|
|
160
163
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
161
|
-
const isVisible = useDelayedVisibility(Boolean(isOpen), DIALOG_TRANSITION_DURATION);
|
|
164
|
+
const isVisible = useDelayedVisibility(Boolean(isOpen), DIALOG_TRANSITION_DURATION, onVisibilityChange);
|
|
165
|
+
|
|
166
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
167
|
+
const clickAwayRefs = useRef([wrapperRef]);
|
|
162
168
|
|
|
163
169
|
return isOpen || isVisible
|
|
164
170
|
? createPortal(
|
|
@@ -180,7 +186,7 @@ export const Dialog: Comp<DialogProps, HTMLDivElement> = forwardRef((props, ref)
|
|
|
180
186
|
<div className={`${CLASSNAME}__overlay`} />
|
|
181
187
|
|
|
182
188
|
<section className={`${CLASSNAME}__container`} role="dialog" aria-modal="true" {...dialogProps}>
|
|
183
|
-
<ClickAwayProvider callback={!preventAutoClose && handleClose} refs={
|
|
189
|
+
<ClickAwayProvider callback={!preventAutoClose && handleClose} refs={clickAwayRefs}>
|
|
184
190
|
<div className={`${CLASSNAME}__wrapper`} ref={wrapperRef}>
|
|
185
191
|
{(header || headerChildContent) && (
|
|
186
192
|
<header
|
|
@@ -75,44 +75,65 @@ exports[`<Dialog> Snapshots and structure should render story DialogWithFocusabl
|
|
|
75
75
|
onChange={[Function]}
|
|
76
76
|
theme="light"
|
|
77
77
|
/>
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
isOpen={false}
|
|
81
|
-
label="Select label"
|
|
82
|
-
onDropdownClose={[Function]}
|
|
83
|
-
onInputClick={[Function]}
|
|
84
|
-
selectedValueRender={[Function]}
|
|
85
|
-
value=""
|
|
78
|
+
<FlexBox
|
|
79
|
+
orientation="horizontal"
|
|
86
80
|
>
|
|
87
|
-
<
|
|
88
|
-
|
|
81
|
+
<DatePickerField
|
|
82
|
+
label="Start date"
|
|
83
|
+
locale="fr"
|
|
84
|
+
nextButtonProps={
|
|
85
|
+
Object {
|
|
86
|
+
"label": "Next month",
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
onChange={[Function]}
|
|
90
|
+
placeholder="Pick a date"
|
|
91
|
+
previousButtonProps={
|
|
92
|
+
Object {
|
|
93
|
+
"label": "Previous month",
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
value={2020-05-18T00:00:00.000Z}
|
|
97
|
+
/>
|
|
98
|
+
<Select
|
|
99
|
+
className="lumx-spacing-margin-left-huge"
|
|
100
|
+
isOpen={false}
|
|
101
|
+
label="Select label"
|
|
102
|
+
onDropdownClose={[Function]}
|
|
103
|
+
onInputClick={[Function]}
|
|
104
|
+
selectedValueRender={[Function]}
|
|
105
|
+
value="First item"
|
|
89
106
|
>
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
key="First item"
|
|
93
|
-
onItemSelected={[Function]}
|
|
94
|
-
size="tiny"
|
|
107
|
+
<List
|
|
108
|
+
isClickable={true}
|
|
95
109
|
>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
<ListItem
|
|
111
|
+
isSelected={true}
|
|
112
|
+
key="First item"
|
|
113
|
+
onItemSelected={[Function]}
|
|
114
|
+
size="tiny"
|
|
115
|
+
>
|
|
116
|
+
First item
|
|
117
|
+
</ListItem>
|
|
118
|
+
<ListItem
|
|
119
|
+
isSelected={false}
|
|
120
|
+
key="Second item"
|
|
121
|
+
onItemSelected={[Function]}
|
|
122
|
+
size="tiny"
|
|
123
|
+
>
|
|
124
|
+
Second item
|
|
125
|
+
</ListItem>
|
|
126
|
+
<ListItem
|
|
127
|
+
isSelected={false}
|
|
128
|
+
key="Third item"
|
|
129
|
+
onItemSelected={[Function]}
|
|
130
|
+
size="tiny"
|
|
131
|
+
>
|
|
132
|
+
Third item
|
|
133
|
+
</ListItem>
|
|
134
|
+
</List>
|
|
135
|
+
</Select>
|
|
136
|
+
</FlexBox>
|
|
116
137
|
<div
|
|
117
138
|
tabIndex={0}
|
|
118
139
|
>
|
|
@@ -731,3 +752,46 @@ Aquitani, tertiam.
|
|
|
731
752
|
</Dialog>
|
|
732
753
|
</Fragment>
|
|
733
754
|
`;
|
|
755
|
+
|
|
756
|
+
exports[`<Dialog> Snapshots and structure should render story WithAnimationCallbacks 1`] = `
|
|
757
|
+
<Fragment>
|
|
758
|
+
<Button
|
|
759
|
+
emphasis="high"
|
|
760
|
+
onClick={[Function]}
|
|
761
|
+
size="m"
|
|
762
|
+
theme="light"
|
|
763
|
+
>
|
|
764
|
+
Open dialog
|
|
765
|
+
</Button>
|
|
766
|
+
<Dialog
|
|
767
|
+
isOpen={true}
|
|
768
|
+
onClose={[Function]}
|
|
769
|
+
onVisibilityChange={[Function]}
|
|
770
|
+
parentElement={
|
|
771
|
+
Object {
|
|
772
|
+
"current": undefined,
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
size="regular"
|
|
776
|
+
>
|
|
777
|
+
<div
|
|
778
|
+
className="lumx-spacing-padding"
|
|
779
|
+
>
|
|
780
|
+
|
|
781
|
+
Nihil hic munitissimus habendi senatus locus, nihil horum? At nos hinc posthac, sitientis piros
|
|
782
|
+
Afros. Magna pars studiorum, prodita quaerimus. Integer legentibus erat a ante historiarum
|
|
783
|
+
dapibus. Praeterea iter est quasdam res quas ex communi. Ullamco laboris nisi ut aliquid ex ea
|
|
784
|
+
commodi consequat. Inmensae subtilitatis, obscuris et malesuada fames. Me non paenitet nullum
|
|
785
|
+
festiviorem excogitasse ad hoc. Cum ceteris in veneratione tui montes, nascetur mus. Etiam
|
|
786
|
+
habebis sem dicantur magna mollis euismod. Quis aute iure reprehenderit in voluptate velit esse.
|
|
787
|
+
Phasellus laoreet lorem vel dolor tempus vehicula. Ambitioni dedisse scripsisse iudicaretur.
|
|
788
|
+
Paullum deliquit, ponderibus modulisque suis ratio utitur. Ab illo tempore, ab est sed
|
|
789
|
+
immemorabili. Nec dubitamus multa iter quae et nos invenerat. Tu quoque, Brute, fili mi, nihil
|
|
790
|
+
timor populi, nihil! Morbi fringilla convallis sapien, id pulvinar odio volutpat. Cras mattis
|
|
791
|
+
iudicium purus sit amet fermentum. Vivamus sagittis lacus vel augue laoreet rutrum faucibus.
|
|
792
|
+
Quisque ut dolor gravida, placerat libero vel, euismod. Unam incolunt Belgae, aliam Aquitani,
|
|
793
|
+
tertiam. Cras mattis iudicium purus sit amet fermentum
|
|
794
|
+
</div>
|
|
795
|
+
</Dialog>
|
|
796
|
+
</Fragment>
|
|
797
|
+
`;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`<Icon> Snapshots and structure should render color & color variant 1`] = `
|
|
4
4
|
<i
|
|
5
|
-
className="lumx-icon lumx-icon--color-primary lumx-icon--color-variant-D1 lumx-icon--no-shape"
|
|
5
|
+
className="lumx-icon lumx-icon--color-primary lumx-icon--color-variant-D1 lumx-icon--no-shape lumx-icon--path"
|
|
6
6
|
>
|
|
7
7
|
<svg
|
|
8
8
|
aria-hidden="true"
|
|
@@ -26,7 +26,7 @@ exports[`<Icon> Snapshots and structure should render color & color variant 1`]
|
|
|
26
26
|
|
|
27
27
|
exports[`<Icon> Snapshots and structure should render correctly 1`] = `
|
|
28
28
|
<i
|
|
29
|
-
className="lumx-icon lumx-icon--no-shape"
|
|
29
|
+
className="lumx-icon lumx-icon--no-shape lumx-icon--path"
|
|
30
30
|
>
|
|
31
31
|
<svg
|
|
32
32
|
aria-hidden="true"
|
|
@@ -98,6 +98,9 @@ export const Lightbox: Comp<LightboxProps, HTMLDivElement> = forwardRef((props,
|
|
|
98
98
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
99
99
|
useCallbackOnEscape(onClose);
|
|
100
100
|
|
|
101
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
102
|
+
const clickAwayRefs = useRef([wrapperRef]);
|
|
103
|
+
|
|
101
104
|
if (!isOpen && !isVisible) return null;
|
|
102
105
|
|
|
103
106
|
return createPortal(
|
|
@@ -130,7 +133,7 @@ export const Lightbox: Comp<LightboxProps, HTMLDivElement> = forwardRef((props,
|
|
|
130
133
|
onClick={onClose}
|
|
131
134
|
/>
|
|
132
135
|
)}
|
|
133
|
-
<ClickAwayProvider callback={!preventAutoClose && onClose} refs={
|
|
136
|
+
<ClickAwayProvider callback={!preventAutoClose && onClose} refs={clickAwayRefs}>
|
|
134
137
|
<div ref={childrenRef} className={`${CLASSNAME}__wrapper`} role="presentation">
|
|
135
138
|
{children}
|
|
136
139
|
</div>
|
|
@@ -27,11 +27,13 @@ exports[`<Lightbox> Snapshots and structure should render story 'Default' 1`] =
|
|
|
27
27
|
<ClickAwayProvider
|
|
28
28
|
callback={[Function]}
|
|
29
29
|
refs={
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
Object {
|
|
31
|
+
"current": Array [
|
|
32
|
+
Object {
|
|
33
|
+
"current": null,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
>
|
|
37
39
|
<div
|
|
@@ -2,6 +2,7 @@ import { Kind, Message } from '@lumx/react';
|
|
|
2
2
|
import { boolean, text } from '@storybook/addon-knobs';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { enumKnob } from '@lumx/react/stories/knobs/enumKnob';
|
|
5
|
+
import { mdiDelete } from '@lumx/icons/';
|
|
5
6
|
|
|
6
7
|
export default { title: 'LumX components/message/Message' };
|
|
7
8
|
|
|
@@ -17,3 +18,10 @@ export const Default = () => (
|
|
|
17
18
|
)}
|
|
18
19
|
</Message>
|
|
19
20
|
);
|
|
21
|
+
|
|
22
|
+
export const CustomIcon = () => (
|
|
23
|
+
<Message icon={mdiDelete} kind="info" hasBackground>
|
|
24
|
+
Lorem ipsum quisque tincidunt lobortis dui non auctor.Donec porta, ligula volutpat vehicula aliquet, dui sapien
|
|
25
|
+
tempus felis, sed.
|
|
26
|
+
</Message>
|
|
27
|
+
);
|
|
@@ -14,6 +14,8 @@ export interface MessageProps extends GenericProps {
|
|
|
14
14
|
hasBackground?: boolean;
|
|
15
15
|
/** Message variant. */
|
|
16
16
|
kind?: Kind;
|
|
17
|
+
/** Message custom icon SVG path. */
|
|
18
|
+
icon?: string;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
/**
|
|
@@ -44,7 +46,7 @@ const CONFIG = {
|
|
|
44
46
|
* @return React element.
|
|
45
47
|
*/
|
|
46
48
|
export const Message: Comp<MessageProps, HTMLDivElement> = forwardRef((props, ref) => {
|
|
47
|
-
const { children, className, hasBackground, kind, ...forwardedProps } = props;
|
|
49
|
+
const { children, className, hasBackground, kind, icon: customIcon, ...forwardedProps } = props;
|
|
48
50
|
const { color, icon } = CONFIG[kind as Kind] || {};
|
|
49
51
|
|
|
50
52
|
return (
|
|
@@ -60,7 +62,7 @@ export const Message: Comp<MessageProps, HTMLDivElement> = forwardRef((props, re
|
|
|
60
62
|
)}
|
|
61
63
|
{...forwardedProps}
|
|
62
64
|
>
|
|
63
|
-
{icon && <Icon className="lumx-message__icon" icon={icon} size={Size.xs} />}
|
|
65
|
+
{(customIcon || icon) && <Icon className="lumx-message__icon" icon={customIcon || icon} size={Size.xs} />}
|
|
64
66
|
<div className="lumx-message__text">{children}</div>
|
|
65
67
|
</div>
|
|
66
68
|
);
|
|
@@ -270,6 +270,9 @@ export const Popover: Comp<PopoverProps, HTMLDivElement> = forwardRef((props, re
|
|
|
270
270
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
271
271
|
useFocus(focusElement?.current, isOpen && (state?.rects?.popper?.y ?? -1) >= 0);
|
|
272
272
|
|
|
273
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
274
|
+
const clickAwayRefs = useRef([clickAwayRef, anchorRef]);
|
|
275
|
+
|
|
273
276
|
return isOpen
|
|
274
277
|
? renderPopover(
|
|
275
278
|
<div
|
|
@@ -282,7 +285,7 @@ export const Popover: Comp<PopoverProps, HTMLDivElement> = forwardRef((props, re
|
|
|
282
285
|
style={popoverStyle}
|
|
283
286
|
{...attributes.popper}
|
|
284
287
|
>
|
|
285
|
-
<ClickAwayProvider callback={closeOnClickAway && onClose} refs={
|
|
288
|
+
<ClickAwayProvider callback={closeOnClickAway && onClose} refs={clickAwayRefs}>
|
|
286
289
|
{hasArrow && <div ref={setArrowElement} className={`${CLASSNAME}__arrow`} style={styles.arrow} />}
|
|
287
290
|
{children}
|
|
288
291
|
</ClickAwayProvider>
|
|
@@ -18,14 +18,16 @@ Array [
|
|
|
18
18
|
>
|
|
19
19
|
<ClickAwayProvider
|
|
20
20
|
refs={
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
Object {
|
|
22
|
+
"current": Array [
|
|
23
|
+
Object {
|
|
24
|
+
"current": null,
|
|
25
|
+
},
|
|
26
|
+
Object {
|
|
27
|
+
"current": null,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
}
|
|
29
31
|
}
|
|
30
32
|
>
|
|
31
33
|
Popover aligned on start of the top side
|
|
@@ -48,14 +50,16 @@ Array [
|
|
|
48
50
|
>
|
|
49
51
|
<ClickAwayProvider
|
|
50
52
|
refs={
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
Object {
|
|
54
|
+
"current": Array [
|
|
55
|
+
Object {
|
|
56
|
+
"current": null,
|
|
57
|
+
},
|
|
58
|
+
Object {
|
|
59
|
+
"current": null,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
}
|
|
59
63
|
}
|
|
60
64
|
>
|
|
61
65
|
Popover aligned on start of the top side
|
|
@@ -82,14 +86,16 @@ exports[`<Popover> Snapshots and structure should render story 'Auto' 1`] = `
|
|
|
82
86
|
>
|
|
83
87
|
<ClickAwayProvider
|
|
84
88
|
refs={
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
Object {
|
|
90
|
+
"current": Array [
|
|
91
|
+
Object {
|
|
92
|
+
"current": null,
|
|
93
|
+
},
|
|
94
|
+
Object {
|
|
95
|
+
"current": null,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
}
|
|
93
99
|
}
|
|
94
100
|
>
|
|
95
101
|
Popover
|
|
@@ -115,14 +121,16 @@ exports[`<Popover> Snapshots and structure should render story 'Default' 1`] = `
|
|
|
115
121
|
>
|
|
116
122
|
<ClickAwayProvider
|
|
117
123
|
refs={
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
Object {
|
|
125
|
+
"current": Array [
|
|
126
|
+
Object {
|
|
127
|
+
"current": null,
|
|
128
|
+
},
|
|
129
|
+
Object {
|
|
130
|
+
"current": null,
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
}
|
|
126
134
|
}
|
|
127
135
|
>
|
|
128
136
|
Popover
|
|
@@ -148,14 +156,16 @@ exports[`<Popover> Snapshots and structure should render story 'MatchingWidth' 1
|
|
|
148
156
|
>
|
|
149
157
|
<ClickAwayProvider
|
|
150
158
|
refs={
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
Object {
|
|
160
|
+
"current": Array [
|
|
161
|
+
Object {
|
|
162
|
+
"current": null,
|
|
163
|
+
},
|
|
164
|
+
Object {
|
|
165
|
+
"current": null,
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
}
|
|
159
169
|
}
|
|
160
170
|
>
|
|
161
171
|
Popover's width matching anchor's
|
|
@@ -181,14 +191,16 @@ exports[`<Popover> Snapshots and structure should render story 'Offset' 1`] = `
|
|
|
181
191
|
>
|
|
182
192
|
<ClickAwayProvider
|
|
183
193
|
refs={
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
194
|
+
Object {
|
|
195
|
+
"current": Array [
|
|
196
|
+
Object {
|
|
197
|
+
"current": null,
|
|
198
|
+
},
|
|
199
|
+
Object {
|
|
200
|
+
"current": null,
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
}
|
|
192
204
|
}
|
|
193
205
|
>
|
|
194
206
|
Popover
|
|
@@ -215,14 +227,16 @@ Array [
|
|
|
215
227
|
>
|
|
216
228
|
<ClickAwayProvider
|
|
217
229
|
refs={
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
230
|
+
Object {
|
|
231
|
+
"current": Array [
|
|
232
|
+
Object {
|
|
233
|
+
"current": null,
|
|
234
|
+
},
|
|
235
|
+
Object {
|
|
236
|
+
"current": null,
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
}
|
|
226
240
|
}
|
|
227
241
|
>
|
|
228
242
|
Popover
|
|
@@ -245,14 +259,16 @@ Array [
|
|
|
245
259
|
>
|
|
246
260
|
<ClickAwayProvider
|
|
247
261
|
refs={
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
262
|
+
Object {
|
|
263
|
+
"current": Array [
|
|
264
|
+
Object {
|
|
265
|
+
"current": null,
|
|
266
|
+
},
|
|
267
|
+
Object {
|
|
268
|
+
"current": null,
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
}
|
|
256
272
|
}
|
|
257
273
|
>
|
|
258
274
|
Popover
|
|
@@ -275,14 +291,16 @@ Array [
|
|
|
275
291
|
>
|
|
276
292
|
<ClickAwayProvider
|
|
277
293
|
refs={
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
294
|
+
Object {
|
|
295
|
+
"current": Array [
|
|
296
|
+
Object {
|
|
297
|
+
"current": null,
|
|
298
|
+
},
|
|
299
|
+
Object {
|
|
300
|
+
"current": null,
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
}
|
|
286
304
|
}
|
|
287
305
|
>
|
|
288
306
|
Popover
|
|
@@ -305,14 +323,16 @@ Array [
|
|
|
305
323
|
>
|
|
306
324
|
<ClickAwayProvider
|
|
307
325
|
refs={
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
326
|
+
Object {
|
|
327
|
+
"current": Array [
|
|
328
|
+
Object {
|
|
329
|
+
"current": null,
|
|
330
|
+
},
|
|
331
|
+
Object {
|
|
332
|
+
"current": null,
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
}
|
|
316
336
|
}
|
|
317
337
|
>
|
|
318
338
|
Popover
|