@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.
- package/dist/design.min.css +1 -1
- package/dist/design.min.js +1 -1
- package/dist/reset.css +2 -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/alert/style/index.js +17 -19
- package/es/app/style/index.js +3 -6
- package/es/button/style/index.js +10 -2
- package/es/config-provider/index.d.ts +2 -1
- package/es/config-provider/index.js +43 -16
- 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/style/index.js +3 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -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 +8 -0
- package/es/style/global.js +118 -0
- package/es/style/reset.css +2 -1
- package/es/table/index.d.ts +2 -2
- package/es/table/style/index.js +5 -1
- package/es/theme/compact.d.ts +1 -1
- package/es/theme/compact.js +2 -6
- package/es/theme/default.d.ts +1 -1
- package/es/theme/default.js +29 -10
- package/es/typography/style/index.js +3 -0
- package/lib/alert/index.js +1 -3
- package/lib/alert/style/index.js +15 -16
- package/lib/app/style/index.js +2 -4
- package/lib/button/style/index.js +8 -2
- package/lib/config-provider/index.d.ts +2 -1
- package/lib/config-provider/index.js +60 -12
- 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/style/index.js +4 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -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 +8 -0
- package/lib/style/global.js +168 -0
- package/lib/style/reset.css +2 -1
- package/lib/table/index.d.ts +2 -2
- package/lib/table/style/index.js +5 -1
- package/lib/theme/compact.d.ts +1 -1
- package/lib/theme/compact.js +1 -5
- package/lib/theme/default.d.ts +1 -1
- package/lib/theme/default.js +29 -10
- 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/es/global.css +0 -48
- package/lib/fonts/Inter.woff2 +0 -0
- package/lib/global.css +0 -48
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'
|
|
@@ -0,0 +1,118 @@
|
|
|
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 React from 'react';
|
|
6
|
+
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
7
|
+
import themeConfig from "../theme";
|
|
8
|
+
import interRegular from "../fonts/Inter-Regular.woff2";
|
|
9
|
+
import interMedium from "../fonts/Inter-Medium.woff2";
|
|
10
|
+
import interSemibold from "../fonts/Inter-SemiBold.woff2";
|
|
11
|
+
import consolas from "../fonts/Consolas.woff2";
|
|
12
|
+
import helveticaNeue from "../fonts/HelveticaNeue.woff2";
|
|
13
|
+
import 'antd/dist/reset.css';
|
|
14
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
var genGlobalStyle = function genGlobalStyle(token, prefixCls) {
|
|
17
|
+
var antCls = ".".concat(prefixCls);
|
|
18
|
+
var buttonComponentCls = "".concat(antCls, "-btn");
|
|
19
|
+
var typographyComponentCls = "".concat(antCls, "-typography");
|
|
20
|
+
var menuComponentCls = "".concat(antCls, "-menu");
|
|
21
|
+
return [{
|
|
22
|
+
'@font-face': {
|
|
23
|
+
fontFamily: 'Inter',
|
|
24
|
+
fontStyle: 'lighter',
|
|
25
|
+
fontWeight: 300,
|
|
26
|
+
// load priority: local font > self-hosting font > remote font
|
|
27
|
+
src: "local('Inter'), url(".concat(interRegular, ") format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2') format('woff2')"),
|
|
28
|
+
fontDisplay: 'swap'
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
'@font-face': {
|
|
32
|
+
fontFamily: 'Inter',
|
|
33
|
+
fontStyle: 'normal',
|
|
34
|
+
fontWeight: 400,
|
|
35
|
+
src: "local('Inter'), url(".concat(interMedium, ") format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2') format('woff2')"),
|
|
36
|
+
fontDisplay: 'swap'
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
'@font-face': {
|
|
40
|
+
fontFamily: 'Inter',
|
|
41
|
+
fontStyle: 'medium',
|
|
42
|
+
fontWeight: 500,
|
|
43
|
+
src: "local('Inter'), url(".concat(interMedium, ") format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2') format('woff2')"),
|
|
44
|
+
fontDisplay: 'swap'
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
'@font-face': {
|
|
48
|
+
fontFamily: 'Inter',
|
|
49
|
+
fontStyle: 'semibold',
|
|
50
|
+
fontWeight: 600,
|
|
51
|
+
src: "local('Inter'), url(".concat(interSemibold, ") format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2') format('woff2')"),
|
|
52
|
+
fontDisplay: 'swap'
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
'@font-face': {
|
|
56
|
+
fontFamily: 'Consolas',
|
|
57
|
+
src: "local('Consolas'), url(".concat(consolas, ") format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2') format('woff2')"),
|
|
58
|
+
fontDisplay: 'swap'
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
'@font-face': {
|
|
62
|
+
fontFamily: 'Helvetica Neue',
|
|
63
|
+
src: "local('Helvetica Neue'), url(".concat(helveticaNeue, ") format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2') format('woff2')"),
|
|
64
|
+
fontDisplay: 'swap'
|
|
65
|
+
}
|
|
66
|
+
}, _defineProperty(_defineProperty(_defineProperty({
|
|
67
|
+
'pre, code, kbd, samp': {
|
|
68
|
+
fontFamily: token.fontFamilyCode
|
|
69
|
+
},
|
|
70
|
+
'*': {
|
|
71
|
+
scrollbarColor: "".concat(token.colorFillSecondary, " transparent")
|
|
72
|
+
},
|
|
73
|
+
'.rc-virtual-list-scrollbar-thumb': {
|
|
74
|
+
background: "".concat(token.colorFillSecondary, " !important")
|
|
75
|
+
},
|
|
76
|
+
// link with href or data-aspm-param^="obcloud_openLink= show underline on hover
|
|
77
|
+
// except disabled and antd element
|
|
78
|
+
'a[href], a[data-aspm-param^="obcloud_openLink="]': _defineProperty({}, "&:not([disabled]):not([class^=\"".concat(prefixCls, "-\"]):hover"), {
|
|
79
|
+
textDecoration: 'underline'
|
|
80
|
+
})
|
|
81
|
+
}, "".concat(buttonComponentCls).concat(buttonComponentCls, "-link:not(").concat(buttonComponentCls, "-disabled)"), {
|
|
82
|
+
'&[href], &[data-aspm-param^="obcloud_openLink="]': {
|
|
83
|
+
'&:hover': {
|
|
84
|
+
textDecoration: 'underline'
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}), "".concat(typographyComponentCls, ":not(").concat(typographyComponentCls, "-disabled)"), {
|
|
88
|
+
'&[href], &[data-aspm-param^="obcloud_openLink="]': {
|
|
89
|
+
'&:hover': {
|
|
90
|
+
textDecoration: 'underline'
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}), "".concat(menuComponentCls), _defineProperty({}, "".concat(menuComponentCls, "-item"), _defineProperty({}, "".concat(menuComponentCls, "-title-content"), {
|
|
94
|
+
'a:hover': {
|
|
95
|
+
textDecoration: 'none'
|
|
96
|
+
}
|
|
97
|
+
})))];
|
|
98
|
+
};
|
|
99
|
+
var GlobalStyle = function GlobalStyle(_ref2) {
|
|
100
|
+
var _ref2$prefixCls = _ref2.prefixCls,
|
|
101
|
+
prefixCls = _ref2$prefixCls === void 0 ? 'ant' : _ref2$prefixCls;
|
|
102
|
+
var _themeConfig$useToken = themeConfig.useToken(),
|
|
103
|
+
theme = _themeConfig$useToken.theme,
|
|
104
|
+
token = _themeConfig$useToken.token;
|
|
105
|
+
var wrapSSR = useStyleRegister({
|
|
106
|
+
theme: theme,
|
|
107
|
+
token: token,
|
|
108
|
+
path: ['global'],
|
|
109
|
+
hashId: '',
|
|
110
|
+
// Empty hashId for global styles
|
|
111
|
+
order: -1000 // Inject before other styles
|
|
112
|
+
}, function () {
|
|
113
|
+
return genGlobalStyle(token, prefixCls);
|
|
114
|
+
});
|
|
115
|
+
return wrapSSR( /*#__PURE__*/_jsx(_Fragment, {}));
|
|
116
|
+
};
|
|
117
|
+
export { GlobalStyle };
|
|
118
|
+
export default GlobalStyle;
|
package/es/style/reset.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/* antd/dist/reset.css is imported in global.tsx */
|
|
2
|
+
/* reserve this file for compatibility with antd */
|
package/es/table/index.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
|
|
|
38
38
|
SELECTION_ALL: "SELECT_ALL";
|
|
39
39
|
SELECTION_INVERT: "SELECT_INVERT";
|
|
40
40
|
SELECTION_NONE: "SELECT_NONE";
|
|
41
|
-
Column: <
|
|
42
|
-
ColumnGroup: <
|
|
41
|
+
Column: <RecordType_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType_1>) => null;
|
|
42
|
+
ColumnGroup: <RecordType_2 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_2>) => null;
|
|
43
43
|
Summary: typeof Summary;
|
|
44
44
|
useStyle: (prefixCls: string) => {
|
|
45
45
|
wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
|
package/es/table/style/index.js
CHANGED
|
@@ -46,7 +46,11 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
46
46
|
}, "& ~ td", {
|
|
47
47
|
borderBottom: 'none'
|
|
48
48
|
})), "tr > td", {
|
|
49
|
-
|
|
49
|
+
fontWeight: token.fontWeight,
|
|
50
|
+
transition: "background ".concat(token.motionDurationMid),
|
|
51
|
+
a: {
|
|
52
|
+
fontWeight: token.fontWeightStrong
|
|
53
|
+
}
|
|
50
54
|
}), "".concat(componentCls, "-placeholder td"), {}), "".concat(componentCls, "-empty-wrapper"), {
|
|
51
55
|
minHeight: calc(360).sub(calc(token.paddingSM).mul(2).equal()).equal(),
|
|
52
56
|
display: 'flex',
|
package/es/theme/compact.d.ts
CHANGED
package/es/theme/compact.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import themeConfig from "./index";
|
|
1
|
+
import theme from "./index";
|
|
3
2
|
var compactTheme = {
|
|
4
|
-
token: theme.
|
|
5
|
-
algorithm: theme.compactAlgorithm,
|
|
6
|
-
token: themeConfig.defaultSeed
|
|
7
|
-
}),
|
|
3
|
+
token: theme.defaultSeed,
|
|
8
4
|
components: {
|
|
9
5
|
InputNumber: {
|
|
10
6
|
handleVisible: true
|
package/es/theme/default.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const fontFamilyEn = "Inter, 'Noto sans', sans-serif, Roboto, 'Open Sans', 'Segoe UI', 'Helvetica Neue', 'Helvetica, Arial', 'Apple Color Emoji'";
|
|
2
|
-
export declare const fontWeightWeakEn =
|
|
2
|
+
export declare const fontWeightWeakEn = 300;
|
|
3
3
|
export declare const fontWeightEn = 500;
|
|
4
4
|
export declare const fontWeightStrongEn = 600;
|
|
5
5
|
declare const _default: import("antd").ThemeConfig;
|
package/es/theme/default.js
CHANGED
|
@@ -19,8 +19,11 @@ var colorFillQuaternary = '#F5F7FC';
|
|
|
19
19
|
var colorBorderSecondary = colorFillSecondary;
|
|
20
20
|
var fontSizeSM = 12;
|
|
21
21
|
var tagColorBorder = colorTextQuaternary;
|
|
22
|
+
var borderRadius = 4;
|
|
23
|
+
var borderRadiusMD = 6;
|
|
24
|
+
var borderRadiusLG = 8;
|
|
22
25
|
export var fontFamilyEn = "Inter, 'Noto sans', sans-serif, Roboto, 'Open Sans', 'Segoe UI', 'Helvetica Neue', 'Helvetica, Arial', 'Apple Color Emoji'";
|
|
23
|
-
export var fontWeightWeakEn =
|
|
26
|
+
export var fontWeightWeakEn = 300;
|
|
24
27
|
export var fontWeightEn = 500;
|
|
25
28
|
export var fontWeightStrongEn = 600;
|
|
26
29
|
var defaultTheme = {
|
|
@@ -31,9 +34,9 @@ var defaultTheme = {
|
|
|
31
34
|
fontWeight: 400,
|
|
32
35
|
fontWeightStrong: 500,
|
|
33
36
|
borderRadiusSM: 2,
|
|
34
|
-
borderRadius:
|
|
35
|
-
borderRadiusMD:
|
|
36
|
-
borderRadiusLG:
|
|
37
|
+
borderRadius: borderRadius,
|
|
38
|
+
borderRadiusMD: borderRadiusMD,
|
|
39
|
+
borderRadiusLG: borderRadiusLG,
|
|
37
40
|
fontSizeSM: fontSizeSM,
|
|
38
41
|
fontSize: 13,
|
|
39
42
|
lineHeight: 20 / 13,
|
|
@@ -97,7 +100,7 @@ var defaultTheme = {
|
|
|
97
100
|
},
|
|
98
101
|
components: {
|
|
99
102
|
Alert: {
|
|
100
|
-
borderRadiusLG:
|
|
103
|
+
borderRadiusLG: borderRadiusMD
|
|
101
104
|
},
|
|
102
105
|
Badge: {
|
|
103
106
|
statusSize: 8
|
|
@@ -118,16 +121,29 @@ var defaultTheme = {
|
|
|
118
121
|
},
|
|
119
122
|
Card: {
|
|
120
123
|
headerFontSize: 16,
|
|
121
|
-
borderRadiusLG:
|
|
124
|
+
borderRadiusLG: borderRadiusLG
|
|
122
125
|
},
|
|
123
126
|
Collapse: {
|
|
124
127
|
colorBorder: colorBorderSecondary
|
|
125
128
|
},
|
|
129
|
+
DatePicker: {
|
|
130
|
+
borderRadiusLG: borderRadiusMD
|
|
131
|
+
},
|
|
126
132
|
Descriptions: {
|
|
127
133
|
labelColor: colorTextSecondary
|
|
128
134
|
},
|
|
135
|
+
Dropdown: {
|
|
136
|
+
borderRadiusLG: borderRadiusMD
|
|
137
|
+
},
|
|
138
|
+
Input: {
|
|
139
|
+
borderRadiusLG: borderRadiusMD
|
|
140
|
+
},
|
|
129
141
|
InputNumber: {
|
|
130
|
-
handleVisible: true
|
|
142
|
+
handleVisible: true,
|
|
143
|
+
borderRadiusLG: borderRadiusMD
|
|
144
|
+
},
|
|
145
|
+
Popover: {
|
|
146
|
+
borderRadiusLG: borderRadiusMD
|
|
131
147
|
},
|
|
132
148
|
Progress: {
|
|
133
149
|
defaultColor: colorPrimarySecondary
|
|
@@ -141,6 +157,7 @@ var defaultTheme = {
|
|
|
141
157
|
},
|
|
142
158
|
Select: {
|
|
143
159
|
// work for all multiple select component, including Select, TreeSelect and Cascader and so on
|
|
160
|
+
borderRadiusLG: borderRadiusMD,
|
|
144
161
|
multipleItemBg: colorFillQuaternary,
|
|
145
162
|
multipleItemBorderColor: tagColorBorder,
|
|
146
163
|
multipleItemBorderColorDisabled: tagColorBorder
|
|
@@ -154,7 +171,7 @@ var defaultTheme = {
|
|
|
154
171
|
handleColorDisabled: '#b3ccff'
|
|
155
172
|
},
|
|
156
173
|
Skeleton: {
|
|
157
|
-
blockRadius:
|
|
174
|
+
blockRadius: borderRadius
|
|
158
175
|
},
|
|
159
176
|
Tabs: {
|
|
160
177
|
horizontalItemGutter: 24,
|
|
@@ -164,7 +181,7 @@ var defaultTheme = {
|
|
|
164
181
|
},
|
|
165
182
|
Tag: {
|
|
166
183
|
colorBorder: tagColorBorder,
|
|
167
|
-
borderRadiusSM:
|
|
184
|
+
borderRadiusSM: borderRadius
|
|
168
185
|
},
|
|
169
186
|
Table: {
|
|
170
187
|
cellFontSize: fontSizeSM,
|
|
@@ -178,13 +195,15 @@ var defaultTheme = {
|
|
|
178
195
|
rowSelectedHoverBg: colorFillTertiary
|
|
179
196
|
},
|
|
180
197
|
Tooltip: {
|
|
198
|
+
borderRadius: borderRadiusMD,
|
|
181
199
|
colorBgSpotlight: '#ffffff',
|
|
182
200
|
colorTextLightSolid: colorText
|
|
183
201
|
},
|
|
184
202
|
Menu: {
|
|
203
|
+
borderRadiusLG: borderRadiusMD,
|
|
185
204
|
paddingContentVertical: 0,
|
|
186
205
|
itemHeight: 30,
|
|
187
|
-
itemBorderRadius:
|
|
206
|
+
itemBorderRadius: borderRadius,
|
|
188
207
|
// 80 means 50% opacity
|
|
189
208
|
itemHoverBg: colorFillSecondary + '80',
|
|
190
209
|
itemActiveBg: colorFillSecondary + '80',
|
|
@@ -46,14 +46,17 @@ export var genTypographyStyle = function genTypographyStyle(token) {
|
|
|
46
46
|
}
|
|
47
47
|
}), "".concat(componentCls).concat(componentCls, "-edit-content"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-div&"), {
|
|
48
48
|
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
49
|
+
insetBlockStart: 0,
|
|
49
50
|
marginTop: negativeMarginOffset,
|
|
50
51
|
marginBottom: calc('1em').sub(marginOffset).equal()
|
|
51
52
|
}), "".concat(componentCls, "-span&"), {
|
|
52
53
|
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
54
|
+
insetBlockStart: 0,
|
|
53
55
|
marginTop: negativeMarginOffset,
|
|
54
56
|
marginBottom: negativeMarginOffset
|
|
55
57
|
}), "".concat(componentCls, "-h1&, ").concat(componentCls, "-h2&, ").concat(componentCls, "-h3&, ").concat(componentCls, "-h4&, ").concat(componentCls, "-h5&"), {
|
|
56
58
|
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
59
|
+
insetBlockStart: 0,
|
|
57
60
|
marginTop: "".concat(negativeMarginOffset, " !important"),
|
|
58
61
|
marginBottom: "".concat(negativeMarginOffset, " !important")
|
|
59
62
|
}));
|
package/lib/alert/index.js
CHANGED
|
@@ -39,7 +39,6 @@ var import_icons = require("@oceanbase/icons");
|
|
|
39
39
|
var import_classnames = __toESM(require("classnames"));
|
|
40
40
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
|
-
var import_theme = __toESM(require("../theme"));
|
|
43
42
|
__reExport(alert_exports, require("antd/es/alert"), module.exports);
|
|
44
43
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
44
|
var iconMapOutlined = {
|
|
@@ -59,8 +58,7 @@ var Alert = ({
|
|
|
59
58
|
className,
|
|
60
59
|
...restProps
|
|
61
60
|
}) => {
|
|
62
|
-
const
|
|
63
|
-
const type = banner && !typeProp ? "warning" : typeProp;
|
|
61
|
+
const type = (banner && !typeProp ? "warning" : typeProp) || "info";
|
|
64
62
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
65
63
|
const prefixCls = getPrefixCls("alert", customizePrefixCls);
|
|
66
64
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
package/lib/alert/style/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(style_exports, {
|
|
|
23
23
|
genAlertStyle: () => genAlertStyle
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
26
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
28
|
var import_lodash = require("lodash");
|
|
28
29
|
var genAlertTypeStyle = (type, token) => {
|
|
@@ -59,12 +60,26 @@ var genAlertStyle = (token) => {
|
|
|
59
60
|
const iconWidth = token.fontSizeLG;
|
|
60
61
|
const contentStartOffset = calc(iconWidth).add(token.marginXS).equal();
|
|
61
62
|
const closeIconWidth = height;
|
|
63
|
+
const contentWidth = (0, import_cssinjs.unit)(
|
|
64
|
+
calc(contentStartOffset).add(closeIconWidth).add(token.padding).equal()
|
|
65
|
+
);
|
|
66
|
+
const actionWidth = (0, import_cssinjs.unit)(calc(contentStartOffset).add(token.padding).equal());
|
|
62
67
|
return {
|
|
63
68
|
[`${componentCls}`]: {
|
|
64
69
|
// vertical align to flex-start
|
|
65
70
|
alignItems: "flex-start !important",
|
|
66
71
|
paddingInline: token.padding,
|
|
67
72
|
position: "relative",
|
|
73
|
+
[`${componentCls}-content`]: {
|
|
74
|
+
flex: `1 1 calc(100% - ${contentWidth})`,
|
|
75
|
+
minWidth: 0,
|
|
76
|
+
maxWidth: `calc(100% - ${contentWidth})`,
|
|
77
|
+
wordBreak: "break-word"
|
|
78
|
+
},
|
|
79
|
+
[`${componentCls}-action`]: {
|
|
80
|
+
width: `calc(100% - ${actionWidth})`,
|
|
81
|
+
marginInlineStart: contentStartOffset
|
|
82
|
+
},
|
|
68
83
|
[`${componentCls}-icon`]: {
|
|
69
84
|
height,
|
|
70
85
|
fontSize: token.fontSizeLG,
|
|
@@ -103,15 +118,7 @@ var genAlertStyle = (token) => {
|
|
|
103
118
|
},
|
|
104
119
|
[`${componentCls}:not(${componentCls}-with-description)`]: {
|
|
105
120
|
flexWrap: "wrap",
|
|
106
|
-
[`${componentCls}-content`]: {
|
|
107
|
-
flex: `1 1 ${calc("100%").sub(contentStartOffset).sub(closeIconWidth).sub(token.padding).equal()}`,
|
|
108
|
-
minWidth: 0,
|
|
109
|
-
maxWidth: calc("100%").sub(contentStartOffset).sub(closeIconWidth).sub(token.padding).equal(),
|
|
110
|
-
wordBreak: "break-word"
|
|
111
|
-
},
|
|
112
121
|
[`${componentCls}-action`]: {
|
|
113
|
-
width: calc("100%").sub(contentStartOffset).sub(token.padding).equal(),
|
|
114
|
-
marginInlineStart: contentStartOffset,
|
|
115
122
|
marginTop: token.marginXS
|
|
116
123
|
}
|
|
117
124
|
},
|
|
@@ -127,15 +134,7 @@ var genAlertStyle = (token) => {
|
|
|
127
134
|
[`${componentCls}-description`]: {
|
|
128
135
|
wordBreak: "break-word"
|
|
129
136
|
},
|
|
130
|
-
[`${componentCls}-content`]: {
|
|
131
|
-
flex: `1 1 ${calc("100%").sub(contentStartOffset).sub(closeIconWidth).sub(token.padding).equal()}`,
|
|
132
|
-
minWidth: 0,
|
|
133
|
-
maxWidth: calc("100%").sub(contentStartOffset).sub(closeIconWidth).sub(token.padding).equal(),
|
|
134
|
-
wordBreak: "break-word"
|
|
135
|
-
},
|
|
136
137
|
[`${componentCls}-action`]: {
|
|
137
|
-
width: calc("100%").sub(contentStartOffset).sub(token.padding).equal(),
|
|
138
|
-
marginInlineStart: contentStartOffset,
|
|
139
138
|
marginTop: token.marginSM
|
|
140
139
|
},
|
|
141
140
|
[`${componentCls}-close-icon`]: {
|
package/lib/app/style/index.js
CHANGED
|
@@ -25,10 +25,8 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genAppStyle = (token) => {
|
|
28
|
-
const { componentCls } = token;
|
|
29
|
-
return {
|
|
30
|
-
[`${componentCls}`]: {}
|
|
31
|
-
};
|
|
28
|
+
const { antCls, componentCls } = token;
|
|
29
|
+
return {};
|
|
32
30
|
};
|
|
33
31
|
var style_default = (prefixCls) => {
|
|
34
32
|
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("App", (token) => {
|
|
@@ -25,11 +25,17 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genButtonStyle = (token) => {
|
|
28
|
-
|
|
28
|
+
const { componentCls } = token;
|
|
29
|
+
return {
|
|
30
|
+
[`${componentCls}`]: {
|
|
31
|
+
// remove box-shadow for button
|
|
32
|
+
boxShadow: "none !important"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
29
35
|
};
|
|
30
36
|
var style_default = (prefixCls, isAliyun) => {
|
|
31
37
|
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Button", (token) => {
|
|
32
|
-
return
|
|
38
|
+
return [genButtonStyle(token)];
|
|
33
39
|
});
|
|
34
40
|
return useStyle(prefixCls);
|
|
35
41
|
};
|
|
@@ -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;
|