@doist/reactist 27.4.0 → 27.5.0

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.
@@ -1982,7 +1982,9 @@ function BaseField({
1982
1982
  hidden,
1983
1983
  'aria-describedby': originalAriaDescribedBy,
1984
1984
  id: originalId,
1985
- characterCountPosition = 'below'
1985
+ characterCountPosition = 'below',
1986
+ endSlot,
1987
+ endSlotPosition = 'bottom'
1986
1988
  }) {
1987
1989
  const id = useId(originalId);
1988
1990
  const messageId = useId();
@@ -2045,8 +2047,13 @@ function BaseField({
2045
2047
  space: "xsmall",
2046
2048
  hidden: hidden
2047
2049
  }, /*#__PURE__*/React__namespace.createElement(Box$1, {
2050
+ display: "flex",
2051
+ flexDirection: "row",
2048
2052
  className: [className, modules_540a88ff.container, tone === 'error' ? modules_540a88ff.error : null, variant === 'bordered' ? modules_540a88ff.bordered : null],
2049
- maxWidth: maxWidth
2053
+ maxWidth: maxWidth,
2054
+ alignItems: "center"
2055
+ }, /*#__PURE__*/React__namespace.createElement(Box$1, {
2056
+ flexGrow: 1
2050
2057
  }, label || auxiliaryLabel ? /*#__PURE__*/React__namespace.createElement(Box$1, {
2051
2058
  as: "span",
2052
2059
  display: "flex",
@@ -2061,7 +2068,7 @@ function BaseField({
2061
2068
  }, label) : null), auxiliaryLabel ? /*#__PURE__*/React__namespace.createElement(Box$1, {
2062
2069
  className: modules_540a88ff.auxiliaryLabel,
2063
2070
  paddingLeft: "small"
2064
- }, auxiliaryLabel) : null) : null, children(childrenProps)), message || characterCount ? /*#__PURE__*/React__namespace.createElement(Columns, {
2071
+ }, auxiliaryLabel) : null) : null, children(childrenProps)), endSlot && endSlotPosition === 'fullHeight' ? endSlot : null), message || characterCount ? /*#__PURE__*/React__namespace.createElement(Columns, {
2065
2072
  align: "right",
2066
2073
  space: "small",
2067
2074
  maxWidth: maxWidth
@@ -2077,7 +2084,7 @@ function BaseField({
2077
2084
 
2078
2085
  var modules_aaf25250 = {"inputWrapper":"c8f65b3b","readOnly":"_326f2644","bordered":"_5252fd3d","error":"_0141b7ac","slot":"b79b851f"};
2079
2086
 
2080
- const _excluded$d = ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "type", "maxWidth", "maxLength", "hidden", "aria-describedby", "startSlot", "endSlot", "onChange", "characterCountPosition"],
2087
+ const _excluded$d = ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "type", "maxWidth", "maxLength", "hidden", "aria-describedby", "startSlot", "endSlot", "onChange", "characterCountPosition", "endSlotPosition"],
2081
2088
  _excluded2$4 = ["onChange", "characterCountElement"];
2082
2089
  const TextField = /*#__PURE__*/React__namespace.forwardRef(function TextField(_ref, ref) {
2083
2090
  let {
@@ -2096,7 +2103,8 @@ const TextField = /*#__PURE__*/React__namespace.forwardRef(function TextField(_r
2096
2103
  startSlot,
2097
2104
  endSlot,
2098
2105
  onChange: originalOnChange,
2099
- characterCountPosition = 'below'
2106
+ characterCountPosition = 'below',
2107
+ endSlotPosition = 'bottom'
2100
2108
  } = _ref,
2101
2109
  props = _objectWithoutProperties(_ref, _excluded$d);
2102
2110
 
@@ -2110,6 +2118,7 @@ const TextField = /*#__PURE__*/React__namespace.forwardRef(function TextField(_r
2110
2118
  (_internalRef$current = internalRef.current) == null ? void 0 : _internalRef$current.focus();
2111
2119
  }
2112
2120
 
2121
+ const displayEndSlot = endSlot && (variant === 'default' || variant === 'bordered' && endSlotPosition === 'bottom');
2113
2122
  return /*#__PURE__*/React__namespace.createElement(BaseField, {
2114
2123
  variant: variant,
2115
2124
  id: id,
@@ -2122,7 +2131,10 @@ const TextField = /*#__PURE__*/React__namespace.forwardRef(function TextField(_r
2122
2131
  maxLength: maxLength,
2123
2132
  hidden: hidden,
2124
2133
  "aria-describedby": ariaDescribedBy,
2125
- characterCountPosition: characterCountPosition
2134
+ characterCountPosition: characterCountPosition,
2135
+ supportsStartAndEndSlots: true,
2136
+ endSlot: endSlot,
2137
+ endSlotPosition: variant === 'bordered' ? endSlotPosition : undefined
2126
2138
  }, _ref2 => {
2127
2139
  let {
2128
2140
  onChange,
@@ -2148,12 +2160,12 @@ const TextField = /*#__PURE__*/React__namespace.forwardRef(function TextField(_r
2148
2160
  originalOnChange == null ? void 0 : originalOnChange(event);
2149
2161
  onChange == null ? void 0 : onChange(event);
2150
2162
  }
2151
- })), endSlot || characterCountElement ? /*#__PURE__*/React__namespace.createElement(Box$1, {
2163
+ })), displayEndSlot || characterCountElement ? /*#__PURE__*/React__namespace.createElement(Box$1, {
2152
2164
  className: modules_aaf25250.slot,
2153
2165
  display: "flex",
2154
2166
  marginRight: variant === 'bordered' ? '-xsmall' : 'xsmall',
2155
2167
  marginLeft: variant === 'bordered' ? 'xsmall' : '-xsmall'
2156
- }, characterCountElement, endSlot) : null);
2168
+ }, characterCountElement, displayEndSlot ? endSlot : null) : null);
2157
2169
  });
2158
2170
  });
2159
2171