@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.
@@ -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
- * Renders the character count element.
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 characterCountPosition !== 'hidden' ? /*#__PURE__*/React__namespace.createElement(FieldCharacterCount, {
2009
+ return /*#__PURE__*/React__namespace.createElement(FieldCharacterCount, {
2012
2010
  tone: characterCountTone
2013
- }, characterCount) : null;
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: characterCountPosition === 'inline' ? renderCharacterCount() : null
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 || characterCount ? /*#__PURE__*/React__namespace.createElement(Columns, {
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