@spothero/ui 25.12.0 → 25.15.0-beta.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/dist/components/Button/Button.styles.d.ts +46 -0
- package/dist/components/Modal/AlwaysMountedModal.d.ts +7 -0
- package/dist/components/Modal/Modal.d.ts +17 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/styles/body.d.ts +3 -6
- package/dist/components/Modal/styles/closeButton.d.ts +3 -4
- package/dist/components/Modal/styles/dialog.d.ts +3 -4
- package/dist/components/Modal/styles/dialogContainer.d.ts +12 -12
- package/dist/components/Modal/styles/footer.d.ts +12 -12
- package/dist/components/Modal/styles/header.d.ts +4 -6
- package/dist/components/Modal/styles/index.d.ts +4 -240
- package/dist/components/Modal/styles/overlay.d.ts +5 -5
- package/dist/components/Modal/types.d.ts +6 -0
- package/dist/components/Popover/Popover.d.ts +10 -0
- package/dist/components/Popover/PopoverArrow.d.ts +7 -0
- package/dist/components/Popover/PopoverCloseButton.d.ts +7 -0
- package/dist/components/Popover/PopoverContent.d.ts +15 -0
- package/dist/components/Popover/index.d.ts +4 -0
- package/dist/components/Popover/styles/index.d.ts +4 -100
- package/dist/components/Popover/styles/popover-arrow.d.ts +5 -0
- package/dist/components/Popover/styles/popover-body.d.ts +3 -2
- package/dist/components/Popover/styles/popover-close-button.d.ts +18 -0
- package/dist/components/Popover/styles/popover-content.d.ts +8 -5
- package/dist/components/Popover/styles/popover-header.d.ts +4 -4
- package/dist/components/Popover/styles/popper.d.ts +3 -3
- package/dist/components/Popover/types.d.ts +4 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +17 -0
- package/dist/index.cjs.js +386 -541
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +75 -11
- package/dist/index.esm.js +387 -542
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/Spaces.d.ts +8 -0
- package/package.json +4 -4
|
@@ -78,6 +78,26 @@ export declare const variants: {
|
|
|
78
78
|
readonly bg: string;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
|
+
readonly iconSecondary: {
|
|
82
|
+
readonly bg: "white";
|
|
83
|
+
readonly borderColor: "gray.medium";
|
|
84
|
+
readonly color: "black";
|
|
85
|
+
readonly minW: "unset";
|
|
86
|
+
readonly px: 3;
|
|
87
|
+
readonly py: 3;
|
|
88
|
+
readonly _hover: {
|
|
89
|
+
readonly _disabled: {
|
|
90
|
+
bg: string;
|
|
91
|
+
borderColor: string;
|
|
92
|
+
color: string;
|
|
93
|
+
};
|
|
94
|
+
readonly bg: string;
|
|
95
|
+
readonly color: "black";
|
|
96
|
+
};
|
|
97
|
+
readonly _active: {
|
|
98
|
+
readonly bg: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
81
101
|
readonly secondaryOnDark: {
|
|
82
102
|
readonly bg: "none";
|
|
83
103
|
readonly borderColor: "white";
|
|
@@ -120,6 +140,32 @@ export declare const variants: {
|
|
|
120
140
|
};
|
|
121
141
|
};
|
|
122
142
|
};
|
|
143
|
+
readonly iconTertiary: {
|
|
144
|
+
readonly bg: "none";
|
|
145
|
+
readonly borderWidth: "none";
|
|
146
|
+
readonly borderRadius: "unset";
|
|
147
|
+
readonly color: "black";
|
|
148
|
+
readonly h: "unset";
|
|
149
|
+
readonly m: "unset";
|
|
150
|
+
readonly minW: "unset";
|
|
151
|
+
readonly px: 2;
|
|
152
|
+
readonly py: 2;
|
|
153
|
+
readonly lineHeight: 1;
|
|
154
|
+
readonly _disabled: {
|
|
155
|
+
readonly bg: "none";
|
|
156
|
+
readonly color: "gray.dark";
|
|
157
|
+
};
|
|
158
|
+
readonly _hover: {
|
|
159
|
+
readonly _disabled: {
|
|
160
|
+
readonly color: "gray.dark";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly _active: {
|
|
164
|
+
readonly _disabled: {
|
|
165
|
+
readonly color: "gray.dark";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
123
169
|
readonly tertiaryOnDark: {
|
|
124
170
|
readonly bg: "none";
|
|
125
171
|
readonly borderRadius: "unset";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ForwardRefComponent } from '../../types/forwardRefComponent';
|
|
2
|
+
import type { ModalProps } from './Modal';
|
|
3
|
+
export interface AlwaysMountedModalProps extends ModalProps {
|
|
4
|
+
onCloseComplete?: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare const AlwaysMountedModal: ForwardRefComponent<HTMLDivElement, AlwaysMountedModalProps>;
|
|
7
|
+
export default AlwaysMountedModal;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ModalOverlay, ModalContent, Modal as ChakraModal } from '@chakra-ui/react';
|
|
3
|
+
import type { ForwardRefComponent } from '../../types/forwardRefComponent';
|
|
4
|
+
import type { ModalSize, ModalStyleProps } from './types';
|
|
5
|
+
type ChakraModalProps = Omit<React.ComponentProps<typeof ChakraModal>, 'children' | 'size'>;
|
|
6
|
+
type ModalContentProps = React.ComponentProps<typeof ModalContent>;
|
|
7
|
+
type ModalOverlayProps = React.ComponentProps<typeof ModalOverlay>;
|
|
8
|
+
export interface ModalProps extends ChakraModalProps, ModalStyleProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
size?: ModalSize;
|
|
12
|
+
isMobile?: boolean;
|
|
13
|
+
contentStyling?: ModalContentProps;
|
|
14
|
+
overlayProps?: ModalOverlayProps;
|
|
15
|
+
}
|
|
16
|
+
declare const Modal: ForwardRefComponent<HTMLDivElement, ModalProps>;
|
|
17
|
+
export default Modal;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
hasHeader: any;
|
|
4
|
-
hideCloseButton: any;
|
|
5
|
-
}): {
|
|
1
|
+
import type { ModalStyleProps } from '../types';
|
|
2
|
+
declare const body: ({ hasFooter, hasHeader, hideCloseButton }: ModalStyleProps) => {
|
|
6
3
|
background: string;
|
|
7
4
|
backgroundRepeat: string;
|
|
8
5
|
backgroundColor: string;
|
|
@@ -27,4 +24,4 @@ declare function _default({ hasFooter, hasHeader, hideCloseButton }: {
|
|
|
27
24
|
overflow: string;
|
|
28
25
|
display: string;
|
|
29
26
|
};
|
|
30
|
-
export default
|
|
27
|
+
export default body;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}): {
|
|
1
|
+
import type { ModalStyleProps } from '../types';
|
|
2
|
+
declare const closeButton: ({ hasHeader }: ModalStyleProps) => {
|
|
4
3
|
position: string;
|
|
5
4
|
top: number;
|
|
6
5
|
insetEnd: number;
|
|
@@ -15,4 +14,4 @@ declare function _default({ hasHeader }: {
|
|
|
15
14
|
bg: string;
|
|
16
15
|
};
|
|
17
16
|
};
|
|
18
|
-
export default
|
|
17
|
+
export default closeButton;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}): {
|
|
1
|
+
import type { ModalStyleProps } from '../types';
|
|
2
|
+
declare const dialog: ({ hasFooter }: ModalStyleProps) => {
|
|
4
3
|
borderRadius: string;
|
|
5
4
|
borderBottomRadius: {
|
|
6
5
|
base: string;
|
|
@@ -13,4 +12,4 @@ declare function _default({ hasFooter }: {
|
|
|
13
12
|
boxShadow: string;
|
|
14
13
|
paddingBottom: number;
|
|
15
14
|
};
|
|
16
|
-
export default
|
|
15
|
+
export default dialog;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export default
|
|
1
|
+
declare const dialogContainer: {
|
|
2
|
+
readonly display: "flex";
|
|
3
|
+
readonly zIndex: "layer8";
|
|
4
|
+
readonly justifyContent: "center";
|
|
5
|
+
readonly alignItems: {
|
|
6
|
+
readonly base: "flex-end";
|
|
7
|
+
readonly tablet: "center";
|
|
8
|
+
};
|
|
9
|
+
readonly height: "100%";
|
|
10
|
+
readonly minHeight: "fill-available";
|
|
11
|
+
};
|
|
12
|
+
export default dialogContainer;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export default
|
|
1
|
+
declare const footer: {
|
|
2
|
+
readonly borderTop: "1px";
|
|
3
|
+
readonly borderColor: "gray.100";
|
|
4
|
+
readonly padding: 4;
|
|
5
|
+
readonly gap: 4;
|
|
6
|
+
readonly justifyContent: "flex-start";
|
|
7
|
+
readonly flexDirection: {
|
|
8
|
+
readonly base: "column";
|
|
9
|
+
readonly desktop: "row-reverse";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default footer;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
hasHeader: any;
|
|
4
|
-
}): {
|
|
1
|
+
import type { ModalStyleProps } from '../types';
|
|
2
|
+
declare const header: ({ hideCloseButton, hasHeader }: ModalStyleProps) => {
|
|
5
3
|
padding: number;
|
|
6
4
|
fontSize: string;
|
|
7
5
|
fontWeight: string;
|
|
8
|
-
minHeight: number |
|
|
6
|
+
minHeight: number | undefined;
|
|
9
7
|
};
|
|
10
|
-
export default
|
|
8
|
+
export default header;
|
|
@@ -1,240 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
zIndex: string;
|
|
6
|
-
};
|
|
7
|
-
dialogContainer: {
|
|
8
|
-
display: string;
|
|
9
|
-
zIndex: string;
|
|
10
|
-
justifyContent: string;
|
|
11
|
-
alignItems: string;
|
|
12
|
-
overflow: string;
|
|
13
|
-
overscrollBehaviorY: string;
|
|
14
|
-
};
|
|
15
|
-
dialog: {
|
|
16
|
-
[x: string]: string | {
|
|
17
|
-
[x: string]: string;
|
|
18
|
-
} | undefined;
|
|
19
|
-
borderRadius: string;
|
|
20
|
-
color: string;
|
|
21
|
-
my: string;
|
|
22
|
-
mx: string | undefined;
|
|
23
|
-
zIndex: string;
|
|
24
|
-
maxH: string | undefined;
|
|
25
|
-
_dark: {
|
|
26
|
-
[x: string]: string;
|
|
27
|
-
};
|
|
28
|
-
bg: string;
|
|
29
|
-
boxShadow: string;
|
|
30
|
-
};
|
|
31
|
-
header: {
|
|
32
|
-
px: string;
|
|
33
|
-
py: string;
|
|
34
|
-
fontSize: string;
|
|
35
|
-
fontWeight: string;
|
|
36
|
-
};
|
|
37
|
-
closeButton: {
|
|
38
|
-
position: string;
|
|
39
|
-
top: string;
|
|
40
|
-
insetEnd: string;
|
|
41
|
-
};
|
|
42
|
-
body: {
|
|
43
|
-
px: string;
|
|
44
|
-
py: string;
|
|
45
|
-
flex: string;
|
|
46
|
-
overflow: string | undefined;
|
|
47
|
-
};
|
|
48
|
-
footer: {
|
|
49
|
-
px: string;
|
|
50
|
-
py: string;
|
|
51
|
-
};
|
|
52
|
-
}) | undefined;
|
|
53
|
-
sizes?: {
|
|
54
|
-
xs: {
|
|
55
|
-
dialog: {
|
|
56
|
-
maxW: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
sm: {
|
|
60
|
-
dialog: {
|
|
61
|
-
maxW: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
md: {
|
|
65
|
-
dialog: {
|
|
66
|
-
maxW: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
lg: {
|
|
70
|
-
dialog: {
|
|
71
|
-
maxW: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
xl: {
|
|
75
|
-
dialog: {
|
|
76
|
-
maxW: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
"2xl": {
|
|
80
|
-
dialog: {
|
|
81
|
-
maxW: string;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
"3xl": {
|
|
85
|
-
dialog: {
|
|
86
|
-
maxW: string;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
"4xl": {
|
|
90
|
-
dialog: {
|
|
91
|
-
maxW: string;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
"5xl": {
|
|
95
|
-
dialog: {
|
|
96
|
-
maxW: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
"6xl": {
|
|
100
|
-
dialog: {
|
|
101
|
-
maxW: string;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
full: {
|
|
105
|
-
dialog: {
|
|
106
|
-
maxW: string;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
} | undefined;
|
|
110
|
-
variants?: {
|
|
111
|
-
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
112
|
-
keys: ("overlay" | "dialogContainer" | "dialog" | "header" | "closeButton" | "body" | "footer")[];
|
|
113
|
-
}>;
|
|
114
|
-
} | undefined;
|
|
115
|
-
defaultProps?: {
|
|
116
|
-
size?: "md" | "full" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | undefined;
|
|
117
|
-
variant?: string | number | undefined;
|
|
118
|
-
colorScheme?: string | undefined;
|
|
119
|
-
} | undefined;
|
|
120
|
-
parts: ("overlay" | "dialogContainer" | "dialog" | "header" | "closeButton" | "body" | "footer")[];
|
|
121
|
-
} & {
|
|
122
|
-
baseStyle: (props: any) => {
|
|
123
|
-
overlay: {
|
|
124
|
-
background: string;
|
|
125
|
-
zIndex: string;
|
|
126
|
-
};
|
|
127
|
-
dialogContainer: {
|
|
128
|
-
display: string;
|
|
129
|
-
zIndex: string;
|
|
130
|
-
justifyContent: string;
|
|
131
|
-
alignItems: {
|
|
132
|
-
base: string;
|
|
133
|
-
tablet: string;
|
|
134
|
-
};
|
|
135
|
-
height: string;
|
|
136
|
-
minHeight: string;
|
|
137
|
-
};
|
|
138
|
-
header: {
|
|
139
|
-
padding: number;
|
|
140
|
-
fontSize: string;
|
|
141
|
-
fontWeight: string;
|
|
142
|
-
minHeight: number | null;
|
|
143
|
-
};
|
|
144
|
-
dialog: {
|
|
145
|
-
borderRadius: string;
|
|
146
|
-
borderBottomRadius: {
|
|
147
|
-
base: string;
|
|
148
|
-
tablet: string;
|
|
149
|
-
};
|
|
150
|
-
background: string;
|
|
151
|
-
color: string;
|
|
152
|
-
marginY: number;
|
|
153
|
-
zIndex: string;
|
|
154
|
-
boxShadow: string;
|
|
155
|
-
paddingBottom: number;
|
|
156
|
-
};
|
|
157
|
-
closeButton: {
|
|
158
|
-
position: string;
|
|
159
|
-
top: number;
|
|
160
|
-
insetEnd: number;
|
|
161
|
-
color: string;
|
|
162
|
-
borderRadius: string;
|
|
163
|
-
width: number;
|
|
164
|
-
height: number;
|
|
165
|
-
_focus: {
|
|
166
|
-
boxShadow: string;
|
|
167
|
-
};
|
|
168
|
-
_hover: {
|
|
169
|
-
bg: string;
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
body: {
|
|
173
|
-
background: string;
|
|
174
|
-
backgroundRepeat: string;
|
|
175
|
-
backgroundColor: string;
|
|
176
|
-
backgroundSize: string;
|
|
177
|
-
backgroundAttachment: string;
|
|
178
|
-
borderBottomRadius: string | null;
|
|
179
|
-
paddingX: number;
|
|
180
|
-
paddingBottom: number;
|
|
181
|
-
flex: number;
|
|
182
|
-
overflow: string;
|
|
183
|
-
display: string;
|
|
184
|
-
} | {
|
|
185
|
-
background?: undefined;
|
|
186
|
-
backgroundRepeat?: undefined;
|
|
187
|
-
backgroundColor?: undefined;
|
|
188
|
-
backgroundSize?: undefined;
|
|
189
|
-
backgroundAttachment?: undefined;
|
|
190
|
-
borderBottomRadius: string | null;
|
|
191
|
-
paddingX: number;
|
|
192
|
-
paddingBottom: number;
|
|
193
|
-
flex: number;
|
|
194
|
-
overflow: string;
|
|
195
|
-
display: string;
|
|
196
|
-
};
|
|
197
|
-
footer: {
|
|
198
|
-
borderTop: string;
|
|
199
|
-
borderColor: string;
|
|
200
|
-
padding: number;
|
|
201
|
-
gap: number;
|
|
202
|
-
justifyContent: string;
|
|
203
|
-
flexDirection: {
|
|
204
|
-
base: string;
|
|
205
|
-
desktop: string;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
sizes: {
|
|
210
|
-
sm: {
|
|
211
|
-
dialog: {
|
|
212
|
-
maxWidth: string[];
|
|
213
|
-
maxHeight: string[];
|
|
214
|
-
minHeight: string[];
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
'sm-md': {
|
|
218
|
-
dialog: {
|
|
219
|
-
maxHeight: string[];
|
|
220
|
-
minWidth: (string | number)[];
|
|
221
|
-
maxWidth: string[];
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
md: {
|
|
225
|
-
dialog: {
|
|
226
|
-
maxWidth: string[];
|
|
227
|
-
maxHeight: string[];
|
|
228
|
-
minHeight: string[];
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
lg: {
|
|
232
|
-
dialog: {
|
|
233
|
-
maxWidth: string[];
|
|
234
|
-
maxHeight: string[];
|
|
235
|
-
minHeight: string[];
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
export default _default;
|
|
1
|
+
import { theme as chakraDefaultTheme } from '@chakra-ui/react';
|
|
2
|
+
type ModalStyle = NonNullable<typeof chakraDefaultTheme.components.Modal>;
|
|
3
|
+
declare const modalStyle: ModalStyle;
|
|
4
|
+
export default modalStyle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export default
|
|
1
|
+
declare const overlay: {
|
|
2
|
+
readonly background: "modalOverlay";
|
|
3
|
+
readonly zIndex: "layer8";
|
|
4
|
+
};
|
|
5
|
+
export default overlay;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Popover as ChakraPopover } from '@chakra-ui/react';
|
|
3
|
+
import type { ForwardRefComponent } from '../../types/forwardRefComponent';
|
|
4
|
+
import type { PopoverVariant } from './types';
|
|
5
|
+
export interface PopoverProps extends React.ComponentProps<typeof ChakraPopover> {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
variant?: PopoverVariant;
|
|
8
|
+
}
|
|
9
|
+
declare const Popover: ForwardRefComponent<HTMLDivElement, PopoverProps>;
|
|
10
|
+
export default Popover;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverArrow as ChakraPopoverArrow } from '@chakra-ui/react';
|
|
3
|
+
import type { ForwardRefComponent } from '../../types/forwardRefComponent';
|
|
4
|
+
import type { PopoverVariantProps } from './types';
|
|
5
|
+
export type PopoverArrowProps = React.ComponentProps<typeof ChakraPopoverArrow> & PopoverVariantProps;
|
|
6
|
+
declare const PopoverArrow: ForwardRefComponent<HTMLDivElement, PopoverArrowProps>;
|
|
7
|
+
export default PopoverArrow;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverCloseButton as ChakraPopoverCloseButton } from '@chakra-ui/react';
|
|
3
|
+
import type { ForwardRefComponent } from '../../types/forwardRefComponent';
|
|
4
|
+
import type { PopoverVariantProps } from './types';
|
|
5
|
+
type PopoverCloseButtonProps = React.ComponentProps<typeof ChakraPopoverCloseButton> & PopoverVariantProps;
|
|
6
|
+
declare const PopoverCloseButton: ForwardRefComponent<HTMLButtonElement, PopoverCloseButtonProps>;
|
|
7
|
+
export default PopoverCloseButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverBody, PopoverContent as ChakraPopoverContent } from '@chakra-ui/react';
|
|
3
|
+
import type { ForwardRefComponent } from '../../types/forwardRefComponent';
|
|
4
|
+
import type { PopoverVariant } from './types';
|
|
5
|
+
type PopoverBodyProps = React.ComponentProps<typeof PopoverBody>;
|
|
6
|
+
export type PopoverContentProps = React.ComponentProps<typeof ChakraPopoverContent> & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
hideCloseButton?: boolean;
|
|
9
|
+
hideArrow?: boolean;
|
|
10
|
+
variant?: PopoverVariant;
|
|
11
|
+
header?: React.ReactNode;
|
|
12
|
+
popoverBodyProps?: PopoverBodyProps;
|
|
13
|
+
};
|
|
14
|
+
declare const PopoverContent: ForwardRefComponent<HTMLDivElement, PopoverContentProps>;
|
|
15
|
+
export default PopoverContent;
|
|
@@ -1,100 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
content: {
|
|
7
|
-
[x: string]: string | {
|
|
8
|
-
[x: string]: string;
|
|
9
|
-
outline?: undefined;
|
|
10
|
-
boxShadow?: undefined;
|
|
11
|
-
} | {
|
|
12
|
-
outline: number;
|
|
13
|
-
boxShadow: string;
|
|
14
|
-
};
|
|
15
|
-
bg: string;
|
|
16
|
-
_dark: {
|
|
17
|
-
[x: string]: string;
|
|
18
|
-
};
|
|
19
|
-
width: string;
|
|
20
|
-
border: string;
|
|
21
|
-
borderColor: string;
|
|
22
|
-
borderRadius: string;
|
|
23
|
-
boxShadow: string;
|
|
24
|
-
zIndex: string;
|
|
25
|
-
_focusVisible: {
|
|
26
|
-
outline: number;
|
|
27
|
-
boxShadow: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
header: {
|
|
31
|
-
px: number;
|
|
32
|
-
py: number;
|
|
33
|
-
borderBottomWidth: string;
|
|
34
|
-
};
|
|
35
|
-
body: {
|
|
36
|
-
px: number;
|
|
37
|
-
py: number;
|
|
38
|
-
};
|
|
39
|
-
footer: {
|
|
40
|
-
px: number;
|
|
41
|
-
py: number;
|
|
42
|
-
borderTopWidth: string;
|
|
43
|
-
};
|
|
44
|
-
closeButton: {
|
|
45
|
-
position: string;
|
|
46
|
-
borderRadius: string;
|
|
47
|
-
top: number;
|
|
48
|
-
insetEnd: number;
|
|
49
|
-
padding: number;
|
|
50
|
-
};
|
|
51
|
-
} | undefined;
|
|
52
|
-
sizes?: {
|
|
53
|
-
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
54
|
-
keys: ("content" | "header" | "closeButton" | "body" | "footer" | "popper" | "arrow")[];
|
|
55
|
-
}>;
|
|
56
|
-
} | undefined;
|
|
57
|
-
variants?: {
|
|
58
|
-
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
59
|
-
keys: ("content" | "header" | "closeButton" | "body" | "footer" | "popper" | "arrow")[];
|
|
60
|
-
}>;
|
|
61
|
-
} | undefined;
|
|
62
|
-
defaultProps?: {
|
|
63
|
-
size?: string | number | undefined;
|
|
64
|
-
variant?: string | number | undefined;
|
|
65
|
-
colorScheme?: string | undefined;
|
|
66
|
-
} | undefined;
|
|
67
|
-
parts: ("content" | "header" | "closeButton" | "body" | "footer" | "popper" | "arrow")[];
|
|
68
|
-
} & {
|
|
69
|
-
parts: string[];
|
|
70
|
-
baseStyle: (props: any) => {
|
|
71
|
-
header: {
|
|
72
|
-
marginBottom: number;
|
|
73
|
-
fontWeight: string;
|
|
74
|
-
};
|
|
75
|
-
content: {
|
|
76
|
-
padding: number;
|
|
77
|
-
marginBottom: number;
|
|
78
|
-
maxWidth: string;
|
|
79
|
-
borderRadius: string;
|
|
80
|
-
background: string;
|
|
81
|
-
boxShadow: string;
|
|
82
|
-
color: string;
|
|
83
|
-
borderColor: string;
|
|
84
|
-
borderWidth: string;
|
|
85
|
-
borderStyle: string;
|
|
86
|
-
'--popper-arrow-shadow-color': (t: any) => any;
|
|
87
|
-
zIndex: string;
|
|
88
|
-
_focusVisible: {
|
|
89
|
-
outline: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
body: {
|
|
93
|
-
fontSize: string;
|
|
94
|
-
};
|
|
95
|
-
popper: {
|
|
96
|
-
borderRadius: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
export default _default;
|
|
1
|
+
import { theme as chakraDefaultTheme } from '@chakra-ui/react';
|
|
2
|
+
type PopoverStyle = NonNullable<typeof chakraDefaultTheme.components.Popover>;
|
|
3
|
+
declare const popoverStyle: PopoverStyle;
|
|
4
|
+
export default popoverStyle;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PopoverVariantProps } from '../types';
|
|
2
|
+
declare const closeButtonStyles: ({ variant }: PopoverVariantProps) => {
|
|
3
|
+
color: string;
|
|
4
|
+
fontSize: string;
|
|
5
|
+
position: "absolute";
|
|
6
|
+
top: number;
|
|
7
|
+
right: number;
|
|
8
|
+
padding: number;
|
|
9
|
+
borderTopRightRadius: number;
|
|
10
|
+
_hover: {
|
|
11
|
+
bgColor: string;
|
|
12
|
+
};
|
|
13
|
+
_focus: {
|
|
14
|
+
boxShadow: string;
|
|
15
|
+
bgColor: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default closeButtonStyles;
|