@spothero/ui 25.5.1 → 25.11.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 (67) 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/Progress/Progress.d.ts +8 -0
  33. package/dist/components/Progress/Progress.styles.d.ts +4 -75
  34. package/dist/components/Radio/Radio.d.ts +9 -0
  35. package/dist/components/Radio/RadioGroup.d.ts +14 -0
  36. package/dist/components/Radio/index.d.ts +2 -0
  37. package/dist/components/Radio/styles/index.d.ts +43 -277
  38. package/dist/components/RefreshedInput/Button/styles/index.d.ts +1 -263
  39. package/dist/components/RefreshedInput/Input/styles/index.d.ts +2 -254
  40. package/dist/components/RefreshedInput/Select/styles/index.d.ts +2 -71
  41. package/dist/components/Select/Select.d.ts +11 -0
  42. package/dist/components/Select/index.d.ts +1 -0
  43. package/dist/components/Select/styles/index.d.ts +28 -218
  44. package/dist/components/Skeleton/Skeleton.styles.d.ts +4 -26
  45. package/dist/components/Skeleton/index.d.ts +1 -0
  46. package/dist/components/Switch/Switch.d.ts +21 -0
  47. package/dist/components/Switch/index.d.ts +1 -0
  48. package/dist/components/Switch/styles/index.d.ts +4 -116
  49. package/dist/components/Table/Table.styles.d.ts +1 -4
  50. package/dist/components/Text/Text.d.ts +11 -0
  51. package/dist/components/Text/Text.styles.d.ts +29 -30
  52. package/dist/components/Text/combineAsWithVariant.d.ts +101 -0
  53. package/dist/components/Text/options.d.ts +2 -0
  54. package/dist/components/Textarea/Textarea.d.ts +12 -0
  55. package/dist/components/Textarea/index.d.ts +1 -0
  56. package/dist/components/Textarea/styles/index.d.ts +3 -0
  57. package/dist/index.cjs.js +3277 -3480
  58. package/dist/index.cjs.js.map +1 -1
  59. package/dist/index.d.ts +366 -58
  60. package/dist/index.esm.js +3272 -3478
  61. package/dist/index.esm.js.map +1 -1
  62. package/dist/theme/base/animation.d.ts +217 -0
  63. package/dist/theme/base/colors.d.ts +29 -13
  64. package/dist/theme/base/index.d.ts +1 -0
  65. package/dist/theme/base/notifications.d.ts +3 -3
  66. package/dist/types/forwardRefComponent.d.ts +2 -0
  67. package/package.json +17 -14
@@ -1,93 +1,17 @@
1
- export declare const accordionTheme: {
2
- baseStyle?: {
3
- icon: {
4
- color: string;
5
- };
6
- button: {
7
- display: string;
8
- gridGap: number;
9
- alignItems: string;
10
- fontSize: string;
11
- fontWeight: string;
12
- _hover: {
13
- backgroundColor: string;
14
- };
15
- };
16
- container: {
17
- borderColor: string;
18
- };
19
- } | undefined;
20
- sizes?: {
21
- [key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
22
- keys: ("container" | "root" | "button" | "panel" | "icon")[];
23
- }>;
24
- } | undefined;
25
- variants?: {
26
- lined: {
27
- button: {
28
- px: number;
29
- py: number;
30
- };
31
- container: {
32
- borderTopWidth: number;
33
- _last: {
34
- borderBottomWidth: number;
35
- };
36
- };
37
- panel: {
38
- px: number;
39
- py: number;
40
- };
41
- };
42
- contained: {
43
- button: {
44
- px: number;
45
- py: number;
46
- };
47
- container: {
48
- borderLeftWidth: number;
49
- borderRightWidth: number;
50
- _first: {
51
- borderTopLeftRadius: number;
52
- borderTopRightRadius: number;
53
- };
54
- _last: {
55
- borderBottomLeftRadius: number;
56
- borderBottomRightRadius: number;
57
- };
58
- };
59
- panel: {
60
- p: number;
61
- borderColor: string;
62
- borderTopWidth: number;
63
- };
64
- };
65
- unstyled: {
66
- icon: {
67
- color: string;
68
- };
69
- button: {
70
- display: string;
71
- alignItems: string;
72
- fontSize: string;
73
- fontWeight: string;
74
- _hover: {
75
- backgroundColor: string;
76
- };
77
- paddingTop: string;
78
- paddingBottom: string;
79
- };
80
- container: {
81
- borderColor: string;
82
- };
83
- };
84
- } | undefined;
1
+ import type { PartsStyleInterpolation } from '@chakra-ui/react';
2
+ import { accordionAnatomy } from '@chakra-ui/anatomy';
3
+ type AccordionParts = typeof accordionAnatomy;
4
+ type AccordionPartsStyle = PartsStyleInterpolation<AccordionParts>;
5
+ type AccordionTheme = {
6
+ baseStyle?: AccordionPartsStyle;
7
+ sizes?: Record<string, AccordionPartsStyle>;
8
+ variants?: Record<string, AccordionPartsStyle>;
85
9
  defaultProps?: {
86
- size?: string | number | undefined;
87
- variant?: "lined" | "contained" | "unstyled" | undefined;
88
- colorScheme?: string | undefined;
89
- } | undefined;
90
- parts: ("container" | "root" | "button" | "panel" | "icon")[];
10
+ size?: string | number;
11
+ variant?: string | number;
12
+ colorScheme?: string;
13
+ };
91
14
  };
15
+ export declare const accordionTheme: AccordionTheme;
92
16
  export declare const theme: Record<string, any>;
93
17
  export default theme;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { Alert as ChakraAlert } from '@chakra-ui/react';
3
+ import { NOTIFICATION_STATUSES } from '@/theme/base/notifications';
4
+ import type { ButtonProps } from '../Button/Button';
5
+ import type { ForwardRefComponent } from '../../types/forwardRefComponent';
6
+ export type AlertStatus = (typeof NOTIFICATION_STATUSES)[keyof typeof NOTIFICATION_STATUSES];
7
+ export type AlertSize = 'sm' | 'md' | 'lg';
8
+ export interface AlertProps extends Omit<React.ComponentProps<typeof ChakraAlert>, 'status' | 'title'> {
9
+ /** Status. One of: success, neutral, warning, or error */
10
+ status?: AlertStatus;
11
+ /** Title Text. Will not display title if empty */
12
+ title?: React.ReactNode;
13
+ /** Props to pass to button (like onClick). Will not display button if this or buttonText empty */
14
+ buttonProps?: Omit<ButtonProps, 'children' | 'variant'> | null;
15
+ /** Text of button. Will not display button if this or buttonProps empty */
16
+ buttonText?: string | null;
17
+ /** Variant of the action button. One of: tertiary, primary */
18
+ buttonVariant?: ButtonProps['variant'];
19
+ /** Whether or not to show X dismiss button */
20
+ showDismiss?: boolean;
21
+ /** Callback when X clicked */
22
+ onDismissClick?: React.MouseEventHandler<HTMLButtonElement> | null;
23
+ /** Whether or not to show the icon */
24
+ showIcon?: boolean;
25
+ /** Description text. Will not display description if empty */
26
+ description?: React.ReactNode;
27
+ /** Size of the text */
28
+ size?: AlertSize;
29
+ /** Custom Icon */
30
+ icon?: React.ElementType | null;
31
+ }
32
+ declare const Alert: ForwardRefComponent<HTMLDivElement, AlertProps>;
33
+ export default Alert;
@@ -0,0 +1 @@
1
+ export { Badge as default } from '@chakra-ui/react';
@@ -1,78 +1,14 @@
1
- export namespace variants {
2
- namespace primary {
3
- let bg: string;
4
- let color: string;
5
- }
6
- namespace warningLight {
7
- let bg_1: string;
8
- export { bg_1 as bg };
9
- let color_1: string;
10
- export { color_1 as color };
11
- }
12
- }
13
- declare const _default: {
14
- baseStyle?: {
15
- px: number;
16
- textTransform: string;
17
- fontSize: string;
18
- borderRadius: string;
19
- fontWeight: string;
20
- bg: string;
21
- color: string;
22
- boxShadow: string;
23
- } | undefined;
24
- sizes?: {
25
- [key: string]: import("@chakra-ui/react").SystemStyleInterpolation;
26
- } | undefined;
27
- variants?: {
28
- solid: (props: import("@chakra-ui/react").StyleFunctionProps) => {
29
- [x: string]: string | {
30
- [x: string]: string;
31
- };
32
- _dark: {
33
- [x: string]: string;
34
- };
35
- };
36
- subtle: (props: import("@chakra-ui/react").StyleFunctionProps) => {
37
- [x: string]: string | {
38
- [x: string]: string;
39
- };
40
- _dark: {
41
- [x: string]: string;
42
- };
43
- };
44
- outline: (props: import("@chakra-ui/react").StyleFunctionProps) => {
45
- [x: string]: string | {
46
- [x: string]: string;
47
- };
48
- _dark: {
49
- [x: string]: string;
50
- };
51
- };
52
- } | undefined;
53
- defaultProps?: {
54
- size?: string | number | undefined;
55
- variant?: "outline" | "solid" | "subtle" | undefined;
56
- colorScheme?: string | undefined;
57
- } | undefined;
58
- } & {
59
- variants: {
60
- primary: {
61
- bg: string;
62
- color: string;
63
- };
64
- warningLight: {
65
- bg: string;
66
- color: string;
67
- };
1
+ import { theme as chakraDefaultTheme } from '@chakra-ui/react';
2
+ export declare const variants: {
3
+ readonly primary: {
4
+ readonly bg: "primary.default";
5
+ readonly color: "white";
68
6
  };
69
- baseStyle: {
70
- px: number;
71
- textTransform: string;
72
- fontSize: string;
73
- borderRadius: string;
74
- fontWeight: string;
7
+ readonly warningLight: {
8
+ readonly bg: "yellow.100";
9
+ readonly color: "black";
75
10
  };
76
- defaultProps: {};
77
11
  };
78
- export default _default;
12
+ type BadgeStyle = NonNullable<typeof chakraDefaultTheme.components.Badge>;
13
+ declare const badgeStyle: BadgeStyle;
14
+ export default badgeStyle;
@@ -0,0 +1,27 @@
1
+ import { type ButtonProps as ChakraButtonProps } from '@chakra-ui/react';
2
+ import { type ButtonHeight, type ButtonVariant } from './Button.styles';
3
+ import type { ForwardRefComponent } from '../../types/forwardRefComponent';
4
+ export type ButtonProps = Omit<ChakraButtonProps, 'variant'> & {
5
+ /**
6
+ * If `true`, the button will render as an anchor.
7
+ */
8
+ asAnchor?: boolean;
9
+ /**
10
+ * If `true`, and an anchor button, target="_blank" and rel="noopener noreferrer" will be set on the anchor.
11
+ * `isExternal` is used to maintain parity with the Link component.
12
+ */
13
+ isExternal?: boolean;
14
+ /**
15
+ * Supports the standard Chakra height prop plus fe-ui `md`/`lg` presets.
16
+ */
17
+ height?: ButtonHeight;
18
+ /**
19
+ * Optional anchor href when rendering the button as a link.
20
+ */
21
+ href?: string;
22
+ target?: string;
23
+ rel?: string;
24
+ variant?: ButtonVariant;
25
+ };
26
+ declare const Button: ForwardRefComponent<HTMLElement, ButtonProps>;
27
+ export default Button;