@evo-web/react 0.0.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.
@@ -0,0 +1,3 @@
1
+ # Autogenerated files
2
+ src/evo-icon/icons/*
3
+ src/evo-icon/types.ts
@@ -0,0 +1,32 @@
1
+ export default {
2
+ stories: ["../src/**/*.stories.tsx"],
3
+ typescript: {
4
+ reactDocgen: "react-docgen-typescript",
5
+ reactDocgenTypescriptOptions: {
6
+ compilerOptions: {
7
+ allowSyntheticDefaultImports: true,
8
+ esModuleInterop: true,
9
+ },
10
+ },
11
+ },
12
+ addons: ["@storybook/addon-a11y", "@storybook/addon-docs"],
13
+
14
+ framework: {
15
+ name: "@storybook/react-vite",
16
+ options: {
17
+ builder: {
18
+ viteConfigPath: "./.storybook/vite.config.js",
19
+ },
20
+ },
21
+ },
22
+
23
+ docs: {
24
+ defaultName: "Documentation",
25
+ autodocs: "tag",
26
+ },
27
+
28
+ core: {
29
+ disableTelemetry: true,
30
+ disableWhatsNewNotifications: true,
31
+ },
32
+ };
@@ -0,0 +1,6 @@
1
+ <!-- hide obnoxious update popup -->
2
+ <style>
3
+ [href="/?path=/settings/about"] {
4
+ display: none !important;
5
+ }
6
+ </style>
@@ -0,0 +1,4 @@
1
+ import { addons } from "storybook/manager-api";
2
+ import theme from "./theme";
3
+
4
+ addons.setConfig({ theme });
@@ -0,0 +1,50 @@
1
+ import React, { StrictMode } from "react";
2
+
3
+ import "@ebay/skin/dist/tokens/evo-core.css";
4
+ import "@ebay/skin/dist/tokens/evo-light.css";
5
+ import "@ebay/skin/dist/tokens/evo-dark.css";
6
+ import "@ebay/skin/dist/global/global.css";
7
+ import "@ebay/skin/dist/utility/utility.css";
8
+ import "@ebay/skin/marketsans";
9
+
10
+ export default {
11
+ tags: ["autodocs"],
12
+ decorators: [
13
+ (Story) => (
14
+ <StrictMode>
15
+ {/* EvoIconProvider will be added when icon components are created */}
16
+ <Story />
17
+ </StrictMode>
18
+ ),
19
+ ],
20
+ globals: {
21
+ a11y: {
22
+ // Disable automatic a11y runs as it impacts performance of storybook.
23
+ // This started after a change introduced in v8.5.0 that runs the axe-core tests
24
+ // in sequence instead of parallel.
25
+ manual: true,
26
+ },
27
+ },
28
+ parameters: {
29
+ controls: { expanded: true },
30
+ docs: {
31
+ codePanel: true,
32
+ },
33
+ options: {
34
+ storySort: {
35
+ order: [
36
+ "buttons",
37
+ "data display",
38
+ "dialogs",
39
+ "form input",
40
+ "graphics & icons",
41
+ "media",
42
+ "navigation & disclosure",
43
+ "notices & tips",
44
+ "progress",
45
+ "building blocks",
46
+ ],
47
+ },
48
+ },
49
+ },
50
+ };
@@ -0,0 +1,17 @@
1
+ import { create } from "storybook/theming";
2
+
3
+ export default create({
4
+ base: "light",
5
+
6
+ // Typography
7
+ fontBase: '"Market Sans", Arial',
8
+ colorSecondary: "#97BB59",
9
+ appBg: "#F8FBF8",
10
+
11
+ // Brand assets
12
+ brandTitle: "EVO React",
13
+ brandUrl: "/",
14
+ brandImage:
15
+ "https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/EBay_logo.svg/1280px-EBay_logo.svg.png",
16
+ brandTarget: "/",
17
+ });
@@ -0,0 +1,3 @@
1
+ import { defineConfig } from "vite";
2
+
3
+ export default defineConfig({});
package/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # @evo-web/react
2
+
3
+ ## Unreleased
4
+
5
+ Initial package setup
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # @evo-web/react
2
+
3
+ Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
4
+
5
+ ## Status: Pre-release
6
+
7
+ This package is currently in active development. Component migration from `@ebay/ui-core-react` is in progress.
8
+
9
+ ## Requirements
10
+
11
+ - Node.js v20.12.2+
12
+ - React 19+
13
+ - eBay Skin 19+
14
+ - **ESM-compatible build setup** (Vite, Webpack 5+, Rollup, etc.)
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install @evo-web/react @ebay/skin react react-dom
20
+ ```
21
+
22
+ ## ESM-Only Notice
23
+
24
+ This package is distributed as **ESM-only**. Your project must support ECMAScript modules:
25
+
26
+ If you need CommonJS support, continue using `@ebay/ui-core-react`.
27
+
28
+ ## CSS Import
29
+
30
+ You must import the required eBay Skin CSS in your application:
31
+
32
+ ```typescript
33
+ import "@ebay/skin/marketsans.css";
34
+ import "@ebay/skin/tokens.css";
35
+ import "@ebay/skin/global.css";
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```tsx
41
+ import { EvoButton } from "@evo-web/react";
42
+ ```
43
+
44
+ ## Component Naming
45
+
46
+ All components use the `Evo*` prefix (e.g., `EvoButton`, `EvoAccordion`).
47
+
48
+ ## Key Differences from @ebay/ui-core-react
49
+
50
+ | Feature | @ebay/ui-core-react | @evo-web/react |
51
+ | ---------------- | ---------------------- | ----------------- |
52
+ | Output Format | CommonJS | ESM |
53
+ | Tree-shaking | component path imports | Optimal |
54
+ | Component Naming | `Ebay*` | `Evo*` |
55
+ | React Version | 16.8+, 18+, 19+ | 19+ |
56
+ | Ref Handling | `forwardRef` | Native (React 19) |
57
+ | TypeScript | Partial strict mode | Full strict mode |
58
+ | Makeup.js | External | Bundled |
59
+
60
+ ## Migration Guide
61
+
62
+ Documentation will be provided when components are available. Migration will involve:
63
+
64
+ - Component renames: `EbayButton` → `EvoButton`
65
+ - Removing `forwardRef` wrappers (React 19 native ref support)
66
+ - Icon provider rename: `EbayIconProvider` → `EvoIconProvider`
67
+ - Flag icons: Use Skin class-based sprites instead of SVG components
68
+ - Import paths: Single entry point with optimal tree-shaking
69
+
70
+ ## Development
71
+
72
+ See [Contributing Guide](../../CONTRIBUTING.md) for development setup.
73
+
74
+ ## License
75
+
76
+ MIT
@@ -0,0 +1,53 @@
1
+ import eslint from "@eslint/js";
2
+ import jsxA11y from "eslint-plugin-jsx-a11y";
3
+ import react from "eslint-plugin-react";
4
+ import reactHooks from "eslint-plugin-react-hooks";
5
+ import storybook from "eslint-plugin-storybook";
6
+ import vitest from "@vitest/eslint-plugin";
7
+ import globals from "globals";
8
+ import tseslint from "typescript-eslint";
9
+
10
+ export default tseslint.config(
11
+ {
12
+ ignores: [
13
+ "dist",
14
+ "scripts",
15
+ ".storybook",
16
+ "node_modules",
17
+ "_site",
18
+ "coverage",
19
+ ],
20
+ },
21
+ eslint.configs.recommended,
22
+ ...tseslint.configs.recommended,
23
+ ...storybook.configs["flat/recommended"],
24
+ react.configs.flat.recommended,
25
+ jsxA11y.flatConfigs.recommended,
26
+ {
27
+ languageOptions: {
28
+ ...react.configs.flat.recommended.languageOptions,
29
+ ...jsxA11y.flatConfigs.recommended.languageOptions,
30
+ globals: {
31
+ ...globals.browser,
32
+ ...globals.node,
33
+ },
34
+ },
35
+ settings: {
36
+ react: {
37
+ version: "detect",
38
+ },
39
+ },
40
+
41
+ plugins: {
42
+ "react-hooks": reactHooks,
43
+ vitest,
44
+ },
45
+
46
+ rules: {
47
+ "no-console": ["error", { allow: ["error", "warn"] }],
48
+ "react/prop-types": "off",
49
+ "react/react-in-jsx-scope": "off",
50
+ ...vitest.configs.recommended.rules,
51
+ },
52
+ },
53
+ );
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@evo-web/react",
3
+ "version": "0.0.0",
4
+ "description": "Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.",
5
+ "keywords": [
6
+ "React",
7
+ "eBay Evo",
8
+ "evo-web",
9
+ "components",
10
+ "design-system"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/eBay/evo-web",
15
+ "directory": "packages/evo-react"
16
+ },
17
+ "license": "MIT",
18
+ "sideEffects": [
19
+ "./**/*.css"
20
+ ],
21
+ "type": "module",
22
+ "exports": {
23
+ "./package.json": "./package.json",
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "default": "./dist/index.js"
27
+ }
28
+ },
29
+ "scripts": {
30
+ "build": "npm run type:check && npm run test && vite build",
31
+ "build:storybook": "storybook build -o ./_site/evo-react/$(git branch --show-current)",
32
+ "deploy": "exit 0",
33
+ "format": "eslint . --fix && prettier . --write --log-level=warn",
34
+ "lint": "eslint . && prettier . --check --log-level=warn",
35
+ "release": "npm run build",
36
+ "start": "storybook dev -p 9001",
37
+ "test": "vitest --browser.headless --passWithNoTests",
38
+ "type:check": "tsc --noEmit",
39
+ "update-icons": "exit 0",
40
+ "version": "npm run update-icons && git add -A src"
41
+ },
42
+ "dependencies": {
43
+ "@floating-ui/react": "^0.27.16",
44
+ "classnames": "^2.5.1",
45
+ "makeup-active-descendant": "^0.7.10",
46
+ "makeup-expander": "^0.11.9",
47
+ "makeup-floating-label": "^0.4.9",
48
+ "makeup-focusables": "^0.4.5",
49
+ "makeup-keyboard-trap": "^0.5.7",
50
+ "makeup-prevent-scroll-keys": "^0.3.4",
51
+ "makeup-roving-tabindex": "^0.7.7",
52
+ "makeup-screenreader-trap": "^0.5.6",
53
+ "makeup-typeahead": "^0.3.3",
54
+ "react-remove-scroll": "^2.7.2"
55
+ },
56
+ "devDependencies": {
57
+ "@vitejs/plugin-react": "^5.1.2",
58
+ "@vitest/browser-playwright": "^4.0.18",
59
+ "vitest-browser-react": "^2.0.4"
60
+ },
61
+ "peerDependencies": {
62
+ "@ebay/skin": "^19",
63
+ "react": "^19",
64
+ "react-dom": "^19"
65
+ },
66
+ "publishConfig": {
67
+ "access": "public",
68
+ "registry": "https://registry.npmjs.org"
69
+ }
70
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export const VERSION = "0.0.0";
package/test.setup.ts ADDED
@@ -0,0 +1,6 @@
1
+ import "@ebay/skin/dist/tokens/evo-core.css";
2
+ import "@ebay/skin/dist/tokens/evo-light.css";
3
+ import "@ebay/skin/dist/tokens/evo-dark.css";
4
+ import "@ebay/skin/dist/global/global.css";
5
+ import "@ebay/skin/dist/utility/utility.css";
6
+ import "@ebay/skin/marketsans";
package/tsconfig.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+ "jsx": "react-jsx",
9
+ "moduleResolution": "bundler",
10
+ "isolatedModules": true,
11
+ "moduleDetection": "force",
12
+ "declaration": true,
13
+ "outDir": "./dist",
14
+ "strict": true,
15
+ "allowSyntheticDefaultImports": true,
16
+ "noUnusedLocals": true,
17
+ "noUnusedParameters": true,
18
+ "noFallthroughCasesInSwitch": true
19
+ },
20
+ "include": ["./**/*"]
21
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["./**/__tests__/*", "./**/*.stories.tsx"],
4
+ "include": ["./src/**/*"]
5
+ }
package/vite.config.js ADDED
@@ -0,0 +1,85 @@
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+ import { nodeExternals } from "rollup-plugin-node-externals";
4
+ import typescript from "@rollup/plugin-typescript";
5
+ import { playwright } from "@vitest/browser-playwright";
6
+
7
+ const isCI = !!process.env.CI;
8
+
9
+ export default defineConfig({
10
+ plugins: [
11
+ react(),
12
+ nodeExternals({
13
+ // Externalize peer dependencies but bundle makeup-js libraries
14
+ include: [/^makeup-/],
15
+ }),
16
+ ],
17
+ build: {
18
+ lib: {
19
+ entry: "./src/index.ts",
20
+ formats: ["es"],
21
+ fileName: "index",
22
+ },
23
+ rollupOptions: {
24
+ output: {
25
+ banner: `"use client";\n`,
26
+ },
27
+ plugins: [
28
+ typescript({
29
+ // We use a different tsconfig for building so vite doesn't generate types for tests,
30
+ // but we still want to have typescript checking for test files.
31
+ tsconfig: "./tsconfig.prod.json",
32
+ declaration: true,
33
+ declarationMap: true,
34
+ outDir: "./dist",
35
+ }),
36
+ ],
37
+ },
38
+ sourcemap: true,
39
+ minify: false,
40
+ target: "es2020",
41
+ },
42
+ test: {
43
+ globals: true,
44
+ pool: "forks",
45
+ coverage: {
46
+ enabled: isCI,
47
+ provider: "v8",
48
+ reporter: ["json-summary", "html", "cobertura", "lcov"],
49
+ include: ["src/**/*.{ts,tsx}"],
50
+ exclude: [
51
+ "src/**/test/**",
52
+ "src/**/*.stories.tsx",
53
+ "src/**/*.d.ts",
54
+ "src/index.ts",
55
+ ],
56
+ },
57
+ projects: [
58
+ {
59
+ extends: true,
60
+ test: {
61
+ name: "browser",
62
+ browser: {
63
+ enabled: true,
64
+ provider: playwright(),
65
+ headless: true,
66
+ instances: [
67
+ {
68
+ browser: "chromium",
69
+ },
70
+ ],
71
+ },
72
+ include: ["src/**/test.browser.{ts,tsx}"],
73
+ },
74
+ },
75
+ {
76
+ extends: true,
77
+ test: {
78
+ name: "server",
79
+ environment: "node",
80
+ include: ["src/**/test.server.{ts,tsx}"],
81
+ },
82
+ },
83
+ ],
84
+ },
85
+ });