@aviala-design/spiral 2.3.1 → 2.4.0
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/component-changelogs.json +144 -0
- package/dist/index.cjs +52 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -31
- package/dist/index.d.ts +29 -31
- package/dist/index.js +64 -28
- package/dist/index.js.map +1 -1
- package/dist/props.json +3230 -58
- package/package.json +7 -4
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Button": [
|
|
3
|
+
{
|
|
4
|
+
"version": "2.1.0",
|
|
5
|
+
"sections": {
|
|
6
|
+
"Added": [
|
|
7
|
+
"`compact` 变体(`min-w-0`)"
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"CascaderField": [
|
|
13
|
+
{
|
|
14
|
+
"version": "2.0.0",
|
|
15
|
+
"sections": {
|
|
16
|
+
"Fixed": [
|
|
17
|
+
"菜单渲染在 Modal 后方(z-index / pointer-events)",
|
|
18
|
+
"触摸下列扩展行为"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"DatePickerField": [
|
|
24
|
+
{
|
|
25
|
+
"version": "2.0.0",
|
|
26
|
+
"sections": {
|
|
27
|
+
"Changed": [
|
|
28
|
+
"键盘与布局细节打磨"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"List": [
|
|
34
|
+
{
|
|
35
|
+
"version": "Unreleased",
|
|
36
|
+
"sections": {
|
|
37
|
+
"Added": [
|
|
38
|
+
"`ListItem` `showTrailing` — set `false` (or `trailing={null}`) to hide trailing actions and the vertical divider; `action` type still shows the chevron",
|
|
39
|
+
"`ListItem` `showChevron` — control the trailing chevron on `action` rows",
|
|
40
|
+
"`ListItem` `showTopDivider` — force show/hide the content-row top hairline (default: hidden on the first child in a `ListGroup`)",
|
|
41
|
+
"`ListItem` `href` / `target` / `rel` — render the row as a link for navigation"
|
|
42
|
+
],
|
|
43
|
+
"Fixed": [
|
|
44
|
+
"First `ListItem` in a `ListGroup` no longer shows a top hairline by default"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"Modal": [
|
|
50
|
+
{
|
|
51
|
+
"version": "2.0.0",
|
|
52
|
+
"sections": {
|
|
53
|
+
"Fixed": [
|
|
54
|
+
"关闭后焦点归还",
|
|
55
|
+
"退场动画"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"Navigation": [
|
|
61
|
+
{
|
|
62
|
+
"version": "2.1.0",
|
|
63
|
+
"sections": {
|
|
64
|
+
"Changed": [
|
|
65
|
+
"垂直轨道在悬停/按下时伸展与收缩"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"Pagination": [
|
|
71
|
+
{
|
|
72
|
+
"version": "2.1.0",
|
|
73
|
+
"sections": {
|
|
74
|
+
"Changed": [
|
|
75
|
+
"省略号打开页码跳转 Popover"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"Popover": [
|
|
81
|
+
{
|
|
82
|
+
"version": "2.2.0",
|
|
83
|
+
"sections": {
|
|
84
|
+
"Added": [
|
|
85
|
+
"`appearance` 变体:`tooltip`(反色提示皮肤)、`primary`(品牌主色表面、白字)"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"version": "2.1.0",
|
|
91
|
+
"sections": {
|
|
92
|
+
"Added": [
|
|
93
|
+
"`HoverPopover`:桌面悬停/焦点打开,触摸降级为点按;复用箭头、表面与动画",
|
|
94
|
+
"内容支持 `flush`(无内边距)"
|
|
95
|
+
],
|
|
96
|
+
"Changed": [
|
|
97
|
+
"进出场动画改为方向感知(自触发点缩放 + 淡入淡出);箭头跟随各边",
|
|
98
|
+
"键盘打开时焦点移入内容,关闭后归还触发器"
|
|
99
|
+
],
|
|
100
|
+
"Fixed": [
|
|
101
|
+
"修复需按两次 Escape 才能关闭(移除吞掉首次关闭的 window-blur 抑制)"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"SegmentatorGroup": [
|
|
107
|
+
{
|
|
108
|
+
"version": "2.1.0",
|
|
109
|
+
"sections": {
|
|
110
|
+
"Changed": [
|
|
111
|
+
"拖拽预览改为命令式 DOM 切换,避免逐项 React 重渲染"
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"Tooltip": [
|
|
117
|
+
{
|
|
118
|
+
"version": "2.2.0",
|
|
119
|
+
"sections": {
|
|
120
|
+
"Changed": [
|
|
121
|
+
"`ResponsiveTooltip` 在触摸设备上保持 tooltip 外观,不再显示浅色 popover 面板"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"version": "2.1.0",
|
|
127
|
+
"sections": {
|
|
128
|
+
"Added": [
|
|
129
|
+
"`ResponsiveTooltip`:桌面为 Tooltip(悬停 + 键盘焦点),触摸自动切为 Popover(点按)"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"Typeface": [
|
|
135
|
+
{
|
|
136
|
+
"version": "2.0.0",
|
|
137
|
+
"sections": {
|
|
138
|
+
"Changed": [
|
|
139
|
+
"标题间距使用 `--gap-none`"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -8226,15 +8226,27 @@ var ListItem = (0, import_react49.forwardRef)(
|
|
|
8226
8226
|
select,
|
|
8227
8227
|
switchProps,
|
|
8228
8228
|
trailing,
|
|
8229
|
+
showTrailing = true,
|
|
8230
|
+
showChevron,
|
|
8231
|
+
showTopDivider,
|
|
8229
8232
|
selected = false,
|
|
8230
8233
|
disabled = false,
|
|
8231
8234
|
interactive,
|
|
8235
|
+
href,
|
|
8236
|
+
target,
|
|
8237
|
+
rel,
|
|
8232
8238
|
onClick,
|
|
8233
8239
|
...props
|
|
8234
8240
|
}, ref) => {
|
|
8235
|
-
const isInteractive = interactive ?? onClick != null;
|
|
8241
|
+
const isInteractive = interactive ?? (onClick != null || href != null);
|
|
8242
|
+
const chevronVisible = showChevron ?? itemType === "action";
|
|
8236
8243
|
const primaryAction = action ?? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons18.GeneralSetting, { "aria-hidden": true }), children: actionLabel });
|
|
8244
|
+
const chevron = chevronVisible ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "aviala-list-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons18.DirectionArrowRightLight, { width: 18, height: 18 }) }) : null;
|
|
8237
8245
|
const renderTrailing = () => {
|
|
8246
|
+
const hideActions = !showTrailing || trailing === null;
|
|
8247
|
+
if (hideActions) {
|
|
8248
|
+
return chevron && itemType === "action" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "aviala-list-item__more", children: chevron }) : null;
|
|
8249
|
+
}
|
|
8238
8250
|
if (trailing !== void 0) return trailing;
|
|
8239
8251
|
switch (itemType) {
|
|
8240
8252
|
case "action":
|
|
@@ -8253,7 +8265,7 @@ var ListItem = (0, import_react49.forwardRef)(
|
|
|
8253
8265
|
)
|
|
8254
8266
|
] }),
|
|
8255
8267
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ListDivider, {}),
|
|
8256
|
-
|
|
8268
|
+
chevron
|
|
8257
8269
|
] });
|
|
8258
8270
|
case "switch":
|
|
8259
8271
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "aviala-list-item__trailing", children: [
|
|
@@ -8270,26 +8282,50 @@ var ListItem = (0, import_react49.forwardRef)(
|
|
|
8270
8282
|
] });
|
|
8271
8283
|
}
|
|
8272
8284
|
};
|
|
8273
|
-
|
|
8285
|
+
const sharedClassName = cn("aviala-list-item", className);
|
|
8286
|
+
const sharedData = {
|
|
8287
|
+
"data-leading": leading,
|
|
8288
|
+
"data-type": itemType,
|
|
8289
|
+
"data-selected": selected ? "true" : void 0,
|
|
8290
|
+
"data-disabled": disabled ? "true" : void 0,
|
|
8291
|
+
"data-interactive": isInteractive ? "true" : void 0,
|
|
8292
|
+
"data-top-divider": showTopDivider === void 0 ? void 0 : showTopDivider ? "true" : "false"
|
|
8293
|
+
};
|
|
8294
|
+
const trailingNode = renderTrailing();
|
|
8295
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
8296
|
+
renderLeadingIcon(icon, leading),
|
|
8297
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "aviala-list-item__body", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "aviala-list-item__content", children: [
|
|
8298
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "aviala-list-item__head", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Typeface, { content: "textCaption", primary: title, secondary: subtitle }) }),
|
|
8299
|
+
trailingNode
|
|
8300
|
+
] }) })
|
|
8301
|
+
] });
|
|
8302
|
+
if (href && !disabled) {
|
|
8303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8304
|
+
"a",
|
|
8305
|
+
{
|
|
8306
|
+
ref,
|
|
8307
|
+
role: "listitem",
|
|
8308
|
+
className: sharedClassName,
|
|
8309
|
+
href,
|
|
8310
|
+
target,
|
|
8311
|
+
rel,
|
|
8312
|
+
onClick,
|
|
8313
|
+
...sharedData,
|
|
8314
|
+
...props,
|
|
8315
|
+
children: body
|
|
8316
|
+
}
|
|
8317
|
+
);
|
|
8318
|
+
}
|
|
8319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8274
8320
|
"div",
|
|
8275
8321
|
{
|
|
8276
8322
|
ref,
|
|
8277
8323
|
role: "listitem",
|
|
8278
|
-
className:
|
|
8279
|
-
"data-leading": leading,
|
|
8280
|
-
"data-type": itemType,
|
|
8281
|
-
"data-selected": selected ? "true" : void 0,
|
|
8282
|
-
"data-disabled": disabled ? "true" : void 0,
|
|
8283
|
-
"data-interactive": isInteractive ? "true" : void 0,
|
|
8324
|
+
className: sharedClassName,
|
|
8284
8325
|
onClick: disabled ? void 0 : onClick,
|
|
8326
|
+
...sharedData,
|
|
8285
8327
|
...props,
|
|
8286
|
-
children:
|
|
8287
|
-
renderLeadingIcon(icon, leading),
|
|
8288
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "aviala-list-item__body", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "aviala-list-item__content", children: [
|
|
8289
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "aviala-list-item__head", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Typeface, { content: "textCaption", primary: title, secondary: subtitle }) }),
|
|
8290
|
-
renderTrailing()
|
|
8291
|
-
] }) })
|
|
8292
|
-
]
|
|
8328
|
+
children: body
|
|
8293
8329
|
}
|
|
8294
8330
|
);
|
|
8295
8331
|
}
|