@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
@@ -45,7 +45,9 @@ var import_static_function = __toESM(require("../static-function"));
45
45
  var import_theme = __toESM(require("../theme"));
46
46
  var import_default = __toESM(require("../theme/default"));
47
47
  var import_dark = __toESM(require("../theme/dark"));
48
+ var import_compact = __toESM(require("../theme/compact"));
48
49
  var import_DefaultRenderEmpty = __toESM(require("./DefaultRenderEmpty"));
50
+ var import_global = __toESM(require("../style/global"));
49
51
  __reExport(config_provider_exports, require("./navigate"), module.exports);
50
52
  __reExport(config_provider_exports, require("antd/es/config-provider/context"), module.exports);
51
53
  __reExport(config_provider_exports, require("antd/es/config-provider/SizeContext"), module.exports);
@@ -57,8 +59,8 @@ var ExtendedConfigContext = import_react.default.createContext({
57
59
  hideOnSinglePage: false,
58
60
  injectStaticFunction: true
59
61
  });
60
- var getLocaleTokenValue = (locale, tokenKey, tokenValue, tokenValueEn) => {
61
- return tokenValue !== import_default.default.token[tokenKey] ? { [tokenKey]: tokenValue } : ["en", "en-gb"].includes(locale.locale) ? { [tokenKey]: tokenValueEn } : {};
62
+ var getLocaleTokenValue = (mergedThemeToken, locale, tokenKey, tokenValue, tokenValueEn) => {
63
+ return tokenValue !== mergedThemeToken[tokenKey] ? { [tokenKey]: tokenValue } : ["en", "en-gb"].includes(locale.locale) ? { [tokenKey]: tokenValueEn } : {};
62
64
  };
63
65
  var ConfigProvider = ({
64
66
  children,
@@ -79,13 +81,43 @@ var ConfigProvider = ({
79
81
  var _a, _b, _c, _d;
80
82
  const parentContext = import_react.default.useContext(import_antd.ConfigProvider.ConfigContext);
81
83
  const parentExtendedContext = import_react.default.useContext(ExtendedConfigContext);
82
- const { isDark, isAliyun } = (0, import_lodash.merge)({}, parentContext.theme, theme);
83
- const customTheme = isAliyun ? import_aliyun_theme.default : isDark ? import_dark.default : void 0;
84
+ const { isAliyun, isDark, isCompact } = (0, import_lodash.merge)({}, parentContext.theme, theme);
85
+ const aliyunThemeConfig = isAliyun ? import_aliyun_theme.default : void 0;
86
+ const darkThemeConfig = isDark && !isAliyun ? isCompact ? import_dark.default : {
87
+ ...import_dark.default,
88
+ token: {
89
+ ...import_dark.default.token,
90
+ ...Object.fromEntries(
91
+ Object.entries(import_default.default.token).filter(
92
+ ([key]) => {
93
+ var _a2;
94
+ return !((_a2 = key == null ? void 0 : key.toLowerCase()) == null ? void 0 : _a2.startsWith("color"));
95
+ }
96
+ )
97
+ )
98
+ }
99
+ } : void 0;
100
+ const compactThemeConfig = isCompact && !isAliyun ? isDark ? import_compact.default : {
101
+ ...import_compact.default,
102
+ token: {
103
+ ...import_compact.default.token,
104
+ ...Object.fromEntries(
105
+ Object.entries(import_default.default.token).filter(
106
+ ([key]) => {
107
+ var _a2;
108
+ return ((_a2 = key == null ? void 0 : key.toLowerCase()) == null ? void 0 : _a2.startsWith("color")) && !["colorBgBase", "colorTextBase"].includes(key);
109
+ }
110
+ )
111
+ )
112
+ }
113
+ } : void 0;
84
114
  const mergedTheme = (0, import_lodash.merge)(
85
115
  {},
86
- customTheme ? {} : import_default.default,
116
+ isAliyun ? {} : isDark || isCompact ? import_theme.default.defaultSeed : import_default.default,
87
117
  parentContext.theme,
88
- customTheme,
118
+ aliyunThemeConfig,
119
+ darkThemeConfig,
120
+ compactThemeConfig,
89
121
  theme
90
122
  );
91
123
  const { token } = import_theme.default.useToken();
@@ -154,9 +186,22 @@ var ConfigProvider = ({
154
186
  tabs: (0, import_lodash.merge)({}, parentContext.tabs, tabs),
155
187
  theme: (0, import_lodash.merge)({}, mergedTheme, {
156
188
  token: {
157
- ...getLocaleTokenValue(mergedLocale, "fontFamily", fontFamily, import_default.fontFamilyEn),
158
- ...getLocaleTokenValue(mergedLocale, "fontWeight", fontWeight, import_default.fontWeightEn),
159
189
  ...getLocaleTokenValue(
190
+ mergedTheme.token || {},
191
+ mergedLocale,
192
+ "fontFamily",
193
+ fontFamily,
194
+ import_default.fontFamilyEn
195
+ ),
196
+ ...getLocaleTokenValue(
197
+ mergedTheme.token || {},
198
+ mergedLocale,
199
+ "fontWeight",
200
+ fontWeight,
201
+ import_default.fontWeightEn
202
+ ),
203
+ ...getLocaleTokenValue(
204
+ mergedTheme.token || {},
160
205
  mergedLocale,
161
206
  "fontWeightStrong",
162
207
  fontWeightStrong,
@@ -175,10 +220,13 @@ var ConfigProvider = ({
175
220
  // inject static function to outermost ConfigProvider only
176
221
  injectStaticFunction: false
177
222
  },
178
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_cssinjs.StyleProvider, { ...mergedStyleProviderProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_app.default, { component: false, ...appProps, children: [
179
- children,
180
- parentExtendedContext.injectStaticFunction && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_static_function.default, {})
181
- ] }) })
223
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_cssinjs.StyleProvider, { ...mergedStyleProviderProps, children: [
224
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_global.default, { prefixCls: restProps.prefixCls }),
225
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_app.default, { component: false, ...appProps, children: [
226
+ children,
227
+ parentExtendedContext.injectStaticFunction && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_static_function.default, {})
228
+ ] })
229
+ ] })
182
230
  }
183
231
  )
184
232
  }
@@ -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
  }[];
@@ -68,6 +68,9 @@ var genDescriptionsStyle = (token) => {
68
68
  return {
69
69
  [`${componentCls}`]: {
70
70
  ...genVerticalStyle("default", token),
71
+ [`${componentCls}-item-label`]: {
72
+ fontWeight: token.fontWeightWeak
73
+ },
71
74
  [`${componentCls}-item-container`]: {
72
75
  [`${componentCls}-item-content`]: {
73
76
  paddingRight: 12,
Binary file
Binary file
Binary file
@@ -28,9 +28,12 @@ var genFormStyle = (token) => {
28
28
  const { componentCls, calc } = token;
29
29
  return {
30
30
  [componentCls]: {
31
- [`${componentCls}-item-extra`]: {
31
+ [`${componentCls}-item-explain, ${componentCls}-item-extra`]: {
32
32
  paddingTop: token.paddingXXS,
33
33
  fontSize: token.fontSizeSM
34
+ },
35
+ [`${componentCls}-item-explain + ${componentCls}-item-extra`]: {
36
+ paddingTop: 0
34
37
  }
35
38
  },
36
39
  [`${componentCls}${componentCls}-vertical`]: {
package/lib/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/lib/index.js CHANGED
@@ -72,7 +72,6 @@ __export(src_exports, {
72
72
  version: () => import_package.version
73
73
  });
74
74
  module.exports = __toCommonJS(src_exports);
75
- var import_global = require("./global.css");
76
75
  __reExport(src_exports, require("antd"), module.exports);
77
76
  var import_package = require("../package.json");
78
77
  var import_alert = __toESM(require("./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;
@@ -30,31 +30,54 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/input/Input.tsx
31
31
  var Input_exports = {};
32
32
  __export(Input_exports, {
33
- default: () => Input_default
33
+ default: () => Input_default,
34
+ showCountFormatter: () => showCountFormatter
34
35
  });
35
36
  module.exports = __toCommonJS(Input_exports);
36
37
  var import_react = require("react");
37
38
  var import_antd = require("antd");
38
39
  var import_config_provider = __toESM(require("../config-provider"));
39
40
  var import_en_US = __toESM(require("../locale/en-US"));
41
+ var import_style = __toESM(require("./style"));
40
42
  __reExport(Input_exports, require("antd/es/input/Input"), module.exports);
41
43
  var import_jsx_runtime = require("react/jsx-runtime");
42
- var Input = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps }, ref) => {
43
- var _a, _b;
44
- const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
45
- const inputLocale = {
46
- placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
47
- ...import_en_US.default.Input,
48
- ...contextLocale == null ? void 0 : contextLocale.Input,
49
- ...customLocale
50
- };
51
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input, { ref, placeholder: inputLocale.placeholder, ...restProps });
52
- });
44
+ var showCountFormatter = ({ count, maxLength }) => {
45
+ return `${count}/${maxLength}`;
46
+ };
47
+ var Input = (0, import_react.forwardRef)(
48
+ ({ prefixCls: customizePrefixCls, locale: customLocale, showCount, ...restProps }, ref) => {
49
+ var _a, _b;
50
+ const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
51
+ import_config_provider.default.ConfigContext
52
+ );
53
+ const inputLocale = {
54
+ placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
55
+ ...import_en_US.default.Input,
56
+ ...contextLocale == null ? void 0 : contextLocale.Input,
57
+ ...customLocale
58
+ };
59
+ const prefixCls = getPrefixCls("input", customizePrefixCls);
60
+ const { wrapSSR } = (0, import_style.default)(prefixCls);
61
+ return wrapSSR(
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
+ import_antd.Input,
64
+ {
65
+ ref,
66
+ prefixCls: customizePrefixCls,
67
+ placeholder: inputLocale.placeholder,
68
+ showCount: showCount === true ? { formatter: showCountFormatter } : showCount,
69
+ ...restProps
70
+ }
71
+ )
72
+ );
73
+ }
74
+ );
53
75
  if (process.env.NODE_ENV !== "production") {
54
76
  Input.displayName = "Input";
55
77
  }
56
78
  var Input_default = Input;
57
79
  // Annotate the CommonJS export names for ESM import in node:
58
80
  0 && (module.exports = {
81
+ showCountFormatter,
59
82
  ...require("antd/es/input/Input")
60
83
  });
@@ -37,19 +37,36 @@ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
+ var import_Input = require("./Input");
41
+ var import_style = __toESM(require("./style"));
40
42
  __reExport(Password_exports, require("antd/es/input/Password"), module.exports);
41
43
  var import_jsx_runtime = require("react/jsx-runtime");
42
44
  var Password = (0, import_react.forwardRef)(
43
- ({ locale: customLocale, ...restProps }, ref) => {
45
+ ({ prefixCls: customizePrefixCls, locale: customLocale, showCount, ...restProps }, ref) => {
44
46
  var _a, _b;
45
- const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
47
+ const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
48
+ import_config_provider.default.ConfigContext
49
+ );
50
+ const prefixCls = getPrefixCls("input", customizePrefixCls);
51
+ const { wrapSSR } = (0, import_style.default)(prefixCls);
46
52
  const inputLocale = {
47
53
  placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
48
54
  ...import_en_US.default.Input,
49
55
  ...contextLocale == null ? void 0 : contextLocale.Input,
50
56
  ...customLocale
51
57
  };
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.Password, { ref, placeholder: inputLocale.placeholder, ...restProps });
58
+ return wrapSSR(
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ import_antd.Input.Password,
61
+ {
62
+ ref,
63
+ prefixCls: customizePrefixCls,
64
+ placeholder: inputLocale.placeholder,
65
+ showCount: showCount === true ? { formatter: import_Input.showCountFormatter } : showCount,
66
+ ...restProps
67
+ }
68
+ )
69
+ );
53
70
  }
54
71
  );
55
72
  if (process.env.NODE_ENV !== "production") {
@@ -37,19 +37,38 @@ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
+ var import_Input = require("./Input");
41
+ var import_style = __toESM(require("./style"));
40
42
  __reExport(Search_exports, require("antd/es/input/Search"), module.exports);
41
43
  var import_jsx_runtime = require("react/jsx-runtime");
42
- var Search = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps }, ref) => {
43
- var _a, _b;
44
- const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
45
- const inputLocale = {
46
- placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
47
- ...import_en_US.default.Input,
48
- ...contextLocale == null ? void 0 : contextLocale.Input,
49
- ...customLocale
50
- };
51
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.Search, { ref, placeholder: inputLocale.placeholder, ...restProps });
52
- });
44
+ var Search = (0, import_react.forwardRef)(
45
+ ({ prefixCls: customizePrefixCls, locale: customLocale, showCount, ...restProps }, ref) => {
46
+ var _a, _b;
47
+ const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
48
+ import_config_provider.default.ConfigContext
49
+ );
50
+ const prefixCls = getPrefixCls("input", customizePrefixCls);
51
+ const { wrapSSR } = (0, import_style.default)(prefixCls);
52
+ const inputLocale = {
53
+ placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
54
+ ...import_en_US.default.Input,
55
+ ...contextLocale == null ? void 0 : contextLocale.Input,
56
+ ...customLocale
57
+ };
58
+ return wrapSSR(
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ import_antd.Input.Search,
61
+ {
62
+ ref,
63
+ prefixCls: customizePrefixCls,
64
+ placeholder: inputLocale.placeholder,
65
+ showCount: showCount === true ? { formatter: import_Input.showCountFormatter } : showCount,
66
+ ...restProps
67
+ }
68
+ )
69
+ );
70
+ }
71
+ );
53
72
  if (process.env.NODE_ENV !== "production") {
54
73
  Search.displayName = "Search";
55
74
  }
@@ -37,19 +37,36 @@ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
+ var import_Input = require("./Input");
41
+ var import_style = __toESM(require("./style"));
40
42
  __reExport(TextArea_exports, require("antd/es/input/TextArea"), module.exports);
41
43
  var import_jsx_runtime = require("react/jsx-runtime");
42
44
  var TextArea = (0, import_react.forwardRef)(
43
- ({ locale: customLocale, ...restProps }, ref) => {
45
+ ({ prefixCls: customizePrefixCls, locale: customLocale, showCount, ...restProps }, ref) => {
44
46
  var _a, _b;
45
- const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
47
+ const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
48
+ import_config_provider.default.ConfigContext
49
+ );
50
+ const prefixCls = getPrefixCls("input", customizePrefixCls);
51
+ const { wrapSSR } = (0, import_style.default)(prefixCls);
46
52
  const inputLocale = {
47
53
  placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
48
54
  ...import_en_US.default.Input,
49
55
  ...contextLocale == null ? void 0 : contextLocale.Input,
50
56
  ...customLocale
51
57
  };
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.TextArea, { ref, placeholder: inputLocale.placeholder, ...restProps });
58
+ return wrapSSR(
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ import_antd.Input.TextArea,
61
+ {
62
+ ref,
63
+ prefixCls: customizePrefixCls,
64
+ placeholder: inputLocale.placeholder,
65
+ showCount: showCount === true ? { formatter: import_Input.showCountFormatter } : showCount,
66
+ ...restProps
67
+ }
68
+ )
69
+ );
53
70
  }
54
71
  );
55
72
  if (process.env.NODE_ENV !== "production") {
@@ -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,46 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/input/style/index.ts
20
+ var style_exports = {};
21
+ __export(style_exports, {
22
+ default: () => style_default,
23
+ genInputStyle: () => genInputStyle
24
+ });
25
+ module.exports = __toCommonJS(style_exports);
26
+ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
+ var genInputStyle = (token) => {
28
+ const { componentCls } = token;
29
+ return {
30
+ [`${componentCls}-affix-wrapper`]: {
31
+ [`${componentCls}-suffix`]: {
32
+ fontSize: token.fontSizeSM
33
+ }
34
+ }
35
+ };
36
+ };
37
+ var style_default = (prefixCls) => {
38
+ const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Input", (token) => {
39
+ return [genInputStyle(token)];
40
+ });
41
+ return useStyle(prefixCls);
42
+ };
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ genInputStyle
46
+ });
@@ -37,19 +37,34 @@ var import_antd = require("antd");
37
37
  var import_react = __toESM(require("react"));
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
+ var import_style = __toESM(require("./style"));
40
41
  __reExport(input_number_exports, require("antd/es/input-number"), module.exports);
41
42
  var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var InternalInputNumber = import_react.default.forwardRef(
43
- ({ locale: customLocale, ...restProps }, ref) => {
44
+ ({ prefixCls: customizePrefixCls, locale: customLocale, ...restProps }, ref) => {
44
45
  var _a, _b;
45
- const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
46
+ const { getPrefixCls, locale: contextLocale } = (0, import_react.useContext)(
47
+ import_config_provider.default.ConfigContext
48
+ );
49
+ const prefixCls = getPrefixCls("input-number", customizePrefixCls);
50
+ const { wrapSSR } = (0, import_style.default)(prefixCls);
46
51
  const inputNumberLocale = {
47
52
  placeholder: ((_a = contextLocale == null ? void 0 : contextLocale.global) == null ? void 0 : _a.inputPlaceholder) || ((_b = import_en_US.default.global) == null ? void 0 : _b.inputPlaceholder),
48
53
  ...import_en_US.default.InputNumber,
49
54
  ...contextLocale == null ? void 0 : contextLocale.InputNumber,
50
55
  ...customLocale
51
56
  };
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.InputNumber, { ref, placeholder: inputNumberLocale.placeholder, ...restProps });
57
+ return wrapSSR(
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ import_antd.InputNumber,
60
+ {
61
+ ref,
62
+ prefixCls: customizePrefixCls,
63
+ placeholder: inputNumberLocale.placeholder,
64
+ ...restProps
65
+ }
66
+ )
67
+ );
53
68
  }
54
69
  );
55
70
  var InputNumber = InternalInputNumber;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
+ export type InputNumberToken = FullToken<'InputNumber'>;
4
+ export declare const genInputStyle: GenerateStyle<InputNumberToken>;
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,51 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/input-number/style/index.ts
20
+ var style_exports = {};
21
+ __export(style_exports, {
22
+ default: () => style_default,
23
+ genInputStyle: () => genInputStyle
24
+ });
25
+ module.exports = __toCommonJS(style_exports);
26
+ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
+ var genInputStyle = (token) => {
28
+ const { antCls, componentCls } = token;
29
+ const selectComponentCls = `${antCls}-select-selector`;
30
+ return {
31
+ [`${componentCls}-group-wrapper`]: {
32
+ [`${componentCls}-group-addon`]: {
33
+ color: token.colorTextTertiary,
34
+ fontSize: token.fontSizeSM,
35
+ [selectComponentCls]: {
36
+ color: token.colorTextTertiary
37
+ }
38
+ }
39
+ }
40
+ };
41
+ };
42
+ var style_default = (prefixCls) => {
43
+ const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("InputNumber", (token) => {
44
+ return [genInputStyle(token)];
45
+ });
46
+ return useStyle(prefixCls);
47
+ };
48
+ // Annotate the CommonJS export names for ESM import in node:
49
+ 0 && (module.exports = {
50
+ genInputStyle
51
+ });
@@ -44,13 +44,13 @@ var ja_JP_default = {
44
44
  total: "合計 ${total} 件"
45
45
  },
46
46
  Drawer: {
47
- okText: "確定",
47
+ okText: "OK",
48
48
  cancelText: "キャンセル"
49
49
  },
50
50
  Table: {
51
51
  ...import_ja_JP.default.Table,
52
52
  batchOperationBar: {
53
- selected: "選択済み",
53
+ selected: "選択中",
54
54
  object: "件",
55
55
  cancel: "キャンセル",
56
56
  collapse: "折りたたむ",
@@ -6,6 +6,7 @@ import type { SegmentedRawOption } from 'rc-segmented';
6
6
  export * from 'antd/es/segmented';
7
7
  type BadgeType = BadgeProps | BadgeProps['count'];
8
8
  export type SegmentedLabeledOption = AntSegmentedLabeledOption & {
9
+ icon?: React.ReactNode;
9
10
  ellipsis?: EllipsisConfig;
10
11
  badge?: BadgeType;
11
12
  };
@@ -57,11 +57,18 @@ var Segmented = import_react.default.forwardRef(
57
57
  }, []);
58
58
  const newOptions = options == null ? void 0 : options.map((item) => {
59
59
  if (typeof item === "object") {
60
- const { label, badge, ...restItem } = item;
60
+ const {
61
+ label,
62
+ icon,
63
+ badge,
64
+ ellipsis = { tooltip: true },
65
+ ...restItem
66
+ } = item;
61
67
  return {
62
68
  ...restItem,
63
- label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Flex, { gap: 4, align: "center", justify: "center", children: [
64
- (item == null ? void 0 : item.ellipsis) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_typography.default.Text, { ellipsis: item.ellipsis, children: label }) : label,
69
+ label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Flex, { align: "center", justify: "center", children: [
70
+ icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item-icon`, children: icon }),
71
+ ellipsis ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_typography.default.Text, { ellipsis, children: label }) : label,
65
72
  badge && renderBadge(badge)
66
73
  ] })
67
74
  };
@@ -45,6 +45,7 @@ var genSegmentedStyle = (token) => {
45
45
  [`>${componentCls}-item`]: {
46
46
  [`>${componentCls}-item-label`]: {
47
47
  [`${antCls}-badge >${antCls}-badge-count`]: {
48
+ marginInlineStart: 4,
48
49
  backgroundColor: colorFillSecondary,
49
50
  color: "inherit",
50
51
  boxShadow: "none"
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import 'antd/dist/reset.css';
3
+ export interface GlobalStyleProps {
4
+ prefixCls?: string;
5
+ }
6
+ declare const GlobalStyle: React.FC<GlobalStyleProps>;
7
+ export { GlobalStyle };
8
+ export default GlobalStyle;