first commit
Some checks failed
Test examples / Test Examples (20) (push) Has been cancelled
Test examples / Test Examples (22) (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Trigger Release / start (push) Has been cancelled
Stale issue handler / stale (push) Has been cancelled
Update Font Data / create-pull-request (push) Has been cancelled
build-and-deploy / deploy-target (push) Has been cancelled
build-and-deploy / build (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / build-wasm (nodejs) (push) Has been cancelled
build-and-deploy / build-wasm (web) (push) Has been cancelled
build-and-deploy / Deploy preview tarball (push) Has been cancelled
build-and-deploy / Potentially publish release (push) Has been cancelled
build-and-deploy / publish-turbopack-npm-packages (push) Has been cancelled
build-and-deploy / Deploy examples (push) Has been cancelled
build-and-deploy / thank you, build (push) Has been cancelled
build-and-deploy / Upload Turbopack Bytesize metrics to Datadog (push) Has been cancelled
Rspack Next.js development integration tests / Rspack integration tests (push) Has been cancelled
Rspack Next.js production integration tests / Rspack integration tests (push) Has been cancelled
Turbopack Next.js development integration tests / Next.js integration tests (push) Has been cancelled
Turbopack Next.js production integration tests / Next.js integration tests (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack development test manifest (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack production test manifest (push) Has been cancelled
Upload bundler test manifests to areweturboyet.com / Upload test results (push) Has been cancelled
Update React / create-pull-request (push) Has been cancelled
test-e2e-project-reset-cron / reset-test-project (push) Has been cancelled
Notify about the top 15 issues/PRs/feature requests (most reacted) in the last 90 days / run (push) Has been cancelled

This commit is contained in:
Arian Tron
2026-03-10 19:37:31 +03:30
commit 61f56f997c
27684 changed files with 2784175 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
{
"presets": [
[
"next/babel",
{
"preset-react": {
"runtime": "automatic",
"importSource": "reflexjs"
}
}
]
]
}

40
examples/with-reflexjs/.gitignore vendored Normal file
View File

@@ -0,0 +1,40 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

View File

@@ -0,0 +1,27 @@
# Next.js + Reflexjs Example
Reflexjs is a library for rapid UI development with style props, color modes, themes and variants.
This example shows how to use [Reflexjs](https://github.com/reflexjs/reflexjs) with Next.js.
## Deploy your own
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-reflexjs&project-name=with-reflexjs&repository-name=with-reflexjs)
## How to use
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
```bash
npx create-next-app --example with-reflexjs with-reflexjs-app
```
```bash
yarn create next-app --example with-reflexjs with-reflexjs-app
```
```bash
pnpm create next-app --example with-reflexjs with-reflexjs-app
```
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).

View File

@@ -0,0 +1,20 @@
{
"private": true,
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"reflexjs": "^2.0.0"
},
"devDependencies": {
"@babel/core": "7.22.5",
"@types/node": "^14.14.12",
"@types/react": "^17.0.0",
"typescript": "^4.1.2"
}
}

View File

@@ -0,0 +1,11 @@
import { AppProps } from "next/app";
import { ThemeProvider } from "reflexjs";
import theme from "../src/theme";
export default function App({ Component, pageProps }: AppProps) {
return (
<ThemeProvider theme={theme}>
<Component {...pageProps} />
</ThemeProvider>
);
}

View File

@@ -0,0 +1,17 @@
import NextDocument, { Html, Main, NextScript, Head } from "next/document";
import { InitializeColorMode } from "reflexjs";
export default class Document extends NextDocument {
render() {
return (
<Html lang="en">
<Head />
<body>
<InitializeColorMode />
<Main />
<NextScript />
</body>
</Html>
);
}
}

View File

@@ -0,0 +1,15 @@
export default function IndexPage() {
return (
<div variant="container" textAlign="center" py="20">
<h1 variant="heading.h1">
Welcome to <span color="primary">Reflexjs</span>
</h1>
<p fontSize="xl" my="4">
Get started by editing pages/index.tsx
</p>
<a href="https://reflexjs.org/docs" variant="button.primary">
Read the docs
</a>
</div>
);
}

View File

@@ -0,0 +1,192 @@
import { Theme } from "reflexjs";
const theme: Theme = {
useRootStyles: true,
initialColorModeName: "light",
colors: {
text: "#191924",
background: "#fff",
primary: "#06f",
border: "#ebece9",
modes: {
dark: {
text: "#ededee",
background: "#1a202c",
primary: "#06f",
border: "#2a2a3c",
},
},
},
breakpoints: ["640px", "768px", "1024px", "1280px"],
fonts: {
body: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
heading: "inherit",
monospace:
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",
},
fontSizes: {
sm: "0.875rem",
md: "1rem",
lg: "3rem",
},
fontWeights: {
normal: 400,
medium: 500,
bold: 700,
},
space: {
0: "0",
1: "0.25rem",
2: "0.5rem",
3: "0.75rem",
4: "1rem",
5: "1.25rem",
6: "1.5rem",
7: "1.75rem",
8: "2rem",
9: "2.25rem",
10: "2.5rem",
},
sizes: {
0: "0",
1: "0.25rem",
2: "0.5rem",
3: "0.75rem",
4: "1rem",
5: "1.25rem",
6: "1.5rem",
7: "1.75rem",
8: "2rem",
9: "2.25rem",
10: "2.5rem",
auto: "auto",
half: "50%",
full: "100%",
screen: "100vw",
},
borders: [0, "1px solid"],
radii: {
none: "0",
sm: "0.125rem",
md: "0.25rem",
lg: "0.375rem",
xl: "0.5rem",
},
shadows: {
none: "none",
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
md: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
lg: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
},
gridTemplateColumns: {
none: "none",
1: "repeat(1, minmax(0, 1fr))",
2: "repeat(2, minmax(0, 1fr))",
3: "repeat(3, minmax(0, 1fr))",
},
gridTemplateRows: {
none: "none",
1: "repeat(1, minmax(0, 1fr))",
2: "repeat(2, minmax(0, 1fr))",
3: "repeat(3, minmax(0, 1fr))",
},
styles: {
root: {
fontFamily: "body",
fontSize: 16,
lineHeight: "normal",
fontFeatureSettings: "'kern'",
textRendering: "optimizeLegibility",
WebkitFontSmoothing: "antialiased",
"*": {
listStyle: "none",
border: "0 solid",
borderColor: "border",
m: 0,
p: 0,
"::selection": {
bg: "selection",
},
},
body: {
color: "text",
fontFamily: "body",
fontWeight: "normal",
fontSize: "md",
lineHeight: "relaxed",
letterSpacing: "normal",
},
},
},
// Variants.
text: {
paragraph: {
fontSize: "lg",
my: 8,
lineHeight: 8,
},
},
heading: {
color: "heading",
fontFamily: "heading",
fontWeight: "semibold",
lineHeight: "tight",
letterSpacing: "tight",
h1: {
fontWeight: "bold",
lineHeight: "1.1",
fontSize: "lg",
},
},
container: {
px: "6|6|6|4",
mx: "auto",
maxWidth: 1280,
},
button: {
display: "inline-flex",
alignItems: "center",
justifyContent: "center",
color: "text",
bg: "muted",
fontFamily: "body",
fontSize: "md",
fontWeight: "medium",
lineHeight: "none",
textDecoration: "none",
border: "1px solid",
borderColor: "border",
borderRadius: "md",
px: 4,
py: 3,
cursor: "pointer",
transition: "all .15s ease-in",
":hover, :focus": {
transform: "translateY(-2px)",
boxShadow: "lg",
},
primary: {
bg: "primary",
color: "white",
borderColor: "primary",
"&:hover, &:focus": {
bg: "primaryHover",
color: "white",
borderColor: "primaryHover",
transform: "translateY(-2px)",
boxShadow: "lg",
},
},
},
};
export default theme;

View File

@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}