@sproutsocial/seeds-react-stack 1.0.23 → 1.0.25

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/src/utils.ts DELETED
@@ -1,42 +0,0 @@
1
- import { theme } from "@sproutsocial/seeds-react-theme";
2
-
3
- import type { TypeResponsive } from "@sproutsocial/seeds-react-system-props";
4
-
5
- const breakpoints = theme.breakpoints;
6
- const LENGTH = breakpoints.length + 1;
7
-
8
- export const normalizeResponsiveProp = (
9
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
- value: TypeResponsive<any>
11
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
- ): TypeResponsive<any> => {
13
- if (["string", "number"].includes(typeof value)) {
14
- return Array(LENGTH).fill(value);
15
- }
16
-
17
- if (value.length) {
18
- switch (value.length) {
19
- case 1:
20
- return Array(LENGTH).fill(value[0]);
21
- case 2:
22
- return [value[0], ...Array(LENGTH - 1).fill(value[1])];
23
- case 3:
24
- return [value[0], value[1], ...Array(LENGTH - 2).fill(value[2])];
25
- case 4:
26
- return [
27
- value[0],
28
- value[1],
29
- value[2],
30
- ...Array(LENGTH - 3).fill(value[3]),
31
- ];
32
- case 5:
33
- return value;
34
- default:
35
- throw new Error(
36
- `Invalid responsive prop length: ${JSON.stringify(value)}`
37
- );
38
- }
39
- } else {
40
- throw new Error(`Invalid responsive prop type: ${JSON.stringify(value)}`);
41
- }
42
- };
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "extends": "@sproutsocial/seeds-tsconfig/bundler/dom/library-monorepo",
3
- "compilerOptions": {
4
- "jsx": "react-jsx",
5
- "module": "esnext"
6
- },
7
- "include": ["src/**/*"],
8
- "exclude": [
9
- "node_modules",
10
- "dist",
11
- "coverage",
12
- "**/*.stories.tsx",
13
- "**/*.stories.ts"
14
- ]
15
- }
package/tsup.config.ts DELETED
@@ -1,12 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig((options) => ({
4
- entry: ["src/index.ts"],
5
- format: ["cjs", "esm"],
6
- clean: true,
7
- legacyOutput: true,
8
- dts: options.dts,
9
- external: ["react"],
10
- sourcemap: true,
11
- metafile: options.metafile,
12
- }));