@sia.soul/sia-react-ui 0.1.38 → 0.1.39
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/{chunk-6TLANQVX.js → chunk-GLS4WVIZ.js} +1 -1
- package/dist/{chunk-ZTJUFVJO.js → chunk-LRGD2QDA.js} +1217 -1217
- package/dist/{chunk-DQ7WGTKA.js → chunk-WR7XTQRU.js} +9 -2
- package/dist/{core-BzBVS9md.d.cts → core-D4opRFkZ.d.cts} +1 -1
- package/dist/{core-CBURAp9W.d.ts → core-VNY_7WRq.d.ts} +1 -1
- package/dist/core.cjs +1471 -1465
- package/dist/core.css +19 -7
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +2 -2
- package/dist/index.cjs +7 -1
- package/dist/index.css +19 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/select-date-range.js +2 -2
- package/package.json +1 -1
|
@@ -2,10 +2,11 @@ import {
|
|
|
2
2
|
TextArea
|
|
3
3
|
} from "./chunk-SMCYEPBL.js";
|
|
4
4
|
import {
|
|
5
|
+
FloatingScrollbarProvider,
|
|
5
6
|
Popover,
|
|
6
7
|
Tooltip,
|
|
7
8
|
useOverlayLifecycle
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LRGD2QDA.js";
|
|
9
10
|
import {
|
|
10
11
|
Dropdown,
|
|
11
12
|
Icon
|
|
@@ -244,7 +245,12 @@ function Tabs({
|
|
|
244
245
|
}
|
|
245
246
|
const listRect = list.getBoundingClientRect();
|
|
246
247
|
const rect = active.getBoundingClientRect();
|
|
247
|
-
|
|
248
|
+
if (type === "tech-line" && resolvedOrientation === "horizontal") {
|
|
249
|
+
if (rect.left < listRect.left) list.scrollLeft += rect.left - listRect.left;
|
|
250
|
+
else if (rect.right > listRect.right) list.scrollLeft += rect.right - listRect.right;
|
|
251
|
+
}
|
|
252
|
+
const currentRect = active.getBoundingClientRect();
|
|
253
|
+
indicator.style.transform = `translate(${currentRect.left - listRect.left - list.clientLeft + list.scrollLeft}px, ${currentRect.top - listRect.top - list.clientTop + list.scrollTop}px)`;
|
|
248
254
|
indicator.style.width = `${rect.width}px`;
|
|
249
255
|
indicator.style.height = `${rect.height}px`;
|
|
250
256
|
indicator.style.visibility = "visible";
|
|
@@ -314,6 +320,7 @@ function Tabs({
|
|
|
314
320
|
...withTitleTooltip(props),
|
|
315
321
|
children: [
|
|
316
322
|
/* @__PURE__ */ jsxs4("div", { className: "sia-tabs__header", children: [
|
|
323
|
+
/* @__PURE__ */ jsx4(FloatingScrollbarProvider, { targetRef: listRef, disabled: type !== "tech-line" || resolvedOrientation !== "horizontal" }),
|
|
317
324
|
tabBarTitle ? /* @__PURE__ */ jsxs4("div", { className: "sia-tabs__title", children: [
|
|
318
325
|
tabBarTitle,
|
|
319
326
|
type === "tech-line" ? /* @__PURE__ */ jsx4("svg", { className: "sia-tabs__title-connector", viewBox: "0 0 32 40", "aria-hidden": "true", children: /* @__PURE__ */ jsx4("path", { d: "M0 39.25 H5 Q8 39.25 10 35.25 L28 3.75 Q29 1.75 32 1.75", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }) : null
|
|
@@ -721,7 +721,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
721
721
|
* @defaultValue false
|
|
722
722
|
*/
|
|
723
723
|
centered?: boolean;
|
|
724
|
-
/**
|
|
724
|
+
/** 标签栏左侧标题,科技大屏型会附带装饰线;折线科技型横向布局按标题内容及装饰留白确定宽度,标签超宽时独立横向滚动并保持当前标签可见,窄屏时标题独占一行。 */
|
|
725
725
|
tabBarTitle?: ReactNode;
|
|
726
726
|
/** 标签栏与内容面板之间的间距,单位 px,支持 0;未指定时上下布局为 16px,左右布局为 20px。仅影响当前 Tabs,不传递给嵌套实例。 */
|
|
727
727
|
contentGap?: number;
|
|
@@ -721,7 +721,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
721
721
|
* @defaultValue false
|
|
722
722
|
*/
|
|
723
723
|
centered?: boolean;
|
|
724
|
-
/**
|
|
724
|
+
/** 标签栏左侧标题,科技大屏型会附带装饰线;折线科技型横向布局按标题内容及装饰留白确定宽度,标签超宽时独立横向滚动并保持当前标签可见,窄屏时标题独占一行。 */
|
|
725
725
|
tabBarTitle?: ReactNode;
|
|
726
726
|
/** 标签栏与内容面板之间的间距,单位 px,支持 0;未指定时上下布局为 16px,左右布局为 20px。仅影响当前 Tabs,不传递给嵌套实例。 */
|
|
727
727
|
contentGap?: number;
|