@oceanbase/design 1.0.0-alpha.10 → 1.0.0-alpha.11
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/_util/index.js +1 -0
- package/es/_util/styleChecker.js +1 -0
- package/es/affix/index.js +1 -0
- package/es/alert/index.d.ts +1 -1
- package/es/alert/index.js +5 -2
- package/es/alert/style/index.js +17 -8
- package/es/anchor/index.js +1 -0
- package/es/app/index.js +1 -0
- package/es/auto-complete/index.js +1 -0
- package/es/avatar/index.js +1 -0
- package/es/badge/index.d.ts +2 -0
- package/es/badge/index.js +26 -10
- package/es/badge/style/index.js +3 -1
- package/es/breadcrumb/Breadcrumb.js +1 -0
- package/es/breadcrumb/index.js +1 -0
- package/es/button/index.js +1 -0
- package/es/calendar/index.js +1 -0
- package/es/card/index.js +2 -0
- package/es/card/style/index.js +3 -1
- package/es/carousel/index.js +1 -0
- package/es/cascader/index.js +1 -0
- package/es/checkbox/index.js +1 -0
- package/es/collapse/index.js +1 -0
- package/es/color-picker/index.js +1 -0
- package/es/config-provider/DefaultRenderEmpty.js +1 -0
- package/es/config-provider/index.js +1 -0
- package/es/date-picker/index.js +1 -0
- package/es/descriptions/hooks/useItems.d.ts +4 -4
- package/es/descriptions/hooks/useItems.js +1 -0
- package/es/descriptions/index.js +1 -0
- package/es/divider/index.js +1 -0
- package/es/drawer/index.js +1 -0
- package/es/dropdown/dropdown-button.js +1 -0
- package/es/dropdown/index.js +1 -0
- package/es/empty/colored.js +1 -0
- package/es/empty/database.js +1 -0
- package/es/empty/default.js +1 -0
- package/es/empty/guide.js +1 -0
- package/es/empty/index.js +1 -0
- package/es/float-button/index.js +1 -0
- package/es/form/FormItem.js +1 -0
- package/es/form/index.js +1 -0
- package/es/grid/col.js +1 -0
- package/es/grid/index.js +1 -0
- package/es/grid/row.js +1 -0
- package/es/image/index.js +1 -0
- package/es/index.js +1 -0
- package/es/input/Input.js +1 -0
- package/es/input/Password.js +1 -0
- package/es/input/Search.js +1 -0
- package/es/input/TextArea.js +1 -0
- package/es/input/index.js +1 -0
- package/es/input-number/index.js +1 -0
- package/es/layout/index.js +1 -0
- package/es/list/index.js +1 -0
- package/es/locale/index.js +1 -0
- package/es/lottie/index.js +1 -0
- package/es/mentions/index.js +1 -0
- package/es/menu/index.js +1 -0
- package/es/message/index.js +1 -0
- package/es/modal/Modal.d.ts +1 -1
- package/es/modal/Modal.js +7 -4
- package/es/modal/Progress.js +1 -0
- package/es/modal/index.js +1 -0
- package/es/modal/style/index.js +9 -5
- package/es/notification/index.js +1 -0
- package/es/pagination/index.js +1 -0
- package/es/popconfirm/index.js +1 -0
- package/es/popover/index.js +1 -0
- package/es/progress/index.js +1 -0
- package/es/qrcode/index.js +1 -0
- package/es/radio/index.js +1 -0
- package/es/rate/index.js +1 -0
- package/es/result/403.js +1 -0
- package/es/result/404.js +1 -0
- package/es/result/500.js +1 -0
- package/es/result/Error.js +1 -0
- package/es/result/Processing.js +1 -0
- package/es/result/Success.js +1 -0
- package/es/result/Warning.js +1 -0
- package/es/result/index.js +1 -0
- package/es/segmented/index.js +1 -0
- package/es/select/index.js +1 -0
- package/es/skeleton/index.js +1 -0
- package/es/slider/index.js +1 -0
- package/es/space/index.js +1 -0
- package/es/spin/index.js +1 -0
- package/es/static-function/index.js +1 -0
- package/es/statistic/index.js +1 -0
- package/es/steps/index.js +1 -0
- package/es/style/cssVariables.js +2 -1
- package/es/style/cssVariablesMeta.js +7 -7
- package/es/style/global.js +1 -0
- package/es/switch/index.js +1 -0
- package/es/table/index.js +38 -61
- package/es/table/style/index.js +23 -17
- package/es/tabs/TabPane.js +1 -0
- package/es/tabs/hooks/useLegacyItems.js +1 -0
- package/es/tabs/index.js +1 -0
- package/es/tag/index.js +1 -0
- package/es/tag/style/index.js +4 -1
- package/es/theme/index.js +1 -0
- package/es/theme/interface.d.ts +7 -0
- package/es/theme/style/aliyun.less +1 -1
- package/es/theme/style/compact.less +3 -3
- package/es/theme/style/dark.less +1 -1
- package/es/theme/style/default.less +3 -3
- package/es/time-picker/index.js +1 -0
- package/es/timeline/index.js +1 -0
- package/es/tooltip/MouseTooltip.js +1 -0
- package/es/tooltip/ReactStickyMouseTooltip.js +1 -0
- package/es/tooltip/index.js +1 -0
- package/es/tour/index.js +1 -0
- package/es/transfer/index.js +1 -0
- package/es/tree/index.js +1 -0
- package/es/tree-select/index.js +1 -0
- package/es/typography/Link.js +1 -0
- package/es/typography/Paragraph.js +1 -0
- package/es/typography/Text.js +1 -0
- package/es/typography/Title.js +1 -0
- package/es/typography/index.js +1 -0
- package/es/upload/index.js +1 -0
- package/es/watermark/index.js +1 -0
- package/lib/_util/genComponentStyleHook.js +52 -59
- package/lib/_util/getEllipsisConfig.js +16 -39
- package/lib/_util/index.js +13 -29
- package/lib/_util/styleChecker.js +33 -53
- package/lib/_util/type.js +4 -16
- package/lib/_util/useFlexGapSupport.js +11 -36
- package/lib/affix/index.js +15 -21
- package/lib/alert/index.d.ts +1 -1
- package/lib/alert/index.js +63 -82
- package/lib/alert/style/index.js +111 -108
- package/lib/anchor/index.js +26 -23
- package/lib/app/index.js +47 -54
- package/lib/app/style/index.js +13 -32
- package/lib/auto-complete/index.js +15 -21
- package/lib/avatar/index.js +26 -23
- package/lib/badge/index.d.ts +2 -0
- package/lib/badge/index.js +108 -110
- package/lib/badge/style/index.js +21 -40
- package/lib/breadcrumb/Breadcrumb.js +15 -21
- package/lib/breadcrumb/index.js +31 -31
- package/lib/button/index.js +50 -60
- package/lib/button/style/index.js +35 -57
- package/lib/calendar/index.js +15 -21
- package/lib/card/Card.js +14 -21
- package/lib/card/index.js +246 -255
- package/lib/card/style/index.js +50 -61
- package/lib/carousel/index.js +15 -21
- package/lib/cascader/index.js +15 -21
- package/lib/checkbox/index.js +52 -69
- package/lib/checkbox/style/index.js +20 -35
- package/lib/collapse/index.js +15 -21
- package/lib/color-picker/index.js +15 -21
- package/lib/color-picker/interface.js +14 -21
- package/lib/config-provider/DefaultRenderEmpty.js +34 -48
- package/lib/config-provider/SizeContext.js +14 -21
- package/lib/config-provider/context.js +14 -21
- package/lib/config-provider/index.js +200 -233
- package/lib/config-provider/navigate.js +4 -16
- package/lib/date-picker/index.js +15 -21
- package/lib/descriptions/Item.js +6 -24
- package/lib/descriptions/hooks/useItems.d.ts +4 -4
- package/lib/descriptions/hooks/useItems.js +50 -73
- package/lib/descriptions/index.js +83 -101
- package/lib/descriptions/style/index.js +46 -64
- package/lib/divider/index.js +15 -21
- package/lib/drawer/index.js +108 -127
- package/lib/drawer/style/index.js +36 -51
- package/lib/dropdown/dropdown-button.js +30 -57
- package/lib/dropdown/index.js +30 -46
- package/lib/dropdown/style/index.js +13 -32
- package/lib/empty/colored.js +198 -314
- package/lib/empty/database.js +117 -185
- package/lib/empty/default.js +53 -48
- package/lib/empty/guide.js +145 -224
- package/lib/empty/index.js +77 -95
- package/lib/empty/style/index.js +28 -43
- package/lib/float-button/index.js +15 -21
- package/lib/float-button/interface.js +14 -21
- package/lib/form/FormItem.js +78 -84
- package/lib/form/index.js +57 -77
- package/lib/form/interface.js +14 -21
- package/lib/form/style/index.js +16 -35
- package/lib/grid/col.js +28 -45
- package/lib/grid/index.js +26 -44
- package/lib/grid/row.js +30 -45
- package/lib/image/index.js +15 -21
- package/lib/index.js +333 -154
- package/lib/input/Input.js +65 -78
- package/lib/input/Password.js +59 -76
- package/lib/input/Search.js +59 -76
- package/lib/input/TextArea.js +59 -76
- package/lib/input/index.js +30 -49
- package/lib/input/style/index.js +19 -36
- package/lib/input-number/index.js +56 -76
- package/lib/input-number/style/index.js +13 -32
- package/lib/layout/index.js +15 -21
- package/lib/list/index.js +52 -59
- package/lib/locale/en-US.js +22 -49
- package/lib/locale/index.js +25 -38
- package/lib/locale/ja-JP.js +22 -49
- package/lib/locale/useLocale.js +6 -24
- package/lib/locale/zh-CN.js +22 -49
- package/lib/locale/zh-TW.js +22 -49
- package/lib/lottie/index.js +61 -80
- package/lib/mentions/index.js +15 -21
- package/lib/menu/index.js +15 -21
- package/lib/menu/interface.js +14 -21
- package/lib/message/index.js +15 -21
- package/lib/message/interface.js +14 -21
- package/lib/modal/Modal.d.ts +1 -1
- package/lib/modal/Modal.js +69 -80
- package/lib/modal/Progress.js +44 -61
- package/lib/modal/index.js +23 -42
- package/lib/modal/interface.js +14 -21
- package/lib/modal/style/index.js +34 -46
- package/lib/notification/index.js +15 -21
- package/lib/notification/interface.js +14 -21
- package/lib/pagination/index.js +15 -21
- package/lib/popconfirm/index.js +15 -21
- package/lib/popover/index.js +15 -21
- package/lib/progress/index.js +26 -23
- package/lib/progress/progress.js +14 -21
- package/lib/qrcode/index.js +15 -21
- package/lib/qrcode/interface.js +14 -21
- package/lib/radio/index.js +53 -62
- package/lib/radio/interface.js +14 -21
- package/lib/radio/style/index.js +18 -33
- package/lib/rate/index.js +15 -21
- package/lib/result/403.js +164 -195
- package/lib/result/404.js +291 -354
- package/lib/result/500.js +156 -259
- package/lib/result/Error.js +127 -161
- package/lib/result/Processing.js +320 -252
- package/lib/result/Success.js +202 -261
- package/lib/result/Warning.js +302 -434
- package/lib/result/index.js +65 -80
- package/lib/result/style/index.js +15 -35
- package/lib/segmented/index.js +86 -83
- package/lib/segmented/style/index.js +19 -36
- package/lib/select/index.js +63 -81
- package/lib/select/style/index.js +12 -32
- package/lib/skeleton/index.js +15 -21
- package/lib/slider/index.js +48 -58
- package/lib/slider/style/index.js +19 -37
- package/lib/space/index.js +63 -69
- package/lib/space/style/index.js +16 -36
- package/lib/spin/index.js +58 -76
- package/lib/spin/style/index.js +48 -52
- package/lib/static-function/index.js +48 -73
- package/lib/statistic/index.js +15 -21
- package/lib/steps/index.js +15 -21
- package/lib/style/cssVariables.js +237 -256
- package/lib/style/cssVariablesMeta.js +978 -1057
- package/lib/style/global.js +119 -155
- package/lib/switch/index.js +52 -60
- package/lib/switch/style/index.js +12 -32
- package/lib/table/hooks/useDefaultPagination.js +18 -46
- package/lib/table/index.js +179 -219
- package/lib/table/interface.js +14 -21
- package/lib/table/style/index.js +59 -73
- package/lib/tabs/TabPane.js +7 -24
- package/lib/tabs/hooks/useLegacyItems.js +27 -43
- package/lib/tabs/index.js +107 -124
- package/lib/tabs/style/index.js +23 -38
- package/lib/tag/index.js +78 -98
- package/lib/tag/style/index.js +35 -57
- package/lib/theme/aliyun.js +7 -34
- package/lib/theme/compact.js +9 -36
- package/lib/theme/dark.js +9 -36
- package/lib/theme/default.js +130 -232
- package/lib/theme/index.js +48 -55
- package/lib/theme/interface.d.ts +7 -0
- package/lib/theme/interface.js +14 -21
- package/lib/theme/internal.js +14 -21
- package/lib/theme/style/aliyun.less +1 -1
- package/lib/theme/style/compact.less +3 -3
- package/lib/theme/style/dark.less +1 -1
- package/lib/theme/style/default.less +3 -3
- package/lib/theme/themes/compact/index.js +19 -39
- package/lib/theme/themes/dark/index.js +19 -39
- package/lib/theme/themes/default/index.js +19 -39
- package/lib/theme/themes/seed.js +24 -43
- package/lib/theme/util/alias.js +19 -39
- package/lib/theme/util/format.js +15 -35
- package/lib/time-picker/index.js +15 -21
- package/lib/timeline/index.js +15 -21
- package/lib/tooltip/MouseTooltip.js +84 -98
- package/lib/tooltip/ReactStickyMouseTooltip.js +63 -88
- package/lib/tooltip/hooks/useTooltipTypeList.js +28 -61
- package/lib/tooltip/index.js +123 -137
- package/lib/tooltip/style/index.js +26 -47
- package/lib/tour/index.js +15 -21
- package/lib/tour/interface.js +14 -21
- package/lib/transfer/index.js +15 -21
- package/lib/transfer/interface.js +14 -21
- package/lib/tree/index.js +15 -21
- package/lib/tree-select/index.js +67 -85
- package/lib/tree-select/style/index.js +9 -31
- package/lib/typography/Link.js +54 -68
- package/lib/typography/Paragraph.js +54 -68
- package/lib/typography/Text.js +55 -68
- package/lib/typography/Title.js +54 -68
- package/lib/typography/hooks/useClassName.js +12 -43
- package/lib/typography/index.js +89 -58
- package/lib/typography/style/index.js +29 -45
- package/lib/upload/index.js +15 -21
- package/lib/upload/interface.js +14 -21
- package/lib/watermark/index.js +15 -21
- package/package.json +3 -3
package/es/table/index.js
CHANGED
|
@@ -13,6 +13,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import { Popover, Space, Table as AntTable } from 'antd';
|
|
17
18
|
import classNames from 'classnames';
|
|
18
19
|
import { isEmpty } from 'lodash';
|
|
@@ -24,7 +25,6 @@ import useStyle from "./style";
|
|
|
24
25
|
import useDefaultPagination from "./hooks/useDefaultPagination";
|
|
25
26
|
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
26
27
|
import enUS from "../locale/en-US";
|
|
27
|
-
import theme from "../theme";
|
|
28
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
29
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
30
|
export * from 'antd/es/table';
|
|
@@ -53,8 +53,6 @@ function Table(props, ref) {
|
|
|
53
53
|
className = props.className;
|
|
54
54
|
var extendedContext = useContext(ConfigProvider.ExtendedConfigContext);
|
|
55
55
|
var pagination = useDefaultPagination(customPagination);
|
|
56
|
-
var _theme$useToken = theme.useToken(),
|
|
57
|
-
token = _theme$useToken.token;
|
|
58
56
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
59
57
|
getPrefixCls = _useContext.getPrefixCls,
|
|
60
58
|
locale = _useContext.locale,
|
|
@@ -189,65 +187,44 @@ function Table(props, ref) {
|
|
|
189
187
|
})]
|
|
190
188
|
});
|
|
191
189
|
};
|
|
192
|
-
return wrapCSSVar( /*#__PURE__*/_jsx(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
Pagination: {
|
|
201
|
-
fontSize: token.fontSizeSM,
|
|
202
|
-
controlHeight: token.controlHeightSM
|
|
203
|
-
},
|
|
204
|
-
Select: {
|
|
205
|
-
fontSize: token.fontSizeSM,
|
|
206
|
-
controlHeight: token.controlHeightSM,
|
|
207
|
-
// control select padding by inputPaddingHorizontalBase
|
|
208
|
-
paddingSM: token.paddingXS
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
children: /*#__PURE__*/_jsx(AntTable, _objectSpread(_objectSpread({}, props), {}, {
|
|
213
|
-
ref: ref,
|
|
214
|
-
prefixCls: customizePrefixCls,
|
|
215
|
-
className: tableCls,
|
|
216
|
-
locale: _objectSpread(_objectSpread({}, restLocale), {}, {
|
|
217
|
-
emptyText: /*#__PURE__*/_jsx("div", {
|
|
218
|
-
className: "".concat(prefixCls, "-empty-wrapper"),
|
|
219
|
-
children: typeof emptyText === 'function' ? emptyText() : emptyText
|
|
220
|
-
})
|
|
221
|
-
}),
|
|
222
|
-
size: size,
|
|
223
|
-
bordered: bordered || innerBordered,
|
|
224
|
-
columns: newColumns,
|
|
225
|
-
rowClassName: function rowClassName() {
|
|
226
|
-
return classNames(typeof _rowClassName === 'function' ? _rowClassName.apply(void 0, arguments) : _rowClassName, _defineProperty({}, "".concat(prefixCls, "-expand-row-by-click"), expandable === null || expandable === void 0 ? void 0 : expandable.expandRowByClick));
|
|
227
|
-
},
|
|
228
|
-
expandable: expandable ? _objectSpread({
|
|
229
|
-
columnWidth: !size || size === 'large' ? 40 : 32
|
|
230
|
-
}, expandable) : undefined,
|
|
231
|
-
rowSelection: rowSelection ? _objectSpread(_objectSpread({
|
|
232
|
-
columnWidth: table === null || table === void 0 ? void 0 : table.selectionColumnWidth
|
|
233
|
-
}, rowSelection), {}, {
|
|
234
|
-
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
235
|
-
var _rowSelection$onChang2;
|
|
236
|
-
handleSelectedData(selectedRowKeys, selectedRows, info);
|
|
237
|
-
rowSelection === null || rowSelection === void 0 || (_rowSelection$onChang2 = rowSelection.onChange) === null || _rowSelection$onChang2 === void 0 || _rowSelection$onChang2.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
238
|
-
}
|
|
239
|
-
}) : undefined,
|
|
240
|
-
scroll: _objectSpread({
|
|
241
|
-
// enable auto x scroll when there is no ellipsis column
|
|
242
|
-
x: hasEllipsisColumn ? undefined : 'max-content'
|
|
243
|
-
}, scroll),
|
|
244
|
-
footer: footer,
|
|
245
|
-
pagination: pagination === false ? false : _objectSpread(_objectSpread({}, pagination), {}, {
|
|
246
|
-
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,
|
|
247
|
-
showTotal: renderOptionsBar
|
|
190
|
+
return wrapCSSVar( /*#__PURE__*/_jsx(AntTable, _objectSpread(_objectSpread({}, props), {}, {
|
|
191
|
+
ref: ref,
|
|
192
|
+
prefixCls: customizePrefixCls,
|
|
193
|
+
className: tableCls,
|
|
194
|
+
locale: _objectSpread(_objectSpread({}, restLocale), {}, {
|
|
195
|
+
emptyText: /*#__PURE__*/_jsx("div", {
|
|
196
|
+
className: "".concat(prefixCls, "-empty-wrapper"),
|
|
197
|
+
children: typeof emptyText === 'function' ? emptyText() : emptyText
|
|
248
198
|
})
|
|
249
|
-
})
|
|
250
|
-
|
|
199
|
+
}),
|
|
200
|
+
size: size,
|
|
201
|
+
bordered: bordered || innerBordered,
|
|
202
|
+
columns: newColumns,
|
|
203
|
+
rowClassName: function rowClassName() {
|
|
204
|
+
return classNames(typeof _rowClassName === 'function' ? _rowClassName.apply(void 0, arguments) : _rowClassName, _defineProperty({}, "".concat(prefixCls, "-expand-row-by-click"), expandable === null || expandable === void 0 ? void 0 : expandable.expandRowByClick));
|
|
205
|
+
},
|
|
206
|
+
expandable: expandable ? _objectSpread({
|
|
207
|
+
columnWidth: !size || size === 'large' ? 40 : 32
|
|
208
|
+
}, expandable) : undefined,
|
|
209
|
+
rowSelection: rowSelection ? _objectSpread(_objectSpread({
|
|
210
|
+
columnWidth: table === null || table === void 0 ? void 0 : table.selectionColumnWidth
|
|
211
|
+
}, rowSelection), {}, {
|
|
212
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
213
|
+
var _rowSelection$onChang2;
|
|
214
|
+
handleSelectedData(selectedRowKeys, selectedRows, info);
|
|
215
|
+
rowSelection === null || rowSelection === void 0 || (_rowSelection$onChang2 = rowSelection.onChange) === null || _rowSelection$onChang2 === void 0 || _rowSelection$onChang2.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
216
|
+
}
|
|
217
|
+
}) : undefined,
|
|
218
|
+
scroll: _objectSpread({
|
|
219
|
+
// enable auto x scroll when there is no ellipsis column
|
|
220
|
+
x: hasEllipsisColumn ? undefined : 'max-content'
|
|
221
|
+
}, scroll),
|
|
222
|
+
footer: footer,
|
|
223
|
+
pagination: pagination === false ? false : _objectSpread(_objectSpread({}, pagination), {}, {
|
|
224
|
+
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,
|
|
225
|
+
showTotal: renderOptionsBar
|
|
226
|
+
})
|
|
227
|
+
})));
|
|
251
228
|
}
|
|
252
229
|
var ForwardTable = /*#__PURE__*/React.forwardRef(Table);
|
|
253
230
|
export default Object.assign(ForwardTable, {
|
package/es/table/style/index.js
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
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
|
+
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; }
|
|
2
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; }
|
|
3
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
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); }
|
|
5
7
|
import { unit } from '@ant-design/cssinjs';
|
|
6
8
|
import { genStyleHooks } from "../../_util/genComponentStyleHook";
|
|
9
|
+
var genSmallBtnStyle = function genSmallBtnStyle(token) {
|
|
10
|
+
var antCls = token.antCls;
|
|
11
|
+
return _defineProperty({}, "".concat(antCls, "-btn:not(").concat(antCls, "-btn-sm):not(").concat(antCls, "-btn-lg)"), _defineProperty(_defineProperty(_defineProperty({
|
|
12
|
+
height: token.controlHeightSM,
|
|
13
|
+
fontSize: token.fontSizeSM
|
|
14
|
+
}, "&:not(".concat(antCls, "-btn-icon-only):not(").concat(antCls, "-btn-circle)"), {
|
|
15
|
+
paddingInline: token.paddingXS
|
|
16
|
+
}), "&".concat(antCls, "-btn-icon-only"), {
|
|
17
|
+
width: token.controlHeightSM
|
|
18
|
+
}), "&".concat(antCls, "-btn-circle"), {
|
|
19
|
+
minWidth: token.controlHeightSM
|
|
20
|
+
}));
|
|
21
|
+
};
|
|
7
22
|
export var genTableStyle = function genTableStyle(token) {
|
|
8
|
-
var
|
|
23
|
+
var _ref2;
|
|
9
24
|
var antCls = token.antCls,
|
|
10
25
|
componentCls = token.componentCls,
|
|
11
26
|
iconCls = token.iconCls,
|
|
@@ -21,7 +36,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
21
36
|
marginLG = token.marginLG,
|
|
22
37
|
marginXS = token.marginXS,
|
|
23
38
|
calc = token.calc;
|
|
24
|
-
return
|
|
39
|
+
return _ref2 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref2, "".concat(componentCls, "-wrapper ").concat(componentCls), _defineProperty(_defineProperty(_defineProperty({
|
|
25
40
|
color: colorText,
|
|
26
41
|
backgroundColor: colorBgBase,
|
|
27
42
|
borderRadius: borderRadiusLG
|
|
@@ -38,7 +53,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
38
53
|
backgroundColor: "".concat(colorBorderSecondary, " !important")
|
|
39
54
|
}), "".concat(componentCls, "-cell-scrollbar"), {
|
|
40
55
|
boxShadow: "0 1px 0 1px ".concat(colorBgBase)
|
|
41
|
-
})), "".concat(componentCls, "-tbody"),
|
|
56
|
+
})), "".concat(componentCls, "-tbody"), _objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-tbody-virtual-scrollbar ").concat(componentCls, "-tbody-virtual-scrollbar-thumb"), {
|
|
42
57
|
background: "".concat(token.colorFillSecondary, " !important")
|
|
43
58
|
}), "".concat(componentCls, "-row-indent+").concat(iconCls), {
|
|
44
59
|
marginInlineEnd: token.marginXS
|
|
@@ -56,16 +71,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
56
71
|
// work for ProTable link style
|
|
57
72
|
fontSize: token.fontSizeSM
|
|
58
73
|
}
|
|
59
|
-
}), "".concat(
|
|
60
|
-
height: token.controlHeightSM,
|
|
61
|
-
fontSize: token.fontSizeSM
|
|
62
|
-
}, "&:not(".concat(antCls, "-btn-icon-only):not(").concat(antCls, "-btn-circle)"), {
|
|
63
|
-
paddingInline: token.paddingXS
|
|
64
|
-
}), "&".concat(antCls, "-btn-icon-only"), {
|
|
65
|
-
width: token.controlHeightSM
|
|
66
|
-
}), "&".concat(antCls, "-btn-circle"), {
|
|
67
|
-
minWidth: token.controlHeightSM
|
|
68
|
-
})), "".concat(componentCls, "-placeholder td"), {}), "".concat(componentCls, "-empty-wrapper"), {
|
|
74
|
+
}), genSmallBtnStyle(token)), {}, _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-placeholder td"), {}), "".concat(componentCls, "-empty-wrapper"), {
|
|
69
75
|
minHeight: calc(360).sub(calc(token.paddingSM).mul(2).equal()).equal(),
|
|
70
76
|
display: 'flex',
|
|
71
77
|
justifyContent: 'center',
|
|
@@ -80,7 +86,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
80
86
|
borderRadius: 0
|
|
81
87
|
}), "".concat(componentCls, "-empty-wrapper"), {
|
|
82
88
|
minHeight: 'auto'
|
|
83
|
-
})))), "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-middle"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-empty-wrapper"), {
|
|
89
|
+
}))))), "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-middle"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-empty-wrapper"), {
|
|
84
90
|
minHeight: calc(260).sub(calc(token.paddingXS).mul(2).equal()).equal()
|
|
85
91
|
}))), "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-small"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-empty-wrapper"), {
|
|
86
92
|
minHeight: calc(160).sub(calc(token.paddingXXS).mul(2).equal()).equal()
|
|
@@ -121,7 +127,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
121
127
|
})))), "".concat(componentCls, "-wrapper ").concat(antCls, "-spin-blur"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-placeholder"), {
|
|
122
128
|
// hide empty when Table loading
|
|
123
129
|
visibility: 'hidden'
|
|
124
|
-
}))), _defineProperty(_defineProperty(_defineProperty(
|
|
130
|
+
}))), _defineProperty(_defineProperty(_defineProperty(_ref2, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls, "-pagination"), _defineProperty(_defineProperty({}, "&".concat(antCls, "-pagination"), _defineProperty(_defineProperty({
|
|
125
131
|
fontSize: token.fontSizeSM,
|
|
126
132
|
padding: "".concat(unit(token.paddingSM), " 0"),
|
|
127
133
|
margin: '0 !important'
|
|
@@ -133,7 +139,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
133
139
|
height: token.controlHeightSM
|
|
134
140
|
}, "".concat(antCls, "-select-selector"), {
|
|
135
141
|
paddingInline: calc(token.paddingXS).sub(token.lineWidth).equal()
|
|
136
|
-
}))), "".concat(componentCls, "-batch-operation-bar"), _defineProperty({
|
|
142
|
+
}))), "".concat(componentCls, "-batch-operation-bar"), _objectSpread(_defineProperty({
|
|
137
143
|
position: 'absolute',
|
|
138
144
|
left: 0,
|
|
139
145
|
display: 'inline-block',
|
|
@@ -141,7 +147,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
141
147
|
}, "".concat(componentCls, "-batch-operation-selection"), _defineProperty({}, "".concat(componentCls, "-batch-operation-selection-count"), {
|
|
142
148
|
margin: "0 ".concat(unit(marginXS)),
|
|
143
149
|
color: colorLink
|
|
144
|
-
}))))), "".concat(antCls, "-popover").concat(componentCls, "-batch-operation-selection-popover"), _defineProperty({}, "".concat(antCls, "-popover-inner"), {
|
|
150
|
+
})), genSmallBtnStyle(token))))), "".concat(antCls, "-popover").concat(componentCls, "-batch-operation-selection-popover"), _defineProperty({}, "".concat(antCls, "-popover-inner"), {
|
|
145
151
|
padding: 0
|
|
146
152
|
})), "".concat(antCls, "-popover, ").concat(antCls, "-tooltip"), _defineProperty({}, "".concat(componentCls, " ").concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-empty-wrapper"), {
|
|
147
153
|
minHeight: 'auto'
|
package/es/tabs/TabPane.js
CHANGED
|
@@ -7,6 +7,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
7
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
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
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
|
+
"use client";
|
|
10
11
|
import warning from 'antd/es/_util/warning';
|
|
11
12
|
import toArray from 'rc-util/lib/Children/toArray';
|
|
12
13
|
import * as React from 'react';
|
package/es/tabs/index.js
CHANGED
|
@@ -13,6 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import React, { useCallback, useContext } from 'react';
|
|
17
18
|
import { Divider, Space, Tabs as AntTabs, Tag } from 'antd';
|
|
18
19
|
import { isNullValue } from '@oceanbase/util';
|
package/es/tag/index.js
CHANGED
|
@@ -13,6 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import React, { useContext } from 'react';
|
|
17
18
|
import { Tag as AntTag } from 'antd';
|
|
18
19
|
import classNames from 'classnames';
|
package/es/tag/style/index.js
CHANGED
|
@@ -2,6 +2,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { unit } from '@ant-design/cssinjs';
|
|
5
6
|
import { mergeToken } from 'antd/es/theme/internal';
|
|
6
7
|
import { genStyleHooks } from "../../_util/genComponentStyleHook";
|
|
7
8
|
var genTagPresetStatusStyle = function genTagPresetStatusStyle(token, status) {
|
|
@@ -60,7 +61,9 @@ export var genTagStyle = function genTagStyle(token) {
|
|
|
60
61
|
borderRadius: 100,
|
|
61
62
|
marginInlineEnd: token.marginXXS,
|
|
62
63
|
borderColor: token.colorBorderSecondary,
|
|
63
|
-
color: token.colorTextSecondary
|
|
64
|
+
color: token.colorTextSecondary,
|
|
65
|
+
// pill tag use smaller line-height
|
|
66
|
+
lineHeight: unit(token.fontHeightSM)
|
|
64
67
|
}));
|
|
65
68
|
};
|
|
66
69
|
export default genStyleHooks('Tag', function (token) {
|
package/es/theme/index.js
CHANGED
|
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
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
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
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
|
+
"use client";
|
|
7
8
|
import { theme } from 'antd';
|
|
8
9
|
import { pick } from 'lodash';
|
|
9
10
|
// umi 插件只能 import 支持 CommonJS 语法库和文件,因此需要使用 lib 产物
|
package/es/theme/interface.d.ts
CHANGED
|
@@ -23,6 +23,13 @@ export interface AliasToken extends AntAliasToken {
|
|
|
23
23
|
* @descEN Round of fontSize * lineHeight.
|
|
24
24
|
*/
|
|
25
25
|
fontHeight: number;
|
|
26
|
+
/**
|
|
27
|
+
* @nameZH 小号字体的高度
|
|
28
|
+
* @nameEN Font height for small size
|
|
29
|
+
* @desc 小号字体的高度,用于组件中的一些小号字体,如 Pill Tag 等一些组件样式。
|
|
30
|
+
* @descEN The height of the small font, used in some small font components, such as Pill Tag etc.
|
|
31
|
+
*/
|
|
32
|
+
fontHeightSM: number;
|
|
26
33
|
/**
|
|
27
34
|
* @nameZH MD号圆角
|
|
28
35
|
* @nameEN MD Border Radius
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
@controlItemBgActiveHover: #b0dbff;
|
|
442
442
|
@controlItemBgActiveDisabled: rgba(0,0,0,0.15);
|
|
443
443
|
@controlTmpOutline: rgba(0,0,0,0.02);
|
|
444
|
-
@fontWeightStrong:
|
|
444
|
+
@fontWeightStrong: var(--ob-font-weight-lg);
|
|
445
445
|
@opacityLoading: 0.65;
|
|
446
446
|
@linkDecoration: none;
|
|
447
447
|
@linkHoverDecoration: none;
|
|
@@ -412,9 +412,9 @@
|
|
|
412
412
|
@borderRadiusSM: 2px;
|
|
413
413
|
@borderRadiusLG: 8px;
|
|
414
414
|
@borderRadiusOuter: 4px;
|
|
415
|
-
@fontWeightWeak:
|
|
416
|
-
@fontWeight:
|
|
417
|
-
@fontWeightStrong:
|
|
415
|
+
@fontWeightWeak: var(--ob-font-weight-sm);
|
|
416
|
+
@fontWeight: var(--ob-font-weight-md);
|
|
417
|
+
@fontWeightStrong: var(--ob-font-weight-lg);
|
|
418
418
|
@borderRadiusMD: 6px;
|
|
419
419
|
@colorFuchsia: #b04ec4;
|
|
420
420
|
@colorFuchsiaBorder: #d88ee7;
|
package/es/theme/style/dark.less
CHANGED
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
@controlItemBgActiveDisabled: rgba(255,255,255,0.18);
|
|
442
442
|
@controlTmpOutline: rgba(255,255,255,0.04);
|
|
443
443
|
@controlOutline: rgba(13,110,251,0.29);
|
|
444
|
-
@fontWeightStrong:
|
|
444
|
+
@fontWeightStrong: var(--ob-font-weight-lg);
|
|
445
445
|
@opacityLoading: 0.65;
|
|
446
446
|
@linkDecoration: none;
|
|
447
447
|
@linkHoverDecoration: none;
|
|
@@ -412,9 +412,9 @@
|
|
|
412
412
|
@borderRadiusSM: 2px;
|
|
413
413
|
@borderRadiusLG: 8px;
|
|
414
414
|
@borderRadiusOuter: 4px;
|
|
415
|
-
@fontWeightWeak:
|
|
416
|
-
@fontWeight:
|
|
417
|
-
@fontWeightStrong:
|
|
415
|
+
@fontWeightWeak: var(--ob-font-weight-sm);
|
|
416
|
+
@fontWeight: var(--ob-font-weight-md);
|
|
417
|
+
@fontWeightStrong: var(--ob-font-weight-lg);
|
|
418
418
|
@borderRadiusMD: 6px;
|
|
419
419
|
@colorFuchsia: #b04ec4;
|
|
420
420
|
@colorFuchsiaBorder: #d88ee7;
|
package/es/time-picker/index.js
CHANGED
package/es/timeline/index.js
CHANGED
|
@@ -14,6 +14,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
|
+
"use client";
|
|
17
18
|
import { useMouse, useSize } from 'ahooks';
|
|
18
19
|
import React, { useRef, useState } from 'react';
|
|
19
20
|
import ReactStickyMouseTooltip from "./ReactStickyMouseTooltip";
|
|
@@ -14,6 +14,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
14
14
|
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; }
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
16
16
|
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); }
|
|
17
|
+
"use client";
|
|
17
18
|
import React from 'react';
|
|
18
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
20
|
var ReactStickyMouseTooltip = /*#__PURE__*/function (_React$PureComponent) {
|
package/es/tooltip/index.js
CHANGED
|
@@ -13,6 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import { Tooltip as AntTooltip, Space } from 'antd';
|
|
17
18
|
import React, { useContext, useState } from 'react';
|
|
18
19
|
import { CloseOutlined } from '@oceanbase/icons';
|
package/es/tour/index.js
CHANGED
package/es/transfer/index.js
CHANGED
package/es/tree/index.js
CHANGED
package/es/tree-select/index.js
CHANGED
|
@@ -13,6 +13,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import { TreeSelect as AntTreeSelect } from 'antd';
|
|
17
18
|
import classNames from 'classnames';
|
|
18
19
|
import React, { useContext } from 'react';
|
package/es/typography/Link.js
CHANGED
|
@@ -13,6 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import React, { useContext } from 'react';
|
|
17
18
|
import { Typography as AntTypography } from 'antd';
|
|
18
19
|
import ConfigProvider from "../config-provider";
|
|
@@ -13,6 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import React, { useContext } from 'react';
|
|
17
18
|
import { Typography as AntTypography } from 'antd';
|
|
18
19
|
import ConfigProvider from "../config-provider";
|
package/es/typography/Text.js
CHANGED
|
@@ -13,6 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import React, { useContext } from 'react';
|
|
17
18
|
import { Typography as AntTypography } from 'antd';
|
|
18
19
|
import ConfigProvider from "../config-provider";
|
package/es/typography/Title.js
CHANGED
|
@@ -13,6 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
+
"use client";
|
|
16
17
|
import React, { useContext } from 'react';
|
|
17
18
|
import { Typography as AntTypography } from 'antd';
|
|
18
19
|
import ConfigProvider from "../config-provider";
|
package/es/typography/index.js
CHANGED
package/es/upload/index.js
CHANGED
package/es/watermark/index.js
CHANGED
|
@@ -1,32 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";
|
|
18
2
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
__export(genComponentStyleHook_exports, {
|
|
22
|
-
genComponentStyleHook: () => genComponentStyleHook,
|
|
23
|
-
genSelectCommonStyle: () => genSelectCommonStyle,
|
|
24
|
-
genStyleHooks: () => genStyleHooks
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
25
5
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
6
|
+
exports.genComponentStyleHook = genComponentStyleHook;
|
|
7
|
+
exports.genSelectCommonStyle = void 0;
|
|
8
|
+
exports.genStyleHooks = genStyleHooks;
|
|
9
|
+
var _internal = require("../theme/internal");
|
|
10
|
+
// work for Select, TreeSelect, Cascader
|
|
11
|
+
const genSelectCommonStyle = token => {
|
|
12
|
+
const {
|
|
13
|
+
antCls
|
|
14
|
+
} = token;
|
|
30
15
|
const selectComponentCls = `${antCls}-select`;
|
|
31
16
|
return {
|
|
32
17
|
[`${selectComponentCls}${selectComponentCls}-multiple`]: {
|
|
@@ -36,48 +21,56 @@ var genSelectCommonStyle = (token) => {
|
|
|
36
21
|
}
|
|
37
22
|
};
|
|
38
23
|
};
|
|
24
|
+
exports.genSelectCommonStyle = genSelectCommonStyle;
|
|
25
|
+
/**
|
|
26
|
+
* Generate style hooks for components, similar to ant-design's genStyleHooks
|
|
27
|
+
* @param componentName - Component name or [componentName, subName] tuple
|
|
28
|
+
* @param styleFn - Style generation function
|
|
29
|
+
* @param getDefaultToken - Optional default token generator
|
|
30
|
+
* @param options - Optional configuration options
|
|
31
|
+
* @returns A hook function that returns [wrapCSSVar, hashId, cssVarCls]
|
|
32
|
+
*/
|
|
39
33
|
function genStyleHooks(componentName, styleFn, getDefaultToken, options) {
|
|
40
34
|
const normalizedComponentName = Array.isArray(componentName) ? componentName[0] : componentName;
|
|
35
|
+
|
|
36
|
+
// Create the component name with OB- prefix
|
|
41
37
|
const obComponentName = Array.isArray(componentName) ? [`OB-${normalizedComponentName}`, componentName[1]] : `OB-${normalizedComponentName}`;
|
|
42
|
-
return (0,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
const componentStyles = styleFn(token);
|
|
50
|
-
if (Array.isArray(componentStyles)) {
|
|
51
|
-
styles.push(...componentStyles);
|
|
52
|
-
} else {
|
|
53
|
-
styles.push(componentStyles);
|
|
54
|
-
}
|
|
55
|
-
return styles;
|
|
56
|
-
},
|
|
57
|
-
getDefaultToken,
|
|
58
|
-
{
|
|
59
|
-
resetStyle: false,
|
|
60
|
-
// antd style order is -999 and -998
|
|
61
|
-
// ref: https://github.com/ant-design/ant-design/blob/master/components/theme/util/genComponentStyleHook.tsx#L175
|
|
62
|
-
// obui style order should behind to cover it
|
|
63
|
-
order: -900,
|
|
64
|
-
...options
|
|
38
|
+
return (0, _internal.genStyleHooks)(obComponentName, token => {
|
|
39
|
+
const styles = [];
|
|
40
|
+
|
|
41
|
+
// Add genSelectCommonStyle for Select, TreeSelect, Cascader
|
|
42
|
+
if (['Select', 'TreeSelect', 'Cascader'].includes(normalizedComponentName)) {
|
|
43
|
+
styles.push(genSelectCommonStyle(token));
|
|
65
44
|
}
|
|
66
|
-
|
|
45
|
+
|
|
46
|
+
// Add component-specific styles
|
|
47
|
+
const componentStyles = styleFn(token);
|
|
48
|
+
if (Array.isArray(componentStyles)) {
|
|
49
|
+
styles.push(...componentStyles);
|
|
50
|
+
} else {
|
|
51
|
+
styles.push(componentStyles);
|
|
52
|
+
}
|
|
53
|
+
return styles;
|
|
54
|
+
}, getDefaultToken, {
|
|
55
|
+
resetStyle: false,
|
|
56
|
+
// antd style order is -999 and -998
|
|
57
|
+
// ref: https://github.com/ant-design/ant-design/blob/master/components/theme/util/genComponentStyleHook.tsx#L175
|
|
58
|
+
// obui style order should behind to cover it
|
|
59
|
+
order: -900,
|
|
60
|
+
...options
|
|
61
|
+
});
|
|
67
62
|
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use genStyleHooks instead. This function is kept for backward compatibility.
|
|
66
|
+
*/
|
|
68
67
|
function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
|
|
69
68
|
const useStyle = genStyleHooks(componentName, styleFn, getDefaultToken);
|
|
70
|
-
return
|
|
69
|
+
return prefixCls => {
|
|
71
70
|
const [wrapCSSVar, hashId] = useStyle(prefixCls);
|
|
72
71
|
return {
|
|
73
72
|
wrapSSR: wrapCSSVar,
|
|
74
73
|
hashId
|
|
75
74
|
};
|
|
76
75
|
};
|
|
77
|
-
}
|
|
78
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
-
0 && (module.exports = {
|
|
80
|
-
genComponentStyleHook,
|
|
81
|
-
genSelectCommonStyle,
|
|
82
|
-
genStyleHooks
|
|
83
|
-
});
|
|
76
|
+
}
|