@hkyhy/marsun-components-core 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Form/FormDataSync.d.ts +11 -0
- package/dist/components/Form/FormDataSync.js +20 -0
- package/dist/components/Form/FormDataSync.js.map +1 -0
- package/dist/components/Form/index.d.ts +3 -1
- package/dist/components/Form/kneFormInfo.d.ts +1 -0
- package/dist/components/Form/kneFormInfo.js +12 -11
- package/dist/components/Form/kneFormInfo.js.map +1 -1
- package/dist/components/Icons/index.d.ts +3 -1
- package/dist/components/Icons/index.js +165 -159
- package/dist/components/Icons/index.js.map +1 -1
- package/dist/components/InteractiveBlock/InteractiveBlock.d.ts +31 -0
- package/dist/components/InteractiveBlock/InteractiveBlock.js +171 -0
- package/dist/components/InteractiveBlock/InteractiveBlock.js.map +1 -0
- package/dist/components/InteractiveBlock/index.d.ts +3 -0
- package/dist/components/InteractiveBlock/style.module.scss.js +19 -0
- package/dist/components/InteractiveBlock/style.module.scss.js.map +1 -0
- package/dist/components/Layout/ContentCard/index.d.ts +14 -0
- package/dist/components/Layout/ContentCard/index.js +20 -0
- package/dist/components/Layout/ContentCard/index.js.map +1 -0
- package/dist/components/Layout/ContentCard/style.module.scss.js +9 -0
- package/dist/components/Layout/ContentCard/style.module.scss.js.map +1 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +387 -378
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DescriptionItem } from '../Descriptions/CommonDescriptions';
|
|
3
|
+
export type InteractiveBlockTag = {
|
|
4
|
+
label: string;
|
|
5
|
+
color: string;
|
|
6
|
+
};
|
|
7
|
+
export type InteractiveBlockAction = {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
hidden?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type InteractiveBlockTagsPlacement = 'inline' | 'below';
|
|
15
|
+
export type InteractiveBlockProps = {
|
|
16
|
+
title: ReactNode;
|
|
17
|
+
info?: DescriptionItem[];
|
|
18
|
+
subtitle?: ReactNode;
|
|
19
|
+
description?: ReactNode;
|
|
20
|
+
tags?: InteractiveBlockTag[];
|
|
21
|
+
tagsPlacement?: InteractiveBlockTagsPlacement;
|
|
22
|
+
actions?: InteractiveBlockAction[];
|
|
23
|
+
selected?: boolean;
|
|
24
|
+
onClick?: () => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* 带操作性的展示块:title → Info+TooltipInfo → actions;tags 紧贴 subtitle。
|
|
29
|
+
*/
|
|
30
|
+
declare const InteractiveBlock: React.FC<InteractiveBlockProps>;
|
|
31
|
+
export default InteractiveBlock;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsx as t, jsxs as l, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import g from "@kne/button-group";
|
|
3
|
+
import i from "classnames";
|
|
4
|
+
import { Info as w } from "../Icons/index.js";
|
|
5
|
+
import n from "./style.module.scss.js";
|
|
6
|
+
import x from "../Tag/SemanticTag.js";
|
|
7
|
+
import D from "../TooltipInfo/TooltipInfo.js";
|
|
8
|
+
const L = ({
|
|
9
|
+
title: k,
|
|
10
|
+
info: a,
|
|
11
|
+
subtitle: o,
|
|
12
|
+
description: s,
|
|
13
|
+
tags: r,
|
|
14
|
+
tagsPlacement: d = "inline",
|
|
15
|
+
actions: p,
|
|
16
|
+
selected: m,
|
|
17
|
+
onClick: c,
|
|
18
|
+
className: u
|
|
19
|
+
}) => {
|
|
20
|
+
const v = (p ?? []).filter((e) => !e.hidden), h = !!(o || r != null && r.length), y = v.map((e) => ({
|
|
21
|
+
type: "link",
|
|
22
|
+
key: e.key,
|
|
23
|
+
icon: e.icon,
|
|
24
|
+
children: e.label,
|
|
25
|
+
onClick: e.onClick
|
|
26
|
+
})), f = r != null && r.length ? /* @__PURE__ */ t(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: i(
|
|
30
|
+
"marsun-interactive-block-tags",
|
|
31
|
+
n["marsun-interactive-block-tags"]
|
|
32
|
+
),
|
|
33
|
+
children: r.map((e) => /* @__PURE__ */ t(x, { color: e.color, children: e.label }, e.label))
|
|
34
|
+
}
|
|
35
|
+
) : null, b = /* @__PURE__ */ l(N, { children: [
|
|
36
|
+
/* @__PURE__ */ l(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: i(
|
|
40
|
+
"marsun-interactive-block-header",
|
|
41
|
+
n["marsun-interactive-block-header"]
|
|
42
|
+
),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ l(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: i(
|
|
48
|
+
"marsun-interactive-block-title-group",
|
|
49
|
+
n["marsun-interactive-block-title-group"]
|
|
50
|
+
),
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ t(
|
|
53
|
+
"p",
|
|
54
|
+
{
|
|
55
|
+
className: i(
|
|
56
|
+
"marsun-interactive-block-title",
|
|
57
|
+
n["marsun-interactive-block-title"]
|
|
58
|
+
),
|
|
59
|
+
children: k
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
a != null && a.length ? /* @__PURE__ */ t(
|
|
63
|
+
D,
|
|
64
|
+
{
|
|
65
|
+
content: a,
|
|
66
|
+
placement: "topLeft",
|
|
67
|
+
overlayStyle: { minWidth: 220, maxWidth: 360 },
|
|
68
|
+
overlayClassName: "marsun-interactive-block-info-tooltip",
|
|
69
|
+
children: /* @__PURE__ */ t(
|
|
70
|
+
"span",
|
|
71
|
+
{
|
|
72
|
+
className: i(
|
|
73
|
+
"marsun-interactive-block-info-trigger",
|
|
74
|
+
n["marsun-interactive-block-info-trigger"]
|
|
75
|
+
),
|
|
76
|
+
onClick: (e) => e.stopPropagation(),
|
|
77
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
78
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
79
|
+
children: /* @__PURE__ */ t(w, { size: 16, "aria-hidden": !0 })
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
) : null
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
v.length ? /* @__PURE__ */ t(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
className: i(
|
|
91
|
+
"marsun-interactive-block-actions",
|
|
92
|
+
n["marsun-interactive-block-actions"]
|
|
93
|
+
),
|
|
94
|
+
onClick: (e) => e.stopPropagation(),
|
|
95
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
96
|
+
role: "presentation",
|
|
97
|
+
children: /* @__PURE__ */ t(g, { moreType: "link", list: y })
|
|
98
|
+
}
|
|
99
|
+
) : null
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
h ? /* @__PURE__ */ l(
|
|
104
|
+
"div",
|
|
105
|
+
{
|
|
106
|
+
className: i(
|
|
107
|
+
"marsun-interactive-block-meta",
|
|
108
|
+
n["marsun-interactive-block-meta"],
|
|
109
|
+
d === "below" && n["marsun-interactive-block-meta--below"]
|
|
110
|
+
),
|
|
111
|
+
children: [
|
|
112
|
+
o ? /* @__PURE__ */ t(
|
|
113
|
+
"p",
|
|
114
|
+
{
|
|
115
|
+
className: i(
|
|
116
|
+
"marsun-interactive-block-subtitle",
|
|
117
|
+
n["marsun-interactive-block-subtitle"]
|
|
118
|
+
),
|
|
119
|
+
children: o
|
|
120
|
+
}
|
|
121
|
+
) : null,
|
|
122
|
+
f
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
) : null,
|
|
126
|
+
s ? /* @__PURE__ */ t(
|
|
127
|
+
"p",
|
|
128
|
+
{
|
|
129
|
+
className: i(
|
|
130
|
+
"marsun-interactive-block-description",
|
|
131
|
+
n["marsun-interactive-block-description"]
|
|
132
|
+
),
|
|
133
|
+
children: s
|
|
134
|
+
}
|
|
135
|
+
) : null
|
|
136
|
+
] });
|
|
137
|
+
return c ? /* @__PURE__ */ t(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
role: "button",
|
|
141
|
+
tabIndex: 0,
|
|
142
|
+
className: i(
|
|
143
|
+
"marsun-interactive-block",
|
|
144
|
+
n["marsun-interactive-block"],
|
|
145
|
+
n["marsun-interactive-block--clickable"],
|
|
146
|
+
m && n["marsun-interactive-block--selected"],
|
|
147
|
+
u
|
|
148
|
+
),
|
|
149
|
+
onClick: c,
|
|
150
|
+
onKeyDown: (e) => {
|
|
151
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), c());
|
|
152
|
+
},
|
|
153
|
+
children: b
|
|
154
|
+
}
|
|
155
|
+
) : /* @__PURE__ */ t(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
className: i(
|
|
159
|
+
"marsun-interactive-block",
|
|
160
|
+
n["marsun-interactive-block"],
|
|
161
|
+
m && n["marsun-interactive-block--selected"],
|
|
162
|
+
u
|
|
163
|
+
),
|
|
164
|
+
children: b
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
};
|
|
168
|
+
export {
|
|
169
|
+
L as default
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=InteractiveBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractiveBlock.js","sources":["../../../src/components/InteractiveBlock/InteractiveBlock.tsx"],"sourcesContent":["import ButtonGroup from '@kne/button-group';\nimport classNames from 'classnames';\nimport type { ReactNode } from 'react';\nimport type { DescriptionItem } from '../Descriptions/CommonDescriptions';\nimport { Info } from '../Icons';\nimport { SemanticTag } from '../Tag';\nimport { TooltipInfo } from '../TooltipInfo';\nimport styles from './style.module.scss';\n\nexport type InteractiveBlockTag = {\n label: string;\n color: string;\n};\n\nexport type InteractiveBlockAction = {\n key: string;\n label: string;\n icon?: ReactNode;\n onClick?: () => void;\n hidden?: boolean;\n};\n\nexport type InteractiveBlockTagsPlacement = 'inline' | 'below';\n\nexport type InteractiveBlockProps = {\n title: ReactNode;\n info?: DescriptionItem[];\n subtitle?: ReactNode;\n description?: ReactNode;\n tags?: InteractiveBlockTag[];\n tagsPlacement?: InteractiveBlockTagsPlacement;\n actions?: InteractiveBlockAction[];\n selected?: boolean;\n onClick?: () => void;\n className?: string;\n};\n\n/**\n * 带操作性的展示块:title → Info+TooltipInfo → actions;tags 紧贴 subtitle。\n */\nconst InteractiveBlock: React.FC<InteractiveBlockProps> = ({\n title,\n info,\n subtitle,\n description,\n tags,\n tagsPlacement = 'inline',\n actions,\n selected,\n onClick,\n className,\n}) => {\n const visibleActions = (actions ?? []).filter((a) => !a.hidden);\n const hasMeta = Boolean(subtitle || tags?.length);\n\n const actionList = visibleActions.map((action) => ({\n type: 'link' as const,\n key: action.key,\n icon: action.icon,\n children: action.label,\n onClick: action.onClick,\n }));\n\n const tagsNode = tags?.length ? (\n <div\n className={classNames(\n 'marsun-interactive-block-tags',\n styles['marsun-interactive-block-tags'],\n )}\n >\n {tags.map((tag) => (\n <SemanticTag key={tag.label} color={tag.color}>\n {tag.label}\n </SemanticTag>\n ))}\n </div>\n ) : null;\n\n const body = (\n <>\n <div\n className={classNames(\n 'marsun-interactive-block-header',\n styles['marsun-interactive-block-header'],\n )}\n >\n <div\n className={classNames(\n 'marsun-interactive-block-title-group',\n styles['marsun-interactive-block-title-group'],\n )}\n >\n <p\n className={classNames(\n 'marsun-interactive-block-title',\n styles['marsun-interactive-block-title'],\n )}\n >\n {title}\n </p>\n {info?.length ? (\n <TooltipInfo\n content={info}\n placement=\"topLeft\"\n overlayStyle={{ minWidth: 220, maxWidth: 360 }}\n overlayClassName=\"marsun-interactive-block-info-tooltip\"\n >\n <span\n className={classNames(\n 'marsun-interactive-block-info-trigger',\n styles['marsun-interactive-block-info-trigger'],\n )}\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <Info size={16} aria-hidden />\n </span>\n </TooltipInfo>\n ) : null}\n </div>\n {visibleActions.length ? (\n <div\n className={classNames(\n 'marsun-interactive-block-actions',\n styles['marsun-interactive-block-actions'],\n )}\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n role=\"presentation\"\n >\n <ButtonGroup moreType=\"link\" list={actionList} />\n </div>\n ) : null}\n </div>\n {hasMeta ? (\n <div\n className={classNames(\n 'marsun-interactive-block-meta',\n styles['marsun-interactive-block-meta'],\n tagsPlacement === 'below' && styles['marsun-interactive-block-meta--below'],\n )}\n >\n {subtitle ? (\n <p\n className={classNames(\n 'marsun-interactive-block-subtitle',\n styles['marsun-interactive-block-subtitle'],\n )}\n >\n {subtitle}\n </p>\n ) : null}\n {tagsNode}\n </div>\n ) : null}\n {description ? (\n <p\n className={classNames(\n 'marsun-interactive-block-description',\n styles['marsun-interactive-block-description'],\n )}\n >\n {description}\n </p>\n ) : null}\n </>\n );\n\n if (onClick) {\n return (\n <div\n role=\"button\"\n tabIndex={0}\n className={classNames(\n 'marsun-interactive-block',\n styles['marsun-interactive-block'],\n styles['marsun-interactive-block--clickable'],\n selected && styles['marsun-interactive-block--selected'],\n className,\n )}\n onClick={onClick}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick();\n }\n }}\n >\n {body}\n </div>\n );\n }\n\n return (\n <div\n className={classNames(\n 'marsun-interactive-block',\n styles['marsun-interactive-block'],\n selected && styles['marsun-interactive-block--selected'],\n className,\n )}\n >\n {body}\n </div>\n );\n};\n\nexport default InteractiveBlock;\n"],"names":["InteractiveBlock","title","info","subtitle","description","tags","tagsPlacement","actions","selected","onClick","className","visibleActions","a","hasMeta","actionList","action","tagsNode","jsx","classNames","styles","tag","SemanticTag","body","jsxs","Fragment","TooltipInfo","Info","ButtonGroup"],"mappings":";;;;;;;AAwCA,MAAMA,IAAoD,CAAC;AAAA,EACzD,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACJ,QAAMC,KAAkBJ,KAAW,CAAA,GAAI,OAAO,CAACK,MAAM,CAACA,EAAE,MAAM,GACxDC,IAAU,GAAQV,KAAYE,KAAA,QAAAA,EAAM,SAEpCS,IAAaH,EAAe,IAAI,CAACI,OAAY;AAAA,IACjD,MAAM;AAAA,IACN,KAAKA,EAAO;AAAA,IACZ,MAAMA,EAAO;AAAA,IACb,UAAUA,EAAO;AAAA,IACjB,SAASA,EAAO;AAAA,EAAA,EAChB,GAEIC,IAAWX,KAAA,QAAAA,EAAM,SACrB,gBAAAY;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAC,EAAO,+BAA+B;AAAA,MAAA;AAAA,MAGvC,UAAAd,EAAK,IAAI,CAACe,MACT,gBAAAH,EAACI,GAAA,EAA4B,OAAOD,EAAI,OACrC,UAAAA,EAAI,MAAA,GADWA,EAAI,KAEtB,CACD;AAAA,IAAA;AAAA,EAAA,IAED,MAEEE,IACJ,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWL;AAAA,UACT;AAAA,UACAC,EAAO,iCAAiC;AAAA,QAAA;AAAA,QAG1C,UAAA;AAAA,UAAA,gBAAAI;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWL;AAAA,gBACT;AAAA,gBACAC,EAAO,sCAAsC;AAAA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sun-interactive-block_3jkx1_1",
|
|
3
|
+
"marsun-interactive-block--clickable": "_marsun-interactive-block--clickable_3jkx1_10",
|
|
4
|
+
"marsun-interactive-block--selected": "_marsun-interactive-block--selected_3jkx1_13",
|
|
5
|
+
"marsun-interactive-block-title": "_marsun-interactive-block-title_3jkx1_13",
|
|
6
|
+
"marsun-interactive-block-header": "_marsun-interactive-block-header_3jkx1_33",
|
|
7
|
+
"marsun-interactive-block-title-group": "_marsun-interactive-block-title-group_3jkx1_40",
|
|
8
|
+
"marsun-interactive-block-info-trigger": "_marsun-interactive-block-info-trigger_3jkx1_59",
|
|
9
|
+
"marsun-interactive-block-actions": "_marsun-interactive-block-actions_3jkx1_69",
|
|
10
|
+
"marsun-interactive-block-meta": "_marsun-interactive-block-meta_3jkx1_86",
|
|
11
|
+
"marsun-interactive-block-meta--below": "_marsun-interactive-block-meta--below_3jkx1_93",
|
|
12
|
+
"marsun-interactive-block-subtitle": "_marsun-interactive-block-subtitle_3jkx1_98",
|
|
13
|
+
"marsun-interactive-block-tags": "_marsun-interactive-block-tags_3jkx1_105",
|
|
14
|
+
"marsun-interactive-block-description": "_marsun-interactive-block-description_3jkx1_111"
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
e as default
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ContentCardProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
/** 去掉内边距(适合嵌套 Tabs / Table) */
|
|
6
|
+
noPadding?: boolean;
|
|
7
|
+
/** 无 border / shadow / radius,用于模块 workarea 扁平容器 */
|
|
8
|
+
flat?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 主内容卡片容器。模块 workarea 扁平布局传 `flat`(可加 `noPadding`)。
|
|
12
|
+
*/
|
|
13
|
+
declare const ContentCard: React.FC<ContentCardProps>;
|
|
14
|
+
export default ContentCard;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import c from "classnames";
|
|
3
|
+
import t from "./style.module.scss.js";
|
|
4
|
+
const f = ({ children: n, className: a, noPadding: r, flat: o }) => /* @__PURE__ */ s(
|
|
5
|
+
"section",
|
|
6
|
+
{
|
|
7
|
+
className: c(
|
|
8
|
+
"marsun-content-card",
|
|
9
|
+
t["marsun-content-card"],
|
|
10
|
+
r && t["marsun-content-card--no-padding"],
|
|
11
|
+
o && t["marsun-content-card--flat"],
|
|
12
|
+
a
|
|
13
|
+
),
|
|
14
|
+
children: n
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
export {
|
|
18
|
+
f as default
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Layout/ContentCard/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport type { ReactNode } from 'react';\nimport styles from './style.module.scss';\n\nexport type ContentCardProps = {\n children: ReactNode;\n className?: string;\n /** 去掉内边距(适合嵌套 Tabs / Table) */\n noPadding?: boolean;\n /** 无 border / shadow / radius,用于模块 workarea 扁平容器 */\n flat?: boolean;\n};\n\n/**\n * 主内容卡片容器。模块 workarea 扁平布局传 `flat`(可加 `noPadding`)。\n */\nconst ContentCard: React.FC<ContentCardProps> = ({ children, className, noPadding, flat }) => (\n <section\n className={classNames(\n 'marsun-content-card',\n styles['marsun-content-card'],\n noPadding && styles['marsun-content-card--no-padding'],\n flat && styles['marsun-content-card--flat'],\n className,\n )}\n >\n {children}\n </section>\n);\n\nexport default ContentCard;\n"],"names":["ContentCard","children","className","noPadding","flat","jsx","classNames","styles"],"mappings":";;;AAgBA,MAAMA,IAA0C,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,MAAAC,QACjF,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAC,EAAO,qBAAqB;AAAA,MAC5BJ,KAAaI,EAAO,iCAAiC;AAAA,MACrDH,KAAQG,EAAO,2BAA2B;AAAA,MAC1CL;AAAA,IAAA;AAAA,IAGD,UAAAD;AAAA,EAAA;AACH;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const n = {
|
|
2
|
+
"marsun-content-card": "_marsun-content-card_kuu48_1",
|
|
3
|
+
"marsun-content-card--no-padding": "_marsun-content-card--no-padding_kuu48_9",
|
|
4
|
+
"marsun-content-card--flat": "_marsun-content-card--flat_kuu48_14"
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
n as default
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -8,3 +8,5 @@ export { default as ModulePageShell } from './ModulePageShell';
|
|
|
8
8
|
export type { ModulePageShellProps } from './ModulePageShell';
|
|
9
9
|
export { AgentAppShell } from './AgentAppShell';
|
|
10
10
|
export type { AgentAppShellProps } from './AgentAppShell';
|
|
11
|
+
export { default as ContentCard } from './ContentCard';
|
|
12
|
+
export type { ContentCardProps } from './ContentCard';
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from './components/Empty';
|
|
|
27
27
|
export * from './components/File';
|
|
28
28
|
export * from './components/Filter';
|
|
29
29
|
export * from './components/Form';
|
|
30
|
+
export * from './components/InteractiveBlock';
|
|
30
31
|
export * from './components/Layout';
|
|
31
32
|
export * from './components/Modal';
|
|
32
33
|
export * from './components/Stat';
|