Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): component theming #5170

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5fa49fb
feat(ui): component theming (#4883)
dbanksdesign Apr 18, 2024
9084dc2
Merge branch 'main' into component-theming/main
dbanksdesign Apr 18, 2024
4652209
fixing test
dbanksdesign Apr 18, 2024
d675c4e
fixes
dbanksdesign Apr 19, 2024
89c5cfe
LFG
dbanksdesign Apr 23, 2024
bff60ab
updates
dbanksdesign Jun 19, 2024
014ab1b
Merge branch 'main' into component-theming/main
dbanksdesign Jun 19, 2024
3b7594b
updates
dbanksdesign Jun 20, 2024
861d1c6
adding more components and fixing things
dbanksdesign Jun 20, 2024
74cc803
fixes
dbanksdesign Jun 20, 2024
d07f5ae
starting to migrate React primitive classnames
dbanksdesign Jun 20, 2024
f38ebe1
more work
dbanksdesign Jun 21, 2024
3929d5b
working
dbanksdesign Jun 21, 2024
1027758
migrating more primitives
dbanksdesign Jun 21, 2024
10d4556
finishing removing ComponentClassNames
dbanksdesign Jun 24, 2024
dc83aa2
update accordion
dbanksdesign Jun 24, 2024
8569e78
undo primitives changes
dbanksdesign Jun 24, 2024
7031852
fixes
dbanksdesign Jun 24, 2024
c8ca4ba
fixing size increase
dbanksdesign Jun 25, 2024
1790554
fixing size increase
dbanksdesign Jun 25, 2024
098b9ce
fixing size increase
dbanksdesign Jun 25, 2024
57198dd
fixing docs page
dbanksdesign Jun 25, 2024
26e8fbd
updating internal names, removing unnecessary exports
dbanksdesign Jun 26, 2024
9b73ca0
final cleanup
dbanksdesign Jun 26, 2024
112be0f
add changeset
dbanksdesign Jun 26, 2024
2a490a8
removing one more type export
dbanksdesign Jun 26, 2024
fa620ea
changing to defineComponentTheme and adding containerProps function
dbanksdesign Jun 26, 2024
1b92c66
adding type benchmarks for themeing functions
dbanksdesign Jun 26, 2024
98b1142
cleanup
dbanksdesign Jun 26, 2024
745151e
Merge branch 'main' into component-theming/main
dbanksdesign Jun 26, 2024
6dfa6a5
fiddling with the yarn.lock
dbanksdesign Jun 26, 2024
86c1118
more fiddling
dbanksdesign Jun 26, 2024
c1bbcdb
please work
dbanksdesign Jun 26, 2024
badf3a7
fixing tests
dbanksdesign Jun 26, 2024
c3e0560
Merge branch 'main' into component-theming/main
dbanksdesign Jun 26, 2024
b68c1be
Merge branch 'main' into component-theming/main
dbanksdesign Jun 27, 2024
f937f27
adding animation support
dbanksdesign Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Heading
description: Heading renders semantic section heading text representing six levels.
themeSource: packages/ui/src/theme/tokens/components/heading.ts
reactSource: packages/react/src/primitives/Heading/Heading.tsx
mdnUrl: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
mdnUrl: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_element
htmlElement: h1-h6
supportedFrameworks: react
---
Expand Down
3 changes: 3 additions & 0 deletions examples/next-app-router/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions examples/next-app-router/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# 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
36 changes: 36 additions & 0 deletions examples/next-app-router/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
4 changes: 4 additions & 0 deletions examples/next-app-router/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

module.exports = nextConfig;
26 changes: 26 additions & 0 deletions examples/next-app-router/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "next-app-router",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@aws-amplify/ui-react": "^6.1.0",
"next": "^14.2.4",
"react": "^18",
"react-dom": "^18",
"tailwindcss": "^3.4.1"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.0.4",
"typescript": "^5"
}
}
6 changes: 6 additions & 0 deletions examples/next-app-router/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
1 change: 1 addition & 0 deletions examples/next-app-router/public/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/next-app-router/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/next-app-router/src/app/favicon.ico
Binary file not shown.
38 changes: 38 additions & 0 deletions examples/next-app-router/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@import '@aws-amplify/ui-react/styles.css';

* {
--hover-off: initial;
--hover-on: ;
--active-off: initial;
--active-on: ;
--hover: ;
--color-mode-light: initial;
--color-mode-dark: ;

--breakpoint-large: ;
}
*:hover {
--hover-off: ;
--hover-on: initial;
--hover: initial;
}

*:active {
--active-off: ;
--active-on: initial;
}

[data-amplify-color-mode='dark'] {
--color-mode-light: ;
--color-mode-dark: initial;
}

@media (min-width: 992px) {
[data-amplify-theme='my-theme'] {
--breakpoint-large: initial;
}
}
22 changes: 22 additions & 0 deletions examples/next-app-router/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
import './globals.css';

const inter = Inter({ subsets: ['latin'] });

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
);
}
Loading
Loading