Skip to content

Commit

Permalink
Merge branch 'main' into feat/use-disclosure
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Apr 4, 2024
2 parents 68a7f64 + 9373518 commit 565d303
Show file tree
Hide file tree
Showing 1,735 changed files with 53,488 additions and 95,246 deletions.
22 changes: 20 additions & 2 deletions .changeset/blue-masks-tell.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
---
"@chakra-ui/theme": patch
"@chakra-ui/react": minor
---

Fix hard-coded z-index for Menu in favor of one defined from the theme
### Fixed

- Fix hard-coded z-index for Menu in favor of one defined from the theme
- Fix problem with leading and trailing spaces when getting initials for the
Avatar component
- Suppress unnecessary re-renders of Checkbox and Radio component

### Added

- Add CSS `accentColor` property to style props
- Add support for `asChild` in chakra factory
- Export `toastStore` from `toast` component
- Upgrade `framer-motion` to allow for skipAnimations
- Add component namespace to reduce imports and provide better composition
- Modal, Drawer: Add default `preserveScrollBarGap`

### Changed

Redesign the component themes and anatomy
9 changes: 1 addition & 8 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,5 @@
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
},
"ignore": [
"create-react-app-ts",
"gatsby-starter-default",
"chakra-next-app",
"chakra-next-pages",
"chakra-storybook-addon",
"vite-ts"
]
"ignore": ["chakra-next-app", "chakra-next-pages", "vite-ts"]
}
5 changes: 0 additions & 5 deletions .changeset/dirty-carrots-check.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/great-windows-warn.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/happy-falcons-guess.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/khaki-windows-hide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lucky-donuts-burn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/metal-mangos-judge.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ninety-humans-call.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/old-kids-smile.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/pretty-cougars-cough.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
"@chakra-ui/styled-system": minor
"@chakra-ui/react": minor
"@chakra-ui/theme": minor
---

Add support for custom theme conditions or pseudo props via `theme.conditions`
Expand Down
5 changes: 0 additions & 5 deletions .changeset/slimy-hotels-shave.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/smart-maps-repair.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/soft-crabs-scream.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/spotty-buckets-know.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/tasty-scissors-watch.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@chakra-ui/styled-system": minor
"@chakra-ui/react": minor
---

Add support for `_open` and `_closed` pseudo props for styling their respective
Expand Down
5 changes: 0 additions & 5 deletions .changeset/young-lizards-double.md

This file was deleted.

13 changes: 0 additions & 13 deletions .codesandbox/ci.json

This file was deleted.

34 changes: 8 additions & 26 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 10
"ecmaVersion": 10,
"project": "./tsconfig.build.json",
},
"extends": [
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"airbnb-typescript",
"prettier"
"prettier",
],
"env": {
"es6": true,
"browser": true,
"node": true
"node": true,
},
"settings": {
"react": {
"version": "detect"
}
"version": "detect",
},
},
"plugins": ["@typescript-eslint/eslint-plugin", "testing-library"],
"rules": {
Expand Down Expand Up @@ -59,7 +60,7 @@
"no-alert": "off",
"react/jsx-filename-extension": [
"error",
{ "extensions": [".js", ".tsx"] }
{ "extensions": [".js", ".tsx"] },
],
"react/jsx-props-no-spreading": "off",
"react/no-array-index-key": "off",
Expand All @@ -71,25 +72,6 @@
"import/no-named-as-default": "off",
"prefer-object-spread": "off",
"arrow-body-style": "off",
"react/sort-comp": "off"
"react/sort-comp": "off",
},
"overrides": [
{
"files": [
"packages/**/*.ts",
"packages/**/*.tsx",
"tooling/**/*/*.ts",
"scripts/**/*.ts"
],
"parserOptions": {
"project": ["tsconfig.json"]
}
},
{
"files": ["scripts/**/*.ts"],
"parserOptions": {
"project": ["scripts/tsconfig.json"]
}
}
]
}
22 changes: 0 additions & 22 deletions .github/workflows/sync.yml

This file was deleted.

9 changes: 2 additions & 7 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"**/*.{ts,tsx,js,jsx}": [
"prettier --write"
],
"**/*.{md,mdx,yml,json,babelrc,eslintrc,prettierrc}": [
"prettier --write"
]
}
"**/*.{ts,tsx,js,jsx,md,mdx}": ["prettier --write"]
}
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all"
"trailingComma": "all",
"importOrder": ["<THIRD_PARTY_MODULES>, ^@/(.*)$", "^[./]"],
"importOrderSortSpecifiers": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
7 changes: 0 additions & 7 deletions .storybook/.babelrc.json

This file was deleted.

19 changes: 0 additions & 19 deletions .storybook/main.mjs

This file was deleted.

25 changes: 25 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { StorybookConfig } from "@storybook/react-vite"

const config: StorybookConfig = {
stories: ["../packages/react/__stories__/*.stories.tsx"],
addons: [
"@storybook/addon-a11y",
"@storybook/addon-essentials",
"@storybook/addon-themes",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
features: {
buildStoriesJson: true,
},
core: {
disableTelemetry: true,
},
typescript: {
reactDocgen: false,
},
}

export default config
6 changes: 0 additions & 6 deletions .storybook/manager.mjs

This file was deleted.

6 changes: 6 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from "@storybook/manager-api"
import theme from "./storybook-theme"

addons.setConfig({
theme,
})
26 changes: 0 additions & 26 deletions .storybook/preview.mjs

This file was deleted.

30 changes: 30 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { withThemeByClassName } from "@storybook/addon-themes"
import { Preview, ReactRenderer } from "@storybook/react"
import React from "react"
import { ChakraProvider, defaultSystem } from "../packages/react/src"

const preview: Preview = {
parameters: {
options: {
storySort: {
method: "alphabetical",
},
},
},
decorators: [
withThemeByClassName<ReactRenderer>({
defaultTheme: "light",
themes: {
light: "",
dark: "dark",
},
}),
(Story) => (
<ChakraProvider value={defaultSystem}>
<Story />
</ChakraProvider>
),
],
}

export default preview

0 comments on commit 565d303

Please sign in to comment.