@oceanbase/design 1.0.0-alpha.5 → 1.0.0-alpha.7

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.
Files changed (88) hide show
  1. package/dist/design.min.css +1 -1
  2. package/dist/design.min.js +1 -1
  3. package/dist/reset.css +2 -1
  4. package/dist/static/Inter-Medium.ea234620.woff2 +0 -0
  5. package/dist/static/Inter-Regular.34ba43c9.woff2 +0 -0
  6. package/dist/static/Inter-SemiBold.95439fb4.woff2 +0 -0
  7. package/es/alert/index.js +1 -4
  8. package/es/alert/style/index.js +17 -19
  9. package/es/app/style/index.js +3 -6
  10. package/es/button/style/index.js +10 -2
  11. package/es/config-provider/index.d.ts +2 -1
  12. package/es/config-provider/index.js +43 -16
  13. package/es/descriptions/hooks/useItems.d.ts +6 -6
  14. package/es/descriptions/style/index.js +3 -1
  15. package/es/fonts/Inter-Medium.woff2 +0 -0
  16. package/es/fonts/Inter-Regular.woff2 +0 -0
  17. package/es/fonts/Inter-SemiBold.woff2 +0 -0
  18. package/es/form/style/index.js +3 -1
  19. package/es/index.d.ts +0 -1
  20. package/es/index.js +0 -1
  21. package/es/input/Input.d.ts +2 -0
  22. package/es/input/Input.js +23 -7
  23. package/es/input/Password.js +17 -5
  24. package/es/input/Search.js +17 -5
  25. package/es/input/TextArea.js +17 -5
  26. package/es/input/style/index.d.ts +9 -0
  27. package/es/input/style/index.js +17 -0
  28. package/es/input-number/index.js +11 -4
  29. package/es/input-number/style/index.d.ts +9 -0
  30. package/es/input-number/style/index.js +22 -0
  31. package/es/locale/ja-JP.js +2 -2
  32. package/es/segmented/index.d.ts +1 -0
  33. package/es/segmented/index.js +15 -7
  34. package/es/segmented/style/index.js +1 -0
  35. package/es/style/global.d.ts +8 -0
  36. package/es/style/global.js +118 -0
  37. package/es/style/reset.css +2 -1
  38. package/es/table/index.d.ts +2 -2
  39. package/es/table/style/index.js +5 -1
  40. package/es/theme/compact.d.ts +1 -1
  41. package/es/theme/compact.js +2 -6
  42. package/es/theme/default.d.ts +1 -1
  43. package/es/theme/default.js +29 -10
  44. package/es/typography/style/index.js +3 -0
  45. package/lib/alert/index.js +1 -3
  46. package/lib/alert/style/index.js +15 -16
  47. package/lib/app/style/index.js +2 -4
  48. package/lib/button/style/index.js +8 -2
  49. package/lib/config-provider/index.d.ts +2 -1
  50. package/lib/config-provider/index.js +60 -12
  51. package/lib/descriptions/hooks/useItems.d.ts +6 -6
  52. package/lib/descriptions/style/index.js +3 -0
  53. package/lib/fonts/Inter-Medium.woff2 +0 -0
  54. package/lib/fonts/Inter-Regular.woff2 +0 -0
  55. package/lib/fonts/Inter-SemiBold.woff2 +0 -0
  56. package/lib/form/style/index.js +4 -1
  57. package/lib/index.d.ts +0 -1
  58. package/lib/index.js +0 -1
  59. package/lib/input/Input.d.ts +2 -0
  60. package/lib/input/Input.js +35 -12
  61. package/lib/input/Password.js +20 -3
  62. package/lib/input/Search.js +30 -11
  63. package/lib/input/TextArea.js +20 -3
  64. package/lib/input/style/index.d.ts +9 -0
  65. package/lib/input/style/index.js +46 -0
  66. package/lib/input-number/index.js +18 -3
  67. package/lib/input-number/style/index.d.ts +9 -0
  68. package/lib/input-number/style/index.js +51 -0
  69. package/lib/locale/ja-JP.js +2 -2
  70. package/lib/segmented/index.d.ts +1 -0
  71. package/lib/segmented/index.js +10 -3
  72. package/lib/segmented/style/index.js +1 -0
  73. package/lib/style/global.d.ts +8 -0
  74. package/lib/style/global.js +168 -0
  75. package/lib/style/reset.css +2 -1
  76. package/lib/table/index.d.ts +2 -2
  77. package/lib/table/style/index.js +5 -1
  78. package/lib/theme/compact.d.ts +1 -1
  79. package/lib/theme/compact.js +1 -5
  80. package/lib/theme/default.d.ts +1 -1
  81. package/lib/theme/default.js +29 -10
  82. package/lib/typography/style/index.js +3 -0
  83. package/package.json +3 -2
  84. package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
  85. package/es/fonts/Inter.woff2 +0 -0
  86. package/es/global.css +0 -48
  87. package/lib/fonts/Inter.woff2 +0 -0
  88. package/lib/global.css +0 -48
package/dist/reset.css CHANGED
@@ -1 +1,2 @@
1
- @import '~antd/dist/reset.css';
1
+ /* antd/dist/reset.css is imported in global.tsx */
2
+ /* reserve this file for compatibility with antd */
package/es/alert/index.js CHANGED
@@ -13,7 +13,6 @@ import { CheckCircleOutlined, CloseCircleOutlined, ExclamationCircleOutlined, In
13
13
  import classNames from 'classnames';
14
14
  import ConfigProvider from "../config-provider";
15
15
  import useStyle from "./style";
16
- import theme from "../theme";
17
16
  import { jsx as _jsx } from "react/jsx-runtime";
18
17
  export * from 'antd/es/alert';
19
18
  var iconMapOutlined = {
@@ -33,10 +32,8 @@ var Alert = function Alert(_ref) {
33
32
  customizePrefixCls = _ref.prefixCls,
34
33
  className = _ref.className,
35
34
  restProps = _objectWithoutProperties(_ref, _excluded);
36
- var _theme$useToken = theme.useToken(),
37
- token = _theme$useToken.token;
38
35
  // banner exists and type is empty, use warning type by default for correct icon
39
- var type = banner && !typeProp ? 'warning' : typeProp;
36
+ var type = (banner && !typeProp ? 'warning' : typeProp) || 'info';
40
37
  var _useContext = useContext(ConfigProvider.ConfigContext),
41
38
  getPrefixCls = _useContext.getPrefixCls;
42
39
  var prefixCls = getPrefixCls('alert', customizePrefixCls);
@@ -2,6 +2,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ import { unit } from '@ant-design/cssinjs';
5
6
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
7
  import { upperFirst } from 'lodash';
7
8
  var genAlertTypeStyle = function genAlertTypeStyle(type, token) {
@@ -42,12 +43,23 @@ export var genAlertStyle = function genAlertStyle(token) {
42
43
  var contentStartOffset = calc(iconWidth).add(token.marginXS).equal();
43
44
  // close icon width (approximate)
44
45
  var closeIconWidth = height;
45
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
46
+ // Common calculated values
47
+ var contentWidth = unit(calc(contentStartOffset).add(closeIconWidth).add(token.padding).equal());
48
+ var actionWidth = unit(calc(contentStartOffset).add(token.padding).equal());
49
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
46
50
  // vertical align to flex-start
47
51
  alignItems: 'flex-start !important',
48
52
  paddingInline: token.padding,
49
53
  position: 'relative'
50
- }, "".concat(componentCls, "-icon"), {
54
+ }, "".concat(componentCls, "-content"), {
55
+ flex: "1 1 calc(100% - ".concat(contentWidth, ")"),
56
+ minWidth: 0,
57
+ maxWidth: "calc(100% - ".concat(contentWidth, ")"),
58
+ wordBreak: 'break-word'
59
+ }), "".concat(componentCls, "-action"), {
60
+ width: "calc(100% - ".concat(actionWidth, ")"),
61
+ marginInlineStart: contentStartOffset
62
+ }), "".concat(componentCls, "-icon"), {
51
63
  height: height,
52
64
  fontSize: token.fontSizeLG,
53
65
  marginInlineEnd: token.marginXS,
@@ -73,18 +85,11 @@ export var genAlertStyle = function genAlertStyle(token) {
73
85
  a: {
74
86
  textDecoration: 'underline'
75
87
  }
76
- }), "&".concat(componentCls, "-success"), genAlertTypeStyle('success', token)), "&".concat(componentCls, "-info"), genAlertTypeStyle('info', token)), "&".concat(componentCls, "-warning"), genAlertTypeStyle('warning', token)), "&".concat(componentCls, "-error"), genAlertTypeStyle('error', token))), "".concat(componentCls, ":not(").concat(componentCls, "-with-description)"), _defineProperty(_defineProperty({
88
+ }), "&".concat(componentCls, "-success"), genAlertTypeStyle('success', token)), "&".concat(componentCls, "-info"), genAlertTypeStyle('info', token)), "&".concat(componentCls, "-warning"), genAlertTypeStyle('warning', token)), "&".concat(componentCls, "-error"), genAlertTypeStyle('error', token))), "".concat(componentCls, ":not(").concat(componentCls, "-with-description)"), _defineProperty({
77
89
  flexWrap: 'wrap'
78
- }, "".concat(componentCls, "-content"), {
79
- flex: "1 1 ".concat(calc('100%').sub(contentStartOffset).sub(closeIconWidth).sub(token.padding).equal()),
80
- minWidth: 0,
81
- maxWidth: calc('100%').sub(contentStartOffset).sub(closeIconWidth).sub(token.padding).equal(),
82
- wordBreak: 'break-word'
83
- }), "".concat(componentCls, "-action"), {
84
- width: calc('100%').sub(contentStartOffset).sub(token.padding).equal(),
85
- marginInlineStart: contentStartOffset,
90
+ }, "".concat(componentCls, "-action"), {
86
91
  marginTop: token.marginXS
87
- })), "".concat(componentCls).concat(componentCls, "-with-description"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
92
+ })), "".concat(componentCls).concat(componentCls, "-with-description"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
88
93
  paddingBlock: token.paddingSM,
89
94
  flexWrap: 'wrap'
90
95
  }, "".concat(componentCls, "-message"), {
@@ -94,14 +99,7 @@ export var genAlertStyle = function genAlertStyle(token) {
94
99
  wordBreak: 'break-word'
95
100
  }), "".concat(componentCls, "-description"), {
96
101
  wordBreak: 'break-word'
97
- }), "".concat(componentCls, "-content"), {
98
- flex: "1 1 ".concat(calc('100%').sub(contentStartOffset).sub(closeIconWidth).sub(token.padding).equal()),
99
- minWidth: 0,
100
- maxWidth: calc('100%').sub(contentStartOffset).sub(closeIconWidth).sub(token.padding).equal(),
101
- wordBreak: 'break-word'
102
102
  }), "".concat(componentCls, "-action"), {
103
- width: calc('100%').sub(contentStartOffset).sub(token.padding).equal(),
104
- marginInlineStart: contentStartOffset,
105
103
  marginTop: token.marginSM
106
104
  }), "".concat(componentCls, "-close-icon"), {
107
105
  top: token.paddingSM
@@ -1,11 +1,8 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
1
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
2
  export var genAppStyle = function genAppStyle(token) {
7
- var componentCls = token.componentCls;
8
- return _defineProperty({}, "".concat(componentCls), {});
3
+ var antCls = token.antCls,
4
+ componentCls = token.componentCls;
5
+ return {};
9
6
  };
10
7
  export default (function (prefixCls) {
11
8
  var useStyle = genComponentStyleHook('App', function (token) {
@@ -1,10 +1,18 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
5
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
2
6
  export var genButtonStyle = function genButtonStyle(token) {
3
- return {};
7
+ var componentCls = token.componentCls;
8
+ return _defineProperty({}, "".concat(componentCls), {
9
+ // remove box-shadow for button
10
+ boxShadow: 'none !important'
11
+ });
4
12
  };
5
13
  export default (function (prefixCls, isAliyun) {
6
14
  var useStyle = genComponentStyleHook('Button', function (token) {
7
- return isAliyun ? [] : [genButtonStyle(token)];
15
+ return [genButtonStyle(token)];
8
16
  });
9
17
  return useStyle(prefixCls);
10
18
  });
@@ -14,8 +14,9 @@ export * from 'antd/es/config-provider/SizeContext';
14
14
  export * from 'antd/es/config-provider/DisabledContext';
15
15
  export * from 'antd/es/config-provider';
16
16
  export interface ThemeConfig extends AntThemeConfig {
17
- isDark?: boolean;
18
17
  isAliyun?: boolean;
18
+ isDark?: boolean;
19
+ isCompact?: boolean;
19
20
  }
20
21
  export type CardConfig = AntCardConfig & {
21
22
  divided?: boolean;
@@ -1,5 +1,11 @@
1
1
  var _excluded = ["children", "theme", "locale", "navigate", "hideOnSinglePage", "card", "collapse", "form", "spin", "table", "tabs", "styleProviderProps", "appProps"];
2
2
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
3
9
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
10
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
11
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -19,7 +25,9 @@ import StaticFunction from "../static-function";
19
25
  import themeConfig from "../theme";
20
26
  import defaultTheme, { fontFamilyEn, fontWeightEn, fontWeightStrongEn } from "../theme/default";
21
27
  import darkTheme from "../theme/dark";
28
+ import compactTheme from "../theme/compact";
22
29
  import DefaultRenderEmpty from "./DefaultRenderEmpty";
30
+ import GlobalStyle from "../style/global";
23
31
  import { jsx as _jsx } from "react/jsx-runtime";
24
32
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
33
  export * from "./navigate";
@@ -32,8 +40,8 @@ var ExtendedConfigContext = /*#__PURE__*/React.createContext({
32
40
  hideOnSinglePage: false,
33
41
  injectStaticFunction: true
34
42
  });
35
- var getLocaleTokenValue = function getLocaleTokenValue(locale, tokenKey, tokenValue, tokenValueEn) {
36
- return tokenValue !== defaultTheme.token[tokenKey] ? _defineProperty({}, tokenKey, tokenValue) : ['en', 'en-gb'].includes(locale.locale) ? _defineProperty({}, tokenKey, tokenValueEn) : {};
43
+ var getLocaleTokenValue = function getLocaleTokenValue(mergedThemeToken, locale, tokenKey, tokenValue, tokenValueEn) {
44
+ return tokenValue !== mergedThemeToken[tokenKey] ? _defineProperty({}, tokenKey, tokenValue) : ['en', 'en-gb'].includes(locale.locale) ? _defineProperty({}, tokenKey, tokenValueEn) : {};
37
45
  };
38
46
  var ConfigProvider = function ConfigProvider(_ref3) {
39
47
  var _mergedTheme$token, _mergedTheme$token2, _mergedTheme$token3, _parentContext$pagina;
@@ -55,10 +63,27 @@ var ConfigProvider = function ConfigProvider(_ref3) {
55
63
  var parentContext = React.useContext(AntConfigProvider.ConfigContext);
56
64
  var parentExtendedContext = React.useContext(ExtendedConfigContext);
57
65
  var _merge = merge({}, parentContext.theme, theme),
66
+ isAliyun = _merge.isAliyun,
58
67
  isDark = _merge.isDark,
59
- isAliyun = _merge.isAliyun;
60
- var customTheme = isAliyun ? aliyunTheme : isDark ? darkTheme : undefined;
61
- var mergedTheme = merge({}, customTheme ? {} : defaultTheme, parentContext.theme, customTheme, theme);
68
+ isCompact = _merge.isCompact;
69
+ var aliyunThemeConfig = isAliyun ? aliyunTheme : undefined;
70
+ var darkThemeConfig = isDark && !isAliyun ? isCompact ? darkTheme : _objectSpread(_objectSpread({}, darkTheme), {}, {
71
+ token: _objectSpread(_objectSpread({}, darkTheme.token), Object.fromEntries(Object.entries(defaultTheme.token).filter(function (_ref4) {
72
+ var _key$toLowerCase;
73
+ var _ref5 = _slicedToArray(_ref4, 1),
74
+ key = _ref5[0];
75
+ return !(key !== null && key !== void 0 && (_key$toLowerCase = key.toLowerCase()) !== null && _key$toLowerCase !== void 0 && _key$toLowerCase.startsWith('color'));
76
+ })))
77
+ }) : undefined;
78
+ var compactThemeConfig = isCompact && !isAliyun ? isDark ? compactTheme : _objectSpread(_objectSpread({}, compactTheme), {}, {
79
+ token: _objectSpread(_objectSpread({}, compactTheme.token), Object.fromEntries(Object.entries(defaultTheme.token).filter(function (_ref6) {
80
+ var _key$toLowerCase2;
81
+ var _ref7 = _slicedToArray(_ref6, 1),
82
+ key = _ref7[0];
83
+ return (key === null || key === void 0 || (_key$toLowerCase2 = key.toLowerCase()) === null || _key$toLowerCase2 === void 0 ? void 0 : _key$toLowerCase2.startsWith('color')) && !['colorBgBase', 'colorTextBase'].includes(key);
84
+ })))
85
+ }) : undefined;
86
+ var mergedTheme = merge({}, isAliyun ? {} : isDark || isCompact ? themeConfig.defaultSeed : defaultTheme, parentContext.theme, aliyunThemeConfig, darkThemeConfig, compactThemeConfig, theme);
62
87
  var _themeConfig$useToken = themeConfig.useToken(),
63
88
  token = _themeConfig$useToken.token;
64
89
  var fontFamily = ((_mergedTheme$token = mergedTheme.token) === null || _mergedTheme$token === void 0 ? void 0 : _mergedTheme$token.fontFamily) || token.fontFamily;
@@ -74,9 +99,9 @@ var ConfigProvider = function ConfigProvider(_ref3) {
74
99
  locale: mergedLocale,
75
100
  card: merge({}, parentContext.card, card),
76
101
  collapse: merge({}, {
77
- expandIcon: function expandIcon(_ref4) {
102
+ expandIcon: function expandIcon(_ref8) {
78
103
  var _mergedTheme$token4, _mergedTheme$token5;
79
- var isActive = _ref4.isActive;
104
+ var isActive = _ref8.isActive;
80
105
  return /*#__PURE__*/_jsx(CaretRightOutlined, {
81
106
  rotate: isActive ? 90 : 0,
82
107
  style: {
@@ -91,12 +116,12 @@ var ConfigProvider = function ConfigProvider(_ref3) {
91
116
  spin: merge({}, parentContext.spin, spin),
92
117
  table: merge({}, {
93
118
  expandable: {
94
- expandIcon: function expandIcon(_ref5) {
119
+ expandIcon: function expandIcon(_ref9) {
95
120
  var _mergedTheme$token6, _mergedTheme$token7;
96
- var expandable = _ref5.expandable,
97
- expanded = _ref5.expanded,
98
- onExpand = _ref5.onExpand,
99
- record = _ref5.record;
121
+ var expandable = _ref9.expandable,
122
+ expanded = _ref9.expanded,
123
+ onExpand = _ref9.onExpand,
124
+ record = _ref9.record;
100
125
  return expandable && /*#__PURE__*/_jsx(CaretRightOutlined, {
101
126
  onClick: function onClick(e) {
102
127
  return onExpand(record, e);
@@ -112,7 +137,7 @@ var ConfigProvider = function ConfigProvider(_ref3) {
112
137
  }, parentContext.table, table),
113
138
  tabs: merge({}, parentContext.tabs, tabs),
114
139
  theme: merge({}, mergedTheme, {
115
- token: _objectSpread(_objectSpread(_objectSpread({}, getLocaleTokenValue(mergedLocale, 'fontFamily', fontFamily, fontFamilyEn)), getLocaleTokenValue(mergedLocale, 'fontWeight', fontWeight, fontWeightEn)), getLocaleTokenValue(mergedLocale, 'fontWeightStrong', fontWeightStrong, fontWeightStrongEn))
140
+ token: _objectSpread(_objectSpread(_objectSpread({}, getLocaleTokenValue(mergedTheme.token || {}, mergedLocale, 'fontFamily', fontFamily, fontFamilyEn)), getLocaleTokenValue(mergedTheme.token || {}, mergedLocale, 'fontWeight', fontWeight, fontWeightEn)), getLocaleTokenValue(mergedTheme.token || {}, mergedLocale, 'fontWeightStrong', fontWeightStrong, fontWeightStrongEn))
116
141
  }),
117
142
  renderEmpty: parentContext.renderEmpty || function (componentName) {
118
143
  return /*#__PURE__*/_jsx(DefaultRenderEmpty, {
@@ -127,12 +152,14 @@ var ConfigProvider = function ConfigProvider(_ref3) {
127
152
  // inject static function to outermost ConfigProvider only
128
153
  injectStaticFunction: false
129
154
  },
130
- children: /*#__PURE__*/_jsx(StyleProvider, _objectSpread(_objectSpread({}, mergedStyleProviderProps), {}, {
131
- children: /*#__PURE__*/_jsxs(App, _objectSpread(_objectSpread({
155
+ children: /*#__PURE__*/_jsxs(StyleProvider, _objectSpread(_objectSpread({}, mergedStyleProviderProps), {}, {
156
+ children: [/*#__PURE__*/_jsx(GlobalStyle, {
157
+ prefixCls: restProps.prefixCls
158
+ }), /*#__PURE__*/_jsxs(App, _objectSpread(_objectSpread({
132
159
  component: false
133
160
  }, appProps), {}, {
134
161
  children: [children, parentExtendedContext.injectStaticFunction && /*#__PURE__*/_jsx(StaticFunction, {})]
135
- }))
162
+ }))]
136
163
  }))
137
164
  })
138
165
  }));
@@ -5,17 +5,17 @@ export default function useItems(items?: DescriptionsItemType[], children?: Reac
5
5
  key?: React.Key;
6
6
  label?: React.ReactNode;
7
7
  span?: number | "filled" | {
8
- xxl?: number;
9
- xl?: number;
10
- lg?: number;
11
- md?: number;
12
- sm?: number;
13
8
  xs?: number;
9
+ sm?: number;
10
+ md?: number;
11
+ lg?: number;
12
+ xl?: number;
13
+ xxl?: number;
14
14
  };
15
15
  style?: React.CSSProperties;
16
- className?: string;
17
16
  classNames?: Partial<Record<"label" | "content", string>>;
18
17
  styles?: Partial<Record<"label" | "content", React.CSSProperties>>;
18
+ className?: string;
19
19
  labelStyle?: React.CSSProperties;
20
20
  contentStyle?: React.CSSProperties;
21
21
  }[];
@@ -34,7 +34,9 @@ export var genDescriptionsStyle = function genDescriptionsStyle(token) {
34
34
  var componentCls = token.componentCls,
35
35
  typographyComponentCls = token.typographyComponentCls,
36
36
  calc = token.calc;
37
- return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _objectSpread(_objectSpread({}, genVerticalStyle('default', token)), {}, _defineProperty(_defineProperty({}, "".concat(componentCls, "-item-container"), _defineProperty({}, "".concat(componentCls, "-item-content"), _defineProperty({
37
+ return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _objectSpread(_objectSpread({}, genVerticalStyle('default', token)), {}, _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-item-label"), {
38
+ fontWeight: token.fontWeightWeak
39
+ }), "".concat(componentCls, "-item-container"), _defineProperty({}, "".concat(componentCls, "-item-content"), _defineProperty({
38
40
  paddingRight: 12
39
41
  }, "".concat(typographyComponentCls, "-edit-content"), {
40
42
  insetInlineStart: 0,
Binary file
Binary file
Binary file
@@ -6,9 +6,11 @@ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
6
  export var genFormStyle = function genFormStyle(token) {
7
7
  var componentCls = token.componentCls,
8
8
  calc = token.calc;
9
- return _defineProperty(_defineProperty({}, componentCls, _defineProperty({}, "".concat(componentCls, "-item-extra"), {
9
+ return _defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty({}, "".concat(componentCls, "-item-explain, ").concat(componentCls, "-item-extra"), {
10
10
  paddingTop: token.paddingXXS,
11
11
  fontSize: token.fontSizeSM
12
+ }), "".concat(componentCls, "-item-explain + ").concat(componentCls, "-item-extra"), {
13
+ paddingTop: 0
12
14
  })), "".concat(componentCls).concat(componentCls, "-vertical"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-item:not(").concat(componentCls, "-item-horizontal)"), _defineProperty({}, "".concat(componentCls, "-item-label > label"), _defineProperty({
13
15
  width: '100%'
14
16
  }, "".concat(componentCls, "-item-action"), {
package/es/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import './global.css';
2
1
  export * from 'antd';
3
2
  export { version } from '../package.json';
4
3
  export { default as Alert } from './alert';
package/es/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./global.css";
2
1
  export * from 'antd';
3
2
  export { version } from "../package.json";
4
3
  export { default as Alert } from "./alert";
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { InputProps as AntInputProps, InputRef } from 'antd';
3
+ import type { ShowCountFormatter } from 'rc-input/es/interface';
3
4
  export * from 'antd/es/input/Input';
4
5
  export interface InputLocale {
5
6
  placeholder?: string;
@@ -7,5 +8,6 @@ export interface InputLocale {
7
8
  export interface InputProps extends AntInputProps {
8
9
  locale?: InputLocale;
9
10
  }
11
+ export declare const showCountFormatter: ShowCountFormatter;
10
12
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
11
13
  export default Input;
package/es/input/Input.js CHANGED
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["locale"];
2
+ var _excluded = ["prefixCls", "locale", "showCount"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -11,21 +11,37 @@ import React, { forwardRef, useContext } from 'react';
11
11
  import { Input as AntInput } from 'antd';
12
12
  import ConfigProvider from "../config-provider";
13
13
  import defaultLocale from "../locale/en-US";
14
+ import useStyle from "./style";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  export * from 'antd/es/input/Input';
16
- var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
17
+ export var showCountFormatter = function showCountFormatter(_ref) {
18
+ var count = _ref.count,
19
+ maxLength = _ref.maxLength;
20
+ return "".concat(count, "/").concat(maxLength);
21
+ };
22
+ var Input = /*#__PURE__*/forwardRef(function (_ref2, ref) {
17
23
  var _contextLocale$global, _defaultLocale$global;
18
- var customLocale = _ref.locale,
19
- restProps = _objectWithoutProperties(_ref, _excluded);
24
+ var customizePrefixCls = _ref2.prefixCls,
25
+ customLocale = _ref2.locale,
26
+ showCount = _ref2.showCount,
27
+ restProps = _objectWithoutProperties(_ref2, _excluded);
20
28
  var _useContext = useContext(ConfigProvider.ConfigContext),
29
+ getPrefixCls = _useContext.getPrefixCls,
21
30
  contextLocale = _useContext.locale;
22
31
  var inputLocale = _objectSpread(_objectSpread(_objectSpread({
23
32
  placeholder: (contextLocale === null || contextLocale === void 0 || (_contextLocale$global = contextLocale.global) === null || _contextLocale$global === void 0 ? void 0 : _contextLocale$global.inputPlaceholder) || ((_defaultLocale$global = defaultLocale.global) === null || _defaultLocale$global === void 0 ? void 0 : _defaultLocale$global.inputPlaceholder)
24
33
  }, defaultLocale.Input), contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Input), customLocale);
25
- return /*#__PURE__*/_jsx(AntInput, _objectSpread({
34
+ var prefixCls = getPrefixCls('input', customizePrefixCls);
35
+ var _useStyle = useStyle(prefixCls),
36
+ wrapSSR = _useStyle.wrapSSR;
37
+ return wrapSSR( /*#__PURE__*/_jsx(AntInput, _objectSpread({
26
38
  ref: ref,
27
- placeholder: inputLocale.placeholder
28
- }, restProps));
39
+ prefixCls: customizePrefixCls,
40
+ placeholder: inputLocale.placeholder,
41
+ showCount: showCount === true ? {
42
+ formatter: showCountFormatter
43
+ } : showCount
44
+ }, restProps)));
29
45
  });
30
46
  if (process.env.NODE_ENV !== 'production') {
31
47
  Input.displayName = 'Input';
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["locale"];
2
+ var _excluded = ["prefixCls", "locale", "showCount"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -11,21 +11,33 @@ import React, { forwardRef, useContext } from 'react';
11
11
  import { Input as AntInput } from 'antd';
12
12
  import ConfigProvider from "../config-provider";
13
13
  import defaultLocale from "../locale/en-US";
14
+ import { showCountFormatter } from "./Input";
15
+ import useStyle from "./style";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
15
17
  export * from 'antd/es/input/Password';
16
18
  var Password = /*#__PURE__*/forwardRef(function (_ref, ref) {
17
19
  var _contextLocale$global, _defaultLocale$global;
18
- var customLocale = _ref.locale,
20
+ var customizePrefixCls = _ref.prefixCls,
21
+ customLocale = _ref.locale,
22
+ showCount = _ref.showCount,
19
23
  restProps = _objectWithoutProperties(_ref, _excluded);
20
24
  var _useContext = useContext(ConfigProvider.ConfigContext),
25
+ getPrefixCls = _useContext.getPrefixCls,
21
26
  contextLocale = _useContext.locale;
27
+ var prefixCls = getPrefixCls('input', customizePrefixCls);
28
+ var _useStyle = useStyle(prefixCls),
29
+ wrapSSR = _useStyle.wrapSSR;
22
30
  var inputLocale = _objectSpread(_objectSpread(_objectSpread({
23
31
  placeholder: (contextLocale === null || contextLocale === void 0 || (_contextLocale$global = contextLocale.global) === null || _contextLocale$global === void 0 ? void 0 : _contextLocale$global.inputPlaceholder) || ((_defaultLocale$global = defaultLocale.global) === null || _defaultLocale$global === void 0 ? void 0 : _defaultLocale$global.inputPlaceholder)
24
32
  }, defaultLocale.Input), contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Input), customLocale);
25
- return /*#__PURE__*/_jsx(AntInput.Password, _objectSpread({
33
+ return wrapSSR( /*#__PURE__*/_jsx(AntInput.Password, _objectSpread({
26
34
  ref: ref,
27
- placeholder: inputLocale.placeholder
28
- }, restProps));
35
+ prefixCls: customizePrefixCls,
36
+ placeholder: inputLocale.placeholder,
37
+ showCount: showCount === true ? {
38
+ formatter: showCountFormatter
39
+ } : showCount
40
+ }, restProps)));
29
41
  });
30
42
  if (process.env.NODE_ENV !== 'production') {
31
43
  Password.displayName = 'Password';
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["locale"];
2
+ var _excluded = ["prefixCls", "locale", "showCount"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -11,21 +11,33 @@ import React, { forwardRef, useContext } from 'react';
11
11
  import { Input as AntInput } from 'antd';
12
12
  import ConfigProvider from "../config-provider";
13
13
  import defaultLocale from "../locale/en-US";
14
+ import { showCountFormatter } from "./Input";
15
+ import useStyle from "./style";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
15
17
  export * from 'antd/es/input/Search';
16
18
  var Search = /*#__PURE__*/forwardRef(function (_ref, ref) {
17
19
  var _contextLocale$global, _defaultLocale$global;
18
- var customLocale = _ref.locale,
20
+ var customizePrefixCls = _ref.prefixCls,
21
+ customLocale = _ref.locale,
22
+ showCount = _ref.showCount,
19
23
  restProps = _objectWithoutProperties(_ref, _excluded);
20
24
  var _useContext = useContext(ConfigProvider.ConfigContext),
25
+ getPrefixCls = _useContext.getPrefixCls,
21
26
  contextLocale = _useContext.locale;
27
+ var prefixCls = getPrefixCls('input', customizePrefixCls);
28
+ var _useStyle = useStyle(prefixCls),
29
+ wrapSSR = _useStyle.wrapSSR;
22
30
  var inputLocale = _objectSpread(_objectSpread(_objectSpread({
23
31
  placeholder: (contextLocale === null || contextLocale === void 0 || (_contextLocale$global = contextLocale.global) === null || _contextLocale$global === void 0 ? void 0 : _contextLocale$global.inputPlaceholder) || ((_defaultLocale$global = defaultLocale.global) === null || _defaultLocale$global === void 0 ? void 0 : _defaultLocale$global.inputPlaceholder)
24
32
  }, defaultLocale.Input), contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Input), customLocale);
25
- return /*#__PURE__*/_jsx(AntInput.Search, _objectSpread({
33
+ return wrapSSR( /*#__PURE__*/_jsx(AntInput.Search, _objectSpread({
26
34
  ref: ref,
27
- placeholder: inputLocale.placeholder
28
- }, restProps));
35
+ prefixCls: customizePrefixCls,
36
+ placeholder: inputLocale.placeholder,
37
+ showCount: showCount === true ? {
38
+ formatter: showCountFormatter
39
+ } : showCount
40
+ }, restProps)));
29
41
  });
30
42
  if (process.env.NODE_ENV !== 'production') {
31
43
  Search.displayName = 'Search';
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["locale"];
2
+ var _excluded = ["prefixCls", "locale", "showCount"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -11,21 +11,33 @@ import React, { forwardRef, useContext } from 'react';
11
11
  import { Input as AntInput } from 'antd';
12
12
  import ConfigProvider from "../config-provider";
13
13
  import defaultLocale from "../locale/en-US";
14
+ import { showCountFormatter } from "./Input";
15
+ import useStyle from "./style";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
15
17
  export * from 'antd/es/input/TextArea';
16
18
  var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
17
19
  var _contextLocale$global, _defaultLocale$global;
18
- var customLocale = _ref.locale,
20
+ var customizePrefixCls = _ref.prefixCls,
21
+ customLocale = _ref.locale,
22
+ showCount = _ref.showCount,
19
23
  restProps = _objectWithoutProperties(_ref, _excluded);
20
24
  var _useContext = useContext(ConfigProvider.ConfigContext),
25
+ getPrefixCls = _useContext.getPrefixCls,
21
26
  contextLocale = _useContext.locale;
27
+ var prefixCls = getPrefixCls('input', customizePrefixCls);
28
+ var _useStyle = useStyle(prefixCls),
29
+ wrapSSR = _useStyle.wrapSSR;
22
30
  var inputLocale = _objectSpread(_objectSpread(_objectSpread({
23
31
  placeholder: (contextLocale === null || contextLocale === void 0 || (_contextLocale$global = contextLocale.global) === null || _contextLocale$global === void 0 ? void 0 : _contextLocale$global.inputPlaceholder) || ((_defaultLocale$global = defaultLocale.global) === null || _defaultLocale$global === void 0 ? void 0 : _defaultLocale$global.inputPlaceholder)
24
32
  }, defaultLocale.Input), contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Input), customLocale);
25
- return /*#__PURE__*/_jsx(AntInput.TextArea, _objectSpread({
33
+ return wrapSSR( /*#__PURE__*/_jsx(AntInput.TextArea, _objectSpread({
26
34
  ref: ref,
27
- placeholder: inputLocale.placeholder
28
- }, restProps));
35
+ prefixCls: customizePrefixCls,
36
+ placeholder: inputLocale.placeholder,
37
+ showCount: showCount === true ? {
38
+ formatter: showCountFormatter
39
+ } : showCount
40
+ }, restProps)));
29
41
  });
30
42
  if (process.env.NODE_ENV !== 'production') {
31
43
  TextArea.displayName = 'TextArea';
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
+ export type InputToken = FullToken<'Input'>;
4
+ export declare const genInputStyle: GenerateStyle<InputToken>;
5
+ declare const _default: (prefixCls: string) => {
6
+ wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
7
+ hashId: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,17 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
+ export var genInputStyle = function genInputStyle(token) {
7
+ var componentCls = token.componentCls;
8
+ return _defineProperty({}, "".concat(componentCls, "-affix-wrapper"), _defineProperty({}, "".concat(componentCls, "-suffix"), {
9
+ fontSize: token.fontSizeSM
10
+ }));
11
+ };
12
+ export default (function (prefixCls) {
13
+ var useStyle = genComponentStyleHook('Input', function (token) {
14
+ return [genInputStyle(token)];
15
+ });
16
+ return useStyle(prefixCls);
17
+ });