@fibery/ui-kit 1.40.3 → 1.41.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/CHANGELOG.md +14 -0
- package/eslint.config.mjs +16 -0
- package/package.json +11 -13
- package/src/a11y-color.test.ts +162 -0
- package/src/a11y-color.ts +13 -20
- package/src/actions-menu/actions-menu-item.tsx +9 -12
- package/src/actions-menu/context-actions-menu.tsx +8 -3
- package/src/ai/model.tsx +0 -1
- package/src/ai/temperature.tsx +0 -1
- package/src/animated-height-container.tsx +3 -3
- package/src/antd/ant-modal.tsx +10 -5
- package/src/antd/index.tsx +3 -0
- package/src/antd/input.tsx +0 -1
- package/src/antd/styles.ts +15 -15
- package/src/app-icon-with-fallback.tsx +6 -6
- package/src/app-icon-wrapper.tsx +2 -3
- package/src/app-icon.tsx +4 -4
- package/src/avatar.tsx +3 -3
- package/src/button/base-button.tsx +0 -1
- package/src/button/button.tsx +1 -0
- package/src/button/make-button-colors.ts +5 -13
- package/src/checkbox.tsx +2 -2
- package/src/collapsible-section.tsx +11 -1
- package/src/color-picker/ColorPickerOrLoader.js +2 -2
- package/src/color-utils.test.ts +307 -0
- package/src/color-utils.ts +215 -0
- package/src/command-menu/index.tsx +1 -0
- package/src/comment.tsx +3 -2
- package/src/context-menu/index.tsx +12 -7
- package/src/date-picker/contexts.ts +2 -2
- package/src/date-picker/date-range-picker.tsx +3 -4
- package/src/date-picker/single-date-picker.tsx +147 -119
- package/src/date-picker/types.ts +4 -3
- package/src/day-select/iso-week-day-select.tsx +2 -2
- package/src/day-select/week-day-select.tsx +2 -2
- package/src/delayed.tsx +0 -1
- package/src/design-system/alpha.test.ts +59 -0
- package/src/design-system/alpha.ts +41 -0
- package/src/design-system/animation.ts +10 -0
- package/src/design-system/colors-css.test.ts +39 -0
- package/src/design-system/colors-css.ts +25 -0
- package/src/design-system/colors-js.test.ts +232 -0
- package/src/design-system/colors-js.ts +107 -0
- package/src/design-system/colors.test.ts +74 -0
- package/src/design-system/colors.ts +759 -0
- package/src/design-system/date.ts +3 -0
- package/src/design-system/layout.ts +106 -0
- package/src/design-system/theme.test.ts +94 -0
- package/src/design-system/theme.ts +93 -0
- package/src/design-system/typography.ts +179 -0
- package/src/design-system/vars.test.ts +1679 -0
- package/src/design-system/vars.ts +52 -0
- package/src/design-system.test.ts +45 -22
- package/src/design-system.ts +25 -1339
- package/src/dropdown-menu/index.tsx +21 -16
- package/src/emoji-picker/app-icon-picker.tsx +5 -5
- package/src/emoji-picker/emoji-picker-content-with-color.tsx +4 -4
- package/src/emoji-picker/icon-emoji-picker.tsx +3 -3
- package/src/favorites-icon.tsx +1 -1
- package/src/fibermoji-placeholder.tsx +3 -3
- package/src/field-container.tsx +11 -2
- package/src/file-item/file-icon.tsx +169 -0
- package/src/file-item/file-menu-items.tsx +68 -0
- package/src/file-item/file-preview-actions.tsx +38 -0
- package/src/file-item/file-title.tsx +48 -0
- package/src/file-item/types.ts +27 -0
- package/src/file-item/use-register-in-image-gallery.tsx +70 -0
- package/src/file-item-2.tsx +32 -348
- package/src/file-item.tsx +6 -3
- package/src/hue-shift.test.ts +91 -0
- package/src/icons/ast/ChatBubble.ts +8 -0
- package/src/icons/ast/ChatFloat.ts +8 -0
- package/src/icons/ast/ChatSidebar.ts +8 -0
- package/src/icons/ast/FileCounter.ts +8 -0
- package/src/icons/ast/FileMultiple.ts +8 -0
- package/src/icons/ast/FileOther.ts +8 -0
- package/src/icons/ast/NoBorder.ts +8 -0
- package/src/icons/ast/NoFill.ts +8 -0
- package/src/icons/ast/ValueEdit.ts +8 -0
- package/src/icons/ast/index.tsx +9 -0
- package/src/icons/react/ChatBubble.tsx +13 -0
- package/src/icons/react/ChatFloat.tsx +13 -0
- package/src/icons/react/ChatSidebar.tsx +13 -0
- package/src/icons/react/FileCounter.tsx +13 -0
- package/src/icons/react/FileMultiple.tsx +13 -0
- package/src/icons/react/FileOther.tsx +13 -0
- package/src/icons/react/NoBorder.tsx +13 -0
- package/src/icons/react/NoFill.tsx +13 -0
- package/src/icons/react/ValueEdit.tsx +13 -0
- package/src/icons/react/index.tsx +9 -0
- package/src/icons/svg/chat-bubble.svg +4 -0
- package/src/icons/svg/chat-float.svg +4 -0
- package/src/icons/svg/chat-sidebar.svg +4 -0
- package/src/icons/svg/file-counter.svg +3 -0
- package/src/icons/svg/file-multiple.svg +3 -0
- package/src/icons/svg/file-other.svg +3 -0
- package/src/icons/svg/no-border.svg +17 -0
- package/src/icons/svg/no-fill.svg +4 -0
- package/src/icons/svg/value-edit.svg +3 -0
- package/src/images-gallery/images-gallery.tsx +8 -6
- package/src/images-gallery/slide-buttons.tsx +4 -11
- package/src/is-iOS.ts +0 -1
- package/src/is-in-popup.ts +2 -1
- package/src/lists/actions-menu-row-surface.tsx +7 -7
- package/src/loading-sausage.tsx +2 -2
- package/src/media-query-utils.ts +1 -2
- package/src/mobile-keyboard-aware-popup.tsx +6 -5
- package/src/modal-menu/modal-menu-content.tsx +2 -2
- package/src/number-input/decimal.js +9 -7
- package/src/number-input/{number-inline-input-with-autosize.tsx → number-input-inline-with-autosize.tsx} +20 -41
- package/src/number-input/number-input-inline.tsx +118 -0
- package/src/number-input/{index.test.js → number-input.test.tsx} +38 -43
- package/src/number-input/number-input.tsx +63 -121
- package/src/number-input/types.ts +19 -0
- package/src/number-input/utils.ts +61 -0
- package/src/online-users.tsx +2 -2
- package/src/palette-generator.test.ts +309 -0
- package/src/palette-generator.ts +160 -0
- package/src/palettes/_.ts +72 -0
- package/src/palettes/slate-arch.colors-snapshot.test.ts +1689 -0
- package/src/palettes/slate-arch.ts +188 -0
- package/src/palettes/slate-user.colors-snapshot.test.ts +1689 -0
- package/src/palettes/slate-user.ts +187 -0
- package/src/palettes/warm-arch.colors-snapshot.test.ts +1689 -0
- package/src/palettes/warm-arch.ts +222 -0
- package/src/palettes/warm-user.colors-snapshot.test.ts +1689 -0
- package/src/palettes/warm-user.ts +222 -0
- package/src/platform.ts +0 -3
- package/src/popover/get-element-ref.ts +28 -0
- package/src/popover/index.tsx +236 -339
- package/src/popover/{mobile-popup-context.tsx → mobile-popover-context.tsx} +7 -7
- package/src/popover/mobile-popover.tsx +169 -0
- package/src/popover/modifiers.tsx +2 -2
- package/src/popover/popup-stack-context.tsx +8 -9
- package/src/progress.tsx +2 -2
- package/src/reactions/reaction-button.tsx +12 -6
- package/src/root-theme-provider.test.tsx +411 -0
- package/src/scale-generator.ts +356 -0
- package/src/select/components/menu-list-virtualized.tsx +12 -25
- package/src/select/components/menu.tsx +12 -2
- package/src/select/index.tsx +6 -5
- package/src/select/select.tsx +38 -39
- package/src/select/styles.ts +0 -1
- package/src/select/util.ts +1 -1
- package/src/static-palettes.ts +356 -0
- package/src/thematic-color-picker.tsx +266 -0
- package/src/thematic-constants.tsx +27 -0
- package/src/thematic-controls.tsx +144 -0
- package/src/thematic-scales.tsx +122 -0
- package/src/thematic-state.ts +370 -0
- package/src/thematic.tsx +386 -0
- package/src/theme-provider.test.tsx +820 -0
- package/src/theme-provider.tsx +158 -92
- package/src/theme-settings.ts +67 -12
- package/src/theme-styles.ts +58 -6
- package/src/toast/toast-action.tsx +1 -1
- package/src/toast/toast.tsx +1 -2
- package/src/toggle-on-off.tsx +2 -2
- package/src/toggle.tsx +7 -8
- package/src/tooltip.tsx +14 -10
- package/src/type-badge.tsx +7 -14
- package/src/unit/styles.ts +2 -25
- package/src/unit/unit-with-tooltip.tsx +3 -2
- package/src/use-is-phone.tsx +7 -2
- package/src/use-long-press.tsx +2 -2
- package/src/use-on-screen-keyboard-data.tsx +2 -2
- package/src/with-data.tsx +4 -3
- package/src/workflow-progress-icon.tsx +2 -2
- package/.eslintignore +0 -3
- package/.eslintrc +0 -14
- package/src/__mocks__/createInlineTheme.js +0 -3
- package/src/create-inline-theme.ts +0 -66
- package/src/number-input/index.js +0 -191
- package/src/palette.ts +0 -237
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import noop from "lodash/noop";
|
|
2
2
|
import {FC, ReactNode, useState, useMemo} from "react";
|
|
3
3
|
import {createContext} from "@fibery/react/src/create-context";
|
|
4
4
|
|
|
5
|
-
type
|
|
5
|
+
type MobilePopoverContext = {
|
|
6
6
|
title?: string;
|
|
7
7
|
headerSlot?: ReactNode;
|
|
8
8
|
setTitle: (title: string) => void;
|
|
9
9
|
setHeader: (header?: ReactNode) => void;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const [Provider,
|
|
13
|
-
setTitle:
|
|
14
|
-
setHeader:
|
|
12
|
+
const [Provider, useMobilePopover] = createContext<MobilePopoverContext>("MobilePopoverContext", {
|
|
13
|
+
setTitle: noop,
|
|
14
|
+
setHeader: noop,
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
export const
|
|
17
|
+
export const MobilePopoverProvider: FC<{children?: ReactNode}> = ({children}) => {
|
|
18
18
|
const [title, setTitle] = useState<string | undefined>();
|
|
19
19
|
const [headerSlot, setHeader] = useState<ReactNode | undefined>();
|
|
20
20
|
|
|
@@ -26,4 +26,4 @@ export const MobilePopupProvider: FC<{children?: ReactNode}> = ({children}) => {
|
|
|
26
26
|
return <Provider value={contextValue}>{children}</Provider>;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export {
|
|
29
|
+
export {useMobilePopover};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import {stopPropagation} from "@fibery/react/src/stop-propagation";
|
|
2
|
+
import {css} from "@linaria/core";
|
|
3
|
+
import cx from "classnames";
|
|
4
|
+
import {CSSProperties, ReactNode} from "react";
|
|
5
|
+
import {
|
|
6
|
+
safeAreaInsetBottomVar,
|
|
7
|
+
safeAreaInsetLeftVar,
|
|
8
|
+
safeAreaInsetRightVar,
|
|
9
|
+
safeAreaInsetTopVar,
|
|
10
|
+
} from "../mobile-styles";
|
|
11
|
+
import {space, textStyles, themeVars, transition} from "../design-system";
|
|
12
|
+
import {IconButton} from "../button/icon-button";
|
|
13
|
+
import CloseIcon from "../icons/react/Close";
|
|
14
|
+
import ArrowLeftIcon from "../icons/react/ArrowLeft";
|
|
15
|
+
import {ThemeProvider} from "../theme-provider";
|
|
16
|
+
import {useMobilePopover} from "./mobile-popover-context";
|
|
17
|
+
|
|
18
|
+
const mobileAnimationClassName = css`
|
|
19
|
+
transition: transform ${transition}, opacity ${transition};
|
|
20
|
+
transform: translateY(0);
|
|
21
|
+
opacity: 1;
|
|
22
|
+
|
|
23
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
24
|
+
@starting-style {
|
|
25
|
+
transform: translateY(20%);
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
const popupContentClassName = css`
|
|
32
|
+
display: grid;
|
|
33
|
+
background: ${themeVars.actionMenuBg};
|
|
34
|
+
grid-template-rows: 60px 1fr;
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
export const mobileZIndex = 1002;
|
|
38
|
+
|
|
39
|
+
export function MobilePopover({
|
|
40
|
+
content,
|
|
41
|
+
mobilePopupStyle,
|
|
42
|
+
mobilePopupContentClassName,
|
|
43
|
+
title,
|
|
44
|
+
onClose,
|
|
45
|
+
height,
|
|
46
|
+
onNavigateBack,
|
|
47
|
+
}: {
|
|
48
|
+
content: ReactNode;
|
|
49
|
+
mobilePopupStyle?: CSSProperties;
|
|
50
|
+
mobilePopupContentClassName?: string;
|
|
51
|
+
title: string;
|
|
52
|
+
height?: string;
|
|
53
|
+
onClose?: () => void;
|
|
54
|
+
onNavigateBack?: () => void;
|
|
55
|
+
}) {
|
|
56
|
+
const {title: contextTitle, headerSlot} = useMobilePopover();
|
|
57
|
+
|
|
58
|
+
const headerContent = headerSlot ?? (
|
|
59
|
+
<>
|
|
60
|
+
{onNavigateBack && (
|
|
61
|
+
<IconButton onClick={onNavigateBack} size="xLarge">
|
|
62
|
+
<ArrowLeftIcon />
|
|
63
|
+
</IconButton>
|
|
64
|
+
)}
|
|
65
|
+
<div
|
|
66
|
+
className={css`
|
|
67
|
+
${textStyles.heading3}
|
|
68
|
+
flex: 1;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
`}
|
|
74
|
+
>
|
|
75
|
+
{contextTitle ?? title}
|
|
76
|
+
</div>
|
|
77
|
+
{onClose && (
|
|
78
|
+
<IconButton onClick={onClose} size="xLarge">
|
|
79
|
+
<CloseIcon />
|
|
80
|
+
</IconButton>
|
|
81
|
+
)}
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
const popupContent = (
|
|
86
|
+
<>
|
|
87
|
+
<div
|
|
88
|
+
className={cx(
|
|
89
|
+
css`
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: ${space.s8}px;
|
|
93
|
+
padding: ${space.s8}px ${space.s8}px ${space.s8}px ${space.s20}px;
|
|
94
|
+
min-width: 0;
|
|
95
|
+
`,
|
|
96
|
+
onNavigateBack &&
|
|
97
|
+
css`
|
|
98
|
+
padding-left: ${space.s4}px;
|
|
99
|
+
`
|
|
100
|
+
)}
|
|
101
|
+
>
|
|
102
|
+
{headerContent}
|
|
103
|
+
</div>
|
|
104
|
+
<div
|
|
105
|
+
className={cx(
|
|
106
|
+
css`
|
|
107
|
+
border-top: ${themeVars.separators.opacity5};
|
|
108
|
+
min-width: 0;
|
|
109
|
+
`,
|
|
110
|
+
mobilePopupContentClassName
|
|
111
|
+
)}
|
|
112
|
+
>
|
|
113
|
+
{content}
|
|
114
|
+
</div>
|
|
115
|
+
</>
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const res = (
|
|
119
|
+
<div
|
|
120
|
+
className={cx(
|
|
121
|
+
css`
|
|
122
|
+
position: absolute;
|
|
123
|
+
left: var(${safeAreaInsetLeftVar});
|
|
124
|
+
right: var(${safeAreaInsetRightVar});
|
|
125
|
+
top: var(${safeAreaInsetTopVar});
|
|
126
|
+
bottom: var(${safeAreaInsetBottomVar});
|
|
127
|
+
z-index: ${mobileZIndex};
|
|
128
|
+
`,
|
|
129
|
+
!height && mobileAnimationClassName,
|
|
130
|
+
!height && popupContentClassName,
|
|
131
|
+
height &&
|
|
132
|
+
css`
|
|
133
|
+
display: grid;
|
|
134
|
+
`
|
|
135
|
+
)}
|
|
136
|
+
style={{
|
|
137
|
+
...mobilePopupStyle,
|
|
138
|
+
...(height ? {gridTemplateRows: `1fr ${height}`} : {}),
|
|
139
|
+
}}
|
|
140
|
+
onClick={stopPropagation}
|
|
141
|
+
>
|
|
142
|
+
{height ? (
|
|
143
|
+
<>
|
|
144
|
+
<div
|
|
145
|
+
onClick={onClose}
|
|
146
|
+
className={css`
|
|
147
|
+
background-color: ${themeVars.modalBg};
|
|
148
|
+
`}
|
|
149
|
+
/>
|
|
150
|
+
<div
|
|
151
|
+
className={cx(
|
|
152
|
+
css`
|
|
153
|
+
display: grid;
|
|
154
|
+
grid-template-rows: 60px 1fr;
|
|
155
|
+
`,
|
|
156
|
+
mobileAnimationClassName,
|
|
157
|
+
popupContentClassName
|
|
158
|
+
)}
|
|
159
|
+
>
|
|
160
|
+
{popupContent}
|
|
161
|
+
</div>
|
|
162
|
+
</>
|
|
163
|
+
) : (
|
|
164
|
+
popupContent
|
|
165
|
+
)}
|
|
166
|
+
</div>
|
|
167
|
+
);
|
|
168
|
+
return <ThemeProvider portal>{res}</ThemeProvider>;
|
|
169
|
+
}
|
|
@@ -3,7 +3,7 @@ import {Modifier, ModifierArguments, Placement, Boundary, RootBoundary, Padding,
|
|
|
3
3
|
import maxSize from "popper-max-size-modifier";
|
|
4
4
|
import {getResizeListener} from "@fibery/helpers/utils/resize-listener";
|
|
5
5
|
import {isElementReference} from "./reference";
|
|
6
|
-
import
|
|
6
|
+
import noop from "lodash/noop";
|
|
7
7
|
|
|
8
8
|
type MaxSizeOptions = {
|
|
9
9
|
placement: Placement;
|
|
@@ -65,6 +65,6 @@ export const observeWidth: Modifier<"observeWidth", Record<string, never>> = {
|
|
|
65
65
|
name: "observeWidth",
|
|
66
66
|
enabled: true,
|
|
67
67
|
phase: "main",
|
|
68
|
-
fn:
|
|
68
|
+
fn: noop,
|
|
69
69
|
effect: observeWidthEffect,
|
|
70
70
|
};
|
|
@@ -25,17 +25,16 @@ const [Provider, usePopupStackContext] = createContext<{
|
|
|
25
25
|
|
|
26
26
|
export function PopupStackContextProvider({children}: {children: ReactNode}) {
|
|
27
27
|
useEffect(() => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
});
|
|
28
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
29
|
+
if (event.key === "Escape") {
|
|
30
|
+
const callbacks = [...callbacksMap.values()].filter(Boolean);
|
|
31
|
+
const topmost = callbacks[callbacks.length - 1];
|
|
32
|
+
topmost?.(event);
|
|
33
|
+
}
|
|
35
34
|
};
|
|
36
|
-
document.addEventListener("keydown",
|
|
35
|
+
document.addEventListener("keydown", onKeyDown);
|
|
37
36
|
return () => {
|
|
38
|
-
document.removeEventListener("keydown",
|
|
37
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
39
38
|
};
|
|
40
39
|
}, []);
|
|
41
40
|
return <Provider value={value}>{children}</Provider>;
|
package/src/progress.tsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {Line, Circle, ProgressProps} from "rc-progress";
|
|
2
2
|
import {FC} from "react";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
type CircleProgressProps = ProgressProps;
|
|
5
5
|
|
|
6
6
|
export const CircleProgress: FC<CircleProgressProps> = (props) => {
|
|
7
7
|
return <Circle trailWidth={12} strokeWidth={12} {...props} />;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type ProgressBarProps = ProgressProps;
|
|
11
11
|
|
|
12
12
|
export const ProgressBar: FC<ProgressBarProps> = (props) => {
|
|
13
13
|
return <Line className={props.className} trailWidth={8} strokeWidth={8} {...props} />;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {css} from "@linaria/core";
|
|
2
|
-
import {Fragment, ReactEventHandler, ReactNode, useCallback,
|
|
2
|
+
import {Fragment, ReactEventHandler, ReactNode, useCallback, useRef, useState} from "react";
|
|
3
3
|
import {createPortal} from "react-dom";
|
|
4
4
|
import {fontSize, fontWeight, space, themeVars} from "../design-system";
|
|
5
|
+
import {ThemeProvider} from "../theme-provider";
|
|
5
6
|
import {Emoji} from "../emoji-picker/emoji";
|
|
6
7
|
import {ToggleButton} from "../toggle-button/toggle-button";
|
|
7
8
|
import {Tooltip} from "../tooltip";
|
|
@@ -10,7 +11,7 @@ import {mobileRootSelector, safeAreaInsetBottomVar} from "../mobile-styles";
|
|
|
10
11
|
import {useLongPress} from "../use-long-press";
|
|
11
12
|
import {getWordDivider} from "./get-word-divider";
|
|
12
13
|
import {EmojiTooltipDescription, EmojiTooltipTitle} from "./tootltip";
|
|
13
|
-
import {
|
|
14
|
+
import {tabButton, TabNavLink, TabNavList, TabNavRoot} from "../tab-nav/tab-nav";
|
|
14
15
|
import {AvatarImage} from "../avatar";
|
|
15
16
|
import {getPopupContainerElement} from "../utils-dom";
|
|
16
17
|
|
|
@@ -46,7 +47,12 @@ const overlayClassName = css`
|
|
|
46
47
|
`;
|
|
47
48
|
|
|
48
49
|
function TouchOverlay({onClick}: {onClick: () => void}) {
|
|
49
|
-
return createPortal(
|
|
50
|
+
return createPortal(
|
|
51
|
+
<ThemeProvider portal>
|
|
52
|
+
<div className={overlayClassName} onClick={onClick} />
|
|
53
|
+
</ThemeProvider>,
|
|
54
|
+
getPopupContainerElement()
|
|
55
|
+
);
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
function MobileOverlay({content, onClose}: {content: ReactNode; onClose: () => void}) {
|
|
@@ -57,7 +63,7 @@ function MobileOverlay({content, onClose}: {content: ReactNode; onClose: () => v
|
|
|
57
63
|
},
|
|
58
64
|
[onClose]
|
|
59
65
|
);
|
|
60
|
-
|
|
66
|
+
const res = (
|
|
61
67
|
<div className={overlayClassName}>
|
|
62
68
|
<div
|
|
63
69
|
onPointerDown={handleClose}
|
|
@@ -79,9 +85,9 @@ function MobileOverlay({content, onClose}: {content: ReactNode; onClose: () => v
|
|
|
79
85
|
>
|
|
80
86
|
{content}
|
|
81
87
|
</div>
|
|
82
|
-
</div
|
|
83
|
-
getPopupContainerElement()
|
|
88
|
+
</div>
|
|
84
89
|
);
|
|
90
|
+
return createPortal(<ThemeProvider portal>{res}</ThemeProvider>, getPopupContainerElement());
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
const navLinkClassName = css`
|