@spothero/ui 25.6.0 → 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 +3074 -3465
  58. package/dist/index.cjs.js.map +1 -1
  59. package/dist/index.d.ts +364 -59
  60. package/dist/index.esm.js +2578 -2970
  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 +7 -6
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Animation tokens for consistent motion throughout the application.
3
+ * Based on SpotHero Motion Guidelines:
4
+ * https://spothero.atlassian.net/wiki/spaces/PROD/pages/5029789787/Motion+SpotHero
5
+ */
6
+ /**
7
+ * Duration tokens (in seconds for framer-motion compatibility)
8
+ */
9
+ export declare const DURATION: {
10
+ /** 70ms - Micro-interactions such as buttons and toggles */
11
+ readonly SHORT_1: 0.07;
12
+ /** 110ms - Micro-interactions such as fade */
13
+ readonly SHORT_2: 0.11;
14
+ /** 150ms - Micro-interactions, small expansion, short distance movements */
15
+ readonly MEDIUM_1: 0.15;
16
+ /** 240ms - Expansion, system communication, toast */
17
+ readonly MEDIUM_2: 0.24;
18
+ /** 400ms - Large expansion, important system notifications */
19
+ readonly SLOW_1: 0.4;
20
+ /** 700ms - Background dimming and full-screen animations */
21
+ readonly SLOW_2: 0.7;
22
+ };
23
+ /**
24
+ * Duration tokens in milliseconds (for CSS transitions)
25
+ */
26
+ export declare const DURATION_MS: {
27
+ /** 70ms - Micro-interactions such as buttons and toggles */
28
+ readonly SHORT_1: 70;
29
+ /** 110ms - Micro-interactions such as fade */
30
+ readonly SHORT_2: 110;
31
+ /** 150ms - Micro-interactions, small expansion, short distance movements */
32
+ readonly MEDIUM_1: 150;
33
+ /** 240ms - Expansion, system communication, toast */
34
+ readonly MEDIUM_2: 240;
35
+ /** 400ms - Large expansion, important system notifications */
36
+ readonly SLOW_1: 400;
37
+ /** 700ms - Background dimming and full-screen animations */
38
+ readonly SLOW_2: 700;
39
+ };
40
+ export declare const DURATION_DESCRIPTIONS: {
41
+ readonly SHORT_1: "Micro-interactions such as buttons and toggles";
42
+ readonly SHORT_2: "Micro-interactions such as fade";
43
+ readonly MEDIUM_1: "Micro-interactions, small expansion, short distance movements";
44
+ readonly MEDIUM_2: "Expansion, system communication, toast";
45
+ readonly SLOW_1: "Large expansion, important system notifications";
46
+ readonly SLOW_2: "Background dimming and full-screen animations";
47
+ };
48
+ /**
49
+ * Easing tokens as cubic-bezier arrays (for framer-motion)
50
+ */
51
+ export declare const EASING: {
52
+ /** Snappy - Quick start, smooth finish. Good for UI interactions. */
53
+ readonly SNAPPY: readonly [0.16, 1, 0.3, 1];
54
+ /** Calm - Standard easing. Good for general transitions. */
55
+ readonly CALM: readonly [0.4, 0, 0.2, 1];
56
+ /** Linear - Constant speed. Good for progress indicators. */
57
+ readonly LINEAR: readonly [0, 0, 1, 1];
58
+ };
59
+ /**
60
+ * Easing tokens as CSS cubic-bezier strings
61
+ */
62
+ export declare const EASING_CSS: {
63
+ /** Snappy - Quick start, smooth finish. Good for UI interactions. */
64
+ readonly SNAPPY: "cubic-bezier(0.16, 1, 0.3, 1)";
65
+ /** Calm - Standard easing. Good for general transitions. */
66
+ readonly CALM: "cubic-bezier(0.4, 0, 0.2, 1)";
67
+ /** Linear - Constant speed. Good for progress indicators. */
68
+ readonly LINEAR: "linear";
69
+ };
70
+ export declare const EASING_DESCRIPTIONS: {
71
+ readonly SNAPPY: "Quick start, smooth finish. Good for UI interactions.";
72
+ readonly CALM: "Standard easing. Good for general transitions.";
73
+ readonly LINEAR: "Constant speed. Good for progress indicators.";
74
+ };
75
+ /**
76
+ * Pre-composed transition objects for common use cases with framer-motion
77
+ */
78
+ export declare const TRANSITION: {
79
+ /** Quick micro-interaction (buttons, toggles) */
80
+ readonly MICRO: {
81
+ readonly duration: 0.07;
82
+ readonly ease: readonly [0.16, 1, 0.3, 1];
83
+ };
84
+ /** Small fade transitions */
85
+ readonly FADE: {
86
+ readonly duration: 0.11;
87
+ readonly ease: readonly [0.16, 1, 0.3, 1];
88
+ };
89
+ /** Small expansion or short movements */
90
+ readonly SMALL: {
91
+ readonly duration: 0.15;
92
+ readonly ease: readonly [0.16, 1, 0.3, 1];
93
+ };
94
+ /** Medium expansion, toasts, system communication */
95
+ readonly MEDIUM: {
96
+ readonly duration: 0.24;
97
+ readonly ease: readonly [0.16, 1, 0.3, 1];
98
+ };
99
+ /** Large expansion, important notifications */
100
+ readonly LARGE: {
101
+ readonly duration: 0.4;
102
+ readonly ease: readonly [0.4, 0, 0.2, 1];
103
+ };
104
+ /** Full-screen animations, background dimming */
105
+ readonly FULL_SCREEN: {
106
+ readonly duration: 0.7;
107
+ readonly ease: readonly [0.4, 0, 0.2, 1];
108
+ };
109
+ };
110
+ export declare const TRANSITION_DESCRIPTIONS: {
111
+ readonly MICRO: "Quick micro-interaction (buttons, toggles)";
112
+ readonly FADE: "Small fade transitions";
113
+ readonly SMALL: "Small expansion or short movements";
114
+ readonly MEDIUM: "Medium expansion, toasts, system communication";
115
+ readonly LARGE: "Large expansion, important notifications";
116
+ readonly FULL_SCREEN: "Full-screen animations, background dimming";
117
+ };
118
+ export declare const ANIMATION_TOKENS: {
119
+ readonly DURATION: {
120
+ /** 70ms - Micro-interactions such as buttons and toggles */
121
+ readonly SHORT_1: 0.07;
122
+ /** 110ms - Micro-interactions such as fade */
123
+ readonly SHORT_2: 0.11;
124
+ /** 150ms - Micro-interactions, small expansion, short distance movements */
125
+ readonly MEDIUM_1: 0.15;
126
+ /** 240ms - Expansion, system communication, toast */
127
+ readonly MEDIUM_2: 0.24;
128
+ /** 400ms - Large expansion, important system notifications */
129
+ readonly SLOW_1: 0.4;
130
+ /** 700ms - Background dimming and full-screen animations */
131
+ readonly SLOW_2: 0.7;
132
+ };
133
+ readonly DURATION_MS: {
134
+ /** 70ms - Micro-interactions such as buttons and toggles */
135
+ readonly SHORT_1: 70;
136
+ /** 110ms - Micro-interactions such as fade */
137
+ readonly SHORT_2: 110;
138
+ /** 150ms - Micro-interactions, small expansion, short distance movements */
139
+ readonly MEDIUM_1: 150;
140
+ /** 240ms - Expansion, system communication, toast */
141
+ readonly MEDIUM_2: 240;
142
+ /** 400ms - Large expansion, important system notifications */
143
+ readonly SLOW_1: 400;
144
+ /** 700ms - Background dimming and full-screen animations */
145
+ readonly SLOW_2: 700;
146
+ };
147
+ readonly DURATION_DESCRIPTIONS: {
148
+ readonly SHORT_1: "Micro-interactions such as buttons and toggles";
149
+ readonly SHORT_2: "Micro-interactions such as fade";
150
+ readonly MEDIUM_1: "Micro-interactions, small expansion, short distance movements";
151
+ readonly MEDIUM_2: "Expansion, system communication, toast";
152
+ readonly SLOW_1: "Large expansion, important system notifications";
153
+ readonly SLOW_2: "Background dimming and full-screen animations";
154
+ };
155
+ readonly EASING: {
156
+ /** Snappy - Quick start, smooth finish. Good for UI interactions. */
157
+ readonly SNAPPY: readonly [0.16, 1, 0.3, 1];
158
+ /** Calm - Standard easing. Good for general transitions. */
159
+ readonly CALM: readonly [0.4, 0, 0.2, 1];
160
+ /** Linear - Constant speed. Good for progress indicators. */
161
+ readonly LINEAR: readonly [0, 0, 1, 1];
162
+ };
163
+ readonly EASING_CSS: {
164
+ /** Snappy - Quick start, smooth finish. Good for UI interactions. */
165
+ readonly SNAPPY: "cubic-bezier(0.16, 1, 0.3, 1)";
166
+ /** Calm - Standard easing. Good for general transitions. */
167
+ readonly CALM: "cubic-bezier(0.4, 0, 0.2, 1)";
168
+ /** Linear - Constant speed. Good for progress indicators. */
169
+ readonly LINEAR: "linear";
170
+ };
171
+ readonly EASING_DESCRIPTIONS: {
172
+ readonly SNAPPY: "Quick start, smooth finish. Good for UI interactions.";
173
+ readonly CALM: "Standard easing. Good for general transitions.";
174
+ readonly LINEAR: "Constant speed. Good for progress indicators.";
175
+ };
176
+ readonly TRANSITION: {
177
+ /** Quick micro-interaction (buttons, toggles) */
178
+ readonly MICRO: {
179
+ readonly duration: 0.07;
180
+ readonly ease: readonly [0.16, 1, 0.3, 1];
181
+ };
182
+ /** Small fade transitions */
183
+ readonly FADE: {
184
+ readonly duration: 0.11;
185
+ readonly ease: readonly [0.16, 1, 0.3, 1];
186
+ };
187
+ /** Small expansion or short movements */
188
+ readonly SMALL: {
189
+ readonly duration: 0.15;
190
+ readonly ease: readonly [0.16, 1, 0.3, 1];
191
+ };
192
+ /** Medium expansion, toasts, system communication */
193
+ readonly MEDIUM: {
194
+ readonly duration: 0.24;
195
+ readonly ease: readonly [0.16, 1, 0.3, 1];
196
+ };
197
+ /** Large expansion, important notifications */
198
+ readonly LARGE: {
199
+ readonly duration: 0.4;
200
+ readonly ease: readonly [0.4, 0, 0.2, 1];
201
+ };
202
+ /** Full-screen animations, background dimming */
203
+ readonly FULL_SCREEN: {
204
+ readonly duration: 0.7;
205
+ readonly ease: readonly [0.4, 0, 0.2, 1];
206
+ };
207
+ };
208
+ readonly TRANSITION_DESCRIPTIONS: {
209
+ readonly MICRO: "Quick micro-interaction (buttons, toggles)";
210
+ readonly FADE: "Small fade transitions";
211
+ readonly SMALL: "Small expansion or short movements";
212
+ readonly MEDIUM: "Medium expansion, toasts, system communication";
213
+ readonly LARGE: "Large expansion, important notifications";
214
+ readonly FULL_SCREEN: "Full-screen animations, background dimming";
215
+ };
216
+ };
217
+ export default ANIMATION_TOKENS;
@@ -1,18 +1,33 @@
1
1
  declare const colors: {
2
2
  readonly gray: {
3
- readonly light: string;
4
- readonly medium: string;
5
- readonly dark: string;
6
- readonly 50: string;
7
- readonly 100: string;
8
- readonly 200: string;
9
- readonly 300: string;
10
- readonly 400: string;
11
- readonly 500: string;
12
- readonly 600: string;
13
- readonly 700: string;
14
- readonly 800: string;
15
- readonly 900: string;
3
+ light: string;
4
+ medium: string;
5
+ dark: string;
6
+ 50: string;
7
+ 100: string;
8
+ 200: string;
9
+ 300: string;
10
+ 400: string;
11
+ 500: string;
12
+ 600: string;
13
+ 700: string;
14
+ 800: string;
15
+ 900: string;
16
+ };
17
+ readonly grey: {
18
+ light: string;
19
+ medium: string;
20
+ dark: string;
21
+ 50: string;
22
+ 100: string;
23
+ 200: string;
24
+ 300: string;
25
+ 400: string;
26
+ 500: string;
27
+ 600: string;
28
+ 700: string;
29
+ 800: string;
30
+ 900: string;
16
31
  };
17
32
  readonly blue: {
18
33
  50: string;
@@ -120,6 +135,7 @@ declare const colors: {
120
135
  readonly light: string;
121
136
  readonly dark: "#ffffff";
122
137
  };
138
+ readonly brandText: "#ffffff";
123
139
  };
124
140
  readonly background: {
125
141
  readonly gray: string;
@@ -3,5 +3,6 @@ export { default as colors } from './colors';
3
3
  export { default as shadows } from './shadows';
4
4
  export { default as zIndices } from './zindices';
5
5
  export { default as breakpoints } from './breakpoints';
6
+ export { default as animationTokens } from './animation';
6
7
  export { fonts, fontSizes, fontWeights } from './typography';
7
8
  export { notificationBaseStyle, notificationStatusStyles, NOTIFICATION_STATUSES, } from './notifications';
@@ -6,12 +6,12 @@ export declare const NOTIFICATION_STATUSES: {
6
6
  };
7
7
  export declare const notificationBaseStyle: {
8
8
  container: {
9
- paddingY: number;
9
+ padding: number;
10
10
  borderRadius: string;
11
+ alignItems: string;
11
12
  };
12
13
  actionButton: {
13
14
  fontSize: string;
14
- height: string;
15
15
  lineHeight: string;
16
16
  color: string;
17
17
  _hover: {
@@ -39,8 +39,8 @@ export declare const notificationBaseStyle: {
39
39
  };
40
40
  icon: {
41
41
  width: number;
42
- marginRight: number;
43
42
  height: string;
43
+ flexShrink: number;
44
44
  };
45
45
  description: {
46
46
  lineHeight: number;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export type ForwardRefComponent<Element, Props> = React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<Element>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spothero/ui",
3
- "version": "25.6.0",
3
+ "version": "25.11.0",
4
4
  "description": "SpotHero's React component UI library.",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",
@@ -80,7 +80,7 @@
80
80
  "babel-loader": "8.2.2",
81
81
  "babel-plugin-module-resolver": "5.0.0",
82
82
  "chalk": "4.1.0",
83
- "classnames": "2.2.6",
83
+ "classnames": "2.3.2",
84
84
  "css-loader": "5.1.3",
85
85
  "eslint-loader": "4.0.2",
86
86
  "get-contrast-ratio": "0.2.1",
@@ -115,10 +115,10 @@
115
115
  "@spothero/babel-preset-spothero": "5.1.0",
116
116
  "@spothero/browserslist-config": "4.0.0",
117
117
  "@spothero/core": "7.0.1",
118
+ "@spothero/icons": "9.2.0",
118
119
  "@spothero/eslint-config": "6.1.0",
119
- "@spothero/icons": "9.1.10",
120
- "@spothero/prettier-config": "5.0.0",
121
120
  "@spothero/npm-publisher": "7.0.2",
121
+ "@spothero/prettier-config": "5.0.0",
122
122
  "@spothero/stylelint-config": "6.0.0"
123
123
  },
124
124
  "dependencies": {
@@ -133,7 +133,7 @@
133
133
  "@chakra-ui/react": "2.8.2",
134
134
  "@emotion/react": "11.11.4",
135
135
  "@emotion/styled": "11.11.5",
136
- "classnames": "2.2.6",
136
+ "classnames": "2.3.2",
137
137
  "framer-motion": "10.18.0",
138
138
  "lodash": "4.17.21",
139
139
  "prop-types": "15.7.2",
@@ -153,6 +153,7 @@
153
153
  "build": "pnpm run clean && rollup -c --configPlugin typescript",
154
154
  "release": "npm-release",
155
155
  "build-storybook": "NODE_OPTIONS=--openssl-legacy-provider storybook build -o ./docs/v2",
156
- "publish-storybook": "pnpm run build-storybook"
156
+ "publish-storybook": "pnpm run build-storybook",
157
+ "type-check": "tsc --noemit"
157
158
  }
158
159
  }