@spothero/ui 25.11.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.
Files changed (34) hide show
  1. package/dist/components/Button/Button.styles.d.ts +46 -0
  2. package/dist/components/Modal/AlwaysMountedModal.d.ts +7 -0
  3. package/dist/components/Modal/Modal.d.ts +17 -0
  4. package/dist/components/Modal/index.d.ts +3 -0
  5. package/dist/components/Modal/styles/body.d.ts +3 -6
  6. package/dist/components/Modal/styles/closeButton.d.ts +3 -4
  7. package/dist/components/Modal/styles/dialog.d.ts +3 -4
  8. package/dist/components/Modal/styles/dialogContainer.d.ts +12 -12
  9. package/dist/components/Modal/styles/footer.d.ts +12 -6
  10. package/dist/components/Modal/styles/header.d.ts +4 -6
  11. package/dist/components/Modal/styles/index.d.ts +4 -227
  12. package/dist/components/Modal/styles/overlay.d.ts +5 -5
  13. package/dist/components/Modal/types.d.ts +6 -0
  14. package/dist/components/Popover/Popover.d.ts +10 -0
  15. package/dist/components/Popover/PopoverArrow.d.ts +7 -0
  16. package/dist/components/Popover/PopoverCloseButton.d.ts +7 -0
  17. package/dist/components/Popover/PopoverContent.d.ts +15 -0
  18. package/dist/components/Popover/index.d.ts +4 -0
  19. package/dist/components/Popover/styles/index.d.ts +4 -100
  20. package/dist/components/Popover/styles/popover-arrow.d.ts +5 -0
  21. package/dist/components/Popover/styles/popover-body.d.ts +3 -2
  22. package/dist/components/Popover/styles/popover-close-button.d.ts +18 -0
  23. package/dist/components/Popover/styles/popover-content.d.ts +8 -5
  24. package/dist/components/Popover/styles/popover-header.d.ts +4 -4
  25. package/dist/components/Popover/styles/popper.d.ts +3 -3
  26. package/dist/components/Popover/types.d.ts +4 -0
  27. package/dist/components/ThemeProvider/ThemeProvider.d.ts +17 -0
  28. package/dist/index.cjs.js +386 -528
  29. package/dist/index.cjs.js.map +1 -1
  30. package/dist/index.d.ts +75 -11
  31. package/dist/index.esm.js +387 -529
  32. package/dist/index.esm.js.map +1 -1
  33. package/dist/utils/Spaces.d.ts +8 -0
  34. 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;
@@ -0,0 +1,3 @@
1
+ export { ModalBody, ModalFooter, ModalHeader } from '@chakra-ui/react';
2
+ export { default as Modal } from './Modal';
3
+ export { default as AlwaysMountedModal } from './AlwaysMountedModal';
@@ -1,8 +1,5 @@
1
- declare function _default({ hasFooter, hasHeader, hideCloseButton }: {
2
- hasFooter: any;
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 _default;
27
+ export default body;
@@ -1,6 +1,5 @@
1
- declare function _default({ hasHeader }: {
2
- hasHeader: any;
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 _default;
17
+ export default closeButton;
@@ -1,6 +1,5 @@
1
- declare function _default({ hasFooter }: {
2
- hasFooter: any;
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 _default;
15
+ export default dialog;
@@ -1,12 +1,12 @@
1
- declare namespace _default {
2
- let display: string;
3
- let zIndex: string;
4
- let justifyContent: string;
5
- namespace alignItems {
6
- let base: string;
7
- let tablet: string;
8
- }
9
- let height: string;
10
- let minHeight: string;
11
- }
12
- export default _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,6 +1,12 @@
1
- declare namespace _default {
2
- let borderTop: string;
3
- let borderColor: string;
4
- let padding: number;
5
- }
6
- export default _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
- declare function _default({ hideCloseButton, hasHeader }: {
2
- hideCloseButton: any;
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 | null;
6
+ minHeight: number | undefined;
9
7
  };
10
- export default _default;
8
+ export default header;
@@ -1,227 +1,4 @@
1
- declare const _default: {
2
- baseStyle?: ((props: import("@chakra-ui/react").StyleFunctionProps) => {
3
- overlay: {
4
- bg: string;
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
- };
202
- };
203
- sizes: {
204
- sm: {
205
- dialog: {
206
- maxWidth: string[];
207
- maxHeight: string[];
208
- minHeight: string[];
209
- };
210
- };
211
- md: {
212
- dialog: {
213
- maxWidth: string[];
214
- maxHeight: string[];
215
- minHeight: string[];
216
- };
217
- };
218
- lg: {
219
- dialog: {
220
- maxWidth: string[];
221
- maxHeight: string[];
222
- minHeight: string[];
223
- };
224
- };
225
- };
226
- };
227
- 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 namespace _default {
2
- let background: string;
3
- let zIndex: string;
4
- }
5
- export default _default;
1
+ declare const overlay: {
2
+ readonly background: "modalOverlay";
3
+ readonly zIndex: "layer8";
4
+ };
5
+ export default overlay;
@@ -0,0 +1,6 @@
1
+ export type ModalSize = 'sm' | 'sm-md' | 'md' | 'lg' | 'full';
2
+ export interface ModalStyleProps {
3
+ hasHeader?: boolean;
4
+ hasFooter?: boolean;
5
+ hideCloseButton?: boolean;
6
+ }
@@ -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;
@@ -0,0 +1,4 @@
1
+ export { PopoverTrigger, PopoverAnchor } from '@chakra-ui/react';
2
+ export { default as Popover } from './Popover';
3
+ export { default as PopoverContent } from './PopoverContent';
4
+ export { default as PopoverArrow } from './PopoverArrow';
@@ -1,100 +1,4 @@
1
- declare const _default: {
2
- baseStyle?: {
3
- popper: {
4
- zIndex: number;
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,5 @@
1
+ import type { PopoverVariantProps } from '../types';
2
+ declare const arrowStyles: ({ variant }: PopoverVariantProps) => {
3
+ backgroundColor: string;
4
+ };
5
+ export default arrowStyles;
@@ -1,4 +1,5 @@
1
- export default body;
2
- declare function body(props: any): {
1
+ import type { PopoverVariantProps } from '../types';
2
+ declare const body: (_props: PopoverVariantProps) => {
3
3
  fontSize: string;
4
4
  };
5
+ export default body;
@@ -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;
@@ -1,7 +1,5 @@
1
- export default popoverContentStyles;
2
- declare function popoverContentStyles({ variant }: {
3
- variant: any;
4
- }): {
1
+ import type { PopoverVariantProps } from '../types';
2
+ declare const popoverContentStyles: ({ variant }: PopoverVariantProps) => {
5
3
  padding: number;
6
4
  marginBottom: number;
7
5
  maxWidth: string;
@@ -12,9 +10,14 @@ declare function popoverContentStyles({ variant }: {
12
10
  borderColor: string;
13
11
  borderWidth: string;
14
12
  borderStyle: string;
15
- '--popper-arrow-shadow-color': (t: any) => any;
13
+ '--popper-arrow-shadow-color': (t: {
14
+ colors: {
15
+ gray: Record<string, string>;
16
+ };
17
+ }) => string;
16
18
  zIndex: string;
17
19
  _focusVisible: {
18
20
  outline: string;
19
21
  };
20
22
  };
23
+ export default popoverContentStyles;