@antv/infographic 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/infographic.min.js +205 -176
- package/dist/infographic.min.js.map +1 -1
- package/esm/constants/index.js +4 -4
- package/esm/designs/components/Btn.js +2 -2
- package/esm/designs/components/BtnsGroup.js +2 -2
- package/esm/designs/components/Gap.js +1 -1
- package/esm/designs/components/Illus.js +2 -2
- package/esm/designs/components/ItemDesc.js +2 -2
- package/esm/designs/components/ItemIcon.js +2 -2
- package/esm/designs/components/ItemLabel.js +2 -2
- package/esm/designs/components/ItemValue.js +2 -2
- package/esm/designs/components/ItemsGroup.js +2 -2
- package/esm/designs/components/ShapesGroup.js +2 -2
- package/esm/designs/components/Title.js +3 -3
- package/esm/designs/components/index.js +11 -11
- package/esm/designs/decorations/index.js +3 -3
- package/esm/designs/decorations/simple-arrow.js +2 -2
- package/esm/designs/decorations/text-3d.js +2 -2
- package/esm/designs/decorations/triangle.js +2 -2
- package/esm/designs/defs/DropShadow.js +1 -1
- package/esm/designs/defs/LinearGradient.js +1 -1
- package/esm/designs/defs/index.js +2 -2
- package/esm/designs/index.js +5 -5
- package/esm/designs/items/BadgeCard.js +6 -6
- package/esm/designs/items/CandyCardLite.js +5 -5
- package/esm/designs/items/CapsuleItem.js +6 -6
- package/esm/designs/items/CircleNode.js +5 -5
- package/esm/designs/items/CircularProgress.js +5 -5
- package/esm/designs/items/CompactCard.js +6 -6
- package/esm/designs/items/DoneList.js +5 -5
- package/esm/designs/items/HorizontalIconArrow.js +6 -6
- package/esm/designs/items/HorizontalIconLine.js +6 -6
- package/esm/designs/items/IconBadge.js +5 -5
- package/esm/designs/items/IndexedCard.js +6 -6
- package/esm/designs/items/LCornerCard.js +5 -5
- package/esm/designs/items/LetterCard.js +5 -5
- package/esm/designs/items/LinedText.js +5 -5
- package/esm/designs/items/PillBadge.js +6 -6
- package/esm/designs/items/PlainText.js +4 -4
- package/esm/designs/items/ProgressCard.js +5 -5
- package/esm/designs/items/QuarterCircular.js +5 -5
- package/esm/designs/items/QuarterSimpleCard.js +5 -5
- package/esm/designs/items/RibbonCard.js +5 -5
- package/esm/designs/items/RoundedRectNode.js +5 -5
- package/esm/designs/items/SimpleCircleNode.js +4 -4
- package/esm/designs/items/SimpleHorizontalArrow.js +7 -7
- package/esm/designs/items/SimpleIllusItem.js +6 -6
- package/esm/designs/items/SimpleItem.js +6 -6
- package/esm/designs/items/SimpleVerticalArrow.js +7 -7
- package/esm/designs/items/UnderlineText.js +5 -5
- package/esm/designs/items/VerticalIconArrow.js +7 -7
- package/esm/designs/items/index.js +30 -30
- package/esm/designs/layouts/Align.js +2 -2
- package/esm/designs/layouts/Flex.js +2 -2
- package/esm/designs/layouts/index.js +2 -2
- package/esm/designs/structures/chart-bar.js +7 -7
- package/esm/designs/structures/chart-column.js +7 -7
- package/esm/designs/structures/chart-line.js +7 -7
- package/esm/designs/structures/chart-pie.js +6 -6
- package/esm/designs/structures/chart-wordcloud.js +6 -6
- package/esm/designs/structures/compare-binary-horizontal/dividers/index.js +4 -4
- package/esm/designs/structures/compare-binary-horizontal/dividers/pros-cons-arrow.js +4 -4
- package/esm/designs/structures/compare-binary-horizontal/dividers/pros-cons-fold.js +4 -4
- package/esm/designs/structures/compare-binary-horizontal/dividers/vs.js +4 -4
- package/esm/designs/structures/compare-binary-horizontal/index.js +8 -8
- package/esm/designs/structures/compare-hierarchy-left-right.js +7 -7
- package/esm/designs/structures/compare-hierarchy-row.js +6 -6
- package/esm/designs/structures/compare-quadrant.js +5 -5
- package/esm/designs/structures/hierarchy-mindmap.js +6 -6
- package/esm/designs/structures/hierarchy-structure.js +6 -6
- package/esm/designs/structures/hierarchy-tree.js +6 -6
- package/esm/designs/structures/index.js +42 -42
- package/esm/designs/structures/list-column.js +5 -5
- package/esm/designs/structures/list-grid.js +5 -5
- package/esm/designs/structures/list-pyramid.js +5 -5
- package/esm/designs/structures/list-row.js +5 -5
- package/esm/designs/structures/list-sector.js +5 -5
- package/esm/designs/structures/list-waterfall.js +5 -5
- package/esm/designs/structures/list-zigzag.js +6 -6
- package/esm/designs/structures/relation-circle.js +5 -5
- package/esm/designs/structures/relation-dagre-flow.js +6 -6
- package/esm/designs/structures/relation-network.js +6 -6
- package/esm/designs/structures/sequence-ascending-stairs-3d.js +7 -7
- package/esm/designs/structures/sequence-ascending-steps.js +5 -5
- package/esm/designs/structures/sequence-circle-arrows.js +6 -6
- package/esm/designs/structures/sequence-circular.js +6 -6
- package/esm/designs/structures/sequence-color-snake-steps.js +6 -6
- package/esm/designs/structures/sequence-cylinders-3d.js +6 -6
- package/esm/designs/structures/sequence-filter-mesh.js +6 -6
- package/esm/designs/structures/sequence-funnel.js +6 -6
- package/esm/designs/structures/sequence-horizontal-zigzag.js +6 -6
- package/esm/designs/structures/sequence-mountain.js +6 -6
- package/esm/designs/structures/sequence-pyramid.js +6 -6
- package/esm/designs/structures/sequence-roadmap-vertical.js +7 -7
- package/esm/designs/structures/sequence-snake-steps.js +7 -7
- package/esm/designs/structures/sequence-stairs-front.js +6 -6
- package/esm/designs/structures/sequence-steps.js +7 -7
- package/esm/designs/structures/sequence-timeline.js +6 -6
- package/esm/designs/structures/sequence-zigzag-pucks-3d.js +6 -6
- package/esm/designs/structures/sequence-zigzag-steps.js +6 -6
- package/esm/designs/utils/color.js +3 -3
- package/esm/designs/utils/index.js +3 -3
- package/esm/editor/commands/UpdateElement.js +1 -1
- package/esm/editor/commands/UpdateText.js +2 -2
- package/esm/editor/commands/index.js +4 -4
- package/esm/editor/editor.js +1 -1
- package/esm/editor/index.js +3 -3
- package/esm/editor/interactions/brush-select.js +3 -3
- package/esm/editor/interactions/click-select.js +3 -3
- package/esm/editor/interactions/dblclick-edit-text.js +4 -4
- package/esm/editor/interactions/drag-element.js +5 -5
- package/esm/editor/interactions/hotkey-history.js +2 -2
- package/esm/editor/interactions/index.js +8 -8
- package/esm/editor/interactions/select-highlight.js +4 -4
- package/esm/editor/interactions/zoom-wheel.js +3 -3
- package/esm/editor/managers/command.js +1 -1
- package/esm/editor/managers/index.js +4 -4
- package/esm/editor/managers/interaction.js +2 -2
- package/esm/editor/managers/plugin.js +1 -1
- package/esm/editor/managers/state.js +2 -2
- package/esm/editor/plugins/edit-bar/components/button.js +1 -1
- package/esm/editor/plugins/edit-bar/components/color-picker.js +1 -1
- package/esm/editor/plugins/edit-bar/components/index.js +5 -5
- package/esm/editor/plugins/edit-bar/components/popover.js +2 -2
- package/esm/editor/plugins/edit-bar/components/select.js +1 -1
- package/esm/editor/plugins/edit-bar/edit-bar.js +5 -5
- package/esm/editor/plugins/edit-bar/edit-items/align-elements.js +5 -5
- package/esm/editor/plugins/edit-bar/edit-items/font-align.js +3 -3
- package/esm/editor/plugins/edit-bar/edit-items/font-color.js +3 -3
- package/esm/editor/plugins/edit-bar/edit-items/font-family.js +4 -4
- package/esm/editor/plugins/edit-bar/edit-items/font-size.js +3 -3
- package/esm/editor/plugins/edit-bar/edit-items/icon-color.js +3 -3
- package/esm/editor/plugins/edit-bar/edit-items/index.js +6 -6
- package/esm/editor/plugins/edit-bar/index.js +2 -2
- package/esm/editor/plugins/index.js +3 -3
- package/esm/editor/plugins/resize-element.js +4 -4
- package/esm/editor/utils/data.js +1 -1
- package/esm/editor/utils/element.js +1 -1
- package/esm/editor/utils/event.js +1 -1
- package/esm/editor/utils/index.js +7 -7
- package/esm/exporter/font.d.ts +0 -13
- package/esm/exporter/font.js +20 -28
- package/esm/exporter/index.js +2 -2
- package/esm/exporter/png.js +2 -2
- package/esm/exporter/svg.js +2 -2
- package/esm/index.js +14 -14
- package/esm/jsx/components/Text.js +1 -1
- package/esm/jsx/components/index.js +7 -7
- package/esm/jsx/index.js +6 -6
- package/esm/jsx/layout.js +1 -1
- package/esm/jsx/renderer.js +4 -4
- package/esm/jsx/utils/bounds.js +4 -4
- package/esm/jsx/utils/children.js +1 -1
- package/esm/jsx/utils/element.js +2 -2
- package/esm/jsx/utils/index.js +10 -10
- package/esm/jsx/utils/is-fragment.js +1 -1
- package/esm/jsx-dev-runtime.js +1 -1
- package/esm/jsx-runtime.js +1 -1
- package/esm/options/index.js +1 -1
- package/esm/options/parser.js +4 -4
- package/esm/package.json +1 -0
- package/esm/renderer/composites/background.js +1 -1
- package/esm/renderer/composites/base.js +2 -2
- package/esm/renderer/composites/button.js +1 -1
- package/esm/renderer/composites/icon.js +3 -3
- package/esm/renderer/composites/illus.js +2 -2
- package/esm/renderer/composites/index.js +8 -8
- package/esm/renderer/composites/shape.js +3 -3
- package/esm/renderer/composites/svg.js +1 -1
- package/esm/renderer/composites/text.js +2 -2
- package/esm/renderer/constants/index.js +2 -2
- package/esm/renderer/fonts/index.js +4 -4
- package/esm/renderer/fonts/loader.js +3 -3
- package/esm/renderer/fonts/registry.js +1 -1
- package/esm/renderer/index.js +4 -4
- package/esm/renderer/palettes/built-in.js +1 -1
- package/esm/renderer/palettes/index.js +3 -3
- package/esm/renderer/palettes/utils.js +1 -1
- package/esm/renderer/renderer.js +3 -3
- package/esm/renderer/stylize/gradient.js +2 -2
- package/esm/renderer/stylize/index.js +3 -3
- package/esm/renderer/stylize/pattern.js +3 -3
- package/esm/renderer/stylize/patterns/diamond.js +1 -1
- package/esm/renderer/stylize/patterns/dot.js +1 -1
- package/esm/renderer/stylize/patterns/hex.js +1 -1
- package/esm/renderer/stylize/patterns/index.js +6 -6
- package/esm/renderer/stylize/patterns/line.js +1 -1
- package/esm/renderer/stylize/patterns/mosaic.js +1 -1
- package/esm/renderer/stylize/patterns/square.js +1 -1
- package/esm/renderer/stylize/rough.js +1 -1
- package/esm/renderer/utils/index.js +2 -2
- package/esm/resource/index.js +4 -4
- package/esm/resource/loader.js +6 -6
- package/esm/resource/loaders/image.js +1 -1
- package/esm/resource/loaders/index.js +4 -4
- package/esm/resource/loaders/remote.js +3 -3
- package/esm/resource/loaders/search.js +5 -5
- package/esm/resource/loaders/svg.js +1 -1
- package/esm/resource/utils/index.js +3 -3
- package/esm/resource/utils/parser.js +1 -1
- package/esm/resource/utils/ref.js +2 -2
- package/esm/runtime/Infographic.js +11 -11
- package/esm/runtime/index.js +1 -1
- package/esm/runtime/options.js +1 -1
- package/esm/runtime/utils.js +1 -1
- package/esm/ssr/index.js +1 -1
- package/esm/ssr/renderer.js +5 -5
- package/esm/syntax/index.js +4 -4
- package/esm/syntax/mapper.js +1 -1
- package/esm/syntax/relations.js +2 -2
- package/esm/templates/built-in.js +9 -9
- package/esm/templates/index.js +2 -2
- package/esm/themes/built-in.js +1 -1
- package/esm/themes/index.js +3 -3
- package/esm/utils/element.js +1 -1
- package/esm/utils/icon.js +2 -2
- package/esm/utils/index.js +21 -21
- package/esm/utils/measure-text.js +3 -3
- package/esm/utils/padding.js +3 -3
- package/esm/utils/recognizer.js +3 -3
- package/esm/utils/text.js +4 -4
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/lib/exporter/font.d.ts +0 -13
- package/lib/exporter/font.js +17 -26
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/src/exporter/font.ts +21 -32
- package/src/version.ts +1 -1
package/esm/constants/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './components';
|
|
2
|
-
export * from './element';
|
|
3
|
-
export * from './service';
|
|
4
|
-
export * from './shape';
|
|
1
|
+
export * from './components.js';
|
|
2
|
+
export * from './element.js';
|
|
3
|
+
export * from './service.js';
|
|
4
|
+
export * from './shape.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Rect } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Rect } from '../../jsx/index.js';
|
|
3
3
|
export const BtnAdd = (props) => {
|
|
4
4
|
const { indexes, ...restProps } = props;
|
|
5
5
|
const defaultProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Group } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group } from '../../jsx/index.js';
|
|
3
3
|
export const BtnsGroup = (props) => {
|
|
4
4
|
return (_jsx(Group, { "data-element-type": "btns-group" /* ElementTypeEnum.BtnsGroup */, width: 0, height: 0, ...props, display: "none" }));
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Rect } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Rect } from '../../jsx/index.js';
|
|
3
3
|
export const Illus = ({ indexes, ...props }) => {
|
|
4
4
|
const defaultProps = {
|
|
5
5
|
fill: 'lightgray',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Text } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Text } from '../../jsx/index.js';
|
|
3
3
|
export const ItemDesc = ({ indexes, lineNumber = 2, children, ...props }) => {
|
|
4
4
|
if (!children)
|
|
5
5
|
return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Ellipse, Group, Rect } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Ellipse, Group, Rect } from '../../jsx/index.js';
|
|
3
3
|
export const ItemIcon = (props) => {
|
|
4
4
|
const { indexes, size = 32, ...restProps } = props;
|
|
5
5
|
const finalProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Text } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Text } from '../../jsx/index.js';
|
|
3
3
|
export const ItemLabel = ({ indexes, children, ...props }) => {
|
|
4
4
|
const finalProps = {
|
|
5
5
|
fontSize: 18,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Text } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Text } from '../../jsx/index.js';
|
|
3
3
|
export const ItemValue = ({ indexes, value, formatter = (v) => String(v), ...props }) => {
|
|
4
4
|
const finalProps = {
|
|
5
5
|
fontSize: 14,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Group } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group } from '../../jsx/index.js';
|
|
3
3
|
export const ItemsGroup = (props) => {
|
|
4
4
|
return _jsx(Group, { "data-element-type": "items-group" /* ElementTypeEnum.ItemsGroup */, ...props });
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Group } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group } from '../../jsx/index.js';
|
|
3
3
|
export const ShapesGroup = (props) => {
|
|
4
4
|
return _jsx(Group, { "data-element-type": "shapes-group", ...props });
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Text } from '../../jsx';
|
|
3
|
-
import { FlexLayout } from '../layouts';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Text } from '../../jsx/index.js';
|
|
3
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
4
4
|
export const Title = (props) => {
|
|
5
5
|
const { x = 0, y = 0, alignHorizontal = 'center', title, desc, descLineNumber: subTitleLineNumber = 2, themeColors, } = props;
|
|
6
6
|
const MainTitle = (props) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from './Btn';
|
|
2
|
-
export * from './BtnsGroup';
|
|
3
|
-
export * from './Gap';
|
|
4
|
-
export * from './Illus';
|
|
5
|
-
export * from './ItemDesc';
|
|
6
|
-
export * from './ItemIcon';
|
|
7
|
-
export * from './ItemLabel';
|
|
8
|
-
export * from './ItemsGroup';
|
|
9
|
-
export * from './ItemValue';
|
|
10
|
-
export * from './ShapesGroup';
|
|
11
|
-
export * from './Title';
|
|
1
|
+
export * from './Btn.js';
|
|
2
|
+
export * from './BtnsGroup.js';
|
|
3
|
+
export * from './Gap.js';
|
|
4
|
+
export * from './Illus.js';
|
|
5
|
+
export * from './ItemDesc.js';
|
|
6
|
+
export * from './ItemIcon.js';
|
|
7
|
+
export * from './ItemLabel.js';
|
|
8
|
+
export * from './ItemsGroup.js';
|
|
9
|
+
export * from './ItemValue.js';
|
|
10
|
+
export * from './ShapesGroup.js';
|
|
11
|
+
export * from './Title.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './simple-arrow';
|
|
2
|
-
export * from './text-3d';
|
|
3
|
-
export * from './triangle';
|
|
1
|
+
export * from './simple-arrow.js';
|
|
2
|
+
export * from './text-3d.js';
|
|
3
|
+
export * from './triangle.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "
|
|
2
|
-
import { Defs, Polygon } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, Polygon } from '../../jsx/index.js';
|
|
3
3
|
export const SimpleArrow = ({ width = 25, height = 25, colorPrimary = '#6699FF', rotation = 0, ...rest }) => {
|
|
4
4
|
const strokeId = `gradient-arrow-stroke-${colorPrimary.replace('#', '')}`;
|
|
5
5
|
const fillId = `gradient-arrow-fill-${colorPrimary.replace('#', '')}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Group } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group } from '../../jsx/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* A 3D text component with layered shadows to create a depth effect
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { Polygon } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { Polygon } from '../../jsx/index.js';
|
|
3
3
|
export const Triangle = ({ width = 25, height = 25, colorPrimary = '#6699FF', rotation = 0, strokeWidth = 4, ...rest }) => {
|
|
4
4
|
// 定义三角形的三个顶点
|
|
5
5
|
const points = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
2
|
export const DropShadow = (props) => {
|
|
3
3
|
const { color = 'black', opacity = 0.8, ...restProps } = props;
|
|
4
4
|
return (_jsx("filter", { id: "drop-shadow", x: "-25%", y: "-25%", width: "200%", height: "200%", ...restProps, children: _jsx("feDropShadow", { dx: "4", dy: "4", stdDeviation: "4", "flood-color": color, "flood-opacity": opacity }) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
export const LinearGradient = (props) => {
|
|
3
3
|
const { id = 'linear-gradient', startColor = 'black', stopColor = 'white', direction = 'left-right', } = props;
|
|
4
4
|
const directionMap = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './DropShadow';
|
|
2
|
-
export * from './LinearGradient';
|
|
1
|
+
export * from './DropShadow.js';
|
|
2
|
+
export * from './LinearGradient.js';
|
package/esm/designs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from '../templates';
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from './items';
|
|
4
|
-
export * from './layouts';
|
|
5
|
-
export * from './structures';
|
|
1
|
+
export * from '../templates/index.js';
|
|
2
|
+
export * from './components/index.js';
|
|
3
|
+
export * from './items/index.js';
|
|
4
|
+
export * from './layouts/index.js';
|
|
5
|
+
export * from './structures/index.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "../../jsx-runtime.js";
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
|
-
import { Defs, Ellipse, Group, Rect } from '../../jsx';
|
|
4
|
-
import { ItemDesc, ItemIcon, ItemLabel, ItemValue } from '../components';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getItemProps } from '../utils';
|
|
7
|
-
import { registerItem } from './registry';
|
|
3
|
+
import { Defs, Ellipse, Group, Rect } from '../../jsx/index.js';
|
|
4
|
+
import { ItemDesc, ItemIcon, ItemLabel, ItemValue } from '../components/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getItemProps } from '../utils/index.js';
|
|
7
|
+
import { registerItem } from './registry.js';
|
|
8
8
|
export const BadgeCard = (props) => {
|
|
9
9
|
const [{ datum, indexes, width = 200, height = 80, iconSize = 24, badgeSize = 32, gap = 8, positionH = 'normal', themeColors, valueFormatter, }, restProps,] = getItemProps(props, ['width', 'height', 'iconSize', 'badgeSize', 'gap']);
|
|
10
10
|
const value = datum.value;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Group, Path } from '../../jsx';
|
|
3
|
-
import { ItemDesc, ItemIcon, ItemLabel } from '../components';
|
|
4
|
-
import { getItemProps } from '../utils';
|
|
5
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group, Path } from '../../jsx/index.js';
|
|
3
|
+
import { ItemDesc, ItemIcon, ItemLabel } from '../components/index.js';
|
|
4
|
+
import { getItemProps } from '../utils/index.js';
|
|
5
|
+
import { registerItem } from './registry.js';
|
|
6
6
|
export const CandyCardLite = (props) => {
|
|
7
7
|
const [{ indexes, datum, width = 280, height = 140, themeColors }, restProps,] = getItemProps(props, ['width', 'height']);
|
|
8
8
|
return (_jsxs(Group, { ...restProps, children: [_jsx("rect", { x: 0, y: 0, width: width, height: height, rx: 22, ry: 22, fill: themeColors.colorPrimaryBg, stroke: themeColors.colorPrimary, "data-element-type": "shape" }), _jsx(Path, { x: width - 85, y: 0.5, width: 85, height: 65, d: "M0 0H62.4495C74.9557 0 85.4549 10.8574 84.4557 23.1875V60.1875L77.8772 62.5839C64.3776 67.6876 48.51 64.6893 37.8662 53.7441L10.2361 25.3312C4.91402 19.8571 1.65356 13.1736 0.435652 6.21819L0 0Z", fill: themeColors.colorBg, "data-element-type": "shape" }), _jsx(ItemLabel, { indexes: indexes, x: 20, y: 24, width: 200, alignHorizontal: "left", alignVertical: "middle", fill: themeColors.colorText, children: datum.label }), _jsx(ItemDesc, { indexes: indexes, x: 20, y: 58, width: 220, height: 70, fill: themeColors.colorTextSecondary, alignHorizontal: "left", alignVertical: "top", children: datum.desc }), _jsx(ItemIcon, { indexes: indexes, x: width - 48, y: 12, width: 32, height: 32, fill: themeColors.colorPrimary })] }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, Ellipse, getElementBounds, Group, Rect, } from '../../jsx';
|
|
3
|
-
import { ItemDesc, ItemIconCircle, ItemLabel } from '../components';
|
|
4
|
-
import { DropShadow } from '../defs';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, Ellipse, getElementBounds, Group, Rect, } from '../../jsx/index.js';
|
|
3
|
+
import { ItemDesc, ItemIconCircle, ItemLabel } from '../components/index.js';
|
|
4
|
+
import { DropShadow } from '../defs/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
export const CapsuleItem = (props) => {
|
|
8
8
|
const [{ datum, indexes, width = 300, height = 80, gap = 12, positionH = 'normal', iconPadding = height / 10, themeColors, }, restProps,] = getItemProps(props, ['width', 'height', 'gap', 'iconPadding']);
|
|
9
9
|
// Capsule border radius and icon size (icon with some padding inside)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
|
-
import { Defs, Ellipse, Group } from '../../jsx';
|
|
4
|
-
import { ItemLabel } from '../components';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
3
|
+
import { Defs, Ellipse, Group } from '../../jsx/index.js';
|
|
4
|
+
import { ItemLabel } from '../components/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
export const CircleNode = (props) => {
|
|
8
8
|
const [{ indexes, datum, themeColors, positionH = 'normal', width = 240, height = width, }, restProps,] = getItemProps(props, ['width', 'height']);
|
|
9
9
|
const size = Math.min(width, height);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Ellipse, Group, Path, Rect } from '../../jsx';
|
|
3
|
-
import { ItemLabel, ItemValue } from '../components';
|
|
4
|
-
import { getItemProps } from '../utils';
|
|
5
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Ellipse, Group, Path, Rect } from '../../jsx/index.js';
|
|
3
|
+
import { ItemLabel, ItemValue } from '../components/index.js';
|
|
4
|
+
import { getItemProps } from '../utils/index.js';
|
|
5
|
+
import { registerItem } from './registry.js';
|
|
6
6
|
export const CircularProgress = (props) => {
|
|
7
7
|
const [{ datum, indexes, size = 120, strokeWidth = 12, gap = 8, themeColors, valueFormatter = (value) => `${Math.round(value)}%`, }, restProps,] = getItemProps(props, ['size', 'strokeWidth', 'gap']);
|
|
8
8
|
const value = datum.value ?? 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, Group, Rect } from '../../jsx';
|
|
3
|
-
import { ItemDesc, ItemIcon, ItemLabel, ItemValue } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, Group, Rect } from '../../jsx/index.js';
|
|
3
|
+
import { ItemDesc, ItemIcon, ItemLabel, ItemValue } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
export const CompactCard = (props) => {
|
|
8
8
|
const [{ datum, indexes, width = 200, height = 60, iconSize = 20, gap = 8, positionH = 'normal', themeColors, valueFormatter, }, restProps,] = getItemProps(props, ['width', 'height', 'iconSize', 'gap']);
|
|
9
9
|
const value = datum.value;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Group, Path } from '../../jsx';
|
|
3
|
-
import { ItemLabel } from '../components';
|
|
4
|
-
import { getItemProps } from '../utils';
|
|
5
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group, Path } from '../../jsx/index.js';
|
|
3
|
+
import { ItemLabel } from '../components/index.js';
|
|
4
|
+
import { getItemProps } from '../utils/index.js';
|
|
5
|
+
import { registerItem } from './registry.js';
|
|
6
6
|
export const DoneList = (props) => {
|
|
7
7
|
const [{ datum, indexes, width = 300, height = 30, iconSize = 30, gap = 5, positionH = 'normal', positionV = 'middle', themeColors, }, restProps,] = getItemProps(props, ['width', 'height', 'iconSize', 'gap']);
|
|
8
8
|
const textWidth = width - iconSize - gap;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "
|
|
2
|
-
import { Ellipse, getElementBounds, Group, Path, Polygon, Text, } from '../../jsx';
|
|
3
|
-
import { Gap, ItemDesc, ItemIconCircle, ItemLabel, ShapesGroup, } from '../components';
|
|
4
|
-
import { AlignLayout, FlexLayout } from '../layouts';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Ellipse, getElementBounds, Group, Path, Polygon, Text, } from '../../jsx/index.js';
|
|
3
|
+
import { Gap, ItemDesc, ItemIconCircle, ItemLabel, ShapesGroup, } from '../components/index.js';
|
|
4
|
+
import { AlignLayout, FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
export const HorizontalIconArrow = (props) => {
|
|
8
8
|
const [{ indexes, datum, width = 140, themeColors, positionV = 'normal' }, restProps,] = getItemProps(props, ['width']);
|
|
9
9
|
const isVNormal = positionV !== 'flipped';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Ellipse, getElementBounds, Rect, Text, } from '../../jsx';
|
|
3
|
-
import { Gap, ItemDesc, ItemIconCircle, ItemLabel } from '../components';
|
|
4
|
-
import { AlignLayout, FlexLayout } from '../layouts';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Ellipse, getElementBounds, Rect, Text, } from '../../jsx/index.js';
|
|
3
|
+
import { Gap, ItemDesc, ItemIconCircle, ItemLabel } from '../components/index.js';
|
|
4
|
+
import { AlignLayout, FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
export const HorizontalIconLine = (props) => {
|
|
8
8
|
const [{ indexes, datum, width = 160, themeColors, positionH = 'center', positionV = 'normal', }, restProps,] = getItemProps(props, ['width']);
|
|
9
9
|
const textAlignHorizontal = positionH === 'normal'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
|
-
import { Defs, Ellipse, Group, Text } from '../../jsx';
|
|
4
|
-
import { ItemIcon, ItemLabel } from '../components';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
3
|
+
import { Defs, Ellipse, Group, Text } from '../../jsx/index.js';
|
|
4
|
+
import { ItemIcon, ItemLabel } from '../components/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
export const IconBadge = (props) => {
|
|
8
8
|
const [{ datum, indexes, size = 80, iconSize = 28, badgeSize = 24, gap = 8, themeColors, width = 84, height = 105, }, restProps,] = getItemProps(props, ['size', 'iconSize', 'badgeSize', 'gap']);
|
|
9
9
|
const value = datum.value ?? 0;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group } from '../../jsx';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group } from '../../jsx/index.js';
|
|
3
3
|
// 根据需要选择性导入原子组件和类型
|
|
4
|
-
import { Rect, Text } from '../../jsx';
|
|
4
|
+
import { Rect, Text } from '../../jsx/index.js';
|
|
5
5
|
// 根据需要选择性导入封装组件
|
|
6
|
-
import { ItemDesc, ItemLabel } from '../components';
|
|
6
|
+
import { ItemDesc, ItemLabel } from '../components/index.js';
|
|
7
7
|
import tinycolor from 'tinycolor2';
|
|
8
|
-
import { getItemProps } from '../utils';
|
|
9
|
-
import { registerItem } from './registry';
|
|
8
|
+
import { getItemProps } from '../utils/index.js';
|
|
9
|
+
import { registerItem } from './registry.js';
|
|
10
10
|
// -----------------------------------------------------------------------------------
|
|
11
11
|
// 2. 组件实现
|
|
12
12
|
// -----------------------------------------------------------------------------------
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Group, Path, Polygon } from '../../jsx';
|
|
3
|
-
import { ItemDesc, ItemIcon, ItemLabel } from '../components';
|
|
4
|
-
import { getItemProps } from '../utils';
|
|
5
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group, Path, Polygon } from '../../jsx/index.js';
|
|
3
|
+
import { ItemDesc, ItemIcon, ItemLabel } from '../components/index.js';
|
|
4
|
+
import { getItemProps } from '../utils/index.js';
|
|
5
|
+
import { registerItem } from './registry.js';
|
|
6
6
|
export const LCornerCard = (props) => {
|
|
7
7
|
const [{ indexes, datum, width = 140, iconSize = 24, themeColors }, restProps,] = getItemProps(props, ['width', 'iconSize']);
|
|
8
8
|
const { label, desc } = datum;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
|
-
import { Defs, Group, Rect } from '../../jsx';
|
|
4
|
-
import { ItemLabel } from '../components';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
3
|
+
import { Defs, Group, Rect } from '../../jsx/index.js';
|
|
4
|
+
import { ItemLabel } from '../components/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
/**
|
|
8
8
|
* 字母卡片组件
|
|
9
9
|
* 用于显示大字母和标题
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Group, Path, getElementBounds } from '../../jsx';
|
|
3
|
-
import { ItemLabel } from '../components';
|
|
4
|
-
import { getItemProps } from '../utils';
|
|
5
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group, Path, getElementBounds } from '../../jsx/index.js';
|
|
3
|
+
import { ItemLabel } from '../components/index.js';
|
|
4
|
+
import { getItemProps } from '../utils/index.js';
|
|
5
|
+
import { registerItem } from './registry.js';
|
|
6
6
|
export const LinedText = (props) => {
|
|
7
7
|
const [{ datum, indexes, width, themeColors, positionH = 'normal', positionV = 'center', formatter = (text) => text || '', usePaletteColor = false, showUnderline = false, underlineGap = 6, underlineExtend = 8, underlineThickness = 2, }, restProps,] = getItemProps(props, [
|
|
8
8
|
'width',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, Group, Rect } from '../../jsx';
|
|
3
|
-
import { ItemDesc, ItemLabel } from '../components';
|
|
4
|
-
import { DropShadow, LinearGradient } from '../defs';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, Group, Rect } from '../../jsx/index.js';
|
|
3
|
+
import { ItemDesc, ItemLabel } from '../components/index.js';
|
|
4
|
+
import { DropShadow, LinearGradient } from '../defs/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
export const PillBadge = (props) => {
|
|
8
8
|
const [{ datum, indexes, width = 300, pillWidth = 120, pillHeight = 36, gap = 16, positionH = 'normal', themeColors, }, restProps,] = getItemProps(props, ['width', 'pillWidth', 'pillHeight', 'gap']);
|
|
9
9
|
// Optimize: when no description, use pillWidth as component width
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx } from "
|
|
2
|
-
import { ItemLabel } from '../components';
|
|
3
|
-
import { getItemProps } from '../utils';
|
|
4
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx } from "../../jsx-runtime.js";
|
|
2
|
+
import { ItemLabel } from '../components/index.js';
|
|
3
|
+
import { getItemProps } from '../utils/index.js';
|
|
4
|
+
import { registerItem } from './registry.js';
|
|
5
5
|
export const LabelText = (props) => {
|
|
6
6
|
const [{ indexes, datum, width = 120, themeColors, positionH = 'normal', positionV = 'center', formatter = (text) => text || '', usePaletteColor = false, lineNumber = 1, }, restProps,] = getItemProps(props, [
|
|
7
7
|
'width',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import { scaleLinear } from 'd3';
|
|
3
3
|
import tinycolor from 'tinycolor2';
|
|
4
|
-
import { Defs, getElementBounds, Group, Rect } from '../../jsx';
|
|
5
|
-
import { ItemDesc, ItemIcon, ItemLabel, ItemValue } from '../components';
|
|
6
|
-
import { getItemProps } from '../utils';
|
|
7
|
-
import { registerItem } from './registry';
|
|
4
|
+
import { Defs, getElementBounds, Group, Rect } from '../../jsx/index.js';
|
|
5
|
+
import { ItemDesc, ItemIcon, ItemLabel, ItemValue } from '../components/index.js';
|
|
6
|
+
import { getItemProps } from '../utils/index.js';
|
|
7
|
+
import { registerItem } from './registry.js';
|
|
8
8
|
export const ProgressCard = (props) => {
|
|
9
9
|
const [{ datum, data, indexes, width = 280, height = 120, iconSize = 32, gap = 12, progressHeight = 8, borderRadius = 12, positionH = 'normal', themeColors, valueFormatter = (v) => `${v}%`, }, restProps,] = getItemProps(props, [
|
|
10
10
|
'width',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Ellipse, getElementBounds, Group, Path, Text, } from '../../jsx';
|
|
3
|
-
import { ItemDesc, ItemIcon, ItemLabel, ShapesGroup } from '../components';
|
|
4
|
-
import { getItemProps } from '../utils';
|
|
5
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Ellipse, getElementBounds, Group, Path, Text, } from '../../jsx/index.js';
|
|
3
|
+
import { ItemDesc, ItemIcon, ItemLabel, ShapesGroup } from '../components/index.js';
|
|
4
|
+
import { getItemProps } from '../utils/index.js';
|
|
5
|
+
import { registerItem } from './registry.js';
|
|
6
6
|
export const QuarterCircular = (props) => {
|
|
7
7
|
const [{ datum, indexes, width = 280, height = 120, iconSize = 30, circleRadius = 80, positionH = 'normal', positionV = 'normal', themeColors, }, restProps,] = getItemProps(props, ['width', 'height', 'iconSize', 'circleRadius']);
|
|
8
8
|
// 圆的质心
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Group, Path, getElementBounds } from '../../jsx';
|
|
3
|
-
import { ItemDesc, ItemIcon, ItemLabel } from '../components';
|
|
4
|
-
import { getItemProps } from '../utils';
|
|
5
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group, Path, getElementBounds } from '../../jsx/index.js';
|
|
3
|
+
import { ItemDesc, ItemIcon, ItemLabel } from '../components/index.js';
|
|
4
|
+
import { getItemProps } from '../utils/index.js';
|
|
5
|
+
import { registerItem } from './registry.js';
|
|
6
6
|
export const QuarterSimpleCard = (props) => {
|
|
7
7
|
const [{ datum, indexes, width = 150, height = 150, iconSize = 30, padding = 20, borderRadius = 16, positionH = 'center', positionV = 'middle', themeColors, }, restProps,] = getItemProps(props, [
|
|
8
8
|
'width',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
|
-
import { Defs, Group, Path, Rect } from '../../jsx';
|
|
4
|
-
import { ItemDesc, ItemIcon, ItemLabel, ShapesGroup } from '../components';
|
|
5
|
-
import { getItemProps } from '../utils';
|
|
6
|
-
import { registerItem } from './registry';
|
|
3
|
+
import { Defs, Group, Path, Rect } from '../../jsx/index.js';
|
|
4
|
+
import { ItemDesc, ItemIcon, ItemLabel, ShapesGroup } from '../components/index.js';
|
|
5
|
+
import { getItemProps } from '../utils/index.js';
|
|
6
|
+
import { registerItem } from './registry.js';
|
|
7
7
|
export const RibbonCard = (props) => {
|
|
8
8
|
const [{ datum, indexes, width = 240, height = 140, iconSize = 28, gap = 12, ribbonHeight = 32, themeColors, }, restProps,] = getItemProps(props, [
|
|
9
9
|
'width',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Group, Rect } from '../../jsx';
|
|
3
|
-
import { ItemLabel } from '../components';
|
|
4
|
-
import { getItemProps } from '../utils';
|
|
5
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Group, Rect } from '../../jsx/index.js';
|
|
3
|
+
import { ItemLabel } from '../components/index.js';
|
|
4
|
+
import { getItemProps } from '../utils/index.js';
|
|
5
|
+
import { registerItem } from './registry.js';
|
|
6
6
|
export const RoundedRectNode = (props) => {
|
|
7
7
|
const [{ indexes, datum, themeColors, width = 300, height = 40, padding = 4, positionH = 'normal', }, restProps,] = getItemProps(props, ['width', 'height', 'borderRadius', 'padding']);
|
|
8
8
|
const borderRadius = height / 2;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Ellipse, Group, Rect } from '../../jsx';
|
|
3
|
-
import { getItemProps } from '../utils';
|
|
4
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Ellipse, Group, Rect } from '../../jsx/index.js';
|
|
3
|
+
import { getItemProps } from '../utils/index.js';
|
|
4
|
+
import { registerItem } from './registry.js';
|
|
5
5
|
export const SimpleCircleNode = (props) => {
|
|
6
6
|
const [{ width = 24, height = width, strokeWidth = 2, themeColors, datum }, restProps,] = getItemProps(props, ['width', 'height']);
|
|
7
7
|
const size = Math.min(width, height) - strokeWidth;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group, Polygon, Text, } from '../../jsx';
|
|
3
|
-
import { Gap, ItemDesc, ItemLabel } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { AlignLayout } from '../layouts/Align';
|
|
6
|
-
import { getItemProps } from '../utils';
|
|
7
|
-
import { registerItem } from './registry';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group, Polygon, Text, } from '../../jsx/index.js';
|
|
3
|
+
import { Gap, ItemDesc, ItemLabel } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { AlignLayout } from '../layouts/Align.js';
|
|
6
|
+
import { getItemProps } from '../utils/index.js';
|
|
7
|
+
import { registerItem } from './registry.js';
|
|
8
8
|
export const SimpleHorizontalArrow = (props) => {
|
|
9
9
|
const [{ indexes, datum, width = 140, themeColors, positionV = 'normal' }, restProps,] = getItemProps(props, ['width']);
|
|
10
10
|
const isVNormal = positionV !== 'flipped';
|