-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Orbit styled-system exports (#511)
- Loading branch information
Showing
27 changed files
with
3,028 additions
and
1,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extends @workleap/browserslist-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
**/dist/* | ||
**/__snapshots__/* | ||
node_modules | ||
*.md | ||
*.yml | ||
*.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/eslintrc", | ||
"root": true, | ||
"extends": "plugin:@workleap/web-application" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "basic", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "webpack serve --config webpack.dev.js", | ||
"build": "webpack --config webpack.build.js", | ||
"lint": "eslint ./src" | ||
}, | ||
"dependencies": { | ||
"@hopper-ui/components": "workspace:*", | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"react-router-dom": "^6.26.2" | ||
}, | ||
"devDependencies": { | ||
"@swc/core": "1.7.26", | ||
"@swc/helpers": "0.5.13", | ||
"@types/react": "18.3.3", | ||
"@types/react-dom": "18.3.0", | ||
"@typescript-eslint/parser": "8.6.0", | ||
"@workleap/browserslist-config": "2.0.1", | ||
"@workleap/eslint-plugin": "3.2.2", | ||
"@workleap/swc-configs": "2.2.3", | ||
"@workleap/typescript-configs": "3.0.2", | ||
"@workleap/webpack-configs": "1.5.1", | ||
"browserslist": "4.23.3", | ||
"eslint": "8.57.1", | ||
"shelljs": "0.8.5", | ||
"typescript": "5.5.4", | ||
"webpack": "5.95.0", | ||
"webpack-cli": "5.1.4", | ||
"webpack-dev-server": "5.1.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- <!doctype html> --> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<link href="favicon.png" rel="icon"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>React app</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
import { Route, Routes } from "react-router-dom"; | ||
import { Layout } from "./Layout.tsx"; | ||
import { MainPage } from "./MainPage.tsx"; | ||
import { StorePage } from "./StorePage.tsx"; | ||
|
||
export function App() { | ||
return ( | ||
<Routes> | ||
<Route path="/" element={<Layout />}> | ||
<Route index element={<MainPage />} /> | ||
<Route path="/store" element={<StorePage />} /> | ||
</Route> | ||
</Routes> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Button, Div, H1, HopperProvider, HtmlHeader, Link, Main, useColorSchemeContext } from "@hopper-ui/components"; | ||
import { Outlet, useHref, useNavigate, type NavigateOptions } from "react-router-dom"; | ||
|
||
declare module "react-aria-components" { | ||
interface RouterConfig { | ||
routerOptions: NavigateOptions; | ||
} | ||
} | ||
|
||
export function Layout() { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<HopperProvider locale="en-US" navigate={navigate} useHref={useHref} withBodyStyle defaultColorScheme="dark"> | ||
<InnerLayout /> | ||
</HopperProvider> | ||
); | ||
} | ||
|
||
function InnerLayout() { | ||
const { setColorScheme, colorScheme } = useColorSchemeContext(); | ||
|
||
return ( | ||
<Div> | ||
<HtmlHeader borderBottom="neutral" padding="inset-sm"> | ||
<H1>React App</H1> | ||
<Link href="/">Main Page</Link> | ||
<Link href="/store">Store</Link> | ||
<Div | ||
position="absolute" | ||
top="10px" | ||
right="10px" | ||
display="fixed" | ||
UNSAFE_width="200px" | ||
> | ||
<Button | ||
size="sm" | ||
variant="secondary" | ||
onPress={() => { | ||
setColorScheme(colorScheme === "light" ? "dark" : "light"); | ||
}} | ||
>Change Theme</Button> | ||
</Div> | ||
</HtmlHeader> | ||
<Main padding="inset-lg"> | ||
<Outlet /> | ||
</Main> | ||
</Div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Checkbox, CheckboxGroup, H1, Stack, Text } from "@hopper-ui/components"; | ||
|
||
export function MainPage() { | ||
return ( | ||
<Stack> | ||
<H1>MainPage</H1> | ||
<Text> | ||
This is the main page. | ||
What is your role? | ||
</Text> | ||
<CheckboxGroup label="Roles"> | ||
<Checkbox value="developer">Developer</Checkbox> | ||
<Checkbox value="designer">Designer</Checkbox> | ||
</CheckboxGroup> | ||
</Stack> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { H1, Select, SelectItem, Stack, Text } from "@hopper-ui/components"; | ||
|
||
export function StorePage() { | ||
return ( | ||
<Stack> | ||
<H1>Store</H1> | ||
<Text> | ||
This is the store page. | ||
What is do you want to buy? | ||
</Text> | ||
<Select label="Movies"> | ||
<SelectItem id="venom">Venom</SelectItem> | ||
<SelectItem id="spider-man">Spider-man</SelectItem> | ||
<SelectItem id="deadpool">Deadpool</SelectItem> | ||
</Select> | ||
</Stack> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import url("@hopper-ui/components/index.css") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { StrictMode } from "react"; | ||
import { createRoot } from "react-dom/client"; | ||
import { BrowserRouter } from "react-router-dom"; | ||
import { App } from "./App.tsx"; | ||
import "./index.css"; | ||
|
||
const root = createRoot(document.getElementById("root")!); | ||
|
||
root.render( | ||
<StrictMode> | ||
<BrowserRouter> | ||
<App /> | ||
</BrowserRouter> | ||
</StrictMode> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @ts-check | ||
|
||
import { browserslistToSwc, defineBuildConfig } from "@workleap/swc-configs"; | ||
|
||
const targets = browserslistToSwc(); | ||
|
||
export const swcConfig = defineBuildConfig(targets); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @ts-check | ||
|
||
import { browserslistToSwc, defineDevConfig } from "@workleap/swc-configs"; | ||
|
||
const targets = browserslistToSwc(); | ||
|
||
export const swcConfig = defineDevConfig(targets); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "@workleap/typescript-configs/web-application.json", | ||
"exclude": ["dist", "node_modules"], | ||
"include": ["**/*", "../../../types"], | ||
"compilerOptions": { | ||
"paths": { | ||
"@hopper-ui/components": ["../../../packages/components/src/index.ts"], | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// @ts-check | ||
|
||
import { defineBuildConfig } from "@workleap/webpack-configs"; | ||
import { swcConfig } from "./swc.build.js"; | ||
|
||
export default defineBuildConfig(swcConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// @ts-check | ||
import { defineDevConfig } from "@workleap/webpack-configs"; | ||
import { swcConfig } from "./swc.dev.js"; | ||
|
||
export default defineDevConfig(swcConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.