@oceanbase/design 1.0.0-alpha.6 → 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.
- package/dist/design.min.js +1 -1
- package/dist/static/Inter-Medium.ea234620.woff2 +0 -0
- package/dist/static/Inter-Regular.34ba43c9.woff2 +0 -0
- package/dist/static/Inter-SemiBold.95439fb4.woff2 +0 -0
- package/es/alert/index.js +1 -4
- package/es/app/style/index.js +3 -6
- package/es/config-provider/index.js +3 -1
- package/es/descriptions/hooks/useItems.d.ts +6 -6
- package/es/descriptions/style/index.js +3 -1
- package/es/fonts/Inter-Medium.woff2 +0 -0
- package/es/fonts/Inter-Regular.woff2 +0 -0
- package/es/fonts/Inter-SemiBold.woff2 +0 -0
- package/es/form/FormItem.d.ts +1 -1
- package/es/form/style/index.js +3 -1
- package/es/input/Input.d.ts +2 -0
- package/es/input/Input.js +23 -7
- package/es/input/Password.js +17 -5
- package/es/input/Search.js +17 -5
- package/es/input/TextArea.js +17 -5
- package/es/input/style/index.d.ts +9 -0
- package/es/input/style/index.js +17 -0
- package/es/input-number/index.js +11 -4
- package/es/input-number/style/index.d.ts +9 -0
- package/es/input-number/style/index.js +22 -0
- package/es/locale/ja-JP.js +2 -2
- package/es/segmented/index.d.ts +1 -0
- package/es/segmented/index.js +15 -7
- package/es/segmented/style/index.js +1 -0
- package/es/style/global.d.ts +4 -1
- package/es/style/global.js +75 -19
- package/es/table/index.d.ts +2 -2
- package/es/table/style/index.js +5 -1
- package/es/theme/default.d.ts +1 -1
- package/es/theme/default.js +1 -1
- package/es/typography/style/index.js +3 -0
- package/lib/alert/index.js +1 -3
- package/lib/app/style/index.js +2 -4
- package/lib/config-provider/index.js +1 -1
- package/lib/descriptions/hooks/useItems.d.ts +6 -6
- package/lib/descriptions/style/index.js +3 -0
- package/lib/fonts/Inter-Medium.woff2 +0 -0
- package/lib/fonts/Inter-Regular.woff2 +0 -0
- package/lib/fonts/Inter-SemiBold.woff2 +0 -0
- package/lib/form/FormItem.d.ts +1 -1
- package/lib/form/style/index.js +4 -1
- package/lib/input/Input.d.ts +2 -0
- package/lib/input/Input.js +35 -12
- package/lib/input/Password.js +20 -3
- package/lib/input/Search.js +30 -11
- package/lib/input/TextArea.js +20 -3
- package/lib/input/style/index.d.ts +9 -0
- package/lib/input/style/index.js +46 -0
- package/lib/input-number/index.js +18 -3
- package/lib/input-number/style/index.d.ts +9 -0
- package/lib/input-number/style/index.js +51 -0
- package/lib/locale/ja-JP.js +2 -2
- package/lib/segmented/index.d.ts +1 -0
- package/lib/segmented/index.js +10 -3
- package/lib/segmented/style/index.js +1 -0
- package/lib/style/global.d.ts +4 -1
- package/lib/style/global.js +77 -10
- package/lib/table/index.d.ts +2 -2
- package/lib/table/style/index.js +5 -1
- package/lib/theme/default.d.ts +1 -1
- package/lib/theme/default.js +1 -1
- package/lib/typography/style/index.js +3 -0
- package/package.json +3 -2
- package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
- package/es/fonts/Inter.woff2 +0 -0
- package/lib/fonts/Inter.woff2 +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
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);
|
package/es/app/style/index.js
CHANGED
|
@@ -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
|
|
8
|
-
|
|
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) {
|
|
@@ -153,7 +153,9 @@ var ConfigProvider = function ConfigProvider(_ref3) {
|
|
|
153
153
|
injectStaticFunction: false
|
|
154
154
|
},
|
|
155
155
|
children: /*#__PURE__*/_jsxs(StyleProvider, _objectSpread(_objectSpread({}, mergedStyleProviderProps), {}, {
|
|
156
|
-
children: [/*#__PURE__*/_jsx(GlobalStyle, {
|
|
156
|
+
children: [/*#__PURE__*/_jsx(GlobalStyle, {
|
|
157
|
+
prefixCls: restProps.prefixCls
|
|
158
|
+
}), /*#__PURE__*/_jsxs(App, _objectSpread(_objectSpread({
|
|
157
159
|
component: false
|
|
158
160
|
}, appProps), {}, {
|
|
159
161
|
children: [children, parentExtendedContext.injectStaticFunction && /*#__PURE__*/_jsx(StaticFunction, {})]
|
|
@@ -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(
|
|
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
|
package/es/form/FormItem.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
|
|
|
4
4
|
import type { TooltipProps } from '../tooltip';
|
|
5
5
|
declare const AntFormItem: (<Values = any>(props: AntFormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
6
6
|
useStatus: () => {
|
|
7
|
-
status?: "" | "
|
|
7
|
+
status?: "" | "success" | "warning" | "error" | "validating";
|
|
8
8
|
errors: React.ReactNode[];
|
|
9
9
|
warnings: React.ReactNode[];
|
|
10
10
|
};
|
package/es/form/style/index.js
CHANGED
|
@@ -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/input/Input.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
28
|
-
|
|
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';
|
package/es/input/Password.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,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
|
|
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
|
-
|
|
28
|
-
|
|
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';
|
package/es/input/Search.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,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
|
|
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
|
-
|
|
28
|
-
|
|
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';
|
package/es/input/TextArea.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,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
|
|
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
|
-
|
|
28
|
-
|
|
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
|
+
});
|
package/es/input-number/index.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"];
|
|
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,28 @@ import { InputNumber as AntInputNumber } from 'antd';
|
|
|
11
11
|
import React, { useContext } from 'react';
|
|
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-number';
|
|
16
17
|
var InternalInputNumber = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17
18
|
var _contextLocale$global, _defaultLocale$global;
|
|
18
|
-
var
|
|
19
|
+
var customizePrefixCls = _ref.prefixCls,
|
|
20
|
+
customLocale = _ref.locale,
|
|
19
21
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
22
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
23
|
+
getPrefixCls = _useContext.getPrefixCls,
|
|
21
24
|
contextLocale = _useContext.locale;
|
|
25
|
+
var prefixCls = getPrefixCls('input-number', customizePrefixCls);
|
|
26
|
+
var _useStyle = useStyle(prefixCls),
|
|
27
|
+
wrapSSR = _useStyle.wrapSSR;
|
|
22
28
|
var inputNumberLocale = _objectSpread(_objectSpread(_objectSpread({
|
|
23
29
|
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
30
|
}, defaultLocale.InputNumber), contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.InputNumber), customLocale);
|
|
25
|
-
return /*#__PURE__*/_jsx(AntInputNumber, _objectSpread({
|
|
31
|
+
return wrapSSR( /*#__PURE__*/_jsx(AntInputNumber, _objectSpread({
|
|
26
32
|
ref: ref,
|
|
33
|
+
prefixCls: customizePrefixCls,
|
|
27
34
|
placeholder: inputNumberLocale.placeholder
|
|
28
|
-
}, restProps));
|
|
35
|
+
}, restProps)));
|
|
29
36
|
});
|
|
30
37
|
var InputNumber = InternalInputNumber;
|
|
31
38
|
InputNumber._InternalPanelDoNotUseOrYouWillBeFired = AntInputNumber._InternalPanelDoNotUseOrYouWillBeFired;
|
|
@@ -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,22 @@
|
|
|
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 antCls = token.antCls,
|
|
8
|
+
componentCls = token.componentCls;
|
|
9
|
+
var selectComponentCls = "".concat(antCls, "-select-selector");
|
|
10
|
+
return _defineProperty({}, "".concat(componentCls, "-group-wrapper"), _defineProperty({}, "".concat(componentCls, "-group-addon"), _defineProperty({
|
|
11
|
+
color: token.colorTextTertiary,
|
|
12
|
+
fontSize: token.fontSizeSM
|
|
13
|
+
}, selectComponentCls, {
|
|
14
|
+
color: token.colorTextTertiary
|
|
15
|
+
})));
|
|
16
|
+
};
|
|
17
|
+
export default (function (prefixCls) {
|
|
18
|
+
var useStyle = genComponentStyleHook('InputNumber', function (token) {
|
|
19
|
+
return [genInputStyle(token)];
|
|
20
|
+
});
|
|
21
|
+
return useStyle(prefixCls);
|
|
22
|
+
});
|
package/es/locale/ja-JP.js
CHANGED
|
@@ -13,12 +13,12 @@ export default _objectSpread(_objectSpread({}, jaJP), {}, {
|
|
|
13
13
|
total: '合計 ${total} 件'
|
|
14
14
|
}),
|
|
15
15
|
Drawer: {
|
|
16
|
-
okText: '
|
|
16
|
+
okText: 'OK',
|
|
17
17
|
cancelText: 'キャンセル'
|
|
18
18
|
},
|
|
19
19
|
Table: _objectSpread(_objectSpread({}, jaJP.Table), {}, {
|
|
20
20
|
batchOperationBar: {
|
|
21
|
-
selected: '
|
|
21
|
+
selected: '選択中',
|
|
22
22
|
object: '件',
|
|
23
23
|
cancel: 'キャンセル',
|
|
24
24
|
collapse: '折りたたむ',
|
package/es/segmented/index.d.ts
CHANGED
|
@@ -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
|
};
|
package/es/segmented/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["prefixCls", "options"],
|
|
2
|
-
_excluded2 = ["label", "badge"];
|
|
2
|
+
_excluded2 = ["label", "icon", "badge", "ellipsis"];
|
|
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; }
|
|
@@ -39,16 +39,24 @@ var Segmented = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
39
39
|
}, []);
|
|
40
40
|
var newOptions = options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
41
41
|
if (_typeof(item) === 'object') {
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
var _ref2 = item,
|
|
43
|
+
label = _ref2.label,
|
|
44
|
+
icon = _ref2.icon,
|
|
45
|
+
badge = _ref2.badge,
|
|
46
|
+
_ref2$ellipsis = _ref2.ellipsis,
|
|
47
|
+
ellipsis = _ref2$ellipsis === void 0 ? {
|
|
48
|
+
tooltip: true
|
|
49
|
+
} : _ref2$ellipsis,
|
|
50
|
+
restItem = _objectWithoutProperties(_ref2, _excluded2);
|
|
45
51
|
return _objectSpread(_objectSpread({}, restItem), {}, {
|
|
46
52
|
label: /*#__PURE__*/_jsxs(Flex, {
|
|
47
|
-
gap: 4,
|
|
48
53
|
align: "center",
|
|
49
54
|
justify: "center",
|
|
50
|
-
children: [
|
|
51
|
-
|
|
55
|
+
children: [icon && /*#__PURE__*/_jsx("span", {
|
|
56
|
+
className: "".concat(prefixCls, "-item-icon"),
|
|
57
|
+
children: icon
|
|
58
|
+
}), ellipsis ? /*#__PURE__*/_jsx(Typography.Text, {
|
|
59
|
+
ellipsis: ellipsis,
|
|
52
60
|
children: label
|
|
53
61
|
}) : label, badge && renderBadge(badge)]
|
|
54
62
|
})
|
|
@@ -13,6 +13,7 @@ export var genSegmentedStyle = function genSegmentedStyle(token) {
|
|
|
13
13
|
})), '&:active', _defineProperty({}, "".concat(antCls, "-badge >").concat(antCls, "-badge-count"), {
|
|
14
14
|
backgroundColor: colorFillSecondary
|
|
15
15
|
})))), ">".concat(componentCls, "-item"), _defineProperty({}, ">".concat(componentCls, "-item-label"), _defineProperty({}, "".concat(antCls, "-badge >").concat(antCls, "-badge-count"), {
|
|
16
|
+
marginInlineStart: 4,
|
|
16
17
|
backgroundColor: colorFillSecondary,
|
|
17
18
|
color: 'inherit',
|
|
18
19
|
boxShadow: 'none'
|
package/es/style/global.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import 'antd/dist/reset.css';
|
|
3
|
-
|
|
3
|
+
export interface GlobalStyleProps {
|
|
4
|
+
prefixCls?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const GlobalStyle: React.FC<GlobalStyleProps>;
|
|
4
7
|
export { GlobalStyle };
|
|
5
8
|
export default GlobalStyle;
|