@agentscope-ai/design 1.0.16 → 1.0.18
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/button.style.js +13 -1
- package/lib/antd/styles/index.style.js +3 -1
- package/lib/antd/styles/tree.style.d.ts +6 -0
- package/lib/antd/styles/tree.style.js +18 -0
- package/lib/antd/themes/bailianDarkTheme.json +3 -1
- package/lib/antd/themes/bailianTheme.json +4 -2
- package/lib/antd/themes/carbonDarkTheme.json +3 -1
- package/lib/antd/themes/carbonTheme.json +3 -1
- package/lib/antd/themes/generateTheme.js +30 -29
- package/lib/components/commonComponents/Audio/Control.d.ts +53 -0
- package/lib/components/commonComponents/{Video → Audio}/Control.js +18 -15
- package/lib/components/commonComponents/Audio/Control.style.d.ts +1 -0
- package/lib/components/commonComponents/Audio/Control.style.js +14 -0
- package/lib/components/commonComponents/Audio/demo/demo1.d.ts +2 -0
- package/lib/components/commonComponents/Audio/demo/demo1.js +11 -0
- package/lib/components/commonComponents/Audio/index.d.ts +10 -0
- package/lib/components/commonComponents/Audio/index.js +164 -0
- package/lib/components/commonComponents/Audio/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Audio/index.style.js +10 -0
- package/lib/components/commonComponents/Button/demo/demo1.js +7 -0
- package/lib/components/commonComponents/Button/index.js +2 -1
- package/lib/components/commonComponents/CollapsePanel/demo/demo1.js +6 -6
- package/lib/components/commonComponents/CollapsePanel/index.js +4 -4
- package/lib/components/commonComponents/EllipsisTip/index.d.ts +8 -1
- package/lib/components/commonComponents/EllipsisTip/index.js +33 -3
- package/lib/components/commonComponents/Empty/index.d.ts +6 -0
- package/lib/components/commonComponents/Empty/index.js +22 -7
- package/lib/components/commonComponents/Empty/index.style.js +1 -1
- package/lib/components/commonComponents/Pagination/index.js +33 -42
- package/lib/components/commonComponents/Pagination/index.style.js +1 -1
- package/lib/components/commonComponents/PromptsEditor/VarRender.js +1 -1
- package/lib/components/commonComponents/SliderSelector/index.d.ts +1 -1
- package/lib/components/commonComponents/SliderSelector/index.js +8 -4
- package/lib/components/commonComponents/Steps/index.js +2 -1
- package/lib/components/commonComponents/Steps/index.style.js +5 -1
- package/lib/components/commonComponents/Table/index.style.js +27 -1
- package/lib/components/commonComponents/Tabs/index.js +9 -8
- package/lib/components/commonComponents/Tooltip/demo/demo3.d.ts +3 -0
- package/lib/components/commonComponents/Tooltip/demo/demo3.js +25 -0
- package/lib/components/commonComponents/Tooltip/index.d.ts +7 -1
- package/lib/components/commonComponents/Tooltip/index.js +12 -1
- package/lib/components/commonComponents/Tooltip/index.style.js +1 -1
- package/lib/components/commonComponents/Video/index.d.ts +5 -6
- package/lib/components/commonComponents/Video/index.js +14 -9
- package/lib/components/commonComponents/Video/index.style.js +2 -4
- package/lib/components/mobileComponents/MobileDrawer/index.style.js +7 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +1 -0
- package/lib/typings.d.ts +12 -0
- package/llms/all.llms.txt +889 -1772
- package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +1 -0
- package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +2 -1
- package/llms/index.llms.txt +47 -47
- package/package.json +4 -4
- package/scripts/mcp-docs-server.js +4 -4
- package/lib/components/commonComponents/Video/Control.d.ts +0 -19
- package/llms/docs/guide/fromAntd.zh-CN.llms.txt +0 -156
- package/llms/docs/guide/fromScratch.zh-CN.llms.txt +0 -83
- package/llms/docs/guide/iconfont.zh-CN.llms.txt +0 -69
- package/llms/docs/guide/overview.zh-CN.llms.txt +0 -51
- package/llms/docs/guide/theme.zh-CN.llms.txt +0 -61
- package/llms/docs/guide/tokens&variables.zh-CN.llms.txt +0 -425
- package/llms/docs/guide/vibe-coding.zh-CN.llms.txt +0 -29
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import createGlobalStyle from "../../libs/createStyle";
|
|
4
|
-
export var useButtonStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n/* \u53D6\u6D88\u6240\u6709button\u7684boxShadow */\nbutton[type=\"button\"].", "-btn {\n font-weight: 500;\n padding-inline: 11px;\n \n span[data-spark-icon] {\n /* @agentscope-ai/icons\u7684\u7279\u6B8A\u903B\u8F91 */\n font-size: 20px;\n }\n \n &.", "-btn-sm {\n padding-inline: 7px;\n \n span[data-spark-icon] {\n /* @agentscope-ai/icons\u7684\u7279\u6B8A\u903B\u8F91 */\n font-size: 16px;\n }\n }\n \n &.", "-btn-lg {\n span[data-spark-icon] {\n /* @agentscope-ai/icons\u7684\u7279\u6B8A\u903B\u8F91 */\n font-size: 24px;\n }\n }\n}\n\n.", "-btn-default {\n border-color: var(--", "-color-border-secondary);\n}\n\n.", "-btn-textCompact:hover {\n color: var(--", "-color-text-tertiary) !important;\n}\n\n.", "-btn.", "-btn-default.", "-btn-dangerous:not(:disabled):not(.", "-btn-disabled) {\n border-color: transparent;\n background-color: var(--", "-color-error-bg);\n color: var(--", "-color-error);\n \n &:hover {\n background-color: var(--", "-color-error-bg-hover);\n border-color: transparent;\n color: var(--", "-color-error-hover);\n }\n}\n\n.", "-btn-color-dangerous.", "-btn-variant-solid:disabled,\n.", "-btn-color-dangerous.", "-btn-variant-solid.", "-btn-disabled {\n border-color: transparent;\n background-color: var(--", "-color-fill-disable);\n color: var(--", "-color-text-white);\n}\n\n.", "-btn-primary:disabled {\n background: var(--", "-color-fill-disable);\n color: var(--", "-color-text-white);\n border-color: transparent;\n}\n\n.", "-btn-default:disabled {\n background: var(--", "-color-bg-base);\n color: var(--", "-color-text-tertiary);\n border-color: var(--", "-color-border-secondary);\n}\n"])), function (p) {
|
|
4
|
+
export var useButtonStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n/* \u53D6\u6D88\u6240\u6709button\u7684boxShadow */\nbutton[type=\"button\"].", "-btn {\n font-weight: 500;\n padding-inline: 11px;\n \n span[data-spark-icon] {\n /* @agentscope-ai/icons\u7684\u7279\u6B8A\u903B\u8F91 */\n font-size: 20px;\n }\n \n &.", "-btn-sm {\n padding-inline: 7px;\n \n span[data-spark-icon] {\n /* @agentscope-ai/icons\u7684\u7279\u6B8A\u903B\u8F91 */\n font-size: 16px;\n }\n }\n \n &.", "-btn-lg {\n span[data-spark-icon] {\n /* @agentscope-ai/icons\u7684\u7279\u6B8A\u903B\u8F91 */\n font-size: 24px;\n }\n }\n}\n\n.", "-btn-default {\n border-color: var(--", "-color-border-secondary);\n}\n\n.", "-btn-textCompact:hover {\n color: var(--", "-color-text-tertiary) !important;\n}\n\n.", "-btn.", "-btn-default.", "-btn-dangerous:not(:disabled):not(.", "-btn-disabled) {\n border-color: transparent;\n background-color: var(--", "-color-error-bg);\n color: var(--", "-color-error);\n \n &:hover {\n background-color: var(--", "-color-error-bg-hover);\n border-color: transparent;\n color: var(--", "-color-error-hover);\n }\n}\n\n.", "-btn-color-dangerous.", "-btn-variant-solid:disabled,\n.", "-btn-color-dangerous.", "-btn-variant-solid.", "-btn-disabled {\n border-color: transparent;\n background-color: var(--", "-color-fill-disable);\n color: var(--", "-color-text-white);\n}\n\n.", "-btn-primary {\n color: var(--", "-color-text-on-primary);\n}\n.", "-btn-primary.", "-btn-variant-solid:not(:disabled):not(.", "-btn-disabled):hover {\n color: var(--", "-color-text-on-primary);\n}\n\n.", "-btn-primary:disabled {\n background: var(--", "-color-fill-disable);\n color: var(--", "-color-text-white);\n border-color: transparent;\n}\n\n.", "-btn-default:disabled {\n background: var(--", "-color-bg-base);\n color: var(--", "-color-text-tertiary);\n border-color: var(--", "-color-border-secondary);\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) {
|
|
5
17
|
return p.antPrefix;
|
|
6
18
|
}, function (p) {
|
|
7
19
|
return p.antPrefix;
|
|
@@ -19,6 +19,7 @@ import { useSelectStyle } from "./select.style";
|
|
|
19
19
|
import { useSliderStyle } from "./slider.style";
|
|
20
20
|
import { useTableStyle } from "./table.style";
|
|
21
21
|
import { useTooltipStyle } from "./tooltip.style";
|
|
22
|
+
import { useTreeStyle } from "./tree.style";
|
|
22
23
|
|
|
23
24
|
// 基础动画样式
|
|
24
25
|
var useBaseStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* \u5B9A\u4E49\u52A8\u753B\u5173\u952E\u5E27 */\n @keyframes fadeInUp {\n 0% {\n opacity: 0;\n transform: translateY(32px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n /* animate-in \u52A8\u753B\u7C7B */\n .animate-in {\n opacity: 0;\n transform: translateY(32px);\n animation: fadeInUp 0.4s ease forwards;\n }\n"])));
|
|
@@ -42,10 +43,11 @@ export var useIndexStyle = function useIndexStyle() {
|
|
|
42
43
|
var SliderStyle = useSliderStyle();
|
|
43
44
|
var TableStyle = useTableStyle();
|
|
44
45
|
var TooltipStyle = useTooltipStyle();
|
|
46
|
+
var TreeStyle = useTreeStyle();
|
|
45
47
|
|
|
46
48
|
// 返回组合组件
|
|
47
49
|
return function IndexStyleComponent() {
|
|
48
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseStyle), /*#__PURE__*/React.createElement(AlertStyle), /*#__PURE__*/React.createElement(BreadcrumbStyle), /*#__PURE__*/React.createElement(ButtonStyle), /*#__PURE__*/React.createElement(DropdownStyle), /*#__PURE__*/React.createElement(FloatButtonStyle), /*#__PURE__*/React.createElement(InputNumberStyle), /*#__PURE__*/React.createElement(MessageStyle), /*#__PURE__*/React.createElement(NotificationStyle), /*#__PURE__*/React.createElement(PopoverStyle), /*#__PURE__*/React.createElement(RadioStyle), /*#__PURE__*/React.createElement(SegmentStyle), /*#__PURE__*/React.createElement(SelectStyle), /*#__PURE__*/React.createElement(SliderStyle), /*#__PURE__*/React.createElement(TableStyle), /*#__PURE__*/React.createElement(TooltipStyle));
|
|
50
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseStyle), /*#__PURE__*/React.createElement(AlertStyle), /*#__PURE__*/React.createElement(BreadcrumbStyle), /*#__PURE__*/React.createElement(ButtonStyle), /*#__PURE__*/React.createElement(DropdownStyle), /*#__PURE__*/React.createElement(FloatButtonStyle), /*#__PURE__*/React.createElement(InputNumberStyle), /*#__PURE__*/React.createElement(MessageStyle), /*#__PURE__*/React.createElement(NotificationStyle), /*#__PURE__*/React.createElement(PopoverStyle), /*#__PURE__*/React.createElement(RadioStyle), /*#__PURE__*/React.createElement(SegmentStyle), /*#__PURE__*/React.createElement(SelectStyle), /*#__PURE__*/React.createElement(SliderStyle), /*#__PURE__*/React.createElement(TableStyle), /*#__PURE__*/React.createElement(TooltipStyle), /*#__PURE__*/React.createElement(TreeStyle));
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Tree 组件全局样式
|
|
7
|
+
* - 节点间距 gap: 8px
|
|
8
|
+
*/
|
|
9
|
+
export var useTreeStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-tree .", "-tree-treenode {\n margin-bottom: 8px;\n}\n\n.", "-tree .", "-tree-treenode:last-child {\n margin-bottom: 0;\n}\n"])), function (p) {
|
|
10
|
+
return p.antPrefix;
|
|
11
|
+
}, function (p) {
|
|
12
|
+
return p.antPrefix;
|
|
13
|
+
}, function (p) {
|
|
14
|
+
return p.antPrefix;
|
|
15
|
+
}, function (p) {
|
|
16
|
+
return p.antPrefix;
|
|
17
|
+
});
|
|
18
|
+
export default useTreeStyle;
|
|
@@ -61,7 +61,9 @@
|
|
|
61
61
|
"colorLink": "#5551CC",
|
|
62
62
|
"boxShadow": "0px 4px 6px 0px rgba(255, 255, 255, 0.08)",
|
|
63
63
|
"boxShadowSecondary": "0px 12px 24px -16px rgba(255, 255, 255, 0.04),0px 8px 40px 0px rgba(255, 255, 255, 0.06),0px 0px 1px 0px rgba(255, 255, 255, 0.02)",
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
"colorTextWhite": "#fff",
|
|
66
|
+
"colorTextOnPrimary": "#fff",
|
|
65
67
|
"colorFillDisable": "#8D8C98",
|
|
66
68
|
"colorPurple": "#5551CC",
|
|
67
69
|
"colorPurpleHover": "#8383F0",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"borderRadiusXL": 12,
|
|
7
7
|
"borderRadiusFull": 999,
|
|
8
8
|
"wireframe": false,
|
|
9
|
-
"colorPrimaryBg": "
|
|
9
|
+
"colorPrimaryBg": "rgba(97, 92, 237, 0.08)",
|
|
10
10
|
"colorPrimaryBgHover": "#F2F0FF",
|
|
11
11
|
"colorPrimaryBorder": "#E2DEFF",
|
|
12
12
|
"colorPrimaryBorderHover": "#BCB5FF",
|
|
@@ -61,7 +61,9 @@
|
|
|
61
61
|
"colorLink": "#615CED",
|
|
62
62
|
"boxShadow": "0px 4px 6px 0px rgba(0, 0, 0, 0.08)",
|
|
63
63
|
"boxShadowSecondary": "0px 12px 24px -16px rgba(0, 0, 0, 0.06),0px 8px 40px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
"colorTextWhite": "#ffffff",
|
|
66
|
+
"colorTextOnPrimary": "#ffffff",
|
|
65
67
|
"colorFillDisable": "#DBDAE7",
|
|
66
68
|
"colorPurple": "#615CED",
|
|
67
69
|
"colorPurpleHover": "#8080FF",
|
|
@@ -61,7 +61,9 @@
|
|
|
61
61
|
"colorLink": "#4D7DFF",
|
|
62
62
|
"boxShadow": "0px 4px 6px 0px rgba(255, 255, 255, 0.08)",
|
|
63
63
|
"boxShadowSecondary": "0px 12px 24px -16px rgba(255, 255, 255, 0.06),0px 8px 40px 0px rgba(255, 255, 255, 0.12),0px 0px 1px 0px rgba(255, 255, 255, 0.04)",
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
"colorTextWhite": "#ffffff",
|
|
66
|
+
"colorTextOnPrimary": "#000000",
|
|
65
67
|
"colorFillDisable": "#898989",
|
|
66
68
|
"colorPurple": "#615CED",
|
|
67
69
|
"colorPurpleHover": "#8383F0",
|
|
@@ -61,7 +61,9 @@
|
|
|
61
61
|
"colorLink": "rgba(0, 77, 255, 1)",
|
|
62
62
|
"boxShadow": "0px 4px 6px 0px rgba(0, 0, 0, 0.08)",
|
|
63
63
|
"boxShadowSecondary": "0px 12px 24px -16px rgba(0, 0, 0, 0.06),0px 8px 40px 0px rgba(0, 0, 0, 0.12),0px 0px 1px 0px rgba(0, 0, 0, 0.04)",
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
"colorTextWhite": "#ffffff",
|
|
66
|
+
"colorTextOnPrimary": "#ffffff",
|
|
65
67
|
"colorFillDisable": "rgba(232, 232, 235, 1)",
|
|
66
68
|
"colorPurple": "rgba(97, 92, 237, 1)",
|
|
67
69
|
"colorPurpleHover": "#8080FF",
|
|
@@ -48,11 +48,11 @@ var rgbToHex = function rgbToHex(r, g, b) {
|
|
|
48
48
|
* RGB 转 HSL
|
|
49
49
|
*/
|
|
50
50
|
var rgbToHsl = function rgbToHsl(r, g, b) {
|
|
51
|
-
r
|
|
52
|
-
g
|
|
53
|
-
b
|
|
54
|
-
var max = Math.max(
|
|
55
|
-
min = Math.min(
|
|
51
|
+
var rr = r / 255;
|
|
52
|
+
var gg = g / 255;
|
|
53
|
+
var bb = b / 255;
|
|
54
|
+
var max = Math.max(rr, gg, bb),
|
|
55
|
+
min = Math.min(rr, gg, bb);
|
|
56
56
|
var h,
|
|
57
57
|
s,
|
|
58
58
|
l = (max + min) / 2;
|
|
@@ -62,14 +62,14 @@ var rgbToHsl = function rgbToHsl(r, g, b) {
|
|
|
62
62
|
var d = max - min;
|
|
63
63
|
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
64
64
|
switch (max) {
|
|
65
|
-
case
|
|
66
|
-
h = ((
|
|
65
|
+
case rr:
|
|
66
|
+
h = ((gg - bb) / d + (gg < bb ? 6 : 0)) / 6;
|
|
67
67
|
break;
|
|
68
|
-
case
|
|
69
|
-
h = ((
|
|
68
|
+
case gg:
|
|
69
|
+
h = ((bb - rr) / d + 2) / 6;
|
|
70
70
|
break;
|
|
71
|
-
case
|
|
72
|
-
h = ((
|
|
71
|
+
case bb:
|
|
72
|
+
h = ((rr - gg) / d + 4) / 6;
|
|
73
73
|
break;
|
|
74
74
|
default:
|
|
75
75
|
h = 0;
|
|
@@ -86,26 +86,27 @@ var rgbToHsl = function rgbToHsl(r, g, b) {
|
|
|
86
86
|
* HSL 转 RGB
|
|
87
87
|
*/
|
|
88
88
|
var hslToRgb = function hslToRgb(h, s, l) {
|
|
89
|
-
h
|
|
90
|
-
s
|
|
91
|
-
l
|
|
89
|
+
var hh = h / 360;
|
|
90
|
+
var ss = s / 100;
|
|
91
|
+
var ll = l / 100;
|
|
92
92
|
var r, g, b;
|
|
93
|
-
if (
|
|
94
|
-
r = g = b =
|
|
93
|
+
if (ss === 0) {
|
|
94
|
+
r = g = b = ll;
|
|
95
95
|
} else {
|
|
96
96
|
var hue2rgb = function hue2rgb(p, q, t) {
|
|
97
|
-
|
|
98
|
-
if (
|
|
99
|
-
if (
|
|
97
|
+
var tt = t;
|
|
98
|
+
if (tt < 0) tt += 1;
|
|
99
|
+
if (tt > 1) tt -= 1;
|
|
100
|
+
if (tt < 1 / 6) return p + (q - p) * 6 * tt;
|
|
100
101
|
if (t < 1 / 2) return q;
|
|
101
|
-
if (
|
|
102
|
+
if (tt < 2 / 3) return p + (q - p) * (2 / 3 - tt) * 6;
|
|
102
103
|
return p;
|
|
103
104
|
};
|
|
104
|
-
var q =
|
|
105
|
-
var p = 2 *
|
|
106
|
-
r = hue2rgb(p, q,
|
|
107
|
-
g = hue2rgb(p, q,
|
|
108
|
-
b = hue2rgb(p, q,
|
|
105
|
+
var q = ll < 0.5 ? ll * (1 + ss) : ll + ss - ll * ss;
|
|
106
|
+
var p = 2 * ll - q;
|
|
107
|
+
r = hue2rgb(p, q, hh + 1 / 3);
|
|
108
|
+
g = hue2rgb(p, q, hh);
|
|
109
|
+
b = hue2rgb(p, q, hh - 1 / 3);
|
|
109
110
|
}
|
|
110
111
|
return {
|
|
111
112
|
r: Math.round(r * 255),
|
|
@@ -177,15 +178,15 @@ var generateTheme = function generateTheme(_ref) {
|
|
|
177
178
|
textBaseHex = _ref.textBaseHex,
|
|
178
179
|
_ref$darkMode = _ref.darkMode,
|
|
179
180
|
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode;
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
var resolvedBgBaseHex = bgBaseHex || (darkMode ? '#000000' : '#ffffff');
|
|
182
|
+
var resolvedTextBaseHex = textBaseHex || (darkMode ? '#E7E7ED' : '#1a1a1a');
|
|
182
183
|
var rgb = hexToRgb(primaryHex);
|
|
183
184
|
if (!rgb) return null;
|
|
184
185
|
var hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);
|
|
185
186
|
|
|
186
187
|
// 获取背景色和文本色的 RGB 和 HSL
|
|
187
|
-
var bgBaseRgb = hexToRgb(
|
|
188
|
-
var textBaseRgb = hexToRgb(
|
|
188
|
+
var bgBaseRgb = hexToRgb(resolvedBgBaseHex);
|
|
189
|
+
var textBaseRgb = hexToRgb(resolvedTextBaseHex);
|
|
189
190
|
var bgBaseHsl = bgBaseRgb ? rgbToHsl(bgBaseRgb.r, bgBaseRgb.g, bgBaseRgb.b) : {
|
|
190
191
|
h: 210,
|
|
191
192
|
s: 8,
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface MediaPlayerControllerProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description 是否正在播放
|
|
5
|
+
*/
|
|
6
|
+
isPlaying: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @description 类名
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @description 当前时间,单位为秒
|
|
13
|
+
*/
|
|
14
|
+
currentTime?: number;
|
|
15
|
+
/**
|
|
16
|
+
* @description 总时间,单位为秒
|
|
17
|
+
*/
|
|
18
|
+
duration?: number;
|
|
19
|
+
/**
|
|
20
|
+
* @description 是否启用音量控制
|
|
21
|
+
*/
|
|
22
|
+
enableVolume?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @description 是否启用全屏控制
|
|
25
|
+
*/
|
|
26
|
+
enableFullscreen?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @description 是否静音
|
|
29
|
+
*/
|
|
30
|
+
muted?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* @description 静音回调
|
|
33
|
+
*/
|
|
34
|
+
onMute?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* @description 播放/暂停回调
|
|
37
|
+
*/
|
|
38
|
+
onPlayPause?: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* @description 全屏回调
|
|
41
|
+
*/
|
|
42
|
+
onFullscreen?: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* @description 点击进度条回调,参数为目标时间
|
|
45
|
+
*/
|
|
46
|
+
onProgressClick?: (time: number) => void;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 视频播放器控制器组件
|
|
50
|
+
* 包含播放/暂停、音量控制、进度条、时间显示和全屏按钮
|
|
51
|
+
*/
|
|
52
|
+
declare const MediaPlayerController: React.FC<MediaPlayerControllerProps>;
|
|
53
|
+
export default MediaPlayerController;
|
|
@@ -2,6 +2,7 @@ import { getCommonConfig } from "../../../config";
|
|
|
2
2
|
import { IconButton, Progress } from "../../..";
|
|
3
3
|
import { SparkEnlargeLine, SparkMuteLine, SparkPauseFill, SparkPlayFill, SparkVolumeLine } from '@agentscope-ai/icons';
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
|
+
import { useStyle } from "./Control.style";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -20,17 +21,19 @@ var formatTime = function formatTime(seconds) {
|
|
|
20
21
|
* 视频播放器控制器组件
|
|
21
22
|
* 包含播放/暂停、音量控制、进度条、时间显示和全屏按钮
|
|
22
23
|
*/
|
|
23
|
-
var
|
|
24
|
+
var MediaPlayerController = function MediaPlayerController(props) {
|
|
24
25
|
var className = props.className,
|
|
25
26
|
isPlaying = props.isPlaying,
|
|
26
27
|
onPlayPause = props.onPlayPause,
|
|
27
28
|
onFullscreen = props.onFullscreen,
|
|
28
29
|
onProgressClick = props.onProgressClick,
|
|
29
|
-
_props$
|
|
30
|
-
|
|
30
|
+
_props$enableVolume = props.enableVolume,
|
|
31
|
+
enableVolume = _props$enableVolume === void 0 ? false : _props$enableVolume,
|
|
32
|
+
enableFullscreen = props.enableFullscreen,
|
|
31
33
|
_props$muted = props.muted,
|
|
32
34
|
muted = _props$muted === void 0 ? true : _props$muted,
|
|
33
35
|
onMute = props.onMute;
|
|
36
|
+
var Style = useStyle();
|
|
34
37
|
var commonConfig = getCommonConfig();
|
|
35
38
|
var sparkPrefix = commonConfig.sparkPrefix;
|
|
36
39
|
var currentTime = useMemo(function () {
|
|
@@ -59,9 +62,9 @@ var VideoPlayerController = function VideoPlayerController(props) {
|
|
|
59
62
|
var clampedTime = Math.max(0, Math.min(targetTime, props.duration));
|
|
60
63
|
onProgressClick(clampedTime);
|
|
61
64
|
};
|
|
62
|
-
return /*#__PURE__*/
|
|
63
|
-
children: /*#__PURE__*/_jsxs("div", {
|
|
64
|
-
className: "".concat(sparkPrefix, "-
|
|
65
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
66
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
|
|
67
|
+
className: "".concat(sparkPrefix, "-media-player-controller ").concat(className || ''),
|
|
65
68
|
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
66
69
|
bordered: false,
|
|
67
70
|
size: "small",
|
|
@@ -73,24 +76,24 @@ var VideoPlayerController = function VideoPlayerController(props) {
|
|
|
73
76
|
bordered: false,
|
|
74
77
|
size: "small",
|
|
75
78
|
shape: "default",
|
|
76
|
-
disabled: !
|
|
77
|
-
icon:
|
|
79
|
+
disabled: !enableVolume,
|
|
80
|
+
icon: enableVolume && muted ? /*#__PURE__*/_jsx(SparkMuteLine, {}) : /*#__PURE__*/_jsx(SparkVolumeLine, {}),
|
|
78
81
|
onClick: onMute
|
|
79
82
|
}), /*#__PURE__*/_jsx("span", {
|
|
80
|
-
className: "".concat(sparkPrefix, "-
|
|
83
|
+
className: "".concat(sparkPrefix, "-media-time-text"),
|
|
81
84
|
children: currentTime
|
|
82
85
|
}), /*#__PURE__*/_jsx("div", {
|
|
83
|
-
className: "".concat(sparkPrefix, "-
|
|
86
|
+
className: "".concat(sparkPrefix, "-media-progress-container"),
|
|
84
87
|
onClick: handleProgressClick,
|
|
85
88
|
children: /*#__PURE__*/_jsx(Progress, {
|
|
86
|
-
className: "".concat(sparkPrefix, "-
|
|
89
|
+
className: "".concat(sparkPrefix, "-media-progress-bar"),
|
|
87
90
|
percent: progress,
|
|
88
91
|
showInfo: false
|
|
89
92
|
})
|
|
90
93
|
}), /*#__PURE__*/_jsx("span", {
|
|
91
|
-
className: "".concat(sparkPrefix, "-
|
|
94
|
+
className: "".concat(sparkPrefix, "-media-time-text"),
|
|
92
95
|
children: duration
|
|
93
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
|
96
|
+
}), enableFullscreen && /*#__PURE__*/_jsx(IconButton, {
|
|
94
97
|
bordered: false,
|
|
95
98
|
size: "small",
|
|
96
99
|
shape: "default",
|
|
@@ -98,7 +101,7 @@ var VideoPlayerController = function VideoPlayerController(props) {
|
|
|
98
101
|
icon: /*#__PURE__*/_jsx(SparkEnlargeLine, {}),
|
|
99
102
|
onClick: onFullscreen
|
|
100
103
|
})]
|
|
101
|
-
})
|
|
104
|
+
})]
|
|
102
105
|
});
|
|
103
106
|
};
|
|
104
|
-
export default
|
|
107
|
+
export default MediaPlayerController;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.", "-media-player-controller {\n display: flex;\n padding: 8px;\n gap: 8px;\n align-items: center;\n width: 100%;\n height: 40px;\n overflow: hidden;\n}\n\n// \u65F6\u95F4\u6587\u672C\u6837\u5F0F\n.", "-media-time-text {\n flex-grow: 0;\n font-size: 12px;\n line-height: 20px;\n}\n\n// \u8FDB\u5EA6\u6761\u5BB9\u5668\u6837\u5F0F\n.", "-media-progress-container {\n flex-grow: 1;\n cursor: pointer;\n}\n\n// \u8FDB\u5EA6\u6761\u6837\u5F0F\n.", "-media-progress-bar {\n width: 100%;\n\n .", "-progress-bg {\n transition-duration: 0s;\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.sparkPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.sparkPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.sparkPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.sparkPrefix;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.antPrefix;
|
|
14
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Audio } from "../../../..";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export default (function () {
|
|
4
|
+
return /*#__PURE__*/_jsx(Audio, {
|
|
5
|
+
src: "https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/qwen3-tts/KiKi.wav",
|
|
6
|
+
style: {
|
|
7
|
+
width: '100%',
|
|
8
|
+
height: '100%'
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type NativeAudioProps = React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
|
|
3
|
+
export interface AudioProps extends NativeAudioProps {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 音频播放器组件
|
|
7
|
+
* 包含播放/暂停、音量控制、进度条和时间显示
|
|
8
|
+
*/
|
|
9
|
+
declare const Audio: React.ForwardRefExoticComponent<Omit<AudioProps, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
10
|
+
export default Audio;
|
|
@@ -0,0 +1,164 @@
|
|
|
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 = ["controls", "className", "style"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
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."); }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
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
|
+
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
|
+
import React, { forwardRef, useEffect, useState, useRef } from 'react';
|
|
17
|
+
import classNames from 'classnames';
|
|
18
|
+
import MediaPlayerController from "./Control";
|
|
19
|
+
import { useControllableValue } from 'ahooks';
|
|
20
|
+
import { getCommonConfig } from "../../../config";
|
|
21
|
+
import { useStyle } from "./index.style";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
25
|
+
/**
|
|
26
|
+
* 音频播放器组件
|
|
27
|
+
* 包含播放/暂停、音量控制、进度条和时间显示
|
|
28
|
+
*/
|
|
29
|
+
var Audio = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
30
|
+
var controls = props.controls,
|
|
31
|
+
className = props.className,
|
|
32
|
+
style = props.style,
|
|
33
|
+
audioProps = _objectWithoutProperties(props, _excluded);
|
|
34
|
+
var commonConfig = getCommonConfig();
|
|
35
|
+
var sparkPrefix = commonConfig.sparkPrefix;
|
|
36
|
+
var Style = useStyle();
|
|
37
|
+
var _useState = useState(0),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
currentTime = _useState2[0],
|
|
40
|
+
setCurrentTime = _useState2[1];
|
|
41
|
+
var _useState3 = useState(0),
|
|
42
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
43
|
+
duration = _useState4[0],
|
|
44
|
+
setDuration = _useState4[1];
|
|
45
|
+
var _useState5 = useState(false),
|
|
46
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
47
|
+
isPlaying = _useState6[0],
|
|
48
|
+
setIsPlaying = _useState6[1];
|
|
49
|
+
var _useControllableValue = useControllableValue(props, {
|
|
50
|
+
valuePropName: 'muted',
|
|
51
|
+
trigger: 'onMutedChange',
|
|
52
|
+
defaultValue: false
|
|
53
|
+
}),
|
|
54
|
+
_useControllableValue2 = _slicedToArray(_useControllableValue, 2),
|
|
55
|
+
muted = _useControllableValue2[0],
|
|
56
|
+
setMuted = _useControllableValue2[1];
|
|
57
|
+
var audioRef = useRef(null);
|
|
58
|
+
|
|
59
|
+
// 合并refs
|
|
60
|
+
var combinedRef = function combinedRef(element) {
|
|
61
|
+
audioRef.current = element;
|
|
62
|
+
if (ref) {
|
|
63
|
+
if (typeof ref === 'function') {
|
|
64
|
+
ref(element);
|
|
65
|
+
} else {
|
|
66
|
+
ref.current = element;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// 监听isPlaying状态来控制定时器
|
|
72
|
+
useEffect(function () {
|
|
73
|
+
var clock;
|
|
74
|
+
if (isPlaying) {
|
|
75
|
+
// 启动定时器
|
|
76
|
+
clock = setInterval(function () {
|
|
77
|
+
if (audioRef.current) {
|
|
78
|
+
setCurrentTime(audioRef.current.currentTime);
|
|
79
|
+
}
|
|
80
|
+
}, 16); // 每16ms更新一次,提供流畅的时间显示
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 清理函数
|
|
84
|
+
return function () {
|
|
85
|
+
if (clock) {
|
|
86
|
+
clearInterval(clock);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}, [isPlaying]);
|
|
90
|
+
|
|
91
|
+
// 音频加载完成处理
|
|
92
|
+
var handleLoadedMetadata = function handleLoadedMetadata() {
|
|
93
|
+
if (audioRef.current) {
|
|
94
|
+
setDuration(audioRef.current.duration);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// 播放/暂停切换
|
|
99
|
+
var handlePlayPause = function handlePlayPause() {
|
|
100
|
+
if (audioRef.current) {
|
|
101
|
+
if (isPlaying) {
|
|
102
|
+
audioRef.current.pause();
|
|
103
|
+
} else {
|
|
104
|
+
audioRef.current.play();
|
|
105
|
+
}
|
|
106
|
+
setIsPlaying(!isPlaying);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// 处理播放事件
|
|
111
|
+
var handlePlay = function handlePlay() {
|
|
112
|
+
setIsPlaying(true);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// 处理暂停事件
|
|
116
|
+
var handlePause = function handlePause() {
|
|
117
|
+
setIsPlaying(false);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// 处理播放结束事件
|
|
121
|
+
var handleEnded = function handleEnded() {
|
|
122
|
+
var _audioRef$current;
|
|
123
|
+
setIsPlaying(false);
|
|
124
|
+
setCurrentTime(((_audioRef$current = audioRef.current) === null || _audioRef$current === void 0 ? void 0 : _audioRef$current.duration) || 0);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// 处理进度条点击事件
|
|
128
|
+
var handleProgressClick = function handleProgressClick(time) {
|
|
129
|
+
if (audioRef.current) {
|
|
130
|
+
audioRef.current.currentTime = time;
|
|
131
|
+
setCurrentTime(time);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
135
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
|
|
136
|
+
className: classNames("".concat(sparkPrefix, "-audio-container"), className),
|
|
137
|
+
style: style,
|
|
138
|
+
children: [/*#__PURE__*/_jsx("audio", _objectSpread(_objectSpread({
|
|
139
|
+
ref: combinedRef
|
|
140
|
+
}, audioProps), {}, {
|
|
141
|
+
muted: muted,
|
|
142
|
+
className: "".concat(sparkPrefix, "-audio-element"),
|
|
143
|
+
onLoadedMetadata: handleLoadedMetadata,
|
|
144
|
+
onPlay: handlePlay,
|
|
145
|
+
onPause: handlePause,
|
|
146
|
+
onEnded: handleEnded
|
|
147
|
+
})), /*#__PURE__*/_jsx(MediaPlayerController, {
|
|
148
|
+
className: "".concat(sparkPrefix, "-audio-controller-wrapper"),
|
|
149
|
+
isPlaying: isPlaying,
|
|
150
|
+
currentTime: currentTime,
|
|
151
|
+
duration: duration,
|
|
152
|
+
enableVolume: true,
|
|
153
|
+
enableFullscreen: false,
|
|
154
|
+
muted: muted,
|
|
155
|
+
onMute: function onMute() {
|
|
156
|
+
return setMuted(!muted);
|
|
157
|
+
},
|
|
158
|
+
onPlayPause: handlePlayPause,
|
|
159
|
+
onProgressClick: handleProgressClick
|
|
160
|
+
})]
|
|
161
|
+
})]
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
export default Audio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
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// Audio \u4E3B\u5BB9\u5668\u6837\u5F0F\n.", "-audio-container {\n position: relative;\n box-sizing: border-box;\n}\n\n.", "-audio-element {\n display: none;\n}\n\n.", "-audio-controller-wrapper {\n width: 100%;\n}\n"])), function (p) {
|
|
5
|
+
return p.sparkPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.sparkPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.sparkPrefix;
|
|
10
|
+
});
|
|
@@ -17,6 +17,9 @@ export default (function () {
|
|
|
17
17
|
}), /*#__PURE__*/_jsx(Button, {
|
|
18
18
|
type: "primary",
|
|
19
19
|
children: "Primary"
|
|
20
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
21
|
+
type: "primaryLess",
|
|
22
|
+
children: "PrimaryLess"
|
|
20
23
|
})]
|
|
21
24
|
}), /*#__PURE__*/_jsxs(Flex, {
|
|
22
25
|
gap: 16,
|
|
@@ -32,6 +35,10 @@ export default (function () {
|
|
|
32
35
|
type: "primary",
|
|
33
36
|
disabled: true,
|
|
34
37
|
children: "Primary"
|
|
38
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
39
|
+
type: "primaryLess",
|
|
40
|
+
disabled: true,
|
|
41
|
+
children: "PrimaryLess"
|
|
35
42
|
})]
|
|
36
43
|
})]
|
|
37
44
|
});
|
|
@@ -82,7 +82,8 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
82
82
|
colorPrimary: token.token.colorSlate,
|
|
83
83
|
// @ts-ignore
|
|
84
84
|
colorPrimaryHover: token.token.colorSlateHover,
|
|
85
|
-
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
colorPrimaryActive: token.token.colorSlate
|
|
86
87
|
}
|
|
87
88
|
},
|
|
88
89
|
children: /*#__PURE__*/_jsx(Tooltip, {
|