@zendeskgarden/container-field
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -10,4 +10,2 @@ /** | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var React = require('react'); | ||
@@ -17,10 +15,5 @@ var reactUid = require('react-uid'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var React__default = /*#__PURE__*/_interopDefaultLegacy(React); | ||
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes); | ||
function useField(idPrefix) { | ||
const seed = reactUid.useUIDSeed(); | ||
const prefix = React.useMemo(() => idPrefix || seed(`field_${'2.1.1'}`), [idPrefix, seed]); | ||
const prefix = React.useMemo(() => idPrefix || seed(`field_${'2.1.2'}`), [idPrefix, seed]); | ||
const inputId = `${prefix}--input`; | ||
@@ -40,3 +33,3 @@ const labelId = `${prefix}--label`; | ||
'data-garden-container-id': 'containers.field', | ||
'data-garden-container-version': '2.1.1', | ||
'data-garden-container-version': '2.1.2', | ||
...other | ||
@@ -95,8 +88,8 @@ }; | ||
} = _ref; | ||
return React__default["default"].createElement(React__default["default"].Fragment, null, render(useField(id))); | ||
return React.createElement(React.Fragment, null, render(useField(id))); | ||
}; | ||
FieldContainer.propTypes = { | ||
children: PropTypes__default["default"].func, | ||
render: PropTypes__default["default"].func, | ||
id: PropTypes__default["default"].string | ||
children: PropTypes.func, | ||
render: PropTypes.func, | ||
id: PropTypes.string | ||
}; | ||
@@ -103,0 +96,0 @@ |
@@ -14,3 +14,3 @@ /** | ||
const seed = useUIDSeed(); | ||
const prefix = useMemo(() => idPrefix || seed(`field_${'2.1.1'}`), [idPrefix, seed]); | ||
const prefix = useMemo(() => idPrefix || seed(`field_${'2.1.2'}`), [idPrefix, seed]); | ||
const inputId = `${prefix}--input`; | ||
@@ -30,3 +30,3 @@ const labelId = `${prefix}--label`; | ||
'data-garden-container-id': 'containers.field', | ||
'data-garden-container-version': '2.1.1', | ||
'data-garden-container-version': '2.1.2', | ||
...other | ||
@@ -33,0 +33,0 @@ }; |
{ | ||
"name": "@zendeskgarden/container-field", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Containers relating to field in the Garden Design System", | ||
@@ -44,3 +44,3 @@ "license": "Apache-2.0", | ||
"zendeskgarden:src": "src/index.ts", | ||
"gitHead": "621beb216c03789ed99aa39ed0f2897fa2e52368" | ||
"gitHead": "1cc53f9f74902490e5af52e54d76c9aa06f8976a" | ||
} |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
19341
226