@chakra-ui/form-control
Advanced tools
Comparing version 1.3.8 to 1.4.0-next.0
# Change Log | ||
## 1.4.0-next.0 | ||
### Minor Changes | ||
- [`ff4dc7c38`](https://github.com/chakra-ui/chakra-ui/commit/ff4dc7c38310367c0e89522db9e88ae069cb6c2b) | ||
[#4317](https://github.com/chakra-ui/chakra-ui/pull/4317) Thanks | ||
[@bhishp](https://github.com/bhishp)! - Added a `container` part to the | ||
`FormControl` component theme, allowing the root `FormControl` element to be | ||
themed. | ||
```jsx | ||
import { extendTheme } from "@chakra-ui/react" | ||
export const theme = extendTheme({ | ||
components: { | ||
Form: { | ||
variants: { | ||
// create a variant named "custom" | ||
custom: { | ||
// style the root `FormControl` element | ||
container: { | ||
color: "white", | ||
bg: "blue.900", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}) | ||
``` | ||
### Patch Changes | ||
- [`4c1071969`](https://github.com/chakra-ui/chakra-ui/commit/4c1071969a9b41a952b374f9990ac0bb89d24fa0) | ||
[#4437](https://github.com/chakra-ui/chakra-ui/pull/4437) Thanks | ||
[@Toxiapo](https://github.com/Toxiapo)! - Remove code that was added as a | ||
workaround for pre-releases of React concurrent mode. | ||
- Updated dependencies | ||
[[`4c1071969`](https://github.com/chakra-ui/chakra-ui/commit/4c1071969a9b41a952b374f9990ac0bb89d24fa0), | ||
[`d3d85956c`](https://github.com/chakra-ui/chakra-ui/commit/d3d85956c776b4768cfe21dabcf9292e01875d74), | ||
[`43f66097b`](https://github.com/chakra-ui/chakra-ui/commit/43f66097b39f1c37a4627dd6ca8a85555f35b95c)]: | ||
- @chakra-ui/utils@1.8.2-next.0 | ||
- @chakra-ui/system@1.7.2-next.0 | ||
- @chakra-ui/hooks@1.5.5-next.0 | ||
- @chakra-ui/icon@1.1.11-next.0 | ||
- @chakra-ui/react-utils@1.1.3-next.0 | ||
## 1.3.8 | ||
@@ -4,0 +52,0 @@ |
@@ -166,5 +166,2 @@ "use strict"; | ||
}, []); | ||
var onFocus = React.useCallback(function () { | ||
(0, _utils.scheduleMicrotask)(setFocus.on); | ||
}, [setFocus]); | ||
return { | ||
@@ -176,3 +173,3 @@ isRequired: !!isRequired, | ||
isFocused: !!isFocused, | ||
onFocus: onFocus, | ||
onFocus: setFocus.on, | ||
onBlur: setFocus.off, | ||
@@ -222,6 +219,3 @@ hasFeedbackText: hasFeedbackText, | ||
className: className, | ||
__css: { | ||
width: "100%", | ||
position: "relative" | ||
} | ||
__css: styles["container"] | ||
})))); | ||
@@ -228,0 +222,0 @@ }); |
@@ -7,3 +7,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import { chakra, forwardRef, omitThemingProps, StylesProvider, useMultiStyleConfig, useStyles } from "@chakra-ui/system"; | ||
import { cx, dataAttr, __DEV__, scheduleMicrotask } from "@chakra-ui/utils"; | ||
import { cx, dataAttr, __DEV__ } from "@chakra-ui/utils"; | ||
import { createContext, mergeRefs } from "@chakra-ui/react-utils"; | ||
@@ -143,5 +143,2 @@ import * as React from "react"; | ||
}, []); | ||
var onFocus = React.useCallback(() => { | ||
scheduleMicrotask(setFocus.on); | ||
}, [setFocus]); | ||
return { | ||
@@ -153,3 +150,3 @@ isRequired: !!isRequired, | ||
isFocused: !!isFocused, | ||
onFocus, | ||
onFocus: setFocus.on, | ||
onBlur: setFocus.off, | ||
@@ -198,6 +195,3 @@ hasFeedbackText, | ||
className: className, | ||
__css: { | ||
width: "100%", | ||
position: "relative" | ||
} | ||
__css: styles["container"] | ||
})))); | ||
@@ -204,0 +198,0 @@ }); |
{ | ||
"name": "@chakra-ui/form-control", | ||
"version": "1.3.8", | ||
"version": "1.4.0-next.0", | ||
"description": "React component to provide validation states to form fields", | ||
@@ -38,3 +38,4 @@ "keywords": [ | ||
"type": "git", | ||
"url": "git+https://github.com/chakra-ui/chakra-ui.git" | ||
"url": "git+https://github.com/chakra-ui/chakra-ui.git", | ||
"directory": "packages/form-control" | ||
}, | ||
@@ -59,15 +60,15 @@ "bugs": { | ||
"dependencies": { | ||
"@chakra-ui/hooks": "1.5.4", | ||
"@chakra-ui/icon": "1.1.10", | ||
"@chakra-ui/react-utils": "1.1.2", | ||
"@chakra-ui/utils": "1.8.1" | ||
"@chakra-ui/hooks": "1.5.5-next.0", | ||
"@chakra-ui/icon": "1.1.11-next.0", | ||
"@chakra-ui/react-utils": "1.1.3-next.0", | ||
"@chakra-ui/utils": "1.8.2-next.0" | ||
}, | ||
"devDependencies": { | ||
"@chakra-ui/system": "1.7.1", | ||
"@chakra-ui/system": "1.7.2-next.0", | ||
"react": "^17.0.1" | ||
}, | ||
"peerDependencies": { | ||
"@chakra-ui/system": ">=1.0.0", | ||
"@chakra-ui/system": ">=1.7.2-next.0", | ||
"react": ">=16.8.6" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122569
981
1
+ Added@chakra-ui/hooks@1.5.5-next.0(transitive)
+ Added@chakra-ui/icon@1.1.11-next.0(transitive)
+ Added@chakra-ui/react-utils@1.1.3-next.0(transitive)
+ Added@chakra-ui/utils@1.8.2-next.0(transitive)
- Removed@chakra-ui/hooks@1.5.4(transitive)
- Removed@chakra-ui/icon@1.1.10(transitive)
- Removed@chakra-ui/react-utils@1.1.2(transitive)
- Removed@chakra-ui/utils@1.8.1(transitive)