@rainbow-oh/yee-c 0.1.0 → 0.2.0
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/cjs/Alert/alert.js +10 -4
- package/dist/cjs/Alert/style/index.less +3 -0
- package/dist/cjs/Anchor/anchor-item.js +6 -4
- package/dist/cjs/Anchor/anchor.js +38 -22
- package/dist/cjs/Anchor/demo/auto.d.ts +11 -0
- package/dist/cjs/Anchor/demo/auto.js +85 -0
- package/dist/cjs/Anchor/demo/basic.js +7 -1
- package/dist/cjs/Anchor/demo/controlled.js +42 -30
- package/dist/cjs/Anchor/interface.d.ts +2 -0
- package/dist/cjs/Anchor/style/index.less +2 -2
- package/dist/cjs/Button/button.d.ts +1 -1
- package/dist/cjs/Checkbox/checkbox-group.js +4 -1
- package/dist/cjs/Checkbox/demo/group.js +1 -0
- package/dist/cjs/Checkbox/interface.d.ts +5 -0
- package/dist/cjs/Checkbox/style/index.less +21 -1
- package/dist/cjs/Dropdown/demo/placement.js +2 -1
- package/dist/cjs/Dropdown/dropdown.js +3 -0
- package/dist/cjs/Dropdown/style/index.less +6 -0
- package/dist/cjs/Form/Field.js +33 -3
- package/dist/cjs/Form/Group.js +3 -2
- package/dist/cjs/Form/demo/form-table.js +1 -8
- package/dist/cjs/Form/demo/tooltip.d.ts +3 -0
- package/dist/cjs/Form/demo/tooltip.js +84 -0
- package/dist/cjs/Form/interface.d.ts +34 -1
- package/dist/cjs/Form/style/index.less +22 -7
- package/dist/cjs/Popconfirm/popconfirm.js +1 -1
- package/dist/cjs/Popconfirm/style/index.less +6 -0
- package/dist/cjs/Popover/popover.js +1 -1
- package/dist/cjs/Popover/style/index.less +6 -0
- package/dist/cjs/Progress/progress.js +2 -2
- package/dist/cjs/Radio/style/index.less +13 -6
- package/dist/cjs/Select/option.js +3 -2
- package/dist/cjs/Select/options.js +9 -1
- package/dist/cjs/Select/select.js +1 -0
- package/dist/cjs/Skeleton/demo/basic.js +1 -1
- package/dist/cjs/Space/interface.d.ts +4 -0
- package/dist/cjs/Space/space.js +36 -16
- package/dist/cjs/Splitter/demo/basic.js +1 -1
- package/dist/cjs/Splitter/demo/vertical.js +23 -1
- package/dist/cjs/Splitter/index.d.ts +1 -1
- package/dist/cjs/Splitter/interface.d.ts +9 -3
- package/dist/cjs/Splitter/splitter-handler.d.ts +1 -1
- package/dist/cjs/Splitter/splitter-handler.js +2 -1
- package/dist/cjs/Splitter/splitter.d.ts +2 -9
- package/dist/cjs/Splitter/splitter.js +53 -50
- package/dist/cjs/Splitter/style/index.less +21 -0
- package/dist/cjs/Table/demo/size.js +1 -1
- package/dist/cjs/Tabs/hooks/useTabScroll.d.ts +1 -1
- package/dist/cjs/Tabs/interface.d.ts +1 -1
- package/dist/cjs/Tabs/style/index.less +4 -0
- package/dist/cjs/Tabs/tab-header/index.js +56 -25
- package/dist/cjs/Tooltip/interface.d.ts +4 -0
- package/dist/cjs/Tooltip/style/index.less +8 -8
- package/dist/cjs/Tooltip/tooltip.js +11 -3
- package/dist/cjs/Tree/demo/draggable.d.ts +3 -0
- package/dist/cjs/Tree/demo/draggable.js +88 -0
- package/dist/cjs/Tree/demo/expanded.js +6 -6
- package/dist/cjs/Tree/index.d.ts +1 -0
- package/dist/cjs/Tree/index.js +3 -1
- package/dist/cjs/Tree/interface.d.ts +26 -0
- package/dist/cjs/Tree/style/index.less +25 -0
- package/dist/cjs/Tree/tree-node.js +38 -4
- package/dist/cjs/Tree/tree.d.ts +12 -1
- package/dist/cjs/Tree/tree.js +174 -18
- package/dist/cjs/Tree/utils/tree-tools.d.ts +21 -0
- package/dist/cjs/Tree/utils/tree-tools.js +88 -0
- package/dist/cjs/Trigger/style/index.less +17 -0
- package/dist/cjs/Trigger/trigger.js +3 -1
- package/dist/cjs/hooks/useDebounceFunction.d.ts +1 -1
- package/dist/cjs/hooks/useLayoutEffect.d.ts +1 -1
- package/dist/cjs/style/size.css +13 -4
- package/dist/cjs/style/themes.css +1 -1
- package/dist/cjs/style/variables.css +14 -5
- package/dist/cjs/utils/debounce.d.ts +6 -1
- package/dist/cjs/utils/debounce.js +9 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Alert/alert.js +24 -8
- package/dist/esm/Alert/style/index.less +3 -0
- package/dist/esm/Anchor/anchor-item.js +6 -3
- package/dist/esm/Anchor/anchor.js +38 -19
- package/dist/esm/Anchor/demo/auto.d.ts +11 -0
- package/dist/esm/Anchor/demo/auto.js +62 -0
- package/dist/esm/Anchor/demo/basic.js +3 -1
- package/dist/esm/Anchor/demo/controlled.js +14 -9
- package/dist/esm/Anchor/interface.d.ts +2 -0
- package/dist/esm/Anchor/style/index.less +2 -2
- package/dist/esm/Button/button.d.ts +1 -1
- package/dist/esm/Checkbox/checkbox-group.js +4 -2
- package/dist/esm/Checkbox/demo/group.js +1 -0
- package/dist/esm/Checkbox/interface.d.ts +5 -0
- package/dist/esm/Checkbox/style/index.less +21 -1
- package/dist/esm/Dropdown/demo/placement.js +2 -1
- package/dist/esm/Dropdown/dropdown.js +6 -1
- package/dist/esm/Dropdown/style/index.less +6 -0
- package/dist/esm/Form/Field.js +43 -5
- package/dist/esm/Form/Group.js +4 -2
- package/dist/esm/Form/demo/form-table.js +8 -6
- package/dist/esm/Form/demo/tooltip.d.ts +3 -0
- package/dist/esm/Form/demo/tooltip.js +59 -0
- package/dist/esm/Form/interface.d.ts +34 -1
- package/dist/esm/Form/style/index.less +22 -7
- package/dist/esm/Popconfirm/popconfirm.js +3 -1
- package/dist/esm/Popconfirm/style/index.less +6 -0
- package/dist/esm/Popover/popover.js +3 -1
- package/dist/esm/Popover/style/index.less +6 -0
- package/dist/esm/Progress/progress.js +5 -5
- package/dist/esm/Radio/style/index.less +13 -6
- package/dist/esm/Select/option.js +4 -2
- package/dist/esm/Select/options.js +5 -3
- package/dist/esm/Select/select.js +1 -0
- package/dist/esm/Skeleton/demo/basic.js +2 -8
- package/dist/esm/Space/interface.d.ts +4 -0
- package/dist/esm/Space/space.js +24 -13
- package/dist/esm/Splitter/demo/basic.js +2 -0
- package/dist/esm/Splitter/demo/vertical.js +13 -5
- package/dist/esm/Splitter/index.d.ts +1 -1
- package/dist/esm/Splitter/interface.d.ts +9 -3
- package/dist/esm/Splitter/splitter-handler.d.ts +1 -1
- package/dist/esm/Splitter/splitter-handler.js +3 -1
- package/dist/esm/Splitter/splitter.d.ts +2 -9
- package/dist/esm/Splitter/splitter.js +59 -56
- package/dist/esm/Splitter/style/index.less +21 -0
- package/dist/esm/Table/demo/size.js +2 -7
- package/dist/esm/Tabs/hooks/useTabScroll.d.ts +1 -1
- package/dist/esm/Tabs/interface.d.ts +1 -1
- package/dist/esm/Tabs/style/index.less +4 -0
- package/dist/esm/Tabs/tab-header/index.js +11 -5
- package/dist/esm/Tooltip/interface.d.ts +4 -0
- package/dist/esm/Tooltip/style/index.less +8 -8
- package/dist/esm/Tooltip/tooltip.js +14 -2
- package/dist/esm/Tree/demo/draggable.d.ts +3 -0
- package/dist/esm/Tree/demo/draggable.js +61 -0
- package/dist/esm/Tree/demo/expanded.js +6 -6
- package/dist/esm/Tree/index.d.ts +1 -0
- package/dist/esm/Tree/index.js +1 -0
- package/dist/esm/Tree/interface.d.ts +26 -0
- package/dist/esm/Tree/style/index.less +25 -0
- package/dist/esm/Tree/tree-node.js +29 -4
- package/dist/esm/Tree/tree.d.ts +12 -1
- package/dist/esm/Tree/tree.js +135 -4
- package/dist/esm/Tree/utils/tree-tools.d.ts +21 -0
- package/dist/esm/Tree/utils/tree-tools.js +128 -1
- package/dist/esm/Trigger/style/index.less +17 -0
- package/dist/esm/Trigger/trigger.js +4 -3
- package/dist/esm/hooks/useDebounceFunction.d.ts +1 -1
- package/dist/esm/hooks/useLayoutEffect.d.ts +1 -1
- package/dist/esm/style/size.css +13 -4
- package/dist/esm/style/themes.css +1 -1
- package/dist/esm/style/variables.css +14 -5
- package/dist/esm/utils/debounce.d.ts +6 -1
- package/dist/esm/utils/debounce.js +9 -2
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/umd/yee-c.min.css +2 -2
- package/dist/umd/yee-c.min.js +1 -1
- package/package.json +21 -23
- package/src/Alert/alert.tsx +10 -4
- package/src/Alert/style/index.less +3 -0
- package/src/Anchor/anchor-item.tsx +7 -2
- package/src/Anchor/anchor.tsx +49 -23
- package/src/Anchor/demo/auto.tsx +55 -0
- package/src/Anchor/demo/basic.tsx +7 -1
- package/src/Anchor/demo/controlled.tsx +18 -14
- package/src/Anchor/index.en-US.md +17 -0
- package/src/Anchor/index.zh-CN.md +17 -0
- package/src/Anchor/interface.ts +2 -0
- package/src/Anchor/style/index.less +2 -2
- package/src/Checkbox/checkbox-group.tsx +5 -1
- package/src/Checkbox/demo/group.tsx +1 -0
- package/src/Checkbox/interface.ts +5 -0
- package/src/Checkbox/style/index.less +21 -1
- package/src/Dropdown/demo/placement.tsx +1 -0
- package/src/Dropdown/dropdown.tsx +2 -0
- package/src/Dropdown/style/index.less +6 -0
- package/src/Form/Field.tsx +45 -3
- package/src/Form/Group.tsx +4 -1
- package/src/Form/demo/form-table.tsx +7 -7
- package/src/Form/demo/tooltip.tsx +72 -0
- package/src/Form/form-store.ts +1 -1
- package/src/Form/index.en-US.md +2 -0
- package/src/Form/index.zh-CN.md +83 -85
- package/src/Form/interface.ts +36 -1
- package/src/Form/style/index.less +22 -7
- package/src/Popconfirm/popconfirm.tsx +1 -1
- package/src/Popconfirm/style/index.less +6 -0
- package/src/Popover/popover.tsx +1 -1
- package/src/Popover/style/index.less +6 -0
- package/src/Progress/progress.tsx +2 -2
- package/src/Radio/style/index.less +13 -6
- package/src/Select/option.tsx +2 -1
- package/src/Select/options.tsx +7 -2
- package/src/Select/select.tsx +1 -0
- package/src/Skeleton/demo/basic.tsx +3 -3
- package/src/Space/interface.ts +4 -0
- package/src/Space/space.tsx +40 -16
- package/src/Splitter/demo/basic.tsx +2 -2
- package/src/Splitter/demo/vertical.tsx +19 -5
- package/src/Splitter/index.ts +5 -1
- package/src/Splitter/interface.ts +10 -3
- package/src/Splitter/splitter-handler.tsx +4 -2
- package/src/Splitter/splitter.tsx +55 -60
- package/src/Splitter/style/index.less +21 -0
- package/src/Table/demo/size.tsx +3 -3
- package/src/Table/index.zh-CN.md +50 -50
- package/src/Tabs/interface.ts +1 -1
- package/src/Tabs/style/index.less +4 -0
- package/src/Tabs/tab-header/index.tsx +26 -5
- package/src/Tooltip/index.en-US.md +1 -0
- package/src/Tooltip/index.zh-CN.md +1 -0
- package/src/Tooltip/interface.ts +4 -0
- package/src/Tooltip/style/index.less +8 -8
- package/src/Tooltip/tooltip.tsx +10 -1
- package/src/Tree/demo/draggable.tsx +58 -0
- package/src/Tree/demo/expanded.tsx +7 -7
- package/src/Tree/index.en-US.md +3 -0
- package/src/Tree/index.ts +1 -0
- package/src/Tree/index.zh-CN.md +3 -0
- package/src/Tree/interface.ts +28 -0
- package/src/Tree/style/index.less +25 -0
- package/src/Tree/tree-node.tsx +26 -0
- package/src/Tree/tree.tsx +183 -2
- package/src/Tree/utils/tree-tools.ts +107 -0
- package/src/Trigger/style/index.less +17 -0
- package/src/Trigger/trigger.tsx +3 -1
- package/src/style/size.css +13 -4
- package/src/utils/debounce.ts +22 -3
- package/src/version.ts +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { Button, Form, Grid, Input, Space, TextArea } from "../..";
|
|
8
|
+
import { Info } from 'lucide-react';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export default (function () {
|
|
11
|
+
var _Form$useForm = Form.useForm(),
|
|
12
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13
|
+
form = _Form$useForm2[0];
|
|
14
|
+
var onFinish = function onFinish(values) {
|
|
15
|
+
console.log('Received values:', values);
|
|
16
|
+
};
|
|
17
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
18
|
+
form: form,
|
|
19
|
+
onFinish: onFinish,
|
|
20
|
+
layout: "vertical",
|
|
21
|
+
"data-testid": "tooltip-form"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement(Form.Field, {
|
|
23
|
+
name: "username",
|
|
24
|
+
label: "Username",
|
|
25
|
+
tooltip: "Used for login. 4-20 characters.",
|
|
26
|
+
rules: [{
|
|
27
|
+
required: true,
|
|
28
|
+
message: 'Please input your username!'
|
|
29
|
+
}]
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
31
|
+
placeholder: "Please input your username"
|
|
32
|
+
}))), /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement(Form.Field, {
|
|
33
|
+
name: "nickname",
|
|
34
|
+
label: "Nickname"
|
|
35
|
+
// Custom trigger icon via the object form
|
|
36
|
+
,
|
|
37
|
+
tooltip: {
|
|
38
|
+
title: 'Shown publicly instead of your username.',
|
|
39
|
+
icon: /*#__PURE__*/React.createElement(Info, {
|
|
40
|
+
size: 14
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
44
|
+
placeholder: "Please input your nickname"
|
|
45
|
+
}))), /*#__PURE__*/React.createElement(Grid.Item, null, /*#__PURE__*/React.createElement(Form.Field, {
|
|
46
|
+
name: "bio",
|
|
47
|
+
label: "Bio",
|
|
48
|
+
tooltip: "A short introduction about yourself."
|
|
49
|
+
}, /*#__PURE__*/React.createElement(TextArea, null)))), /*#__PURE__*/React.createElement(Space, {
|
|
50
|
+
style: {
|
|
51
|
+
marginTop: 16
|
|
52
|
+
}
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
54
|
+
type: "primary",
|
|
55
|
+
htmlType: "submit"
|
|
56
|
+
}, "Submit"), /*#__PURE__*/React.createElement(Button, {
|
|
57
|
+
htmlType: "reset"
|
|
58
|
+
}, "Reset")));
|
|
59
|
+
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { TooltipProps } from '../Tooltip';
|
|
2
3
|
import type { DataAttributeProps } from '../utils/types';
|
|
3
4
|
export type StoreValue = any;
|
|
4
5
|
export type Store = Record<string, StoreValue>;
|
|
@@ -211,7 +212,7 @@ export type Rule = {
|
|
|
211
212
|
/**
|
|
212
213
|
* Error message
|
|
213
214
|
*/
|
|
214
|
-
message
|
|
215
|
+
message?: string;
|
|
215
216
|
/**
|
|
216
217
|
* Custom validation function, returns true for pass, false or throw for fail
|
|
217
218
|
*/
|
|
@@ -227,12 +228,44 @@ export type ValidateMessage = {
|
|
|
227
228
|
value: unknown;
|
|
228
229
|
status: 'error' | 'success' | 'warning' | 'info';
|
|
229
230
|
};
|
|
231
|
+
export type FieldConfigurableTooltip = Omit<TooltipProps, 'children'> & {
|
|
232
|
+
/**
|
|
233
|
+
* Custom trigger icon (defaults to a built-in help icon)
|
|
234
|
+
*/
|
|
235
|
+
icon?: React.ReactNode;
|
|
236
|
+
};
|
|
237
|
+
export type FieldTooltip = React.ReactNode | FieldConfigurableTooltip;
|
|
230
238
|
export type FieldProps = {
|
|
239
|
+
/**
|
|
240
|
+
* Child nodes
|
|
241
|
+
* */
|
|
231
242
|
children: React.ReactElement;
|
|
243
|
+
/**
|
|
244
|
+
* Field name
|
|
245
|
+
* */
|
|
232
246
|
name: NamePath;
|
|
247
|
+
/**
|
|
248
|
+
* Validation rules
|
|
249
|
+
* */
|
|
233
250
|
rules?: Rule[];
|
|
251
|
+
/***
|
|
252
|
+
* Field label
|
|
253
|
+
*/
|
|
234
254
|
label?: React.ReactNode;
|
|
255
|
+
/**
|
|
256
|
+
* Tooltip shown next to the label (a help icon).
|
|
257
|
+
* Pass a string/node to use the default icon, or an object to customize the icon.
|
|
258
|
+
* */
|
|
259
|
+
tooltip?: FieldTooltip;
|
|
260
|
+
/**
|
|
261
|
+
* Whether required (shows required mark)
|
|
262
|
+
* */
|
|
235
263
|
required?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Layout of label and control
|
|
266
|
+
* @default 'vertical'
|
|
267
|
+
* */
|
|
268
|
+
layout?: 'vertical' | 'horizontal';
|
|
236
269
|
/**
|
|
237
270
|
* Format value before passing to children
|
|
238
271
|
* */
|
|
@@ -18,17 +18,32 @@
|
|
|
18
18
|
// padding-bottom: var(--yee-form-item-padding-bottom);
|
|
19
19
|
|
|
20
20
|
&-label {
|
|
21
|
-
display: inline-
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 2px;
|
|
22
24
|
margin-bottom: var(--yee-form-item-label-mb, 4px);
|
|
23
25
|
line-height: var(--yee-form-item-label-line-height);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
&-required
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
// The required asterisk is rendered as a real node via &-required-mark so it
|
|
29
|
+
// stays glued to the label text regardless of what else sits inside the label.
|
|
30
|
+
// The `item-required` className is still applied to the label (see Field/Group)
|
|
31
|
+
// as an opt-in styling hook; the mark itself lives in &-required-mark below.
|
|
32
|
+
&-required-mark {
|
|
33
|
+
color: var(--yee-input-required-font-color);
|
|
34
|
+
margin-inline-start: var(--yee-form-item-required-margin-inline-start);
|
|
35
|
+
line-height: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-tooltip-icon {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
margin-inline-start: 4px;
|
|
42
|
+
color: var(
|
|
43
|
+
--yee-form-item-tooltip-icon-color,
|
|
44
|
+
var(--yee-text-color-secondary, #999)
|
|
45
|
+
);
|
|
46
|
+
cursor: pointer;
|
|
32
47
|
}
|
|
33
48
|
|
|
34
49
|
&-control {
|
|
@@ -37,7 +37,9 @@ var Popconfirm = function Popconfirm(baseprops) {
|
|
|
37
37
|
title = props.title,
|
|
38
38
|
description = props.description,
|
|
39
39
|
_props$arrow = props.arrow,
|
|
40
|
-
arrow = _props$arrow === void 0 ?
|
|
40
|
+
arrow = _props$arrow === void 0 ? {
|
|
41
|
+
className: "".concat(prefixCls, "-arrow")
|
|
42
|
+
} : _props$arrow,
|
|
41
43
|
_props$placement = props.placement,
|
|
42
44
|
placement = _props$placement === void 0 ? 'top' : _props$placement,
|
|
43
45
|
_props$confirmText = props.confirmText,
|
|
@@ -29,7 +29,9 @@ var Popover = function Popover(baseprops) {
|
|
|
29
29
|
title = props.title,
|
|
30
30
|
content = props.content,
|
|
31
31
|
_props$arrow = props.arrow,
|
|
32
|
-
arrow = _props$arrow === void 0 ?
|
|
32
|
+
arrow = _props$arrow === void 0 ? {
|
|
33
|
+
className: "".concat(prefixCls, "-arrow")
|
|
34
|
+
} : _props$arrow,
|
|
33
35
|
_props$placement = props.placement,
|
|
34
36
|
placement = _props$placement === void 0 ? 'top' : _props$placement,
|
|
35
37
|
_props$trigger = props.trigger,
|
|
@@ -1,11 +1,11 @@
|
|
|
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
2
|
var _excluded = ["prefixCls", "type", "children", "status", "percent", "className", "style", "format", "onMouseEnter", "onMouseLeave", "onClick"];
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
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; }
|
|
5
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; }
|
|
6
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; }
|
|
7
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
9
|
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; }
|
|
10
10
|
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; }
|
|
11
11
|
import clsx from 'clsx';
|
|
@@ -67,15 +67,15 @@ var Progress = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
|
|
|
67
67
|
// progress
|
|
68
68
|
var progress;
|
|
69
69
|
if (type === 'line') {
|
|
70
|
-
progress = /*#__PURE__*/React.createElement(Line, {
|
|
70
|
+
progress = /*#__PURE__*/React.createElement(Line, _extends({}, rest, {
|
|
71
71
|
prefixCls: prefixCls,
|
|
72
72
|
percent: percent
|
|
73
|
-
}, progressInfo);
|
|
73
|
+
}), progressInfo);
|
|
74
74
|
} else {
|
|
75
|
-
progress = /*#__PURE__*/React.createElement(Circle, {
|
|
75
|
+
progress = /*#__PURE__*/React.createElement(Circle, _extends({}, rest, {
|
|
76
76
|
prefixCls: prefixCls,
|
|
77
77
|
percent: percent
|
|
78
|
-
}, progressInfo);
|
|
78
|
+
}), progressInfo);
|
|
79
79
|
}
|
|
80
80
|
var cls = clsx(prefixCls, _defineProperty({}, "".concat(prefixCls, "-").concat(props.status), props.status), className);
|
|
81
81
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -9,15 +9,9 @@
|
|
|
9
9
|
gap: var(--yee-radio-group-gap);
|
|
10
10
|
|
|
11
11
|
&-small {
|
|
12
|
-
@{pls} {
|
|
13
|
-
padding: var(--yee-radio-small-padding, 2px 4px);
|
|
14
|
-
}
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
&-large {
|
|
18
|
-
@{pls} {
|
|
19
|
-
padding: var(--yee-radio-large-padding, 6px 12px);
|
|
20
|
-
}
|
|
21
15
|
}
|
|
22
16
|
|
|
23
17
|
&-solid {
|
|
@@ -67,6 +61,19 @@
|
|
|
67
61
|
content: '';
|
|
68
62
|
}
|
|
69
63
|
|
|
64
|
+
&::before {
|
|
65
|
+
position: absolute;
|
|
66
|
+
z-index: 1;
|
|
67
|
+
right: 5px;
|
|
68
|
+
top: 14px;
|
|
69
|
+
width: 4px;
|
|
70
|
+
height: 8px;
|
|
71
|
+
border: 2px solid #fff;
|
|
72
|
+
border-width: 0 2px 2px 0;
|
|
73
|
+
transform: rotate(45deg);
|
|
74
|
+
content: '';
|
|
75
|
+
}
|
|
76
|
+
|
|
70
77
|
z-index: 1;
|
|
71
78
|
}
|
|
72
79
|
|
|
@@ -9,7 +9,8 @@ var Option = function Option(props) {
|
|
|
9
9
|
var label = props.label,
|
|
10
10
|
value = props.value,
|
|
11
11
|
disabled = props.disabled,
|
|
12
|
-
title = props.title
|
|
12
|
+
title = props.title,
|
|
13
|
+
dataTestId = props.dataTestId;
|
|
13
14
|
var _useContext = useContext(OptionsCtx),
|
|
14
15
|
prefixCls = _useContext.prefixCls,
|
|
15
16
|
selectedKeys = _useContext.selectedKeys,
|
|
@@ -32,7 +33,8 @@ var Option = function Option(props) {
|
|
|
32
33
|
},
|
|
33
34
|
role: "option",
|
|
34
35
|
tabIndex: disabled ? undefined : 0,
|
|
35
|
-
title: htmlTitle
|
|
36
|
+
title: htmlTitle,
|
|
37
|
+
"data-testid": dataTestId
|
|
36
38
|
}, label);
|
|
37
39
|
};
|
|
38
40
|
export default Option;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["prefixCls", "options", "popupClassName", "popupStyle", "selectedKeys", "focusedKey", "onSelect"];
|
|
1
|
+
var _excluded = ["prefixCls", "options", "popupClassName", "popupStyle", "selectedKeys", "focusedKey", "dataTestId", "onSelect"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
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; }
|
|
4
4
|
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,6 +17,7 @@ var Options = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
17
17
|
popupStyle = props.popupStyle,
|
|
18
18
|
selectedKeys = props.selectedKeys,
|
|
19
19
|
focusedKey = props.focusedKey,
|
|
20
|
+
dataTestId = props.dataTestId,
|
|
20
21
|
onSelect = props.onSelect,
|
|
21
22
|
rest = _objectWithoutProperties(props, _excluded);
|
|
22
23
|
|
|
@@ -36,9 +37,10 @@ var Options = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
36
37
|
focusedKey: focusedKey,
|
|
37
38
|
onSelect: onSelect
|
|
38
39
|
}
|
|
39
|
-
}, options.map(function (option) {
|
|
40
|
+
}, options.map(function (option, index) {
|
|
40
41
|
return /*#__PURE__*/React.createElement(Option, _extends({}, option, {
|
|
41
|
-
key: option.value
|
|
42
|
+
key: option.value,
|
|
43
|
+
dataTestId: "".concat(dataTestId, "-").concat(index)
|
|
42
44
|
}));
|
|
43
45
|
})));
|
|
44
46
|
});
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { Card, Skeleton
|
|
1
|
+
import { Card, Skeleton } from "../..";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export default (function () {
|
|
4
|
-
return /*#__PURE__*/React.createElement(
|
|
5
|
-
direction: "vertical",
|
|
6
|
-
gap: 16,
|
|
7
|
-
style: {
|
|
8
|
-
width: '100%'
|
|
9
|
-
}
|
|
10
|
-
}, /*#__PURE__*/React.createElement(Card, {
|
|
4
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, {
|
|
11
5
|
title: "Basic Placeholder"
|
|
12
6
|
}, /*#__PURE__*/React.createElement(Skeleton, null)), /*#__PURE__*/React.createElement(Card, {
|
|
13
7
|
title: "With Avatar"
|
|
@@ -26,6 +26,10 @@ export interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
26
26
|
* Alignment
|
|
27
27
|
*/
|
|
28
28
|
align?: 'center' | 'start' | 'end' | 'baseline' | 'flex-start';
|
|
29
|
+
/***
|
|
30
|
+
* Justify content
|
|
31
|
+
* */
|
|
32
|
+
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between';
|
|
29
33
|
/**
|
|
30
34
|
* Whether to take up the entire row
|
|
31
35
|
*/
|
package/dist/esm/Space/space.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 = ["prefixCls", "children", "gap", "direction", "align", "wrap", "className", "style", "classNames", "styles", "block"];
|
|
2
|
+
var _excluded = ["prefixCls", "children", "gap", "direction", "align", "justify", "wrap", "className", "style", "classNames", "styles", "block"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -26,6 +26,7 @@ var Space = /*#__PURE__*/forwardRef(function (baseprops, ref) {
|
|
|
26
26
|
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
|
27
27
|
_props$align = props.align,
|
|
28
28
|
align = _props$align === void 0 ? direction === 'horizontal' ? 'center' : undefined : _props$align,
|
|
29
|
+
justify = props.justify,
|
|
29
30
|
wrap = props.wrap,
|
|
30
31
|
className = props.className,
|
|
31
32
|
style = props.style,
|
|
@@ -45,20 +46,29 @@ var Space = /*#__PURE__*/forwardRef(function (baseprops, ref) {
|
|
|
45
46
|
if (!children) {
|
|
46
47
|
return null;
|
|
47
48
|
}
|
|
49
|
+
var loop = function loop(childs) {
|
|
50
|
+
var res = [];
|
|
51
|
+
childs.forEach(function (child, index) {
|
|
52
|
+
var isItem = /*#__PURE__*/React.isValidElement(child) && child.type.isSpaceItem;
|
|
53
|
+
var itemClassName = isItem ? child.props.className : undefined;
|
|
54
|
+
var itemStyle = isItem ? child.props.style : undefined;
|
|
55
|
+
var itemChildren = isItem ? child.props.children : child;
|
|
56
|
+
if ( /*#__PURE__*/React.isValidElement(child) && child.type === React.Fragment) {
|
|
57
|
+
res = res.concat(loop(React.Children.toArray(child.props.children)));
|
|
58
|
+
} else {
|
|
59
|
+
res.push( /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: clsx("".concat(prefixCls, "-item"), classNames === null || classNames === void 0 ? void 0 : classNames.item, itemClassName),
|
|
61
|
+
style: _objectSpread(_objectSpread({}, styles === null || styles === void 0 ? void 0 : styles.item), itemStyle),
|
|
62
|
+
key: index
|
|
63
|
+
}, itemChildren));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return res;
|
|
67
|
+
};
|
|
48
68
|
var childs = React.Children.toArray(children).filter(function (child) {
|
|
49
69
|
return child !== null && child !== undefined;
|
|
50
70
|
});
|
|
51
|
-
return childs
|
|
52
|
-
var isItem = /*#__PURE__*/React.isValidElement(child) && child.type.isSpaceItem;
|
|
53
|
-
var itemClassName = isItem ? child.props.className : undefined;
|
|
54
|
-
var itemStyle = isItem ? child.props.style : undefined;
|
|
55
|
-
var itemChildren = isItem ? child.props.children : child;
|
|
56
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: clsx("".concat(prefixCls, "-item"), classNames === null || classNames === void 0 ? void 0 : classNames.item, itemClassName),
|
|
58
|
-
style: _objectSpread(_objectSpread({}, styles === null || styles === void 0 ? void 0 : styles.item), itemStyle),
|
|
59
|
-
key: index
|
|
60
|
-
}, itemChildren);
|
|
61
|
-
});
|
|
71
|
+
return loop(childs);
|
|
62
72
|
};
|
|
63
73
|
var packed = pack();
|
|
64
74
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
@@ -66,7 +76,8 @@ var Space = /*#__PURE__*/forwardRef(function (baseprops, ref) {
|
|
|
66
76
|
style: _objectSpread({
|
|
67
77
|
width: block ? '100%' : undefined,
|
|
68
78
|
gap: gap + 'px',
|
|
69
|
-
alignItems: getAlign()
|
|
79
|
+
alignItems: getAlign(),
|
|
80
|
+
justifyContent: justify
|
|
70
81
|
}, style),
|
|
71
82
|
ref: componentRef
|
|
72
83
|
}), packed);
|
|
@@ -7,11 +7,13 @@ export default (function () {
|
|
|
7
7
|
}
|
|
8
8
|
}, /*#__PURE__*/React.createElement(Splitter, null, /*#__PURE__*/React.createElement(Splitter.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
9
9
|
style: {
|
|
10
|
+
margin: 8,
|
|
10
11
|
padding: 16,
|
|
11
12
|
backgroundColor: '#f0f0f0'
|
|
12
13
|
}
|
|
13
14
|
}, "Left Panel")), /*#__PURE__*/React.createElement(Splitter.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
14
15
|
style: {
|
|
16
|
+
margin: 8,
|
|
15
17
|
padding: 16,
|
|
16
18
|
backgroundColor: '#e0e0e0'
|
|
17
19
|
}
|
|
@@ -3,19 +3,27 @@ import React from 'react';
|
|
|
3
3
|
export default (function () {
|
|
4
4
|
return /*#__PURE__*/React.createElement("div", {
|
|
5
5
|
style: {
|
|
6
|
-
height:
|
|
6
|
+
height: 500
|
|
7
7
|
}
|
|
8
8
|
}, /*#__PURE__*/React.createElement(Splitter, {
|
|
9
9
|
layout: "vertical"
|
|
10
|
-
}, /*#__PURE__*/React.createElement(Splitter.Item,
|
|
10
|
+
}, /*#__PURE__*/React.createElement(Splitter.Item, {
|
|
11
|
+
size: 250
|
|
12
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11
13
|
style: {
|
|
14
|
+
marginBottom: 8,
|
|
12
15
|
padding: 16,
|
|
13
|
-
backgroundColor: '#f0f0f0'
|
|
16
|
+
backgroundColor: '#f0f0f0',
|
|
17
|
+
height: '100%'
|
|
14
18
|
}
|
|
15
|
-
}, "Top Panel")), /*#__PURE__*/React.createElement(Splitter.Item,
|
|
19
|
+
}, "Top Panel")), /*#__PURE__*/React.createElement(Splitter.Item, {
|
|
20
|
+
size: 250
|
|
21
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16
22
|
style: {
|
|
23
|
+
marginTop: 8,
|
|
17
24
|
padding: 16,
|
|
18
|
-
backgroundColor: '#e0e0e0'
|
|
25
|
+
backgroundColor: '#e0e0e0',
|
|
26
|
+
height: '100%'
|
|
19
27
|
}
|
|
20
28
|
}, "Bottom Panel"))));
|
|
21
29
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import InternalSplitter from './splitter';
|
|
2
2
|
import Item from './splitter-item';
|
|
3
|
-
export type { SplitterItemProps, SplitterProps } from './interface';
|
|
3
|
+
export type { SplitterItemProps, PanelRect as SplitterPanelRect, SplitterProps, } from './interface';
|
|
4
4
|
type SplitterType = typeof InternalSplitter & {
|
|
5
5
|
Item: typeof Item;
|
|
6
6
|
};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DataAttributeProps } from '../utils/types';
|
|
3
|
+
export type PanelRect = {
|
|
4
|
+
type: 'default' | 'percent' | 'auto';
|
|
5
|
+
size: number;
|
|
6
|
+
currentSize: number;
|
|
7
|
+
min?: string | number;
|
|
8
|
+
max?: string | number;
|
|
9
|
+
};
|
|
3
10
|
export interface SplitterItemProps {
|
|
4
11
|
/**
|
|
5
12
|
* custom item element class name prefix
|
|
@@ -67,14 +74,13 @@ export interface SplitterProps extends DataAttributeProps {
|
|
|
67
74
|
/**
|
|
68
75
|
* children
|
|
69
76
|
*/
|
|
70
|
-
children?: React.ReactElement
|
|
77
|
+
children?: Array<React.ReactElement | null>;
|
|
71
78
|
/**
|
|
72
79
|
* display border or not
|
|
73
80
|
* */
|
|
74
81
|
bordered?: boolean;
|
|
75
|
-
itemPadding?: number | string;
|
|
76
82
|
/**
|
|
77
83
|
* panel size change event
|
|
78
84
|
* */
|
|
79
|
-
onResize?: (sizes:
|
|
85
|
+
onResize?: (sizes: PanelRect[]) => void;
|
|
80
86
|
}
|
|
@@ -36,7 +36,8 @@ var SplitterHandler = function SplitterHandler(_ref) {
|
|
|
36
36
|
var _useContext = useContext(SplitterWrapperCtx),
|
|
37
37
|
refs = _useContext.refs;
|
|
38
38
|
var _useContext2 = useContext(SplitterCtx),
|
|
39
|
-
prefixCls = _useContext2.prefixCls
|
|
39
|
+
prefixCls = _useContext2.prefixCls,
|
|
40
|
+
onResize = _useContext2.onResize;
|
|
40
41
|
var status = records[index - 1] || {};
|
|
41
42
|
var next = records[index] || {};
|
|
42
43
|
var onMove = function onMove(dis) {
|
|
@@ -80,6 +81,7 @@ var SplitterHandler = function SplitterHandler(_ref) {
|
|
|
80
81
|
size: e,
|
|
81
82
|
currentSize: e
|
|
82
83
|
});
|
|
84
|
+
onResize === null || onResize === void 0 || onResize(newState);
|
|
83
85
|
return newState;
|
|
84
86
|
});
|
|
85
87
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SplitterProps } from './interface';
|
|
2
|
+
import type { PanelRect, SplitterProps } from './interface';
|
|
3
3
|
import './style/index.less';
|
|
4
4
|
type SplitterWrapperCtxType = {
|
|
5
5
|
refs: {
|
|
@@ -8,16 +8,9 @@ type SplitterWrapperCtxType = {
|
|
|
8
8
|
};
|
|
9
9
|
type SplitterCtxType = {
|
|
10
10
|
prefixCls: string;
|
|
11
|
-
onResize?: (sizes:
|
|
11
|
+
onResize?: (sizes: PanelRect[]) => void;
|
|
12
12
|
};
|
|
13
13
|
export declare const SplitterWrapperCtx: React.Context<SplitterWrapperCtxType>;
|
|
14
14
|
export declare const SplitterCtx: React.Context<SplitterCtxType>;
|
|
15
|
-
export type PanelRect = {
|
|
16
|
-
type: 'default' | 'percent' | 'auto';
|
|
17
|
-
size: number;
|
|
18
|
-
currentSize: number;
|
|
19
|
-
min?: string | number;
|
|
20
|
-
max?: string | number;
|
|
21
|
-
};
|
|
22
15
|
declare const Splitter: React.ForwardRefExoticComponent<SplitterProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
16
|
export default Splitter;
|