@oceanbase/design 0.4.0 → 0.4.1
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/es/button/index.d.ts +1 -1
- package/es/button/style/index.js +17 -3
- package/es/card/style/index.js +5 -3
- package/es/checkbox/index.d.ts +2 -0
- package/es/checkbox/index.js +40 -1
- package/es/checkbox/style/index.d.ts +9 -0
- package/es/checkbox/style/index.js +22 -0
- package/es/config-provider/index.d.ts +2 -0
- package/es/config-provider/index.js +6 -4
- package/es/descriptions/hooks/useItems.d.ts +3 -3
- package/es/empty/default.js +34 -55
- package/es/index.d.ts +6 -0
- package/es/index.js +3 -0
- package/es/radio/index.d.ts +2 -0
- package/es/radio/index.js +41 -1
- package/es/radio/style/index.d.ts +9 -0
- package/es/radio/style/index.js +23 -0
- package/es/slider/index.d.ts +5 -0
- package/es/slider/index.js +36 -1
- package/es/slider/style/index.d.ts +9 -0
- package/es/slider/style/index.js +21 -0
- package/es/table/index.js +15 -3
- package/es/table/style/index.js +22 -15
- package/es/theme/default.js +10 -11
- package/es/theme/style/aliyun.less +5 -1
- package/es/theme/style/compact.less +7 -3
- package/es/theme/style/dark.less +5 -1
- package/es/theme/style/default.less +15 -11
- package/lib/button/index.d.ts +1 -1
- package/lib/button/style/index.js +21 -1
- package/lib/card/style/index.js +7 -2
- package/lib/checkbox/index.d.ts +2 -0
- package/lib/checkbox/index.js +49 -1
- package/lib/checkbox/style/index.d.ts +9 -0
- package/lib/checkbox/style/index.js +49 -0
- package/lib/config-provider/index.d.ts +2 -0
- package/lib/config-provider/index.js +2 -1
- package/lib/descriptions/hooks/useItems.d.ts +3 -3
- package/lib/empty/default.js +8 -39
- package/lib/index.d.ts +6 -0
- package/lib/index.js +9 -0
- package/lib/radio/index.d.ts +2 -0
- package/lib/radio/index.js +42 -1
- package/lib/radio/style/index.d.ts +9 -0
- package/lib/radio/style/index.js +49 -0
- package/lib/slider/index.d.ts +5 -0
- package/lib/slider/index.js +38 -1
- package/lib/slider/style/index.d.ts +9 -0
- package/lib/slider/style/index.js +51 -0
- package/lib/table/index.js +14 -3
- package/lib/table/style/index.js +20 -16
- package/lib/theme/default.js +10 -11
- package/lib/theme/style/aliyun.less +5 -1
- package/lib/theme/style/compact.less +7 -3
- package/lib/theme/style/dark.less +5 -1
- package/lib/theme/style/default.less +15 -11
- package/package.json +11 -10
package/es/button/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ButtonProps as AntButtonProps } from 'antd/es/button';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export * from 'antd/es/button';
|
|
4
4
|
export type ButtonProps = AntButtonProps;
|
|
5
|
-
declare const _default: React.ForwardRefExoticComponent<AntButtonProps & React.RefAttributes<
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<AntButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>> & {
|
|
6
6
|
Group: React.FC<import("antd/es/button").ButtonGroupProps>;
|
|
7
7
|
__ANT_BUTTON: boolean;
|
|
8
8
|
};
|
package/es/button/style/index.js
CHANGED
|
@@ -5,17 +5,31 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
5
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
6
|
export var genButtonStyle = function genButtonStyle(token) {
|
|
7
7
|
var componentCls = token.componentCls;
|
|
8
|
-
|
|
8
|
+
// primary button className
|
|
9
|
+
var primaryBtnCls = "".concat(componentCls).concat(componentCls, "-primary:not([disabled]):not(").concat(componentCls, "-disabled):not(").concat(componentCls, "-dangerous):not(").concat(componentCls, "-background-ghost)");
|
|
10
|
+
var primaryAndCompactItemBtnCls = "".concat(componentCls, "-compact-item").concat(primaryBtnCls);
|
|
11
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), {
|
|
9
12
|
// remove box-shadow for button
|
|
10
13
|
boxShadow: 'none !important'
|
|
11
|
-
}), "".concat(
|
|
14
|
+
}), "".concat(primaryBtnCls), _defineProperty(_defineProperty({
|
|
12
15
|
background: 'linear-gradient(-59deg, #002BFF 0%, #0080FF 100%)',
|
|
13
16
|
border: 'none'
|
|
14
17
|
}, '&:hover', {
|
|
15
18
|
background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)'
|
|
16
19
|
}), '&:active', {
|
|
17
20
|
background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)'
|
|
18
|
-
}))
|
|
21
|
+
})), "".concat(primaryBtnCls).concat(componentCls, "-compact-last-item"), _defineProperty(_defineProperty({
|
|
22
|
+
background: 'linear-gradient(-59deg, #002BFF 0%, #002BFF 100%)'
|
|
23
|
+
}, '&:hover', {
|
|
24
|
+
background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)'
|
|
25
|
+
}), '&:active', {
|
|
26
|
+
background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)'
|
|
27
|
+
})), "".concat(primaryAndCompactItemBtnCls, "+").concat(primaryAndCompactItemBtnCls, ":before"), {
|
|
28
|
+
height: '100%',
|
|
29
|
+
top: 0
|
|
30
|
+
}), "".concat(primaryAndCompactItemBtnCls, ":hover"), {
|
|
31
|
+
zIndex: 0
|
|
32
|
+
});
|
|
19
33
|
};
|
|
20
34
|
export default (function (prefixCls, isAliyun) {
|
|
21
35
|
var useStyle = genComponentStyleHook('Button', function (token) {
|
package/es/card/style/index.js
CHANGED
|
@@ -26,14 +26,16 @@ export var genCardStyle = function genCardStyle(token) {
|
|
|
26
26
|
padding = token.padding,
|
|
27
27
|
paddingSM = token.paddingSM,
|
|
28
28
|
paddingLG = token.paddingLG;
|
|
29
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
|
|
29
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
|
|
30
30
|
boxShadow: 'none'
|
|
31
31
|
})), "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), {
|
|
32
32
|
borderBottom: 'none'
|
|
33
33
|
})), "".concat(componentCls).concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
34
|
-
padding: "0 ".concat(paddingLG, "px ").concat(
|
|
34
|
+
padding: "0 ".concat(paddingLG, "px ").concat(paddingLG, "px ").concat(paddingLG, "px")
|
|
35
35
|
})), "".concat(componentCls, "-small").concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
36
|
-
padding: "0 ".concat(paddingSM, "px
|
|
36
|
+
padding: "0 ".concat(paddingSM, "px ").concat(paddingSM, "px ").concat(paddingSM, "px")
|
|
37
|
+
})), "".concat(componentCls, "-small").concat(componentCls, "-contain-tabs >").concat(componentCls, "-head"), _defineProperty({}, "".concat(componentCls, "-head-title, ").concat(componentCls, "-head-extra"), {
|
|
38
|
+
paddingTop: token.paddingXS
|
|
37
39
|
})), "".concat(componentCls).concat(componentCls, "-contain-tabs"), _defineProperty({}, "".concat(componentCls, "-head"), genTagStyle(_objectSpread(_objectSpread({}, token), {}, {
|
|
38
40
|
componentCls: tabsComponentCls,
|
|
39
41
|
prefixCls: tabsPrefixCls
|
package/es/checkbox/index.d.ts
CHANGED
package/es/checkbox/index.js
CHANGED
|
@@ -1 +1,40 @@
|
|
|
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 = ["prefixCls", "className"];
|
|
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
|
+
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
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import { Checkbox as AntCheckbox } from 'antd';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import React, { useContext } from 'react';
|
|
13
|
+
import ConfigProvider from "../config-provider";
|
|
14
|
+
import useStyle from "./style";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
export * from 'antd/es/checkbox';
|
|
17
|
+
var InternalCheckbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
|
+
var customizePrefixCls = _ref.prefixCls,
|
|
19
|
+
className = _ref.className,
|
|
20
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
22
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
23
|
+
var prefixCls = getPrefixCls('checkbox', customizePrefixCls);
|
|
24
|
+
var _useStyle = useStyle(prefixCls),
|
|
25
|
+
wrapSSR = _useStyle.wrapSSR;
|
|
26
|
+
var checkboxCls = classNames(className);
|
|
27
|
+
return wrapSSR( /*#__PURE__*/_jsx(AntCheckbox, _objectSpread({
|
|
28
|
+
ref: ref,
|
|
29
|
+
prefixCls: customizePrefixCls,
|
|
30
|
+
className: checkboxCls
|
|
31
|
+
}, restProps)));
|
|
32
|
+
});
|
|
33
|
+
var Checkbox = InternalCheckbox;
|
|
34
|
+
Checkbox.Group = AntCheckbox.Group;
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
Checkbox.__ANT_CHECKBOX = AntCheckbox.__ANT_CHECKBOX;
|
|
37
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
38
|
+
Checkbox.displayName = AntCheckbox.displayName;
|
|
39
|
+
}
|
|
40
|
+
export default Checkbox;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export type CheckboxToken = FullToken<'Checkbox'>;
|
|
4
|
+
export declare const genCheckboxStyle: GenerateStyle<CheckboxToken>;
|
|
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 genCheckboxStyle = function genCheckboxStyle(token) {
|
|
7
|
+
var componentCls = token.componentCls,
|
|
8
|
+
fontSize = token.fontSize,
|
|
9
|
+
fontSizeLG = token.fontSizeLG,
|
|
10
|
+
lineHeight = token.lineHeight;
|
|
11
|
+
return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls), _defineProperty({
|
|
12
|
+
alignSelf: 'baseline'
|
|
13
|
+
}, "".concat(componentCls, "-inner"), {
|
|
14
|
+
transform: "translate(0px, ".concat((fontSize * lineHeight - fontSizeLG) / 2, "px)")
|
|
15
|
+
})));
|
|
16
|
+
};
|
|
17
|
+
export default (function (prefixCls) {
|
|
18
|
+
var useStyle = genComponentStyleHook('Checkbox', function (token) {
|
|
19
|
+
return [genCheckboxStyle(token)];
|
|
20
|
+
});
|
|
21
|
+
return useStyle(prefixCls);
|
|
22
|
+
});
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ConfigProvider as AntConfigProvider } from 'antd';
|
|
3
3
|
import type { ConfigProviderProps as AntConfigProviderProps, ConfigConsumerProps as AntConfigConsumerProps, ThemeConfig as AntThemeConfig } from 'antd/es/config-provider';
|
|
4
4
|
import type { ComponentStyleConfig } from 'antd/es/config-provider/context';
|
|
5
|
+
import type { AppProps } from 'antd/es/app';
|
|
5
6
|
import type { PaginationConfig } from 'antd/es/pagination';
|
|
6
7
|
import type { SpinIndicator } from 'antd/es/spin';
|
|
7
8
|
import type { StyleProviderProps } from '@ant-design/cssinjs';
|
|
@@ -41,6 +42,7 @@ export interface ConfigProviderProps extends AntConfigProviderProps {
|
|
|
41
42
|
table?: TableConfig;
|
|
42
43
|
injectStaticFunction?: boolean;
|
|
43
44
|
styleProviderProps?: StyleProviderProps;
|
|
45
|
+
appProps?: AppProps;
|
|
44
46
|
}
|
|
45
47
|
export interface ExtendedConfigConsumerProps {
|
|
46
48
|
navigate?: NavigateFunction;
|
|
@@ -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 = ["children", "theme", "locale", "navigate", "hideOnSinglePage", "form", "spin", "table", "tabs", "injectStaticFunction", "styleProviderProps"];
|
|
2
|
+
var _excluded = ["children", "theme", "locale", "navigate", "hideOnSinglePage", "form", "spin", "table", "tabs", "injectStaticFunction", "styleProviderProps", "appProps"];
|
|
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; }
|
|
@@ -43,6 +43,7 @@ var ConfigProvider = function ConfigProvider(_ref) {
|
|
|
43
43
|
_ref$injectStaticFunc = _ref.injectStaticFunction,
|
|
44
44
|
injectStaticFunction = _ref$injectStaticFunc === void 0 ? true : _ref$injectStaticFunc,
|
|
45
45
|
styleProviderProps = _ref.styleProviderProps,
|
|
46
|
+
appProps = _ref.appProps,
|
|
46
47
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
47
48
|
// inherit from parent ConfigProvider
|
|
48
49
|
var parentContext = React.useContext(AntConfigProvider.ConfigContext);
|
|
@@ -95,10 +96,11 @@ var ConfigProvider = function ConfigProvider(_ref) {
|
|
|
95
96
|
hideOnSinglePage: (_parentContext$pagina = parentContext.pagination) !== null && _parentContext$pagina !== void 0 && _parentContext$pagina.showSizeChanger ? false : hideOnSinglePage !== undefined ? hideOnSinglePage : parentExtendedContext.hideOnSinglePage
|
|
96
97
|
},
|
|
97
98
|
children: /*#__PURE__*/_jsx(StyleProvider, _objectSpread(_objectSpread({}, mergedStyleProviderProps), {}, {
|
|
98
|
-
children: /*#__PURE__*/_jsxs(App, {
|
|
99
|
-
component: false
|
|
99
|
+
children: /*#__PURE__*/_jsxs(App, _objectSpread(_objectSpread({
|
|
100
|
+
component: false
|
|
101
|
+
}, appProps), {}, {
|
|
100
102
|
children: [children, injectStaticFunction && /*#__PURE__*/_jsx(StaticFunction, {})]
|
|
101
|
-
})
|
|
103
|
+
}))
|
|
102
104
|
}))
|
|
103
105
|
})
|
|
104
106
|
}));
|
|
@@ -10,11 +10,11 @@ export default function useItems(items?: DescriptionsItemType[], children?: Reac
|
|
|
10
10
|
sm?: number;
|
|
11
11
|
xs?: number;
|
|
12
12
|
};
|
|
13
|
-
prefixCls?: string;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
13
|
className?: string;
|
|
16
|
-
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
prefixCls?: string;
|
|
17
16
|
key?: React.Key;
|
|
17
|
+
label?: React.ReactNode;
|
|
18
18
|
labelStyle?: React.CSSProperties;
|
|
19
19
|
contentStyle?: React.CSSProperties;
|
|
20
20
|
}[];
|
package/es/empty/default.js
CHANGED
|
@@ -1,70 +1,49 @@
|
|
|
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 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; }
|
|
3
|
-
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; }
|
|
4
|
-
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; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
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); }
|
|
7
1
|
import React from 'react';
|
|
8
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
3
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
4
|
var DefaultEmptyImg = function DefaultEmptyImg(props) {
|
|
11
|
-
return /*#__PURE__*/_jsx("svg",
|
|
12
|
-
width: "
|
|
13
|
-
height: "
|
|
14
|
-
viewBox: "0 0
|
|
5
|
+
return /*#__PURE__*/_jsx("svg", {
|
|
6
|
+
width: "56px",
|
|
7
|
+
height: "56px",
|
|
8
|
+
viewBox: "0 0 56 56",
|
|
15
9
|
version: "1.1",
|
|
16
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
17
|
-
}, props), {}, {
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
11
|
children: /*#__PURE__*/_jsx("g", {
|
|
19
12
|
stroke: "none",
|
|
20
13
|
strokeWidth: "1",
|
|
21
14
|
fill: "none",
|
|
22
15
|
fillRule: "evenodd",
|
|
23
|
-
children: /*#__PURE__*/
|
|
24
|
-
transform: "translate(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}), /*#__PURE__*/_jsx("rect", {
|
|
52
|
-
fill: "#F8F8F8",
|
|
53
|
-
x: "11.04975",
|
|
54
|
-
y: "10.60425",
|
|
55
|
-
width: "16.08525",
|
|
56
|
-
height: "1.593",
|
|
57
|
-
rx: "0.7965"
|
|
58
|
-
}), /*#__PURE__*/_jsx("path", {
|
|
59
|
-
d: "M43.53075,46.36575 L2.72025,46.36575 C1.22175,46.36575 0,45.15075 0,43.6455 L0,20.277 C0,18.7785 1.215,17.55675 2.72025,17.55675 L18.576,17.55675 C19.494,17.55675 20.3445,18.01575 20.85075,18.78525 L22.32225,21.0195 C22.82175,21.78225 23.679,22.248 24.597,22.248 L43.5375,22.248 C45.036,22.248 46.25775,23.463 46.25775,24.96825 L46.25775,43.6455 C46.25775,45.144 45.04275,46.36575 43.5375,46.36575 L43.53075,46.36575 Z",
|
|
60
|
-
fill: "#F8F8F8"
|
|
61
|
-
})]
|
|
62
|
-
})]
|
|
63
|
-
})
|
|
64
|
-
})
|
|
16
|
+
children: /*#__PURE__*/_jsxs("g", {
|
|
17
|
+
transform: "translate(4.2, 4.2)",
|
|
18
|
+
fillRule: "nonzero",
|
|
19
|
+
children: [/*#__PURE__*/_jsx("rect", {
|
|
20
|
+
fill: "#CDD5E4",
|
|
21
|
+
x: "5.495",
|
|
22
|
+
y: "0",
|
|
23
|
+
width: "37.121",
|
|
24
|
+
height: "29.176",
|
|
25
|
+
rx: "4.03"
|
|
26
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
27
|
+
fill: "#F8F8F8",
|
|
28
|
+
x: "11.452",
|
|
29
|
+
y: "5.257",
|
|
30
|
+
width: "25.046",
|
|
31
|
+
height: "1.652",
|
|
32
|
+
rx: "0.826"
|
|
33
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
34
|
+
fill: "#F8F8F8",
|
|
35
|
+
x: "11.452",
|
|
36
|
+
y: "10.997",
|
|
37
|
+
width: "16.681",
|
|
38
|
+
height: "1.652",
|
|
39
|
+
rx: "0.826"
|
|
40
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
41
|
+
d: "M45.143,48.083 L2.821,48.083 C1.267,48.083 0,46.823 0,45.262 L0,21.028 C0,19.474 1.26,18.207 2.821,18.207 L19.264,18.207 C20.216,18.207 21.098,18.683 21.623,19.481 L23.149,21.798 C23.667,22.589 24.556,23.072 25.508,23.072 L45.15,23.072 C46.704,23.072 47.971,24.332 47.971,25.893 L47.971,45.262 C47.971,46.816 46.711,48.083 45.15,48.083 L45.143,48.083 Z",
|
|
42
|
+
fill: "#F3F6FC"
|
|
43
|
+
})]
|
|
65
44
|
})
|
|
66
45
|
})
|
|
67
|
-
})
|
|
46
|
+
});
|
|
68
47
|
};
|
|
69
48
|
if (process.env.NODE_ENV !== 'production') {
|
|
70
49
|
DefaultEmptyImg.displayName = 'DefaultEmptyImg';
|
package/es/index.d.ts
CHANGED
|
@@ -38,10 +38,16 @@ export { default as Input } from './input';
|
|
|
38
38
|
export type { InputProps } from './input';
|
|
39
39
|
export { default as InputNumber } from './input-number';
|
|
40
40
|
export type { InputNumberProps } from './input-number';
|
|
41
|
+
export { default as Radio } from './radio';
|
|
42
|
+
export type { RadioProps } from './radio';
|
|
43
|
+
export { default as Checkbox } from './checkbox';
|
|
44
|
+
export type { CheckboxProps } from './checkbox';
|
|
41
45
|
export { default as Select } from './select';
|
|
42
46
|
export type { SelectProps } from './select';
|
|
43
47
|
export { default as TreeSelect } from './tree-select';
|
|
44
48
|
export type { TreeSelectProps } from './tree-select';
|
|
49
|
+
export { default as Slider } from './slider';
|
|
50
|
+
export type { SliderSingleProps, SliderRangeProps } from './slider';
|
|
45
51
|
export { default as Tooltip } from './tooltip';
|
|
46
52
|
export type { TooltipProps } from './tooltip';
|
|
47
53
|
export { default as Segmented } from './segmented';
|
package/es/index.js
CHANGED
|
@@ -20,8 +20,11 @@ export { default as Tabs } from "./tabs";
|
|
|
20
20
|
export { default as Tag } from "./tag";
|
|
21
21
|
export { default as Input } from "./input";
|
|
22
22
|
export { default as InputNumber } from "./input-number";
|
|
23
|
+
export { default as Radio } from "./radio";
|
|
24
|
+
export { default as Checkbox } from "./checkbox";
|
|
23
25
|
export { default as Select } from "./select";
|
|
24
26
|
export { default as TreeSelect } from "./tree-select";
|
|
27
|
+
export { default as Slider } from "./slider";
|
|
25
28
|
export { default as Tooltip } from "./tooltip";
|
|
26
29
|
export { default as Segmented } from "./segmented";
|
|
27
30
|
export { default as Breadcrumb } from "./breadcrumb";
|
package/es/radio/index.d.ts
CHANGED
package/es/radio/index.js
CHANGED
|
@@ -1 +1,41 @@
|
|
|
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 = ["prefixCls", "className"];
|
|
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
|
+
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
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import { Radio as AntRadio } from 'antd';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import React, { useContext } from 'react';
|
|
13
|
+
import ConfigProvider from "../config-provider";
|
|
14
|
+
import useStyle from "./style";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
export * from 'antd/es/radio';
|
|
17
|
+
var InternalRadio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
|
+
var customizePrefixCls = _ref.prefixCls,
|
|
19
|
+
className = _ref.className,
|
|
20
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
22
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
23
|
+
var prefixCls = getPrefixCls('radio', customizePrefixCls);
|
|
24
|
+
var _useStyle = useStyle(prefixCls),
|
|
25
|
+
wrapSSR = _useStyle.wrapSSR;
|
|
26
|
+
var radioCls = classNames(className);
|
|
27
|
+
return wrapSSR( /*#__PURE__*/_jsx(AntRadio, _objectSpread({
|
|
28
|
+
ref: ref,
|
|
29
|
+
prefixCls: customizePrefixCls,
|
|
30
|
+
className: radioCls
|
|
31
|
+
}, restProps)));
|
|
32
|
+
});
|
|
33
|
+
var Radio = InternalRadio;
|
|
34
|
+
Radio.Button = AntRadio.Button;
|
|
35
|
+
Radio.Group = AntRadio.Group;
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
Radio.__ANT_RADIO = AntRadio.__ANT_RADIO;
|
|
38
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
39
|
+
Radio.displayName = AntRadio.displayName;
|
|
40
|
+
}
|
|
41
|
+
export default Radio;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export type RadioToken = FullToken<'Radio'>;
|
|
4
|
+
export declare const genRadioStyle: GenerateStyle<RadioToken>;
|
|
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,23 @@
|
|
|
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 genRadioStyle = function genRadioStyle(token) {
|
|
7
|
+
var componentCls = token.componentCls,
|
|
8
|
+
radioSize = token.radioSize,
|
|
9
|
+
fontSize = token.fontSize,
|
|
10
|
+
fontSizeLG = token.fontSizeLG,
|
|
11
|
+
lineHeight = token.lineHeight;
|
|
12
|
+
return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls), _defineProperty({
|
|
13
|
+
alignSelf: 'baseline'
|
|
14
|
+
}, "".concat(componentCls, "-inner"), {
|
|
15
|
+
marginBottom: -(fontSize * lineHeight - (radioSize || fontSizeLG)) / 2
|
|
16
|
+
})));
|
|
17
|
+
};
|
|
18
|
+
export default (function (prefixCls) {
|
|
19
|
+
var useStyle = genComponentStyleHook('Radio', function (token) {
|
|
20
|
+
return [genRadioStyle(token)];
|
|
21
|
+
});
|
|
22
|
+
return useStyle(prefixCls);
|
|
23
|
+
});
|
package/es/slider/index.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
+
import type { SliderSingleProps as AntSliderSingleProps, SliderRangeProps as AntSliderRangeProps } from 'antd/es/slider';
|
|
2
|
+
import type { SliderRef } from 'rc-slider/lib/Slider';
|
|
3
|
+
import React from 'react';
|
|
1
4
|
export * from 'antd/es/slider';
|
|
5
|
+
declare const Slider: React.ForwardRefExoticComponent<(AntSliderSingleProps | AntSliderRangeProps) & React.RefAttributes<SliderRef>>;
|
|
6
|
+
export default Slider;
|
package/es/slider/index.js
CHANGED
|
@@ -1 +1,36 @@
|
|
|
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 = ["prefixCls", "className"];
|
|
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
|
+
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
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import { Slider as AntSlider } from 'antd';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import React, { useContext } from 'react';
|
|
13
|
+
import ConfigProvider from "../config-provider";
|
|
14
|
+
import useStyle from "./style";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
export * from 'antd/es/slider';
|
|
17
|
+
var Slider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
|
+
var customizePrefixCls = _ref.prefixCls,
|
|
19
|
+
className = _ref.className,
|
|
20
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
22
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
23
|
+
var prefixCls = getPrefixCls('slider', customizePrefixCls);
|
|
24
|
+
var _useStyle = useStyle(prefixCls),
|
|
25
|
+
wrapSSR = _useStyle.wrapSSR;
|
|
26
|
+
var sliderCls = classNames(className);
|
|
27
|
+
return wrapSSR( /*#__PURE__*/_jsx(AntSlider, _objectSpread({
|
|
28
|
+
ref: ref,
|
|
29
|
+
prefixCls: customizePrefixCls,
|
|
30
|
+
className: sliderCls
|
|
31
|
+
}, restProps)));
|
|
32
|
+
});
|
|
33
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
34
|
+
Slider.displayName = AntSlider.displayName;
|
|
35
|
+
}
|
|
36
|
+
export default Slider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export type SliderToken = FullToken<'Slider'>;
|
|
4
|
+
export declare const genSliderStyle: GenerateStyle<SliderToken>;
|
|
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,21 @@
|
|
|
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 genSliderStyle = function genSliderStyle(token) {
|
|
7
|
+
var componentCls = token.componentCls,
|
|
8
|
+
_token$dotSize = token.dotSize,
|
|
9
|
+
dotSize = _token$dotSize === void 0 ? 8 : _token$dotSize;
|
|
10
|
+
return _defineProperty({}, "".concat(componentCls).concat(componentCls, "-horizontal"), _defineProperty({}, "".concat(componentCls, "-mark"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-mark-text[style^=\"left: 0%; transform: translateX(-50%);\"]"), {
|
|
11
|
+
transform: "translateX(calc(0% - ".concat(dotSize / 2, "px)) !important")
|
|
12
|
+
}), "".concat(componentCls, "-mark-text[style^=\"left: 100%; transform: translateX(-50%);\"]"), {
|
|
13
|
+
transform: "translateX(calc(-100% + ".concat(dotSize / 2, "px)) !important")
|
|
14
|
+
})));
|
|
15
|
+
};
|
|
16
|
+
export default (function (prefixCls) {
|
|
17
|
+
var useStyle = genComponentStyleHook('Slider', function (token) {
|
|
18
|
+
return [genSliderStyle(token)];
|
|
19
|
+
});
|
|
20
|
+
return useStyle(prefixCls);
|
|
21
|
+
});
|
package/es/table/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 = ["batchOperationBar"];
|
|
2
|
+
var _excluded = ["batchOperationBar", "emptyText"];
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -19,6 +19,7 @@ import { isEmpty } from 'lodash';
|
|
|
19
19
|
import React, { useContext, useEffect, useState } from 'react';
|
|
20
20
|
import ConfigProvider from "../config-provider";
|
|
21
21
|
import Typography from "../typography";
|
|
22
|
+
import Empty from "../empty";
|
|
22
23
|
import useStyle from "./style";
|
|
23
24
|
import useDefaultPagination from "./hooks/useDefaultPagination";
|
|
24
25
|
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
@@ -30,6 +31,7 @@ function Table(props, ref) {
|
|
|
30
31
|
var _enUS$Table, _locale$Table;
|
|
31
32
|
var customLocale = props.locale,
|
|
32
33
|
columns = props.columns,
|
|
34
|
+
footer = props.footer,
|
|
33
35
|
customPagination = props.pagination,
|
|
34
36
|
rowSelection = props.rowSelection,
|
|
35
37
|
toolAlertRender = props.toolAlertRender,
|
|
@@ -53,11 +55,15 @@ function Table(props, ref) {
|
|
|
53
55
|
batchOperationBar: _objectSpread(_objectSpread(_objectSpread({}, (_enUS$Table = enUS.Table) === null || _enUS$Table === void 0 ? void 0 : _enUS$Table.batchOperationBar), locale === null || locale === void 0 || (_locale$Table = locale.Table) === null || _locale$Table === void 0 ? void 0 : _locale$Table.batchOperationBar), customLocale === null || customLocale === void 0 ? void 0 : customLocale.batchOperationBar)
|
|
54
56
|
}),
|
|
55
57
|
batchOperationBar = _customLocale$batchOp.batchOperationBar,
|
|
58
|
+
_customLocale$batchOp2 = _customLocale$batchOp.emptyText,
|
|
59
|
+
emptyText = _customLocale$batchOp2 === void 0 ? /*#__PURE__*/_jsx(Empty, {
|
|
60
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
61
|
+
}) : _customLocale$batchOp2,
|
|
56
62
|
restLocale = _objectWithoutProperties(_customLocale$batchOp, _excluded);
|
|
57
63
|
var prefixCls = getPrefixCls('table', customizePrefixCls);
|
|
58
64
|
var _useStyle = useStyle(prefixCls),
|
|
59
65
|
wrapSSR = _useStyle.wrapSSR;
|
|
60
|
-
var tableCls = classNames(_defineProperty({}, "".concat(prefixCls, "-expandable"), !isEmpty(expandable)), className);
|
|
66
|
+
var tableCls = classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-expandable"), !isEmpty(expandable)), "".concat(prefixCls, "-has-footer"), !!footer), className);
|
|
61
67
|
var _useState = useState(false),
|
|
62
68
|
_useState2 = _slicedToArray(_useState, 2),
|
|
63
69
|
openPopover = _useState2[0],
|
|
@@ -175,7 +181,12 @@ function Table(props, ref) {
|
|
|
175
181
|
ref: ref,
|
|
176
182
|
prefixCls: customizePrefixCls,
|
|
177
183
|
className: tableCls,
|
|
178
|
-
locale: restLocale,
|
|
184
|
+
locale: _objectSpread(_objectSpread({}, restLocale), {}, {
|
|
185
|
+
emptyText: /*#__PURE__*/_jsx("div", {
|
|
186
|
+
className: "".concat(prefixCls, "-empty-wrapper"),
|
|
187
|
+
children: typeof emptyText === 'function' ? emptyText() : emptyText
|
|
188
|
+
})
|
|
189
|
+
}),
|
|
179
190
|
columns: newColumns,
|
|
180
191
|
rowSelection: rowSelection ? _objectSpread(_objectSpread({
|
|
181
192
|
columnWidth: table === null || table === void 0 ? void 0 : table.selectionColumnWidth
|
|
@@ -186,6 +197,7 @@ function Table(props, ref) {
|
|
|
186
197
|
rowSelection === null || rowSelection === void 0 || (_rowSelection$onChang2 = rowSelection.onChange) === null || _rowSelection$onChang2 === void 0 || _rowSelection$onChang2.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
187
198
|
}
|
|
188
199
|
}) : undefined,
|
|
200
|
+
footer: footer,
|
|
189
201
|
pagination: pagination === false ? false : _objectSpread(_objectSpread({}, pagination), {}, {
|
|
190
202
|
hideOnSinglePage: toolAlertRender || toolOptionsRender || toolSelectedContent || pagination !== null && pagination !== void 0 && pagination.showSizeChanger ? false : (pagination === null || pagination === void 0 ? void 0 : pagination.hideOnSinglePage) !== undefined ? pagination === null || pagination === void 0 ? void 0 : pagination.hideOnSinglePage : extendedContext.hideOnSinglePage,
|
|
191
203
|
showTotal: renderOptionsBar
|