@doist/reactist 28.3.0 → 28.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/reactist.cjs.development.js +6 -8
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/base-field/base-field.js +6 -8
- package/es/base-field/base-field.js.map +1 -1
- package/lib/base-field/base-field.js +1 -1
- package/lib/base-field/base-field.js.map +1 -1
- package/package.json +1 -1
|
@@ -2002,15 +2002,13 @@ function BaseField({
|
|
|
2002
2002
|
const [characterCount, setCharacterCount] = React__namespace.useState(inputLength.count);
|
|
2003
2003
|
const [characterCountTone, setCharacterCountTone] = React__namespace.useState(inputLength.tone);
|
|
2004
2004
|
const ariaDescribedBy = originalAriaDescribedBy != null ? originalAriaDescribedBy : message ? messageId : null;
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
* If the characterCountPosition value is 'hidden', it returns null.
|
|
2008
|
-
*/
|
|
2005
|
+
const renderCharacterCountBelow = characterCountPosition === 'below' && characterCount !== null;
|
|
2006
|
+
const renderCharacterCountInline = characterCountPosition === 'inline' && characterCount !== null;
|
|
2009
2007
|
|
|
2010
2008
|
function renderCharacterCount() {
|
|
2011
|
-
return
|
|
2009
|
+
return /*#__PURE__*/React__namespace.createElement(FieldCharacterCount, {
|
|
2012
2010
|
tone: characterCountTone
|
|
2013
|
-
}, characterCount)
|
|
2011
|
+
}, characterCount);
|
|
2014
2012
|
}
|
|
2015
2013
|
|
|
2016
2014
|
const childrenProps = _objectSpread2(_objectSpread2({
|
|
@@ -2035,7 +2033,7 @@ function BaseField({
|
|
|
2035
2033
|
},
|
|
2036
2034
|
|
|
2037
2035
|
// If the character count is inline, we pass it as a prop to the children element so it can be rendered inline
|
|
2038
|
-
characterCountElement:
|
|
2036
|
+
characterCountElement: renderCharacterCountInline ? renderCharacterCount() : null
|
|
2039
2037
|
});
|
|
2040
2038
|
|
|
2041
2039
|
React__namespace.useEffect(function updateCharacterCountOnPropChange() {
|
|
@@ -2075,7 +2073,7 @@ function BaseField({
|
|
|
2075
2073
|
}, label) : null), auxiliaryLabel ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
2076
2074
|
className: modules_540a88ff.auxiliaryLabel,
|
|
2077
2075
|
paddingLeft: "small"
|
|
2078
|
-
}, auxiliaryLabel) : null) : null, children(childrenProps)), endSlot && endSlotPosition === 'fullHeight' ? endSlot : null), message ||
|
|
2076
|
+
}, auxiliaryLabel) : null) : null, children(childrenProps)), endSlot && endSlotPosition === 'fullHeight' ? endSlot : null), message || renderCharacterCountBelow ? /*#__PURE__*/React__namespace.createElement(Columns, {
|
|
2079
2077
|
align: "right",
|
|
2080
2078
|
space: "small",
|
|
2081
2079
|
maxWidth: maxWidth
|