@easy-editor/materials-dashboard-progress 0.0.3 → 0.0.5
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/CHANGELOG.md +27 -13
- package/easypack.config.ts +10 -0
- package/package.json +4 -8
- package/src/component.tsx +56 -12
- package/src/configure.ts +168 -265
- package/src/index.tsx +7 -7
- package/src/meta.ts +2 -2
- package/src/snippets.ts +69 -60
- package/tsconfig.json +20 -9
- package/.vite/plugins/vite-plugin-external-deps.ts +0 -224
- package/.vite/plugins/vite-plugin-material-dev.ts +0 -218
- package/dist/component.esm.js +0 -257
- package/dist/component.esm.js.map +0 -1
- package/dist/component.js +0 -265
- package/dist/component.js.map +0 -1
- package/dist/component.min.js +0 -2
- package/dist/component.min.js.map +0 -1
- package/dist/index.cjs +0 -560
- package/dist/index.cjs.map +0 -1
- package/dist/index.esm.js +0 -557
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -564
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/dist/meta.esm.js +0 -304
- package/dist/meta.esm.js.map +0 -1
- package/dist/meta.js +0 -315
- package/dist/meta.js.map +0 -1
- package/dist/meta.min.js +0 -2
- package/dist/meta.min.js.map +0 -1
- package/dist/src/component.d.ts +0 -36
- package/dist/src/configure.d.ts +0 -7
- package/dist/src/constants.d.ts +0 -36
- package/dist/src/index.d.ts +0 -6
- package/dist/src/meta.d.ts +0 -7
- package/dist/src/snippets.d.ts +0 -7
- package/rollup.config.js +0 -212
- package/tsconfig.build.json +0 -12
- package/tsconfig.test.json +0 -7
- package/vite.config.ts +0 -54
package/dist/index.js
DELETED
|
@@ -1,564 +0,0 @@
|
|
|
1
|
-
/* @easy-editor/materials-dashboard-progress v0.0.2 */
|
|
2
|
-
(function (global, factory) {
|
|
3
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react/jsx-runtime')) :
|
|
4
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react/jsx-runtime'], factory) :
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyEditorMaterialsProgress = {}, global.React, global.jsxRuntime));
|
|
6
|
-
})(this, (function (exports, react, jsxRuntime) { 'use strict';
|
|
7
|
-
|
|
8
|
-
function styleInject(css, ref) {
|
|
9
|
-
if (ref === void 0) ref = {};
|
|
10
|
-
var insertAt = ref.insertAt;
|
|
11
|
-
if (typeof document === 'undefined') {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
15
|
-
var style = document.createElement('style');
|
|
16
|
-
style.type = 'text/css';
|
|
17
|
-
if (insertAt === 'top') {
|
|
18
|
-
if (head.firstChild) {
|
|
19
|
-
head.insertBefore(style, head.firstChild);
|
|
20
|
-
} else {
|
|
21
|
-
head.appendChild(style);
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
head.appendChild(style);
|
|
25
|
-
}
|
|
26
|
-
if (style.styleSheet) {
|
|
27
|
-
style.styleSheet.cssText = css;
|
|
28
|
-
} else {
|
|
29
|
-
style.appendChild(document.createTextNode(css));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
var css_248z = ".component-module__container___VbZSk,.component-module__wrapper___IYMoW{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.component-module__container___VbZSk{position:relative}.component-module__ring___QkEHa{transform:rotate(-90deg)}.component-module__centerContent___Ri3R3{align-items:center;display:flex;flex-direction:column;justify-content:center;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%)}.component-module__value___Fg70k{font-weight:700;line-height:1.1}.component-module__label___6IHVo{color:#fff;margin-top:4px;opacity:.7}.component-module__barContainer___AOTls{display:flex;flex-direction:column;gap:4px;height:100%;justify-content:center;width:100%}.component-module__barWrapper___cni-a{border-radius:4px;flex:1;max-height:8px;min-height:8px;overflow:hidden;width:100%}.component-module__barFill___KZkJe{border-radius:4px;height:100%;transition:width .5s ease}.component-module__barLabels___BvaEi{align-items:center;display:flex;justify-content:space-between}.component-module__barLabel___wVaWe{color:hsla(0,0%,100%,.7);font-size:12px}.component-module__barValue___H2muu{font-size:14px;font-weight:600}";
|
|
34
|
-
var styles = {"wrapper":"component-module__wrapper___IYMoW","container":"component-module__container___VbZSk","ring":"component-module__ring___QkEHa","centerContent":"component-module__centerContent___Ri3R3","value":"component-module__value___Fg70k","label":"component-module__label___6IHVo","barContainer":"component-module__barContainer___AOTls","barWrapper":"component-module__barWrapper___cni-a","barFill":"component-module__barFill___KZkJe","barLabels":"component-module__barLabels___BvaEi","barLabel":"component-module__barLabel___wVaWe","barValue":"component-module__barValue___H2muu"};
|
|
35
|
-
styleInject(css_248z);
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Progress Component
|
|
39
|
-
* 进度组件 - 支持环形和线性进度条
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
// 格式化数值
|
|
43
|
-
const formatValue = (value, percentage, valueFormat) => {
|
|
44
|
-
if (valueFormat === 'percent') {
|
|
45
|
-
return `${Math.round(percentage)}%`;
|
|
46
|
-
}
|
|
47
|
-
return `${value}`;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// 环形进度条组件
|
|
51
|
-
const RingProgress = ({
|
|
52
|
-
percentage,
|
|
53
|
-
strokeWidthRatio,
|
|
54
|
-
trackColor,
|
|
55
|
-
progressColor,
|
|
56
|
-
gradientEnable,
|
|
57
|
-
gradientColors,
|
|
58
|
-
showValue,
|
|
59
|
-
showLabel,
|
|
60
|
-
label,
|
|
61
|
-
valueFormat,
|
|
62
|
-
displayColor,
|
|
63
|
-
gradientId
|
|
64
|
-
}) => {
|
|
65
|
-
const containerRef = react.useRef(null);
|
|
66
|
-
const [size, setSize] = react.useState(100);
|
|
67
|
-
react.useEffect(() => {
|
|
68
|
-
const container = containerRef.current;
|
|
69
|
-
if (!container) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const updateSize = () => {
|
|
73
|
-
const {
|
|
74
|
-
width,
|
|
75
|
-
height
|
|
76
|
-
} = container.getBoundingClientRect();
|
|
77
|
-
const minSize = Math.min(width, height);
|
|
78
|
-
if (minSize > 0) {
|
|
79
|
-
setSize(minSize);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
updateSize();
|
|
83
|
-
const resizeObserver = new ResizeObserver(updateSize);
|
|
84
|
-
resizeObserver.observe(container);
|
|
85
|
-
return () => resizeObserver.disconnect();
|
|
86
|
-
}, []);
|
|
87
|
-
const strokeWidth = Math.max(2, size * strokeWidthRatio);
|
|
88
|
-
const radius = (size - strokeWidth) / 2;
|
|
89
|
-
const circumference = 2 * Math.PI * radius;
|
|
90
|
-
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
91
|
-
const center = size / 2;
|
|
92
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
93
|
-
className: styles.container,
|
|
94
|
-
ref: containerRef,
|
|
95
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
96
|
-
"aria-label": "Progress ring",
|
|
97
|
-
className: styles.ring,
|
|
98
|
-
height: size,
|
|
99
|
-
role: "img",
|
|
100
|
-
width: size,
|
|
101
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("title", {
|
|
102
|
-
children: "Progress indicator"
|
|
103
|
-
}), gradientEnable ? /*#__PURE__*/jsxRuntime.jsx("defs", {
|
|
104
|
-
children: /*#__PURE__*/jsxRuntime.jsxs("linearGradient", {
|
|
105
|
-
id: gradientId,
|
|
106
|
-
x1: "0%",
|
|
107
|
-
x2: "100%",
|
|
108
|
-
y1: "0%",
|
|
109
|
-
y2: "0%",
|
|
110
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("stop", {
|
|
111
|
-
offset: "0%",
|
|
112
|
-
stopColor: gradientColors[0]
|
|
113
|
-
}), /*#__PURE__*/jsxRuntime.jsx("stop", {
|
|
114
|
-
offset: "100%",
|
|
115
|
-
stopColor: gradientColors[1]
|
|
116
|
-
})]
|
|
117
|
-
})
|
|
118
|
-
}) : null, /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
119
|
-
cx: center,
|
|
120
|
-
cy: center,
|
|
121
|
-
fill: "none",
|
|
122
|
-
r: radius,
|
|
123
|
-
stroke: trackColor,
|
|
124
|
-
strokeWidth: strokeWidth
|
|
125
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
126
|
-
cx: center,
|
|
127
|
-
cy: center,
|
|
128
|
-
fill: "none",
|
|
129
|
-
r: radius,
|
|
130
|
-
stroke: gradientEnable ? `url(#${gradientId})` : progressColor,
|
|
131
|
-
strokeDasharray: circumference,
|
|
132
|
-
strokeDashoffset: strokeDashoffset,
|
|
133
|
-
strokeLinecap: "round",
|
|
134
|
-
strokeWidth: strokeWidth,
|
|
135
|
-
style: {
|
|
136
|
-
transition: 'stroke-dashoffset 0.5s ease'
|
|
137
|
-
}
|
|
138
|
-
})]
|
|
139
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
140
|
-
className: styles.centerContent,
|
|
141
|
-
children: [showValue ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
142
|
-
className: styles.value,
|
|
143
|
-
style: {
|
|
144
|
-
fontSize: size * 0.2,
|
|
145
|
-
color: displayColor
|
|
146
|
-
},
|
|
147
|
-
children: formatValue(Math.round(percentage), percentage, valueFormat)
|
|
148
|
-
}) : null, showLabel && label ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
149
|
-
className: styles.label,
|
|
150
|
-
style: {
|
|
151
|
-
fontSize: size * 0.1
|
|
152
|
-
},
|
|
153
|
-
children: label
|
|
154
|
-
}) : null]
|
|
155
|
-
})]
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
// 线性进度条组件
|
|
160
|
-
const BarProgress = ({
|
|
161
|
-
percentage,
|
|
162
|
-
trackColor,
|
|
163
|
-
progressColor,
|
|
164
|
-
gradientEnable,
|
|
165
|
-
gradientColors,
|
|
166
|
-
showValue,
|
|
167
|
-
showLabel,
|
|
168
|
-
label,
|
|
169
|
-
valueFormat,
|
|
170
|
-
displayColor
|
|
171
|
-
}) => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
172
|
-
className: styles.barContainer,
|
|
173
|
-
children: [showLabel || showValue ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
174
|
-
className: styles.barLabels,
|
|
175
|
-
children: [showLabel ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
176
|
-
className: styles.barLabel,
|
|
177
|
-
children: label
|
|
178
|
-
}) : null, showValue ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
179
|
-
className: styles.barValue,
|
|
180
|
-
style: {
|
|
181
|
-
color: displayColor
|
|
182
|
-
},
|
|
183
|
-
children: formatValue(Math.round(percentage), percentage, valueFormat)
|
|
184
|
-
}) : null]
|
|
185
|
-
}) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
186
|
-
className: styles.barWrapper,
|
|
187
|
-
style: {
|
|
188
|
-
background: trackColor
|
|
189
|
-
},
|
|
190
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
191
|
-
className: styles.barFill,
|
|
192
|
-
style: {
|
|
193
|
-
width: `${percentage}%`,
|
|
194
|
-
background: gradientEnable ? `linear-gradient(90deg, ${gradientColors[0]}, ${gradientColors[1]})` : progressColor
|
|
195
|
-
}
|
|
196
|
-
})
|
|
197
|
-
})]
|
|
198
|
-
});
|
|
199
|
-
const Progress = ({
|
|
200
|
-
ref,
|
|
201
|
-
value = 0,
|
|
202
|
-
maxValue = 100,
|
|
203
|
-
type = 'ring',
|
|
204
|
-
showValue = true,
|
|
205
|
-
showLabel = false,
|
|
206
|
-
label = '',
|
|
207
|
-
valueFormat = 'percent',
|
|
208
|
-
strokeWidthRatio = 0.07,
|
|
209
|
-
trackColor = 'rgba(26, 26, 62, 0.8)',
|
|
210
|
-
progressColor = '#00d4ff',
|
|
211
|
-
gradientEnable = false,
|
|
212
|
-
gradientColors = ['#00d4ff', '#9b59b6'],
|
|
213
|
-
style: externalStyle
|
|
214
|
-
}) => {
|
|
215
|
-
const gradientId = react.useId();
|
|
216
|
-
const normalizedValue = Math.min(Math.max(value, 0), maxValue);
|
|
217
|
-
const percentage = normalizedValue / maxValue * 100;
|
|
218
|
-
const displayColor = gradientEnable ? gradientColors[0] : progressColor;
|
|
219
|
-
if (type === 'ring') {
|
|
220
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
221
|
-
className: styles.wrapper,
|
|
222
|
-
ref: ref,
|
|
223
|
-
style: externalStyle,
|
|
224
|
-
children: /*#__PURE__*/jsxRuntime.jsx(RingProgress, {
|
|
225
|
-
displayColor: displayColor,
|
|
226
|
-
gradientColors: gradientColors,
|
|
227
|
-
gradientEnable: gradientEnable,
|
|
228
|
-
gradientId: gradientId,
|
|
229
|
-
label: label,
|
|
230
|
-
percentage: percentage,
|
|
231
|
-
progressColor: progressColor,
|
|
232
|
-
showLabel: showLabel,
|
|
233
|
-
showValue: showValue,
|
|
234
|
-
strokeWidthRatio: strokeWidthRatio,
|
|
235
|
-
trackColor: trackColor,
|
|
236
|
-
valueFormat: valueFormat
|
|
237
|
-
})
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
241
|
-
className: styles.wrapper,
|
|
242
|
-
ref: ref,
|
|
243
|
-
style: externalStyle,
|
|
244
|
-
children: /*#__PURE__*/jsxRuntime.jsx(BarProgress, {
|
|
245
|
-
displayColor: displayColor,
|
|
246
|
-
gradientColors: gradientColors,
|
|
247
|
-
gradientEnable: gradientEnable,
|
|
248
|
-
label: label,
|
|
249
|
-
percentage: percentage,
|
|
250
|
-
progressColor: progressColor,
|
|
251
|
-
showLabel: showLabel,
|
|
252
|
-
showValue: showValue,
|
|
253
|
-
trackColor: trackColor,
|
|
254
|
-
valueFormat: valueFormat
|
|
255
|
-
})
|
|
256
|
-
});
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
const MaterialGroup = {
|
|
260
|
-
DISPLAY: 'display'};
|
|
261
|
-
|
|
262
|
-
const COMPONENT_NAME = 'EasyEditorMaterialsProgress';
|
|
263
|
-
const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress';
|
|
264
|
-
|
|
265
|
-
const configure = {
|
|
266
|
-
props: [{
|
|
267
|
-
type: 'group',
|
|
268
|
-
title: '属性',
|
|
269
|
-
setter: 'TabSetter',
|
|
270
|
-
items: [{
|
|
271
|
-
type: 'group',
|
|
272
|
-
key: 'config',
|
|
273
|
-
title: '配置',
|
|
274
|
-
setter: {
|
|
275
|
-
componentName: 'CollapseSetter',
|
|
276
|
-
props: {
|
|
277
|
-
icon: false
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
items: [
|
|
281
|
-
{
|
|
282
|
-
name: 'id',
|
|
283
|
-
title: 'ID',
|
|
284
|
-
setter: 'NodeIdSetter',
|
|
285
|
-
extraProps: {
|
|
286
|
-
label: false
|
|
287
|
-
}
|
|
288
|
-
}, {
|
|
289
|
-
name: 'title',
|
|
290
|
-
title: '标题',
|
|
291
|
-
setter: 'StringSetter',
|
|
292
|
-
extraProps: {
|
|
293
|
-
getValue(target) {
|
|
294
|
-
return target.getExtraPropValue('title');
|
|
295
|
-
},
|
|
296
|
-
setValue(target, value) {
|
|
297
|
-
target.setExtraPropValue('title', value);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}, {
|
|
301
|
-
type: 'group',
|
|
302
|
-
title: '基础属性',
|
|
303
|
-
setter: {
|
|
304
|
-
componentName: 'CollapseSetter',
|
|
305
|
-
props: {
|
|
306
|
-
icon: false
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
items: [{
|
|
310
|
-
name: 'rect',
|
|
311
|
-
title: '位置尺寸',
|
|
312
|
-
setter: 'RectSetter',
|
|
313
|
-
extraProps: {
|
|
314
|
-
getValue(target) {
|
|
315
|
-
return target.getExtraPropValue('$dashboard.rect');
|
|
316
|
-
},
|
|
317
|
-
setValue(target, value) {
|
|
318
|
-
target.setExtraPropValue('$dashboard.rect', value);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}]
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
type: 'group',
|
|
325
|
-
title: '数值',
|
|
326
|
-
setter: {
|
|
327
|
-
componentName: 'CollapseSetter',
|
|
328
|
-
props: {
|
|
329
|
-
icon: false
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
items: [{
|
|
333
|
-
name: 'value',
|
|
334
|
-
title: '当前值',
|
|
335
|
-
setter: 'NumberSetter',
|
|
336
|
-
extraProps: {
|
|
337
|
-
defaultValue: 0
|
|
338
|
-
}
|
|
339
|
-
}, {
|
|
340
|
-
name: 'maxValue',
|
|
341
|
-
title: '最大值',
|
|
342
|
-
setter: 'NumberSetter',
|
|
343
|
-
extraProps: {
|
|
344
|
-
defaultValue: 100
|
|
345
|
-
}
|
|
346
|
-
}, {
|
|
347
|
-
name: 'valueFormat',
|
|
348
|
-
title: '值格式',
|
|
349
|
-
setter: {
|
|
350
|
-
componentName: 'SelectSetter',
|
|
351
|
-
props: {
|
|
352
|
-
options: [{
|
|
353
|
-
label: '百分比',
|
|
354
|
-
value: 'percent'
|
|
355
|
-
}, {
|
|
356
|
-
label: '数值',
|
|
357
|
-
value: 'number'
|
|
358
|
-
}]
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
extraProps: {
|
|
362
|
-
defaultValue: 'percent'
|
|
363
|
-
}
|
|
364
|
-
}]
|
|
365
|
-
}, {
|
|
366
|
-
type: 'group',
|
|
367
|
-
title: '显示',
|
|
368
|
-
setter: {
|
|
369
|
-
componentName: 'CollapseSetter',
|
|
370
|
-
props: {
|
|
371
|
-
icon: false
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
items: [{
|
|
375
|
-
name: 'type',
|
|
376
|
-
title: '进度条类型',
|
|
377
|
-
setter: {
|
|
378
|
-
componentName: 'SelectSetter',
|
|
379
|
-
props: {
|
|
380
|
-
options: [{
|
|
381
|
-
label: '环形',
|
|
382
|
-
value: 'ring'
|
|
383
|
-
}, {
|
|
384
|
-
label: '线性',
|
|
385
|
-
value: 'bar'
|
|
386
|
-
}]
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
extraProps: {
|
|
390
|
-
defaultValue: 'ring'
|
|
391
|
-
}
|
|
392
|
-
}, {
|
|
393
|
-
name: 'showValue',
|
|
394
|
-
title: '显示数值',
|
|
395
|
-
setter: 'SwitchSetter',
|
|
396
|
-
extraProps: {
|
|
397
|
-
defaultValue: true
|
|
398
|
-
}
|
|
399
|
-
}, {
|
|
400
|
-
name: 'showLabel',
|
|
401
|
-
title: '显示标签',
|
|
402
|
-
setter: 'SwitchSetter',
|
|
403
|
-
extraProps: {
|
|
404
|
-
defaultValue: false
|
|
405
|
-
}
|
|
406
|
-
}, {
|
|
407
|
-
name: 'label',
|
|
408
|
-
title: '标签文本',
|
|
409
|
-
setter: 'StringSetter'
|
|
410
|
-
}]
|
|
411
|
-
}, {
|
|
412
|
-
type: 'group',
|
|
413
|
-
title: '样式',
|
|
414
|
-
setter: {
|
|
415
|
-
componentName: 'CollapseSetter',
|
|
416
|
-
props: {
|
|
417
|
-
icon: false
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
items: [{
|
|
421
|
-
name: 'strokeWidthRatio',
|
|
422
|
-
title: '线条粗细',
|
|
423
|
-
setter: {
|
|
424
|
-
componentName: 'SliderSetter',
|
|
425
|
-
props: {
|
|
426
|
-
min: 0.02,
|
|
427
|
-
max: 0.2,
|
|
428
|
-
step: 0.01
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
|
-
extraProps: {
|
|
432
|
-
defaultValue: 0.07
|
|
433
|
-
}
|
|
434
|
-
}, {
|
|
435
|
-
name: 'trackColor',
|
|
436
|
-
title: '轨道颜色',
|
|
437
|
-
setter: 'ColorSetter',
|
|
438
|
-
extraProps: {
|
|
439
|
-
defaultValue: 'rgba(255, 255, 255, 0.1)'
|
|
440
|
-
}
|
|
441
|
-
}, {
|
|
442
|
-
name: 'progressColor',
|
|
443
|
-
title: '进度颜色',
|
|
444
|
-
setter: 'ColorSetter',
|
|
445
|
-
extraProps: {
|
|
446
|
-
defaultValue: '#00ffff'
|
|
447
|
-
}
|
|
448
|
-
}, {
|
|
449
|
-
name: 'gradientEnable',
|
|
450
|
-
title: '启用渐变',
|
|
451
|
-
setter: 'SwitchSetter',
|
|
452
|
-
extraProps: {
|
|
453
|
-
defaultValue: false
|
|
454
|
-
}
|
|
455
|
-
}, {
|
|
456
|
-
name: 'gradientColors',
|
|
457
|
-
title: '渐变颜色',
|
|
458
|
-
setter: 'ColorSetter',
|
|
459
|
-
extraProps: {
|
|
460
|
-
defaultValue: ['#00d4ff', '#9b59b6']
|
|
461
|
-
}
|
|
462
|
-
}]
|
|
463
|
-
}]
|
|
464
|
-
}, {
|
|
465
|
-
type: 'group',
|
|
466
|
-
key: 'data',
|
|
467
|
-
title: '数据',
|
|
468
|
-
items: [{
|
|
469
|
-
name: 'dataBinding',
|
|
470
|
-
title: '数据绑定',
|
|
471
|
-
setter: 'DataBindingSetter'
|
|
472
|
-
}]
|
|
473
|
-
}, {
|
|
474
|
-
type: 'group',
|
|
475
|
-
key: 'advanced',
|
|
476
|
-
title: '高级',
|
|
477
|
-
items: [{
|
|
478
|
-
name: 'condition',
|
|
479
|
-
title: '显隐控制',
|
|
480
|
-
setter: 'SwitchSetter',
|
|
481
|
-
extraProps: {
|
|
482
|
-
defaultValue: true,
|
|
483
|
-
supportVariable: true
|
|
484
|
-
}
|
|
485
|
-
}]
|
|
486
|
-
}]
|
|
487
|
-
}],
|
|
488
|
-
component: {},
|
|
489
|
-
supports: {},
|
|
490
|
-
advanced: {}
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
const snippets = [{
|
|
494
|
-
title: '进度环',
|
|
495
|
-
screenshot: '',
|
|
496
|
-
schema: {
|
|
497
|
-
componentName: COMPONENT_NAME,
|
|
498
|
-
props: {
|
|
499
|
-
value: 75,
|
|
500
|
-
maxValue: 100,
|
|
501
|
-
type: 'ring',
|
|
502
|
-
showValue: true,
|
|
503
|
-
showLabel: false,
|
|
504
|
-
valueFormat: 'percent',
|
|
505
|
-
strokeWidthRatio: 0.07,
|
|
506
|
-
progressColor: '#00ffff'
|
|
507
|
-
},
|
|
508
|
-
$dashboard: {
|
|
509
|
-
rect: {
|
|
510
|
-
width: 140,
|
|
511
|
-
height: 140
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}, {
|
|
516
|
-
title: '线性进度条',
|
|
517
|
-
screenshot: '',
|
|
518
|
-
schema: {
|
|
519
|
-
componentName: COMPONENT_NAME,
|
|
520
|
-
props: {
|
|
521
|
-
value: 85,
|
|
522
|
-
maxValue: 100,
|
|
523
|
-
type: 'bar',
|
|
524
|
-
showValue: true,
|
|
525
|
-
showLabel: true,
|
|
526
|
-
label: '完成率',
|
|
527
|
-
valueFormat: 'percent',
|
|
528
|
-
progressColor: '#00ff88',
|
|
529
|
-
gradientEnable: true,
|
|
530
|
-
gradientColors: ['#00ff88', '#00d4ff']
|
|
531
|
-
},
|
|
532
|
-
$dashboard: {
|
|
533
|
-
rect: {
|
|
534
|
-
width: 300,
|
|
535
|
-
height: 50
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}];
|
|
540
|
-
|
|
541
|
-
var version = "0.0.2";
|
|
542
|
-
var pkg = {
|
|
543
|
-
version: version};
|
|
544
|
-
|
|
545
|
-
const meta = {
|
|
546
|
-
componentName: COMPONENT_NAME,
|
|
547
|
-
title: '进度条',
|
|
548
|
-
group: MaterialGroup.DISPLAY,
|
|
549
|
-
devMode: 'proCode',
|
|
550
|
-
npm: {
|
|
551
|
-
package: PACKAGE_NAME,
|
|
552
|
-
version: pkg.version,
|
|
553
|
-
globalName: COMPONENT_NAME,
|
|
554
|
-
componentName: COMPONENT_NAME
|
|
555
|
-
},
|
|
556
|
-
snippets,
|
|
557
|
-
configure
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
exports.component = Progress;
|
|
561
|
-
exports.meta = meta;
|
|
562
|
-
|
|
563
|
-
}));
|
|
564
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/component.tsx","../../../../shared/src/index.ts","../src/constants.ts","../src/configure.ts","../src/snippets.ts","../src/meta.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * Progress Component\n * 进度组件 - 支持环形和线性进度条\n */\n\nimport { useId, useRef, useEffect, useState, type CSSProperties, type Ref } from 'react'\nimport styles from './component.module.css'\n\nexport interface ProgressProps {\n ref?: Ref<HTMLDivElement>\n /** 当前值 */\n value?: number\n /** 最大值 */\n maxValue?: number\n /** 进度条类型 */\n type?: 'ring' | 'bar'\n /** 是否显示数值 */\n showValue?: boolean\n /** 是否显示标签 */\n showLabel?: boolean\n /** 标签文本 */\n label?: string\n /** 数值格式 */\n valueFormat?: 'percent' | 'number'\n /** 线条宽度比例(相对于尺寸的百分比) */\n strokeWidthRatio?: number\n /** 轨道颜色 */\n trackColor?: string\n /** 进度颜色 */\n progressColor?: string\n /** 是否启用渐变 */\n gradientEnable?: boolean\n /** 渐变颜色 [起始色, 结束色] */\n gradientColors?: [string, string]\n /** 外部样式 */\n style?: CSSProperties\n}\n\n// 格式化数值\nconst formatValue = (value: number, percentage: number, valueFormat: string): string => {\n if (valueFormat === 'percent') {\n return `${Math.round(percentage)}%`\n }\n return `${value}`\n}\n\n// 环形进度条组件\nconst RingProgress = ({\n percentage,\n strokeWidthRatio,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n gradientId,\n}: {\n percentage: number\n strokeWidthRatio: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n gradientId: string\n}) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [size, setSize] = useState(100)\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) {\n return\n }\n\n const updateSize = () => {\n const { width, height } = container.getBoundingClientRect()\n const minSize = Math.min(width, height)\n if (minSize > 0) {\n setSize(minSize)\n }\n }\n\n updateSize()\n\n const resizeObserver = new ResizeObserver(updateSize)\n resizeObserver.observe(container)\n\n return () => resizeObserver.disconnect()\n }, [])\n\n const strokeWidth = Math.max(2, size * strokeWidthRatio)\n const radius = (size - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const strokeDashoffset = circumference - (percentage / 100) * circumference\n const center = size / 2\n\n return (\n <div className={styles.container} ref={containerRef}>\n <svg aria-label='Progress ring' className={styles.ring} height={size} role='img' width={size}>\n <title>Progress indicator</title>\n {gradientEnable ? (\n <defs>\n <linearGradient id={gradientId} x1='0%' x2='100%' y1='0%' y2='0%'>\n <stop offset='0%' stopColor={gradientColors[0]} />\n <stop offset='100%' stopColor={gradientColors[1]} />\n </linearGradient>\n </defs>\n ) : null}\n {/* 轨道 */}\n <circle cx={center} cy={center} fill='none' r={radius} stroke={trackColor} strokeWidth={strokeWidth} />\n {/* 进度 */}\n <circle\n cx={center}\n cy={center}\n fill='none'\n r={radius}\n stroke={gradientEnable ? `url(#${gradientId})` : progressColor}\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n strokeLinecap='round'\n strokeWidth={strokeWidth}\n style={{\n transition: 'stroke-dashoffset 0.5s ease',\n }}\n />\n </svg>\n <div className={styles.centerContent}>\n {showValue ? (\n <span className={styles.value} style={{ fontSize: size * 0.2, color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n {showLabel && label ? (\n <span className={styles.label} style={{ fontSize: size * 0.1 }}>\n {label}\n </span>\n ) : null}\n </div>\n </div>\n )\n}\n\n// 线性进度条组件\nconst BarProgress = ({\n percentage,\n trackColor,\n progressColor,\n gradientEnable,\n gradientColors,\n showValue,\n showLabel,\n label,\n valueFormat,\n displayColor,\n}: {\n percentage: number\n trackColor: string\n progressColor: string\n gradientEnable: boolean\n gradientColors: [string, string]\n showValue: boolean\n showLabel: boolean\n label: string\n valueFormat: string\n displayColor: string\n}) => (\n <div className={styles.barContainer}>\n {showLabel || showValue ? (\n <div className={styles.barLabels}>\n {showLabel ? <span className={styles.barLabel}>{label}</span> : null}\n {showValue ? (\n <span className={styles.barValue} style={{ color: displayColor }}>\n {formatValue(Math.round(percentage), percentage, valueFormat)}\n </span>\n ) : null}\n </div>\n ) : null}\n <div className={styles.barWrapper} style={{ background: trackColor }}>\n <div\n className={styles.barFill}\n style={{\n width: `${percentage}%`,\n background: gradientEnable\n ? `linear-gradient(90deg, ${gradientColors[0]}, ${gradientColors[1]})`\n : progressColor,\n }}\n />\n </div>\n </div>\n)\n\nexport const Progress: React.FC<ProgressProps> = ({\n ref,\n value = 0,\n maxValue = 100,\n type = 'ring',\n showValue = true,\n showLabel = false,\n label = '',\n valueFormat = 'percent',\n strokeWidthRatio = 0.07,\n trackColor = 'rgba(26, 26, 62, 0.8)',\n progressColor = '#00d4ff',\n gradientEnable = false,\n gradientColors = ['#00d4ff', '#9b59b6'],\n style: externalStyle,\n}) => {\n const gradientId = useId()\n\n const normalizedValue = Math.min(Math.max(value, 0), maxValue)\n const percentage = (normalizedValue / maxValue) * 100\n const displayColor = gradientEnable ? gradientColors[0] : progressColor\n\n if (type === 'ring') {\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <RingProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n gradientId={gradientId}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n strokeWidthRatio={strokeWidthRatio}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n }\n\n return (\n <div className={styles.wrapper} ref={ref} style={externalStyle}>\n <BarProgress\n displayColor={displayColor}\n gradientColors={gradientColors}\n gradientEnable={gradientEnable}\n label={label}\n percentage={percentage}\n progressColor={progressColor}\n showLabel={showLabel}\n showValue={showValue}\n trackColor={trackColor}\n valueFormat={valueFormat}\n />\n </div>\n )\n}\n\nexport default Progress\n","/**\n * Shared types, components and utilities for EasyEditor materials\n * @package @easy-editor/materials-shared\n */\n\n// 物料分组常量\nexport const MaterialGroup = {\n /** 内置 */\n INNER: 'inner',\n /** 基础 */\n BASIC: 'basic',\n /** 图表 */\n CHART: 'chart',\n /** 数据展示 */\n DISPLAY: 'display',\n /** 媒体 */\n MEDIA: 'media',\n /** 交互 */\n INTERACTION: 'interaction',\n /** 地图 */\n MAP: 'map',\n} as const\n\nexport type MaterialGroup = (typeof MaterialGroup)[keyof typeof MaterialGroup]\n\n// 工具函数\nexport { cn } from './lib/utils'\n\nexport * from './types'\n","/**\n * 物料常量配置\n * 统一管理全局变量名等配置,确保 meta.ts 和 rollup.config.js 使用相同的值\n */\n\n/**\n * UMD 全局变量基础名称\n * 用于构建:\n * - 元数据:${GLOBAL_NAME}Meta (例如: EasyEditorMaterialsProgressMeta)\n * - 组件:${GLOBAL_NAME}Component (例如: EasyEditorMaterialsProgressComponent)\n * - 完整构建:${GLOBAL_NAME} (例如: EasyEditorMaterialsProgress)\n */\nexport const COMPONENT_NAME = 'EasyEditorMaterialsProgress'\n\n/**\n * 包名\n */\nexport const PACKAGE_NAME = '@easy-editor/materials-dashboard-progress'\n\n/**\n * 值格式类型\n */\nexport const VALUE_FORMATS = ['percent', 'number'] as const\n\n/**\n * 默认轨道颜色\n */\nexport const DEFAULT_TRACK_COLOR = 'rgba(255, 255, 255, 0.1)'\n\n/**\n * 默认进度颜色\n */\nexport const DEFAULT_PROGRESS_COLOR = '#00ffff'\n\n/**\n * 默认渐变颜色\n */\nexport const DEFAULT_GRADIENT_COLORS: [string, string] = ['#00ffff', '#ff00ff']\n\n/**\n * 默认发光颜色\n */\nexport const DEFAULT_GLOW_COLOR = '#00ffff'\n","/**\n * Progress Configure\n * 进度条组件配置\n */\n\nimport type { Configure } from '@easy-editor/core'\n\nexport const configure: Configure = {\n props: [\n {\n type: 'group',\n title: '属性',\n setter: 'TabSetter',\n items: [\n {\n type: 'group',\n key: 'config',\n title: '配置',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n // 基础配置\n {\n name: 'id',\n title: 'ID',\n setter: 'NodeIdSetter',\n extraProps: {\n // @ts-expect-error label is not a valid extra prop\n label: false,\n },\n },\n {\n name: 'title',\n title: '标题',\n setter: 'StringSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('title')\n },\n setValue(target, value) {\n target.setExtraPropValue('title', value)\n },\n },\n },\n {\n type: 'group',\n title: '基础属性',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'rect',\n title: '位置尺寸',\n setter: 'RectSetter',\n extraProps: {\n getValue(target) {\n return target.getExtraPropValue('$dashboard.rect')\n },\n setValue(target, value) {\n target.setExtraPropValue('$dashboard.rect', value)\n },\n },\n },\n ],\n },\n // 组件配置\n {\n type: 'group',\n title: '数值',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'value',\n title: '当前值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 0,\n },\n },\n {\n name: 'maxValue',\n title: '最大值',\n setter: 'NumberSetter',\n extraProps: {\n defaultValue: 100,\n },\n },\n {\n name: 'valueFormat',\n title: '值格式',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '百分比', value: 'percent' },\n { label: '数值', value: 'number' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'percent',\n },\n },\n ],\n },\n {\n type: 'group',\n title: '显示',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'type',\n title: '进度条类型',\n setter: {\n componentName: 'SelectSetter',\n props: {\n options: [\n { label: '环形', value: 'ring' },\n { label: '线性', value: 'bar' },\n ],\n },\n },\n extraProps: {\n defaultValue: 'ring',\n },\n },\n {\n name: 'showValue',\n title: '显示数值',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n },\n },\n {\n name: 'showLabel',\n title: '显示标签',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'label',\n title: '标签文本',\n setter: 'StringSetter',\n },\n ],\n },\n {\n type: 'group',\n title: '样式',\n setter: {\n componentName: 'CollapseSetter',\n props: {\n icon: false,\n },\n },\n items: [\n {\n name: 'strokeWidthRatio',\n title: '线条粗细',\n setter: {\n componentName: 'SliderSetter',\n props: {\n min: 0.02,\n max: 0.2,\n step: 0.01,\n },\n },\n extraProps: {\n defaultValue: 0.07,\n },\n },\n {\n name: 'trackColor',\n title: '轨道颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: 'rgba(255, 255, 255, 0.1)',\n },\n },\n {\n name: 'progressColor',\n title: '进度颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: '#00ffff',\n },\n },\n {\n name: 'gradientEnable',\n title: '启用渐变',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: false,\n },\n },\n {\n name: 'gradientColors',\n title: '渐变颜色',\n setter: 'ColorSetter',\n extraProps: {\n defaultValue: ['#00d4ff', '#9b59b6'],\n },\n },\n ],\n },\n ],\n },\n {\n type: 'group',\n key: 'data',\n title: '数据',\n items: [\n {\n name: 'dataBinding',\n title: '数据绑定',\n setter: 'DataBindingSetter',\n },\n ],\n },\n {\n type: 'group',\n key: 'advanced',\n title: '高级',\n items: [\n {\n name: 'condition',\n title: '显隐控制',\n setter: 'SwitchSetter',\n extraProps: {\n defaultValue: true,\n supportVariable: true,\n },\n },\n ],\n },\n ],\n },\n ],\n component: {},\n supports: {},\n advanced: {},\n}\n\nexport default configure\n","/**\n * Progress Snippets\n * 进度条组件代码片段\n */\n\nimport type { Snippet } from '@easy-editor/core'\nimport { COMPONENT_NAME } from './constants'\n\nexport const snippets: Snippet[] = [\n {\n title: '进度环',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 75,\n maxValue: 100,\n type: 'ring',\n showValue: true,\n showLabel: false,\n valueFormat: 'percent',\n strokeWidthRatio: 0.07,\n progressColor: '#00ffff',\n },\n $dashboard: {\n rect: {\n width: 140,\n height: 140,\n },\n },\n },\n },\n {\n title: '线性进度条',\n screenshot: '',\n schema: {\n componentName: COMPONENT_NAME,\n props: {\n value: 85,\n maxValue: 100,\n type: 'bar',\n showValue: true,\n showLabel: true,\n label: '完成率',\n valueFormat: 'percent',\n progressColor: '#00ff88',\n gradientEnable: true,\n gradientColors: ['#00ff88', '#00d4ff'],\n },\n $dashboard: {\n rect: {\n width: 300,\n height: 50,\n },\n },\n },\n },\n]\n\nexport default snippets\n","/**\n * Progress Meta\n * 进度条组件元数据\n */\n\nimport type { ComponentMetadata } from '@easy-editor/core'\nimport { MaterialGroup } from '@easy-editor/materials-shared'\nimport { COMPONENT_NAME, PACKAGE_NAME } from './constants'\nimport configure from './configure'\nimport snippets from './snippets'\nimport pkg from '../package.json'\n\nexport const meta: ComponentMetadata = {\n componentName: COMPONENT_NAME,\n title: '进度条',\n group: MaterialGroup.DISPLAY,\n devMode: 'proCode',\n npm: {\n package: PACKAGE_NAME,\n version: pkg.version,\n globalName: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n },\n snippets,\n configure,\n}\n\nexport default meta\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","formatValue","value","percentage","valueFormat","Math","round","RingProgress","strokeWidthRatio","trackColor","progressColor","gradientEnable","gradientColors","showValue","showLabel","label","displayColor","gradientId","containerRef","useRef","size","setSize","useState","useEffect","container","current","updateSize","width","height","getBoundingClientRect","minSize","min","resizeObserver","ResizeObserver","observe","disconnect","strokeWidth","max","radius","circumference","PI","strokeDashoffset","center","_jsxs","className","styles","children","ring","role","_jsx","id","x1","x2","y1","y2","offset","stopColor","cx","cy","fill","r","stroke","strokeDasharray","strokeLinecap","transition","centerContent","fontSize","color","BarProgress","barContainer","barLabels","barLabel","barValue","barWrapper","background","barFill","Progress","maxValue","externalStyle","useId","normalizedValue","wrapper","MaterialGroup","INNER","DISPLAY","COMPONENT_NAME","PACKAGE_NAME","configure","props","title","setter","items","key","componentName","icon","name","extraProps","getValue","target","getExtraPropValue","setValue","setExtraPropValue","defaultValue","options","step","supportVariable","component","supports","advanced","snippets","screenshot","schema","$dashboard","rect","meta","group","devMode","npm","package","version","pkg","globalName"],"mappings":";;;;;;;EAAA,SAASA,WAAWA,CAACC,GAAG,EAAEC,GAAG,EAAE;IAC7B,IAAKA,GAAG,KAAK,MAAM,EAAGA,GAAG,GAAG,EAAE;EAC9B,EAAA,IAAIC,QAAQ,GAAGD,GAAG,CAACC,QAAQ;EAE3B,EAAA,IAAY,OAAOC,QAAQ,KAAK,WAAW,EAAE;EAAE,IAAA;EAAQ,EAAA;EAEvD,EAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IAAI,IAAID,QAAQ,CAACE,oBAAoB,CAAC,MAAM,CAAC,CA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AW,EAAE,SAAS;EACtBM,MAAAA,aAAa,EAAE,SAAS;EACxBC,MAAAA,cAAc,EAAE,IAAI;EACpBC,MAAAA,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS;OACtC;EACDoG,IAAAA,UAAU,EAAE;EACVC,MAAAA,IAAI,EAAE;EACJtF,QAAAA,KAAK,EAAE,GAAG;EACVC,QAAAA,MAAM,EAAE;EACV;EACF;EACF;EACF,CAAC,CACF;;;;;;AC7CM,QAAMsF,IAAuB,GAAG;EACrCrB,EAAAA,aAAa,EAAER,cAAc;EAC7BI,EAAAA,KAAK,EAAE,KAAK;IACZ0B,KAAK,EAAEjC,aAAa,CAACE,OAAO;EAC5BgC,EAAAA,OAAO,EAAE,SAAS;EAClBC,EAAAA,GAAG,EAAE;EACHC,IAAAA,OAAO,EAAEhC,YAAY;MACrBiC,OAAO,EAAEC,GAAG,CAACD,OAAO;EACpBE,IAAAA,UAAU,EAAEpC,cAAc;EAC1BQ,IAAAA,aAAa,EAAER;KAChB;IACDwB,QAAQ;EACRtB,EAAAA;EACF;;;;;;;;;","x_google_ignoreList":[0]}
|
package/dist/index.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["exports","react","react/jsx-runtime"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorMaterialsProgress={},e.React,e.jsxRuntime)}(this,function(e,t,o){"use strict";var r="component-module__wrapper___IYMoW",a="component-module__container___VbZSk",l="component-module__ring___QkEHa",n="component-module__centerContent___Ri3R3",s="component-module__value___Fg70k",i="component-module__label___6IHVo",p="component-module__barContainer___AOTls",d="component-module__barWrapper___cni-a",c="component-module__barFill___KZkJe",m="component-module__barLabels___BvaEi",u="component-module__barLabel___wVaWe",_="component-module__barValue___H2muu";!function(e,t){void 0===t&&(t={});var o=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===o&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".component-module__container___VbZSk,.component-module__wrapper___IYMoW{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.component-module__container___VbZSk{position:relative}.component-module__ring___QkEHa{transform:rotate(-90deg)}.component-module__centerContent___Ri3R3{align-items:center;display:flex;flex-direction:column;justify-content:center;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%)}.component-module__value___Fg70k{font-weight:700;line-height:1.1}.component-module__label___6IHVo{color:#fff;margin-top:4px;opacity:.7}.component-module__barContainer___AOTls{display:flex;flex-direction:column;gap:4px;height:100%;justify-content:center;width:100%}.component-module__barWrapper___cni-a{border-radius:4px;flex:1;max-height:8px;min-height:8px;overflow:hidden;width:100%}.component-module__barFill___KZkJe{border-radius:4px;height:100%;transition:width .5s ease}.component-module__barLabels___BvaEi{align-items:center;display:flex;justify-content:space-between}.component-module__barLabel___wVaWe{color:hsla(0,0%,100%,.7);font-size:12px}.component-module__barValue___H2muu{font-size:14px;font-weight:600}");const h=(e,t,o)=>"percent"===o?`${Math.round(t)}%`:`${e}`,f=({percentage:e,strokeWidthRatio:r,trackColor:p,progressColor:d,gradientEnable:c,gradientColors:m,showValue:u,showLabel:_,label:f,valueFormat:g,displayColor:b,gradientId:x})=>{const y=t.useRef(null),[C,V]=t.useState(100);t.useEffect(()=>{const e=y.current;if(!e)return;const t=()=>{const{width:t,height:o}=e.getBoundingClientRect(),r=Math.min(t,o);r>0&&V(r)};t();const o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[]);const v=Math.max(2,C*r),S=(C-v)/2,w=2*Math.PI*S,k=w-e/100*w,N=C/2;return o.jsxs("div",{className:a,ref:y,children:[o.jsxs("svg",{"aria-label":"Progress ring",className:l,height:C,role:"img",width:C,children:[o.jsx("title",{children:"Progress indicator"}),c?o.jsx("defs",{children:o.jsxs("linearGradient",{id:x,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[o.jsx("stop",{offset:"0%",stopColor:m[0]}),o.jsx("stop",{offset:"100%",stopColor:m[1]})]})}):null,o.jsx("circle",{cx:N,cy:N,fill:"none",r:S,stroke:p,strokeWidth:v}),o.jsx("circle",{cx:N,cy:N,fill:"none",r:S,stroke:c?`url(#${x})`:d,strokeDasharray:w,strokeDashoffset:k,strokeLinecap:"round",strokeWidth:v,style:{transition:"stroke-dashoffset 0.5s ease"}})]}),o.jsxs("div",{className:n,children:[u?o.jsx("span",{className:s,style:{fontSize:.2*C,color:b},children:h(Math.round(e),e,g)}):null,_&&f?o.jsx("span",{className:i,style:{fontSize:.1*C},children:f}):null]})]})},g=({percentage:e,trackColor:t,progressColor:r,gradientEnable:a,gradientColors:l,showValue:n,showLabel:s,label:i,valueFormat:f,displayColor:g})=>o.jsxs("div",{className:p,children:[s||n?o.jsxs("div",{className:m,children:[s?o.jsx("span",{className:u,children:i}):null,n?o.jsx("span",{className:_,style:{color:g},children:h(Math.round(e),e,f)}):null]}):null,o.jsx("div",{className:d,style:{background:t},children:o.jsx("div",{className:c,style:{width:`${e}%`,background:a?`linear-gradient(90deg, ${l[0]}, ${l[1]})`:r}})})]}),b="EasyEditorMaterialsProgress";const x={componentName:b,title:"进度条",group:"display",devMode:"proCode",npm:{package:"@easy-editor/materials-dashboard-progress",version:"0.0.2",globalName:b,componentName:b},snippets:[{title:"进度环",screenshot:"",schema:{componentName:b,props:{value:75,maxValue:100,type:"ring",showValue:!0,showLabel:!1,valueFormat:"percent",strokeWidthRatio:.07,progressColor:"#00ffff"},$dashboard:{rect:{width:140,height:140}}}},{title:"线性进度条",screenshot:"",schema:{componentName:b,props:{value:85,maxValue:100,type:"bar",showValue:!0,showLabel:!0,label:"完成率",valueFormat:"percent",progressColor:"#00ff88",gradientEnable:!0,gradientColors:["#00ff88","#00d4ff"]},$dashboard:{rect:{width:300,height:50}}}}],configure:{props:[{type:"group",title:"属性",setter:"TabSetter",items:[{type:"group",key:"config",title:"配置",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"id",title:"ID",setter:"NodeIdSetter",extraProps:{label:!1}},{name:"title",title:"标题",setter:"StringSetter",extraProps:{getValue:e=>e.getExtraPropValue("title"),setValue(e,t){e.setExtraPropValue("title",t)}}},{type:"group",title:"基础属性",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"rect",title:"位置尺寸",setter:"RectSetter",extraProps:{getValue:e=>e.getExtraPropValue("$dashboard.rect"),setValue(e,t){e.setExtraPropValue("$dashboard.rect",t)}}}]},{type:"group",title:"数值",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"value",title:"当前值",setter:"NumberSetter",extraProps:{defaultValue:0}},{name:"maxValue",title:"最大值",setter:"NumberSetter",extraProps:{defaultValue:100}},{name:"valueFormat",title:"值格式",setter:{componentName:"SelectSetter",props:{options:[{label:"百分比",value:"percent"},{label:"数值",value:"number"}]}},extraProps:{defaultValue:"percent"}}]},{type:"group",title:"显示",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"type",title:"进度条类型",setter:{componentName:"SelectSetter",props:{options:[{label:"环形",value:"ring"},{label:"线性",value:"bar"}]}},extraProps:{defaultValue:"ring"}},{name:"showValue",title:"显示数值",setter:"SwitchSetter",extraProps:{defaultValue:!0}},{name:"showLabel",title:"显示标签",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"label",title:"标签文本",setter:"StringSetter"}]},{type:"group",title:"样式",setter:{componentName:"CollapseSetter",props:{icon:!1}},items:[{name:"strokeWidthRatio",title:"线条粗细",setter:{componentName:"SliderSetter",props:{min:.02,max:.2,step:.01}},extraProps:{defaultValue:.07}},{name:"trackColor",title:"轨道颜色",setter:"ColorSetter",extraProps:{defaultValue:"rgba(255, 255, 255, 0.1)"}},{name:"progressColor",title:"进度颜色",setter:"ColorSetter",extraProps:{defaultValue:"#00ffff"}},{name:"gradientEnable",title:"启用渐变",setter:"SwitchSetter",extraProps:{defaultValue:!1}},{name:"gradientColors",title:"渐变颜色",setter:"ColorSetter",extraProps:{defaultValue:["#00d4ff","#9b59b6"]}}]}]},{type:"group",key:"data",title:"数据",items:[{name:"dataBinding",title:"数据绑定",setter:"DataBindingSetter"}]},{type:"group",key:"advanced",title:"高级",items:[{name:"condition",title:"显隐控制",setter:"SwitchSetter",extraProps:{defaultValue:!0,supportVariable:!0}}]}]}],component:{},supports:{},advanced:{}}};e.component=({ref:e,value:a=0,maxValue:l=100,type:n="ring",showValue:s=!0,showLabel:i=!1,label:p="",valueFormat:d="percent",strokeWidthRatio:c=.07,trackColor:m="rgba(26, 26, 62, 0.8)",progressColor:u="#00d4ff",gradientEnable:_=!1,gradientColors:h=["#00d4ff","#9b59b6"],style:b})=>{const x=t.useId(),y=Math.min(Math.max(a,0),l)/l*100,C=_?h[0]:u;return"ring"===n?o.jsx("div",{className:r,ref:e,style:b,children:o.jsx(f,{displayColor:C,gradientColors:h,gradientEnable:_,gradientId:x,label:p,percentage:y,progressColor:u,showLabel:i,showValue:s,strokeWidthRatio:c,trackColor:m,valueFormat:d})}):o.jsx("div",{className:r,ref:e,style:b,children:o.jsx(g,{displayColor:C,gradientColors:h,gradientEnable:_,label:p,percentage:y,progressColor:u,showLabel:i,showValue:s,trackColor:m,valueFormat:d})})},e.meta=x});
|
|
2
|
-
//# sourceMappingURL=index.min.js.map
|