@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.
Files changed (69) hide show
  1. package/dist/components/Accordion/styles/index.d.ts +13 -89
  2. package/dist/components/Alert/Alert.d.ts +33 -0
  3. package/dist/components/Badge/Badge.d.ts +1 -0
  4. package/dist/components/Badge/styles/index.d.ts +11 -75
  5. package/dist/components/Button/Button.d.ts +27 -0
  6. package/dist/components/Button/Button.styles.d.ts +174 -553
  7. package/dist/components/Button/index.d.ts +2 -0
  8. package/dist/components/Checkbox/Checkbox.d.ts +10 -0
  9. package/dist/components/Checkbox/index.d.ts +1 -0
  10. package/dist/components/Checkbox/styles/index.d.ts +4 -200
  11. package/dist/components/Divider/Divider.styles.d.ts +5 -31
  12. package/dist/components/Drawer/Drawer.d.ts +10 -0
  13. package/dist/components/Drawer/index.d.ts +2 -0
  14. package/dist/components/Drawer/styles/index.d.ts +4 -149
  15. package/dist/components/Grid/Grid.d.ts +10 -0
  16. package/dist/components/Grid/Grid.styles.d.ts +10 -0
  17. package/dist/components/Grid/GridItem.d.ts +8 -0
  18. package/dist/components/Grid/GridItem.styles.d.ts +3 -3
  19. package/dist/components/Heading/Heading.d.ts +9 -0
  20. package/dist/components/Heading/Heading.styles.d.ts +12 -65
  21. package/dist/components/Image/Image.d.ts +21 -0
  22. package/dist/components/Input/Input.d.ts +12 -0
  23. package/dist/components/Input/index.d.ts +1 -0
  24. package/dist/components/Input/styles/index.d.ts +3 -217
  25. package/dist/components/Link/Link.d.ts +1 -0
  26. package/dist/components/Link/Link.styles.d.ts +11 -84
  27. package/dist/components/List/List.d.ts +25 -0
  28. package/dist/components/List/index.d.ts +2 -0
  29. package/dist/components/List/styles/index.d.ts +4 -32
  30. package/dist/components/List/styles/item.styles.d.ts +3 -3
  31. package/dist/components/Loader/Loader.d.ts +13 -0
  32. package/dist/components/Modal/styles/footer.d.ts +6 -0
  33. package/dist/components/Modal/styles/index.d.ts +13 -0
  34. package/dist/components/Progress/Progress.d.ts +8 -0
  35. package/dist/components/Progress/Progress.styles.d.ts +4 -75
  36. package/dist/components/Radio/Radio.d.ts +9 -0
  37. package/dist/components/Radio/RadioGroup.d.ts +14 -0
  38. package/dist/components/Radio/index.d.ts +2 -0
  39. package/dist/components/Radio/styles/index.d.ts +43 -277
  40. package/dist/components/RefreshedInput/Button/styles/index.d.ts +1 -263
  41. package/dist/components/RefreshedInput/Input/styles/index.d.ts +2 -254
  42. package/dist/components/RefreshedInput/Select/styles/index.d.ts +2 -71
  43. package/dist/components/Select/Select.d.ts +11 -0
  44. package/dist/components/Select/index.d.ts +1 -0
  45. package/dist/components/Select/styles/index.d.ts +28 -218
  46. package/dist/components/Skeleton/Skeleton.styles.d.ts +4 -26
  47. package/dist/components/Skeleton/index.d.ts +1 -0
  48. package/dist/components/Switch/Switch.d.ts +21 -0
  49. package/dist/components/Switch/index.d.ts +1 -0
  50. package/dist/components/Switch/styles/index.d.ts +4 -116
  51. package/dist/components/Table/Table.styles.d.ts +1 -4
  52. package/dist/components/Text/Text.d.ts +11 -0
  53. package/dist/components/Text/Text.styles.d.ts +29 -30
  54. package/dist/components/Text/combineAsWithVariant.d.ts +101 -0
  55. package/dist/components/Text/options.d.ts +2 -0
  56. package/dist/components/Textarea/Textarea.d.ts +12 -0
  57. package/dist/components/Textarea/index.d.ts +1 -0
  58. package/dist/components/Textarea/styles/index.d.ts +3 -0
  59. package/dist/index.cjs.js +2659 -3037
  60. package/dist/index.cjs.js.map +1 -1
  61. package/dist/index.d.ts +364 -59
  62. package/dist/index.esm.js +3088 -3467
  63. package/dist/index.esm.js.map +1 -1
  64. package/dist/theme/base/animation.d.ts +217 -0
  65. package/dist/theme/base/colors.d.ts +29 -13
  66. package/dist/theme/base/index.d.ts +1 -0
  67. package/dist/theme/base/notifications.d.ts +3 -3
  68. package/dist/types/forwardRefComponent.d.ts +2 -0
  69. package/package.json +8 -7
@@ -1,116 +1,4 @@
1
- declare const _default: {
2
- defaultProps: {
3
- colorScheme: string;
4
- size: string;
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
- export namespace variants {
2
- namespace body {
3
- namespace fontSize {
4
- let base: "1rem";
5
- let desktop: "1rem";
6
- }
7
- let lineHeight: number;
8
- let fontWeight: 400;
9
- }
10
- namespace body2 {
11
- export namespace fontSize_1 {
12
- let base_1: "0.875rem";
13
- export { base_1 as base };
14
- let desktop_1: "0.875rem";
15
- export { desktop_1 as desktop };
16
- }
17
- export { fontSize_1 as fontSize };
18
- }
19
- namespace caption {
20
- export namespace fontSize_2 {
21
- let base_2: "0.75rem";
22
- export { base_2 as base };
23
- let desktop_2: "0.75rem";
24
- export { desktop_2 as desktop };
25
- }
26
- export { fontSize_2 as fontSize };
27
- }
28
- }
29
- declare const _default: any;
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,2 @@
1
+ declare const options: string[];
2
+ export default options;
@@ -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';
@@ -0,0 +1,3 @@
1
+ import type { StyleConfig } from '@chakra-ui/react';
2
+ declare const textareaStyle: StyleConfig;
3
+ export default textareaStyle;