@spothero/ui 25.6.0 → 25.12.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/dist/components/Accordion/styles/index.d.ts +13 -89
- package/dist/components/Alert/Alert.d.ts +33 -0
- package/dist/components/Badge/Badge.d.ts +1 -0
- package/dist/components/Badge/styles/index.d.ts +11 -75
- package/dist/components/Button/Button.d.ts +27 -0
- package/dist/components/Button/Button.styles.d.ts +174 -553
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/styles/index.d.ts +4 -200
- package/dist/components/Divider/Divider.styles.d.ts +5 -31
- package/dist/components/Drawer/Drawer.d.ts +10 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/styles/index.d.ts +4 -149
- package/dist/components/Grid/Grid.d.ts +10 -0
- package/dist/components/Grid/Grid.styles.d.ts +10 -0
- package/dist/components/Grid/GridItem.d.ts +8 -0
- package/dist/components/Grid/GridItem.styles.d.ts +3 -3
- package/dist/components/Heading/Heading.d.ts +9 -0
- package/dist/components/Heading/Heading.styles.d.ts +12 -65
- package/dist/components/Image/Image.d.ts +21 -0
- package/dist/components/Input/Input.d.ts +12 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/styles/index.d.ts +3 -217
- package/dist/components/Link/Link.d.ts +1 -0
- package/dist/components/Link/Link.styles.d.ts +11 -84
- package/dist/components/List/List.d.ts +25 -0
- package/dist/components/List/index.d.ts +2 -0
- package/dist/components/List/styles/index.d.ts +4 -32
- package/dist/components/List/styles/item.styles.d.ts +3 -3
- package/dist/components/Loader/Loader.d.ts +13 -0
- package/dist/components/Modal/styles/footer.d.ts +6 -0
- package/dist/components/Modal/styles/index.d.ts +13 -0
- package/dist/components/Progress/Progress.d.ts +8 -0
- package/dist/components/Progress/Progress.styles.d.ts +4 -75
- package/dist/components/Radio/Radio.d.ts +9 -0
- package/dist/components/Radio/RadioGroup.d.ts +14 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/styles/index.d.ts +43 -277
- package/dist/components/RefreshedInput/Button/styles/index.d.ts +1 -263
- package/dist/components/RefreshedInput/Input/styles/index.d.ts +2 -254
- package/dist/components/RefreshedInput/Select/styles/index.d.ts +2 -71
- package/dist/components/Select/Select.d.ts +11 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/styles/index.d.ts +28 -218
- package/dist/components/Skeleton/Skeleton.styles.d.ts +4 -26
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +21 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Switch/styles/index.d.ts +4 -116
- package/dist/components/Table/Table.styles.d.ts +1 -4
- package/dist/components/Text/Text.d.ts +11 -0
- package/dist/components/Text/Text.styles.d.ts +29 -30
- package/dist/components/Text/combineAsWithVariant.d.ts +101 -0
- package/dist/components/Text/options.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +12 -0
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/Textarea/styles/index.d.ts +3 -0
- package/dist/index.cjs.js +2659 -3037
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +364 -59
- package/dist/index.esm.js +3088 -3467
- package/dist/index.esm.js.map +1 -1
- package/dist/theme/base/animation.d.ts +217 -0
- package/dist/theme/base/colors.d.ts +29 -13
- package/dist/theme/base/index.d.ts +1 -0
- package/dist/theme/base/notifications.d.ts +3 -3
- package/dist/types/forwardRefComponent.d.ts +2 -0
- package/package.json +8 -7
|
@@ -1,116 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
baseStyle: (props: any) => {
|
|
7
|
-
container: {
|
|
8
|
-
[x: string]: string | {
|
|
9
|
-
[x: string]: string;
|
|
10
|
-
};
|
|
11
|
-
_rtl: {
|
|
12
|
-
[x: string]: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
track: {
|
|
16
|
-
[x: string]: string | string[] | {
|
|
17
|
-
[x: string]: string;
|
|
18
|
-
boxShadow?: undefined;
|
|
19
|
-
opacity?: undefined;
|
|
20
|
-
cursor?: undefined;
|
|
21
|
-
_dark?: undefined;
|
|
22
|
-
} | {
|
|
23
|
-
boxShadow: string;
|
|
24
|
-
opacity?: undefined;
|
|
25
|
-
cursor?: undefined;
|
|
26
|
-
_dark?: undefined;
|
|
27
|
-
} | {
|
|
28
|
-
opacity: number;
|
|
29
|
-
cursor: string;
|
|
30
|
-
boxShadow?: undefined;
|
|
31
|
-
_dark?: undefined;
|
|
32
|
-
} | {
|
|
33
|
-
[x: string]: string | {
|
|
34
|
-
[x: string]: string;
|
|
35
|
-
};
|
|
36
|
-
_dark: {
|
|
37
|
-
[x: string]: string;
|
|
38
|
-
};
|
|
39
|
-
boxShadow?: undefined;
|
|
40
|
-
opacity?: undefined;
|
|
41
|
-
cursor?: undefined;
|
|
42
|
-
};
|
|
43
|
-
borderRadius: string;
|
|
44
|
-
p: string;
|
|
45
|
-
width: string[];
|
|
46
|
-
height: string[];
|
|
47
|
-
transitionProperty: string;
|
|
48
|
-
transitionDuration: string;
|
|
49
|
-
_dark: {
|
|
50
|
-
[x: string]: string;
|
|
51
|
-
};
|
|
52
|
-
_focusVisible: {
|
|
53
|
-
boxShadow: string;
|
|
54
|
-
};
|
|
55
|
-
_disabled: {
|
|
56
|
-
opacity: number;
|
|
57
|
-
cursor: string;
|
|
58
|
-
};
|
|
59
|
-
_checked: {
|
|
60
|
-
[x: string]: string | {
|
|
61
|
-
[x: string]: string;
|
|
62
|
-
};
|
|
63
|
-
_dark: {
|
|
64
|
-
[x: string]: string;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
bg: string;
|
|
68
|
-
};
|
|
69
|
-
thumb: {
|
|
70
|
-
bg: string;
|
|
71
|
-
transitionProperty: string;
|
|
72
|
-
transitionDuration: string;
|
|
73
|
-
borderRadius: string;
|
|
74
|
-
width: string[];
|
|
75
|
-
height: string[];
|
|
76
|
-
_checked: {
|
|
77
|
-
transform: string;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
} & {
|
|
81
|
-
track: {
|
|
82
|
-
overflow: string;
|
|
83
|
-
};
|
|
84
|
-
thumb: {
|
|
85
|
-
transition: string;
|
|
86
|
-
boxShadow: string;
|
|
87
|
-
_hover: {
|
|
88
|
-
boxShadow: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
sizes?: {
|
|
93
|
-
sm: {
|
|
94
|
-
container: {
|
|
95
|
-
[x: string]: string;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
md: {
|
|
99
|
-
container: {
|
|
100
|
-
[x: string]: string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
lg: {
|
|
104
|
-
container: {
|
|
105
|
-
[x: string]: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
} | undefined;
|
|
109
|
-
variants?: {
|
|
110
|
-
[key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
|
|
111
|
-
keys: ("container" | "label" | "track" | "thumb")[];
|
|
112
|
-
}>;
|
|
113
|
-
} | undefined;
|
|
114
|
-
parts: ("container" | "label" | "track" | "thumb")[];
|
|
115
|
-
};
|
|
116
|
-
export default _default;
|
|
1
|
+
import { theme as chakraDefaultTheme } from '@chakra-ui/react';
|
|
2
|
+
type SwitchStyle = NonNullable<typeof chakraDefaultTheme.components.Switch>;
|
|
3
|
+
declare const switchStyle: SwitchStyle;
|
|
4
|
+
export default switchStyle;
|
|
@@ -38,10 +38,7 @@ declare namespace baseStyle {
|
|
|
38
38
|
}
|
|
39
39
|
export namespace th {
|
|
40
40
|
let fontFamily: string;
|
|
41
|
-
let fontSize:
|
|
42
|
-
base: "1rem";
|
|
43
|
-
desktop: "1.25rem";
|
|
44
|
-
};
|
|
41
|
+
let fontSize: unknown;
|
|
45
42
|
let fontWeight: string;
|
|
46
43
|
let letterSpacing: string;
|
|
47
44
|
let padding: number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextProps as ChakraTextProps } from '@chakra-ui/react';
|
|
3
|
+
import { variants } from './Text.styles';
|
|
4
|
+
import type { ForwardRefComponent } from '../../types/forwardRefComponent';
|
|
5
|
+
type TextVariant = keyof typeof variants;
|
|
6
|
+
export interface TextProps extends Omit<ChakraTextProps, 'as' | 'variant'> {
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
variant?: TextVariant;
|
|
9
|
+
}
|
|
10
|
+
declare const Text: ForwardRefComponent<HTMLElement, TextProps>;
|
|
11
|
+
export default Text;
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export default _default;
|
|
1
|
+
import type { StyleConfig } from '@chakra-ui/react';
|
|
2
|
+
export declare const variants: {
|
|
3
|
+
body: {
|
|
4
|
+
fontSize: {
|
|
5
|
+
base: "1rem";
|
|
6
|
+
desktop: "1rem";
|
|
7
|
+
};
|
|
8
|
+
lineHeight: number;
|
|
9
|
+
fontWeight: 400;
|
|
10
|
+
};
|
|
11
|
+
body2: {
|
|
12
|
+
fontSize: {
|
|
13
|
+
base: "0.875rem";
|
|
14
|
+
desktop: "0.875rem";
|
|
15
|
+
};
|
|
16
|
+
lineHeight: number;
|
|
17
|
+
fontWeight: 400;
|
|
18
|
+
};
|
|
19
|
+
caption: {
|
|
20
|
+
fontSize: {
|
|
21
|
+
base: "0.75rem";
|
|
22
|
+
desktop: "0.75rem";
|
|
23
|
+
};
|
|
24
|
+
lineHeight: number;
|
|
25
|
+
fontWeight: 400;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
declare const textStyle: StyleConfig;
|
|
29
|
+
export default textStyle;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { variants } from './Text.styles';
|
|
2
|
+
type TextVariant = keyof typeof variants;
|
|
3
|
+
/**
|
|
4
|
+
* ### `combineAsWithVariant`
|
|
5
|
+
* A function that takes in the `as` value (the HTML element to render the Text component as), and the
|
|
6
|
+
* `variant` value. The default-like styling for the `as` prop is merged with the styling from the
|
|
7
|
+
* `variant` and a combined styleProp object is returned.
|
|
8
|
+
*
|
|
9
|
+
* By default the `as` property only effects the underlying semantics of the markup, whereas the
|
|
10
|
+
* `variant` only effects the visual styling of the text. In order for the text component to be built
|
|
11
|
+
* with accessibility and ease-of-use in mind, these two properties _should_ be interconnected. Having
|
|
12
|
+
* the style and markup unified allows an experience that is accessible to those using screen-readers
|
|
13
|
+
* (or any other assistive technology) that matches (or is at least a close approximation) of the
|
|
14
|
+
* "standard" visual experience.
|
|
15
|
+
*
|
|
16
|
+
* @function combineAsWithVariant
|
|
17
|
+
* @param {string} args.as - The HTML element to render the Text component as
|
|
18
|
+
* @param {string} args.variant - The style variant for the Text component
|
|
19
|
+
* @returns {Object} An object containing the merged styleProps from the `variant` and the `as` props
|
|
20
|
+
*/
|
|
21
|
+
declare const combineAsWithVariant: ({ as, variant }: {
|
|
22
|
+
as?: string;
|
|
23
|
+
variant: TextVariant;
|
|
24
|
+
}) => {
|
|
25
|
+
fontWeight: 600;
|
|
26
|
+
fontSize: {
|
|
27
|
+
base: "1rem";
|
|
28
|
+
desktop: "1rem";
|
|
29
|
+
};
|
|
30
|
+
lineHeight: number;
|
|
31
|
+
} | {
|
|
32
|
+
fontWeight: 600;
|
|
33
|
+
fontSize: {
|
|
34
|
+
base: "0.875rem";
|
|
35
|
+
desktop: "0.875rem";
|
|
36
|
+
};
|
|
37
|
+
lineHeight: number;
|
|
38
|
+
} | {
|
|
39
|
+
fontWeight: 600;
|
|
40
|
+
fontSize: {
|
|
41
|
+
base: "0.75rem";
|
|
42
|
+
desktop: "0.75rem";
|
|
43
|
+
};
|
|
44
|
+
lineHeight: number;
|
|
45
|
+
} | {
|
|
46
|
+
fontStyle: string;
|
|
47
|
+
fontSize: {
|
|
48
|
+
base: "1rem";
|
|
49
|
+
desktop: "1rem";
|
|
50
|
+
};
|
|
51
|
+
lineHeight: number;
|
|
52
|
+
fontWeight: 400;
|
|
53
|
+
} | {
|
|
54
|
+
fontStyle: string;
|
|
55
|
+
fontSize: {
|
|
56
|
+
base: "0.875rem";
|
|
57
|
+
desktop: "0.875rem";
|
|
58
|
+
};
|
|
59
|
+
lineHeight: number;
|
|
60
|
+
fontWeight: 400;
|
|
61
|
+
} | {
|
|
62
|
+
fontStyle: string;
|
|
63
|
+
fontSize: {
|
|
64
|
+
base: "0.75rem";
|
|
65
|
+
desktop: "0.75rem";
|
|
66
|
+
};
|
|
67
|
+
lineHeight: number;
|
|
68
|
+
fontWeight: 400;
|
|
69
|
+
} | {
|
|
70
|
+
textDecoration: string;
|
|
71
|
+
fontSize: {
|
|
72
|
+
base: "1rem";
|
|
73
|
+
desktop: "1rem";
|
|
74
|
+
};
|
|
75
|
+
lineHeight: number;
|
|
76
|
+
fontWeight: 400;
|
|
77
|
+
} | {
|
|
78
|
+
textDecoration: string;
|
|
79
|
+
fontSize: {
|
|
80
|
+
base: "0.875rem";
|
|
81
|
+
desktop: "0.875rem";
|
|
82
|
+
};
|
|
83
|
+
lineHeight: number;
|
|
84
|
+
fontWeight: 400;
|
|
85
|
+
} | {
|
|
86
|
+
textDecoration: string;
|
|
87
|
+
fontSize: {
|
|
88
|
+
base: "0.75rem";
|
|
89
|
+
desktop: "0.75rem";
|
|
90
|
+
};
|
|
91
|
+
lineHeight: number;
|
|
92
|
+
fontWeight: 400;
|
|
93
|
+
} | {
|
|
94
|
+
fontSize: {
|
|
95
|
+
base: string;
|
|
96
|
+
desktop: string;
|
|
97
|
+
};
|
|
98
|
+
lineHeight: number;
|
|
99
|
+
fontWeight: 400;
|
|
100
|
+
};
|
|
101
|
+
export default combineAsWithVariant;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextareaProps as ChakraTextareaProps } from '@chakra-ui/react';
|
|
3
|
+
export interface TextareaProps extends ChakraTextareaProps {
|
|
4
|
+
id: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
isOptional?: boolean;
|
|
9
|
+
customRequiredText?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
12
|
+
export default Textarea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Textarea';
|