@agentscope-ai/design 1.0.8 → 1.0.10
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/lib/antd/styles/alert.style.d.ts +2 -10
- package/lib/antd/styles/alert.style.js +11 -12
- package/lib/antd/styles/breadcrumb.style.d.ts +2 -18
- package/lib/antd/styles/breadcrumb.style.js +13 -15
- package/lib/antd/styles/button.style.d.ts +2 -80
- package/lib/antd/styles/button.style.js +63 -47
- package/lib/antd/styles/dropdown.style.d.ts +2 -15
- package/lib/antd/styles/dropdown.style.js +27 -16
- package/lib/antd/styles/floatButton.style.d.ts +2 -8
- package/lib/antd/styles/floatButton.style.js +13 -12
- package/lib/antd/styles/index.style.d.ts +4 -18
- package/lib/antd/styles/index.style.js +52 -53
- package/lib/antd/styles/inputNumber.style.d.ts +2 -18
- package/lib/antd/styles/inputNumber.style.js +23 -17
- package/lib/antd/styles/message.style.d.ts +2 -5
- package/lib/antd/styles/message.style.js +9 -10
- package/lib/antd/styles/notification.style.d.ts +2 -46
- package/lib/antd/styles/notification.style.js +31 -29
- package/lib/antd/styles/popover.style.d.ts +2 -13
- package/lib/antd/styles/popover.style.js +15 -14
- package/lib/antd/styles/radio.style.d.ts +2 -24
- package/lib/antd/styles/radio.style.js +29 -18
- package/lib/antd/styles/segment.style.d.ts +2 -7
- package/lib/antd/styles/segment.style.js +11 -12
- package/lib/antd/styles/select.style.d.ts +2 -31
- package/lib/antd/styles/select.style.js +51 -28
- package/lib/antd/styles/slider.style.d.ts +2 -22
- package/lib/antd/styles/slider.style.js +19 -21
- package/lib/antd/styles/table.style.d.ts +2 -5
- package/lib/antd/styles/table.style.js +7 -10
- package/lib/antd/styles/tooltip.style.d.ts +2 -8
- package/lib/antd/styles/tooltip.style.js +13 -11
- package/lib/antd/themes/generateThemeByToken.js +8 -2
- package/lib/components/commonComponents/AlertDialog/demo/demo1.js +13 -79
- package/lib/components/commonComponents/AlertDialog/demo/demo2.js +44 -64
- package/lib/components/commonComponents/AlertDialog/index.d.ts +14 -1
- package/lib/components/commonComponents/AlertDialog/index.js +25 -17
- package/lib/components/commonComponents/AlertDialog/index.style.d.ts +1 -17
- package/lib/components/commonComponents/AlertDialog/index.style.js +16 -30
- package/lib/components/commonComponents/Anchor/demo/demo1.d.ts +0 -4
- package/lib/components/commonComponents/Anchor/demo/demo1.js +3 -4
- package/lib/components/commonComponents/Anchor/demo/demo2.d.ts +0 -4
- package/lib/components/commonComponents/Anchor/demo/demo2.js +3 -5
- package/lib/components/commonComponents/Anchor/index.js +7 -3
- package/lib/components/commonComponents/Anchor/index.style.d.ts +1 -14
- package/lib/components/commonComponents/Anchor/index.style.js +18 -23
- package/lib/components/commonComponents/Avatar/index.js +11 -7
- package/lib/components/commonComponents/Avatar/index.style.d.ts +1 -7
- package/lib/components/commonComponents/Avatar/index.style.js +6 -21
- package/lib/components/commonComponents/Breadcrumb/index.js +9 -6
- package/lib/components/commonComponents/Breadcrumb/index.style.d.ts +1 -117
- package/lib/components/commonComponents/Breadcrumb/index.style.js +32 -61
- package/lib/components/commonComponents/Button/index.d.ts +1 -1
- package/lib/components/commonComponents/Button/index.js +7 -7
- package/lib/components/commonComponents/Card/index.js +23 -20
- package/lib/components/commonComponents/Card/index.style.d.ts +1 -71
- package/lib/components/commonComponents/Card/index.style.js +24 -46
- package/lib/components/commonComponents/Checkbox/index.js +13 -10
- package/lib/components/commonComponents/Checkbox/index.style.d.ts +1 -34
- package/lib/components/commonComponents/Checkbox/index.style.js +50 -38
- package/lib/components/commonComponents/CodeBlock/index.js +15 -13
- package/lib/components/commonComponents/CodeBlock/index.style.d.ts +1 -354
- package/lib/components/commonComponents/CodeBlock/index.style.js +26 -72
- package/lib/components/commonComponents/Collapse/index.js +7 -3
- package/lib/components/commonComponents/Collapse/index.style.d.ts +1 -57
- package/lib/components/commonComponents/Collapse/index.style.js +34 -47
- package/lib/components/commonComponents/CollapsePanel/index.d.ts +10 -0
- package/lib/components/commonComponents/CollapsePanel/index.js +56 -44
- package/lib/components/commonComponents/CollapsePanel/index.style.d.ts +1 -287
- package/lib/components/commonComponents/CollapsePanel/index.style.js +42 -97
- package/lib/components/commonComponents/ConfigProvider/index.js +20 -14
- package/lib/components/commonComponents/DatePicker/index.js +45 -39
- package/lib/components/commonComponents/DatePicker/index.style.d.ts +1 -102
- package/lib/components/commonComponents/DatePicker/index.style.js +66 -61
- package/lib/components/commonComponents/Descriptions/index.js +14 -10
- package/lib/components/commonComponents/Descriptions/index.style.d.ts +1 -17
- package/lib/components/commonComponents/Descriptions/index.style.js +32 -29
- package/lib/components/commonComponents/Drawer/Confirm.d.ts +1 -1
- package/lib/components/commonComponents/Drawer/Confirm.js +26 -24
- package/lib/components/commonComponents/Drawer/index.js +15 -11
- package/lib/components/commonComponents/Drawer/index.style.d.ts +1 -84
- package/lib/components/commonComponents/Drawer/index.style.js +44 -54
- package/lib/components/commonComponents/Dropdown/index.d.ts +1 -2
- package/lib/components/commonComponents/Dropdown/index.js +15 -12
- package/lib/components/commonComponents/Dropdown/index.style.d.ts +1 -78
- package/lib/components/commonComponents/Dropdown/index.style.js +48 -40
- package/lib/components/commonComponents/EllipsisTip/index.js +14 -10
- package/lib/components/commonComponents/EllipsisTip/index.style.d.ts +1 -10
- package/lib/components/commonComponents/EllipsisTip/index.style.js +6 -24
- package/lib/components/commonComponents/Empty/index.js +46 -44
- package/lib/components/commonComponents/Empty/index.style.d.ts +1 -113
- package/lib/components/commonComponents/Empty/index.style.js +22 -51
- package/lib/components/commonComponents/FileIcon/index.js +27 -24
- package/lib/components/commonComponents/FileIcon/index.style.d.ts +1 -61
- package/lib/components/commonComponents/FileIcon/index.style.js +20 -42
- package/lib/components/commonComponents/FloatButton/demo/demo1.js +1 -1
- package/lib/components/commonComponents/FloatButton/demo/demo2.js +1 -1
- package/lib/components/commonComponents/Form/index.js +6 -5
- package/lib/components/commonComponents/Form/index.style.d.ts +1 -53
- package/lib/components/commonComponents/Form/index.style.js +26 -38
- package/lib/components/commonComponents/HelpIcon/index.js +25 -20
- package/lib/components/commonComponents/HelpIcon/index.style.d.ts +1 -16
- package/lib/components/commonComponents/HelpIcon/index.style.js +16 -29
- package/lib/components/commonComponents/IconButton/index.js +15 -11
- package/lib/components/commonComponents/IconButton/index.style.d.ts +1 -11
- package/lib/components/commonComponents/IconButton/index.style.js +10 -24
- package/lib/components/commonComponents/IconFont/index.d.ts +1 -2
- package/lib/components/commonComponents/IconFont/index.js +14 -9
- package/lib/components/commonComponents/IconFont/index.style.d.ts +1 -67
- package/lib/components/commonComponents/IconFont/index.style.js +14 -44
- package/lib/components/commonComponents/Image/index.js +8 -5
- package/lib/components/commonComponents/Image/index.style.d.ts +1 -22
- package/lib/components/commonComponents/Image/index.style.js +16 -30
- package/lib/components/commonComponents/Input/index.js +17 -11
- package/lib/components/commonComponents/Input/index.style.d.ts +1 -70
- package/lib/components/commonComponents/Input/index.style.js +46 -42
- package/lib/components/commonComponents/Modal/index.js +18 -16
- package/lib/components/commonComponents/Modal/index.style.d.ts +1 -111
- package/lib/components/commonComponents/Modal/index.style.js +54 -72
- package/lib/components/commonComponents/Pagination/index.d.ts +1 -1
- package/lib/components/commonComponents/Pagination/index.js +96 -36
- package/lib/components/commonComponents/Pagination/index.style.d.ts +1 -49
- package/lib/components/commonComponents/Pagination/index.style.js +26 -42
- package/lib/components/commonComponents/Popconfirm/demo/demo1.js +13 -0
- package/lib/components/commonComponents/Popconfirm/demo/demo2.d.ts +3 -0
- package/lib/components/commonComponents/Popconfirm/demo/demo2.js +49 -0
- package/lib/components/commonComponents/Popconfirm/index.d.ts +9 -2
- package/lib/components/commonComponents/Popconfirm/index.js +50 -8
- package/lib/components/commonComponents/PromptsEditor/demo/basic.js +5 -4
- package/lib/components/commonComponents/PromptsEditor/index.d.ts +8 -2
- package/lib/components/commonComponents/PromptsEditor/index.js +17 -11
- package/lib/components/commonComponents/RadioButton/index.js +9 -10
- package/lib/components/commonComponents/RadioButton/index.style.d.ts +1 -72
- package/lib/components/commonComponents/RadioButton/index.style.js +52 -63
- package/lib/components/commonComponents/Result/index.style.d.ts +1 -3
- package/lib/components/commonComponents/Result/index.style.js +4 -16
- package/lib/components/commonComponents/Select/demo/demo2.js +0 -1
- package/lib/components/commonComponents/SlateEditor/elements/Var.js +11 -8
- package/lib/components/commonComponents/SlateEditor/elements/index.style.d.ts +1 -14
- package/lib/components/commonComponents/SlateEditor/elements/index.style.js +4 -21
- package/lib/components/commonComponents/SlateEditor/index.js +34 -31
- package/lib/components/commonComponents/SlateEditor/index.style.d.ts +1 -28
- package/lib/components/commonComponents/SlateEditor/index.style.js +4 -36
- package/lib/components/commonComponents/Slider/{slider.input.d.ts → Input/index.d.ts} +1 -1
- package/lib/components/commonComponents/Slider/Input/index.js +93 -0
- package/lib/components/commonComponents/Slider/Input/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Slider/Input/index.style.js +22 -0
- package/lib/components/commonComponents/Slider/demo/demo4.d.ts +3 -0
- package/lib/components/commonComponents/Slider/demo/demo4.js +33 -0
- package/lib/components/commonComponents/Slider/demo/demo5.d.ts +3 -0
- package/lib/components/commonComponents/Slider/demo/demo5.js +34 -0
- package/lib/components/commonComponents/Slider/index.d.ts +2 -2
- package/lib/components/commonComponents/Slider/index.js +11 -7
- package/lib/components/commonComponents/Slider/index.style.d.ts +1 -7
- package/lib/components/commonComponents/Slider/index.style.js +10 -22
- package/lib/components/commonComponents/SliderSelector/index.js +38 -35
- package/lib/components/commonComponents/SliderSelector/index.style.d.ts +1 -38
- package/lib/components/commonComponents/SliderSelector/index.style.js +20 -37
- package/lib/components/commonComponents/Spinner/index.d.ts +4 -4
- package/lib/components/commonComponents/Spinner/index.js +28 -24
- package/lib/components/commonComponents/Spinner/index.style.d.ts +1 -79
- package/lib/components/commonComponents/Spinner/index.style.js +30 -61
- package/lib/components/commonComponents/Statistic/index.js +7 -3
- package/lib/components/commonComponents/Statistic/index.style.d.ts +1 -15
- package/lib/components/commonComponents/Statistic/index.style.js +14 -26
- package/lib/components/commonComponents/Steps/index.js +10 -6
- package/lib/components/commonComponents/Steps/index.style.d.ts +1 -162
- package/lib/components/commonComponents/Steps/index.style.js +68 -78
- package/lib/components/commonComponents/Switch/index.js +14 -11
- package/lib/components/commonComponents/Switch/index.style.d.ts +1 -25
- package/lib/components/commonComponents/Switch/index.style.js +22 -33
- package/lib/components/commonComponents/Table/demo/demo1.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo2.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo3.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo4.js +1 -9
- package/lib/components/commonComponents/Table/index.d.ts +1 -1
- package/lib/components/commonComponents/Table/index.js +11 -7
- package/lib/components/commonComponents/Table/index.style.d.ts +1 -52
- package/lib/components/commonComponents/Table/index.style.js +34 -32
- package/lib/components/commonComponents/Tabs/index.js +37 -29
- package/lib/components/commonComponents/Tabs/index.style.d.ts +1 -55
- package/lib/components/commonComponents/Tabs/index.style.js +38 -44
- package/lib/components/commonComponents/Tag/index.js +13 -9
- package/lib/components/commonComponents/Tag/index.style.d.ts +1 -56
- package/lib/components/commonComponents/Tag/index.style.js +54 -58
- package/lib/components/commonComponents/TimePicker/index.js +36 -30
- package/lib/components/commonComponents/TimePicker/index.style.d.ts +1 -71
- package/lib/components/commonComponents/TimePicker/index.style.js +54 -50
- package/lib/components/commonComponents/Tooltip/index.js +14 -10
- package/lib/components/commonComponents/Tooltip/index.style.d.ts +1 -24
- package/lib/components/commonComponents/Tooltip/index.style.js +26 -32
- package/lib/components/commonComponents/Upload/index.js +15 -9
- package/lib/components/commonComponents/Upload/index.style.d.ts +1 -125
- package/lib/components/commonComponents/Upload/index.style.js +80 -90
- package/lib/components/commonComponents/Video/Control.d.ts +19 -0
- package/lib/components/commonComponents/Video/Control.js +104 -0
- package/lib/components/commonComponents/Video/demo/demo1.d.ts +2 -0
- package/lib/components/commonComponents/Video/demo/demo1.js +12 -0
- package/lib/components/commonComponents/Video/index.d.ts +18 -0
- package/lib/components/commonComponents/Video/index.js +222 -0
- package/lib/components/commonComponents/Video/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Video/index.style.js +40 -0
- package/lib/i18n/strings/en-US.json +3 -1
- package/lib/i18n/strings/zh-CN.json +3 -1
- package/lib/index.d.ts +5 -4
- package/lib/index.js +3 -2
- package/lib/libs/createStyle/index.d.ts +7 -1
- package/lib/libs/createStyle/index.js +24 -72
- package/lib/libs/env/index.js +1 -1
- package/lib/libs/generateCssVars/index.js +1 -1
- package/package.json +3 -3
- package/lib/components/commonComponents/Popconfirm/demo/demo.js +0 -155
- package/lib/components/commonComponents/Slider/slider.input.js +0 -76
- package/lib/components/commonComponents/spark.style.d.ts +0 -45
- package/lib/components/commonComponents/spark.style.js +0 -62
- package/llms/all.llms.txt +0 -4235
- package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +0 -74
- package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +0 -71
- package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +0 -61
- package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +0 -89
- package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +0 -99
- package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +0 -79
- package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +0 -88
- package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +0 -34
- package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +0 -76
- package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +0 -75
- package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +0 -227
- package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +0 -60
- package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +0 -87
- package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +0 -87
- package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +0 -100
- package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +0 -70
- package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +0 -383
- package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +0 -68
- package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +0 -118
- package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +0 -168
- package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +0 -66
- package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +0 -114
- package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +0 -154
- package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +0 -118
- package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +0 -62
- package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +0 -56
- package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +0 -64
- package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +0 -75
- package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +0 -94
- package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +0 -63
- package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +0 -120
- package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +0 -71
- package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +0 -83
- package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +0 -38
- package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +0 -77
- package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +0 -82
- package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +0 -58
- package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +0 -228
- package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +0 -95
- package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +0 -57
- package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +0 -104
- package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +0 -63
- package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +0 -105
- package/llms/index.llms.txt +0 -45
- /package/lib/components/commonComponents/Popconfirm/demo/{demo.d.ts → demo1.d.ts} +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../libs/createStyle";
|
|
4
|
+
export var useTooltipStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-tooltip {\n .", "-tooltip-inner {\n border: 1px solid var(--", "-color-border-secondary);\n box-shadow: var(--", "-box-shadow);\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
});
|
|
13
|
+
export default useTooltipStyle;
|
|
@@ -73,7 +73,7 @@ token, darkMode) {
|
|
|
73
73
|
borderRadiusLG: 0,
|
|
74
74
|
// Alert 不要圆角
|
|
75
75
|
defaultPadding: '8px 20px',
|
|
76
|
-
fontSize:
|
|
76
|
+
fontSize: 12,
|
|
77
77
|
// @ts-ignore
|
|
78
78
|
lineHeight: '20px'
|
|
79
79
|
},
|
|
@@ -183,7 +183,13 @@ token, darkMode) {
|
|
|
183
183
|
verticalContentPaddingBottom: 24
|
|
184
184
|
},
|
|
185
185
|
Switch: {
|
|
186
|
-
handleBg: token.colorBgContainer
|
|
186
|
+
handleBg: token.colorBgContainer,
|
|
187
|
+
trackHeight: 24,
|
|
188
|
+
handleSize: 20,
|
|
189
|
+
trackHeightSM: 20,
|
|
190
|
+
handleSizeSM: 16,
|
|
191
|
+
trackMinWidth: 44,
|
|
192
|
+
trackMinWidthSM: 32
|
|
187
193
|
}
|
|
188
194
|
}
|
|
189
195
|
},
|
|
@@ -1,86 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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, Select, Switch } from "../../../..";
|
|
8
|
-
import { Flex, Space } from 'antd';
|
|
9
|
-
import React, { useState } from 'react';
|
|
1
|
+
import { Button } from "../../../..";
|
|
2
|
+
import React from 'react';
|
|
10
3
|
import AlertDialog from '..';
|
|
11
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
5
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
6
|
var App = function App() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
setDanger = _useState6[1];
|
|
27
|
-
var showModal = function showModal() {
|
|
28
|
-
setOpen(true);
|
|
29
|
-
};
|
|
30
|
-
var handleOk = function handleOk() {
|
|
31
|
-
setOpen(false);
|
|
32
|
-
};
|
|
33
|
-
var handleCancel = function handleCancel() {
|
|
34
|
-
setOpen(false);
|
|
35
|
-
};
|
|
36
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
37
|
-
children: [/*#__PURE__*/_jsxs(Flex, {
|
|
38
|
-
vertical: true,
|
|
39
|
-
gap: 10,
|
|
40
|
-
children: [/*#__PURE__*/_jsxs(Space, {
|
|
41
|
-
children: [/*#__PURE__*/_jsx(Select, {
|
|
42
|
-
style: {
|
|
43
|
-
width: 200
|
|
44
|
-
},
|
|
45
|
-
value: type,
|
|
46
|
-
options: [{
|
|
47
|
-
label: 'success',
|
|
48
|
-
value: 'success'
|
|
49
|
-
}, {
|
|
50
|
-
label: 'error',
|
|
51
|
-
value: 'error'
|
|
52
|
-
}, {
|
|
53
|
-
label: 'warning',
|
|
54
|
-
value: 'warning'
|
|
55
|
-
}, {
|
|
56
|
-
label: 'info',
|
|
57
|
-
value: 'info'
|
|
58
|
-
}],
|
|
59
|
-
onSelect: function onSelect(value) {
|
|
60
|
-
return setType(value);
|
|
61
|
-
}
|
|
62
|
-
}), /*#__PURE__*/_jsx(Switch, {
|
|
63
|
-
value: danger,
|
|
64
|
-
onChange: setDanger,
|
|
65
|
-
label: "danger"
|
|
66
|
-
})]
|
|
67
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
68
|
-
type: "primary",
|
|
69
|
-
onClick: showModal,
|
|
70
|
-
style: {
|
|
71
|
-
width: 100
|
|
72
|
-
},
|
|
73
|
-
children: "Open Modal"
|
|
74
|
-
})]
|
|
75
|
-
}), /*#__PURE__*/_jsx(AlertDialog, {
|
|
76
|
-
type: type,
|
|
77
|
-
title: "Basic Modal",
|
|
78
|
-
open: open,
|
|
79
|
-
onOk: handleOk,
|
|
80
|
-
onCancel: handleCancel,
|
|
81
|
-
danger: danger,
|
|
82
|
-
children: "I am a description of a component, I am a description of a component."
|
|
83
|
-
})]
|
|
7
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
8
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
9
|
+
onClick: function onClick() {
|
|
10
|
+
return AlertDialog.info({
|
|
11
|
+
title: 'Title here',
|
|
12
|
+
children: 'This information content passed into this AlertDialog.',
|
|
13
|
+
centered: true
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
children: "Open AlertDialog(Info)"
|
|
17
|
+
})
|
|
84
18
|
});
|
|
85
19
|
};
|
|
86
20
|
export default App;
|
|
@@ -1,70 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 { AlertDialog, Button, Select, Switch } from "../../../..";
|
|
8
|
-
import { Flex, Space } from 'antd';
|
|
9
|
-
import React, { useState } from 'react';
|
|
1
|
+
import { Button } from "../../../..";
|
|
2
|
+
import { Flex } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import AlertDialog from '..';
|
|
10
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
7
|
var App = function App() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
type: "primary",
|
|
55
|
-
onClick: function onClick() {
|
|
56
|
-
AlertDialog[type]({
|
|
57
|
-
title: 'Basic Modal',
|
|
58
|
-
danger: danger,
|
|
59
|
-
children: 'I am a description of a component, I am a description of a component.'
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
style: {
|
|
63
|
-
width: 100
|
|
64
|
-
},
|
|
65
|
-
children: "Open Modal"
|
|
66
|
-
})]
|
|
67
|
-
})
|
|
8
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
9
|
+
vertical: true,
|
|
10
|
+
gap: 24,
|
|
11
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
12
|
+
onClick: function onClick() {
|
|
13
|
+
return AlertDialog.success({
|
|
14
|
+
title: 'Title here',
|
|
15
|
+
children: 'This information content passed into this AlertDialog.',
|
|
16
|
+
centered: true
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
children: "Success"
|
|
20
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
21
|
+
onClick: function onClick() {
|
|
22
|
+
return AlertDialog.warning({
|
|
23
|
+
title: 'Title here',
|
|
24
|
+
children: 'This information content passed into this AlertDialog.',
|
|
25
|
+
centered: true
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
children: "Warning"
|
|
29
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
30
|
+
onClick: function onClick() {
|
|
31
|
+
return AlertDialog.error({
|
|
32
|
+
title: 'Title here',
|
|
33
|
+
children: 'This information content passed into this AlertDialog.',
|
|
34
|
+
centered: true
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
children: "Error"
|
|
38
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
39
|
+
onClick: function onClick() {
|
|
40
|
+
return AlertDialog.confirm({
|
|
41
|
+
title: 'Title here',
|
|
42
|
+
children: 'This information content passed into this AlertDialog.',
|
|
43
|
+
centered: true
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
children: "Confirm"
|
|
47
|
+
})]
|
|
68
48
|
});
|
|
69
49
|
};
|
|
70
50
|
export default App;
|
|
@@ -3,15 +3,27 @@ import { SyntheticEvent } from 'react';
|
|
|
3
3
|
export interface AlertDialogProps extends ModalProps {
|
|
4
4
|
/**
|
|
5
5
|
* @description 类型
|
|
6
|
+
* @descriptionEn type
|
|
6
7
|
* @default info
|
|
7
8
|
*/
|
|
8
|
-
type?: 'success' | 'info' | 'warning' | 'error';
|
|
9
|
+
type?: 'success' | 'info' | 'warning' | 'error' | 'confirm';
|
|
9
10
|
/**
|
|
10
11
|
* @description 确认按钮是否带有danger属性
|
|
12
|
+
* @descriptionEn whether the confirm button has a danger property
|
|
11
13
|
* @default false
|
|
12
14
|
*/
|
|
13
15
|
danger?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @description 内容
|
|
18
|
+
* @descriptionEn content
|
|
19
|
+
* @default -
|
|
20
|
+
*/
|
|
14
21
|
content?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* @description 关闭时触发的回调函数
|
|
24
|
+
* @descriptionEn callback function triggered when closed
|
|
25
|
+
* @default -
|
|
26
|
+
*/
|
|
15
27
|
onClose?: (e: SyntheticEvent<Element, Event>) => any;
|
|
16
28
|
}
|
|
17
29
|
type AlertDialogStaticProps = Omit<AlertDialogProps, 'type' | 'open'>;
|
|
@@ -21,5 +33,6 @@ declare const _default: {
|
|
|
21
33
|
info: (props?: AlertDialogStaticProps) => void;
|
|
22
34
|
warning: (props?: AlertDialogStaticProps) => void;
|
|
23
35
|
error: (props?: AlertDialogStaticProps) => void;
|
|
36
|
+
confirm: (props?: AlertDialogStaticProps) => void;
|
|
24
37
|
};
|
|
25
38
|
export default _default;
|
|
@@ -12,9 +12,10 @@ import { CheckCircleOutlined, CloseCircleOutlined, ExclamationCircleOutlined, In
|
|
|
12
12
|
import { Flex, Modal } from 'antd';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { getCommonConfig } from "../../../config";
|
|
15
|
-
import
|
|
15
|
+
import { useStyle } from "./index.style";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
19
|
var getCommonProps = function getCommonProps(props) {
|
|
19
20
|
var renderTitle = function renderTitle(_ref) {
|
|
20
21
|
var type = _ref.type,
|
|
@@ -36,6 +37,7 @@ var getCommonProps = function getCommonProps(props) {
|
|
|
36
37
|
}), title]
|
|
37
38
|
});
|
|
38
39
|
case 'warning':
|
|
40
|
+
case 'confirm':
|
|
39
41
|
return /*#__PURE__*/_jsxs(Flex, {
|
|
40
42
|
align: "center",
|
|
41
43
|
gap: 8,
|
|
@@ -102,7 +104,7 @@ var getCommonProps = function getCommonProps(props) {
|
|
|
102
104
|
title: title
|
|
103
105
|
}),
|
|
104
106
|
okButtonProps: {
|
|
105
|
-
danger: type === 'error' || danger
|
|
107
|
+
danger: type === 'error' || type === 'warning' || danger
|
|
106
108
|
},
|
|
107
109
|
destroyOnClose: true,
|
|
108
110
|
className: classNames(className, 'animate-in', "".concat(getCommonConfig().sparkPrefix, "-alert-dialog")),
|
|
@@ -112,28 +114,34 @@ var getCommonProps = function getCommonProps(props) {
|
|
|
112
114
|
};
|
|
113
115
|
var AlertDialog = function AlertDialog(props) {
|
|
114
116
|
var commonProps = getCommonProps(props);
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
117
|
+
var Style = useStyle();
|
|
118
|
+
// useIndexStyle();
|
|
119
|
+
|
|
120
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
121
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
|
|
122
|
+
width: commonProps.width,
|
|
123
|
+
transitionName: ""
|
|
124
|
+
}, commonProps.restProps), {}, {
|
|
125
|
+
closeIcon: null,
|
|
126
|
+
title: commonProps.title,
|
|
127
|
+
okButtonProps: commonProps.okButtonProps || {},
|
|
128
|
+
destroyOnClose: commonProps.destroyOnClose,
|
|
129
|
+
className: commonProps.className,
|
|
130
|
+
children: commonProps.content || commonProps.children
|
|
131
|
+
}))]
|
|
132
|
+
});
|
|
127
133
|
};
|
|
128
|
-
var staticFns = ['success', 'info', 'warning', 'error'];
|
|
134
|
+
var staticFns = ['success', 'info', 'warning', 'error', 'confirm'];
|
|
129
135
|
staticFns.forEach(function (type) {
|
|
130
136
|
AlertDialog[type] = function (props) {
|
|
131
137
|
var commonProps = getCommonProps(_objectSpread(_objectSpread({}, props), {}, {
|
|
132
138
|
type: type
|
|
133
139
|
}));
|
|
134
140
|
function Content() {
|
|
135
|
-
|
|
136
|
-
return
|
|
141
|
+
var Style = useStyle();
|
|
142
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
143
|
+
children: [/*#__PURE__*/_jsx(Style, {}), commonProps.content]
|
|
144
|
+
});
|
|
137
145
|
}
|
|
138
146
|
|
|
139
147
|
// @ts-ignore
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
[x: string]: {
|
|
3
|
-
[x: string]: {
|
|
4
|
-
padding: string;
|
|
5
|
-
fontSize: string;
|
|
6
|
-
color: string;
|
|
7
|
-
maxWidth?: undefined;
|
|
8
|
-
} | {
|
|
9
|
-
maxWidth: string;
|
|
10
|
-
padding?: undefined;
|
|
11
|
-
fontSize?: undefined;
|
|
12
|
-
color?: undefined;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
|
|
17
|
-
export default useIndexStyle;
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
padding: '0 0 12px 32px',
|
|
18
|
-
fontSize: '14px',
|
|
19
|
-
color: "var(--".concat(antPrefix, "-color-text-secondary)")
|
|
20
|
-
}), ".".concat(antPrefix, "-modal-confirm-paragraph"), {
|
|
21
|
-
maxWidth: '100%'
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
var useIndexStyle = createStyle(function (_ref2) {
|
|
25
|
-
var css = _ref2.css,
|
|
26
|
-
params = _objectWithoutProperties(_ref2, _excluded);
|
|
27
|
-
var result = css(getIndexStyleData(params));
|
|
28
|
-
return result;
|
|
29
|
-
});
|
|
30
|
-
export default useIndexStyle;
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-alert-dialog {\n .", "-modal-body {\n padding: 0 0 12px 32px;\n font-size: 14px;\n color: var(--", "-color-text-secondary);\n }\n\n .", "-modal-confirm-content {\n padding: 0 0 12px 32px;\n font-size: 14px;\n color: var(--", "-color-text-secondary);\n }\n\n .", "-modal-confirm-paragraph {\n max-width: 100%;\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.sparkPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.antPrefix;
|
|
14
|
+
}, function (p) {
|
|
15
|
+
return p.antPrefix;
|
|
16
|
+
});
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Anchor } from "../../../..";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
/**
|
|
5
|
-
* Anchor 锚点组件演示
|
|
6
|
-
* 根据 masterGo DSL 实现的垂直方向锚点导航
|
|
7
|
-
*/
|
|
8
4
|
var Demo1 = function Demo1() {
|
|
9
5
|
var items = [{
|
|
10
6
|
key: 'anchor-item-1',
|
|
@@ -20,6 +16,9 @@ var Demo1 = function Demo1() {
|
|
|
20
16
|
title: 'Anchor item'
|
|
21
17
|
}];
|
|
22
18
|
return /*#__PURE__*/_jsx(Anchor, {
|
|
19
|
+
onClick: function onClick(e) {
|
|
20
|
+
return e.preventDefault();
|
|
21
|
+
},
|
|
23
22
|
direction: "vertical",
|
|
24
23
|
items: items
|
|
25
24
|
});
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Anchor } from "../../../..";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Anchor 锚点组件演示
|
|
6
|
-
* 根据 masterGo DSL 实现的垂直方向锚点导航
|
|
7
|
-
*/
|
|
8
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
4
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
5
|
var Demo1 = function Demo1() {
|
|
@@ -23,6 +18,9 @@ var Demo1 = function Demo1() {
|
|
|
23
18
|
}];
|
|
24
19
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
25
20
|
children: /*#__PURE__*/_jsx(Anchor, {
|
|
21
|
+
onClick: function onClick(e) {
|
|
22
|
+
return e.preventDefault();
|
|
23
|
+
},
|
|
26
24
|
direction: "horizontal",
|
|
27
25
|
items: items
|
|
28
26
|
})
|
|
@@ -6,10 +6,14 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
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
7
|
import { Anchor } from 'antd';
|
|
8
8
|
import { forwardRef } from 'react';
|
|
9
|
-
import
|
|
9
|
+
import { useStyle } from "./index.style";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
13
|
var SparkAnchor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/
|
|
14
|
+
var Style = useStyle();
|
|
15
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
16
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Anchor, _objectSpread({}, props))]
|
|
17
|
+
});
|
|
14
18
|
});
|
|
15
19
|
export default SparkAnchor;
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
[x: string]: {
|
|
3
|
-
color: string;
|
|
4
|
-
lineHeight: string;
|
|
5
|
-
padding: string;
|
|
6
|
-
} | {
|
|
7
|
-
[x: string]: number;
|
|
8
|
-
color?: undefined;
|
|
9
|
-
lineHeight?: undefined;
|
|
10
|
-
padding?: undefined;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
|
|
14
|
-
export default useIndexStyle;
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
params = _objectWithoutProperties(_ref2, _excluded);
|
|
20
|
-
var result = css(getIndexStyleData(params));
|
|
21
|
-
return result;
|
|
22
|
-
});
|
|
23
|
-
export default useIndexStyle;
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n.", "-anchor-wrapper .", "-anchor .", "-anchor-link-title {\n color: var(--", "-color-text-secondary);\n line-height: 32px;\n padding: 0 16px;\n}\n\n.", "-anchor-link {\n --", "-anchor-link-padding-block: 0;\n --", "-anchor-link-padding-inline-start: 0;\n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.antPrefix;
|
|
14
|
+
}, function (p) {
|
|
15
|
+
return p.antPrefix;
|
|
16
|
+
}, function (p) {
|
|
17
|
+
return p.antPrefix;
|
|
18
|
+
});
|
|
@@ -15,10 +15,12 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
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
16
|
import { Avatar } from 'antd';
|
|
17
17
|
import { forwardRef, useEffect, useState } from 'react';
|
|
18
|
-
import
|
|
18
|
+
import { useStyle } from "./index.style";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
22
|
var SparkAvatar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
|
-
|
|
23
|
+
var Style = useStyle();
|
|
22
24
|
var children = props.children,
|
|
23
25
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
24
26
|
var _useState = useState(props.children),
|
|
@@ -32,10 +34,12 @@ var SparkAvatar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
32
34
|
}
|
|
33
35
|
setModifiedChildren(children);
|
|
34
36
|
}, [children]);
|
|
35
|
-
return /*#__PURE__*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
38
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Avatar, _objectSpread(_objectSpread({
|
|
39
|
+
ref: ref
|
|
40
|
+
}, restProps), {}, {
|
|
41
|
+
children: modifiedChildren
|
|
42
|
+
}))]
|
|
43
|
+
});
|
|
40
44
|
});
|
|
41
45
|
export default SparkAvatar;
|