@sia.soul/sia-react-ui 0.1.166 → 0.1.168

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.
Files changed (42) hide show
  1. package/dist/{Select-Dxevc0f6.d.cts → Select-BXL6JVj0.d.cts} +3 -1
  2. package/dist/{Select-tsENCXQI.d.ts → Select-xBynHOUn.d.ts} +3 -1
  3. package/dist/chart.cjs +4553 -4513
  4. package/dist/chart.d.cts +1850 -1843
  5. package/dist/chart.d.ts +1850 -1843
  6. package/dist/chart.js +1 -1
  7. package/dist/chunk-2FZI7TP6.js +0 -0
  8. package/dist/{chunk-T2F6X3LA.js → chunk-55MXRT55.js} +26 -22
  9. package/dist/{chunk-2EC653G5.js → chunk-5KTQXNGL.js} +2 -2
  10. package/dist/{chunk-NHGCGOF2.js → chunk-A7TLMWMM.js} +4754 -4714
  11. package/dist/{chunk-DKQ5UCN6.js → chunk-DQR7EPRA.js} +519 -220
  12. package/dist/{chunk-G5EJJFUI.js → chunk-FSO46WEJ.js} +14 -6
  13. package/dist/{chunk-SX4LLT3H.js → chunk-V4YT4LT5.js} +36 -29
  14. package/dist/{chunk-23FQ5ARA.js → chunk-XS7AVCHO.js} +27 -17
  15. package/dist/{core-Dy8NWJ1b.d.ts → core-BlCSI1Tm.d.ts} +7 -10
  16. package/dist/{core-Cnt8r6pj.d.cts → core-D_D7pOTq.d.cts} +7 -10
  17. package/dist/core.cjs +117 -88
  18. package/dist/core.css +3145 -5342
  19. package/dist/core.d.cts +2 -2
  20. package/dist/core.d.ts +2 -2
  21. package/dist/core.js +4 -4
  22. package/dist/game.cjs +14 -6
  23. package/dist/game.css +1658 -3131
  24. package/dist/game.js +1 -1
  25. package/dist/index.cjs +6684 -6237
  26. package/dist/index.css +8717 -8536
  27. package/dist/index.d.cts +137 -116
  28. package/dist/index.d.ts +137 -116
  29. package/dist/index.js +908 -828
  30. package/dist/markdown-editor.css +461 -0
  31. package/dist/markdown-editor.js +2 -1
  32. package/dist/rich-text-editor.cjs +38 -20
  33. package/dist/rich-text-editor.css +461 -0
  34. package/dist/rich-text-editor.js +4 -3
  35. package/dist/{select-date-range-E1N5-oXv.d.ts → select-date-range-C-29x2BA.d.ts} +7 -10
  36. package/dist/{select-date-range-BnlISSPV.d.cts → select-date-range-CewOaLtk.d.cts} +7 -10
  37. package/dist/select-date-range.cjs +563 -249
  38. package/dist/select-date-range.d.cts +2 -2
  39. package/dist/select-date-range.d.ts +2 -2
  40. package/dist/select-date-range.js +4 -4
  41. package/package.json +5 -1
  42. /package/dist/{chunk-V4I32DPL.js → chunk-GKWSCL5Q.js} +0 -0
package/dist/chart.js CHANGED
@@ -56,7 +56,7 @@ import {
56
56
  smoothSvgPath,
57
57
  svgArcPath,
58
58
  transferCompositeValue
59
- } from "./chunk-NHGCGOF2.js";
59
+ } from "./chunk-A7TLMWMM.js";
60
60
  import "./chunk-J6BPKBEL.js";
61
61
  import "./chunk-PAWEP65C.js";
62
62
  import "./chunk-OHAESA5R.js";
File without changes
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  Popover,
3
3
  Tooltip
4
- } from "./chunk-SX4LLT3H.js";
4
+ } from "./chunk-V4YT4LT5.js";
5
5
  import {
6
6
  Dropdown
7
- } from "./chunk-23FQ5ARA.js";
7
+ } from "./chunk-XS7AVCHO.js";
8
8
  import {
9
9
  TextArea
10
10
  } from "./chunk-J6BPKBEL.js";
11
11
  import {
12
12
  Icon,
13
13
  useOverlayLifecycle
14
- } from "./chunk-G5EJJFUI.js";
14
+ } from "./chunk-FSO46WEJ.js";
15
15
  import {
16
16
  Button
17
17
  } from "./chunk-PAWEP65C.js";
@@ -92,9 +92,9 @@ function Toolbar({ items, onAction, disabled = false, size = "small", variant =
92
92
  }
93
93
 
94
94
  // src/components/Card.tsx
95
- import { useState as useState2 } from "react";
95
+ import { forwardRef, useState as useState2 } from "react";
96
96
  import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
97
- function Card({
97
+ var Card = forwardRef(function Card2({
98
98
  bordered = true,
99
99
  title,
100
100
  description,
@@ -124,7 +124,7 @@ function Card({
124
124
  onClick,
125
125
  onKeyDown,
126
126
  ...props
127
- }) {
127
+ }, forwardedRef) {
128
128
  const [internalCollapsed, setInternalCollapsed] = useState2(defaultCollapsed);
129
129
  const [internalSelected, setInternalSelected] = useState2(defaultSelected);
130
130
  const isSelected = selected ?? internalSelected;
@@ -151,6 +151,7 @@ function Card({
151
151
  return /* @__PURE__ */ jsxs2(
152
152
  "section",
153
153
  {
154
+ ref: forwardedRef,
154
155
  className: `sia-card${fill ? " sia-card--fill" : ""}${fill && bodyHeight !== void 0 ? " sia-card--body-height" : ""}${!bordered ? " sia-card--borderless" : ""}${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${actionable ? " sia-card--actionable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
155
156
  style: mergedStyle,
156
157
  "data-sia-interaction-cursor": interactionCursor,
@@ -193,7 +194,7 @@ function Card({
193
194
  ]
194
195
  }
195
196
  );
196
- }
197
+ });
197
198
 
198
199
  // src/components/Tag.tsx
199
200
  import { Children, Fragment as Fragment2, isValidElement } from "react";
@@ -255,10 +256,10 @@ function Tag({
255
256
  }
256
257
 
257
258
  // src/components/Tabs.tsx
258
- import { useEffect, useId, useLayoutEffect as useLayoutEffect2, useMemo, useRef as useRef2, useState as useState3 } from "react";
259
+ import { forwardRef as forwardRef2, useEffect, useId, useLayoutEffect as useLayoutEffect2, useMemo, useRef as useRef2, useState as useState3 } from "react";
259
260
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
260
261
  import { createElement } from "react";
261
- function Tabs({
262
+ var Tabs = forwardRef2(function Tabs2({
262
263
  items,
263
264
  activeKey,
264
265
  defaultActiveKey,
@@ -282,7 +283,7 @@ function Tabs({
282
283
  onTabContextMenuClick,
283
284
  className = "",
284
285
  ...props
285
- }) {
286
+ }, forwardedRef) {
286
287
  const firstEnabledKey = items.find((item) => !item.disabled)?.key ?? "";
287
288
  const [internalActiveKey, setInternalActiveKey] = useState3(defaultActiveKey ?? firstEnabledKey);
288
289
  const currentKey = activeKey ?? internalActiveKey;
@@ -461,6 +462,7 @@ function Tabs({
461
462
  return /* @__PURE__ */ jsxs4(
462
463
  "div",
463
464
  {
465
+ ref: forwardedRef,
464
466
  className: `sia-tabs sia-tabs--${type}${type === "underline" ? " sia-tabs--line" : ""} sia-tabs--${size} sia-tabs--${resolvedOrientation} sia-tabs--${resolvedPosition}${centered ? " sia-tabs--centered" : ""} ${className}`.trim(),
465
467
  ...withTitleTooltip(props),
466
468
  children: [
@@ -567,7 +569,7 @@ function Tabs({
567
569
  ]
568
570
  }
569
571
  );
570
- }
572
+ });
571
573
 
572
574
  // src/components/Feedback.tsx
573
575
  import { cloneElement, useEffect as useEffect2, useMemo as useMemo2, useRef as useRef3, useState as useState4 } from "react";
@@ -1467,7 +1469,7 @@ var message = {
1467
1469
  };
1468
1470
 
1469
1471
  // src/components/Upload.tsx
1470
- import { forwardRef, useEffect as useEffect5, useImperativeHandle, useRef as useRef6, useState as useState6 } from "react";
1472
+ import { forwardRef as forwardRef3, useEffect as useEffect5, useImperativeHandle, useRef as useRef6, useState as useState6 } from "react";
1471
1473
 
1472
1474
  // src/components/uploadFiles.ts
1473
1475
  function acceptsUploadFile(file, accept) {
@@ -1654,7 +1656,7 @@ function UploadItem({ file, files, props, actions }) {
1654
1656
  ] });
1655
1657
  return /* @__PURE__ */ jsx8(Fragment5, { children: props.itemRender ? props.itemRender(node, file, files, actions) : node });
1656
1658
  }
1657
- var UploadRoot = forwardRef(function UploadRoot2({
1659
+ var UploadRoot = forwardRef3(function UploadRoot2({
1658
1660
  accept,
1659
1661
  acceptMode = "validate",
1660
1662
  multiple = false,
@@ -1959,7 +1961,7 @@ var UploadRoot = forwardRef(function UploadRoot2({
1959
1961
  }
1960
1962
  );
1961
1963
  });
1962
- var UploadDragger = forwardRef(function UploadDragger2({ hint = "\u652F\u6301\u5355\u4E2A\u6216\u6279\u91CF\u4E0A\u4F20", children, className = "", ...props }, ref) {
1964
+ var UploadDragger = forwardRef3(function UploadDragger2({ hint = "\u652F\u6301\u5355\u4E2A\u6216\u6279\u91CF\u4E0A\u4F20", children, className = "", ...props }, ref) {
1963
1965
  return /* @__PURE__ */ jsx8(UploadRoot, { ...props, ref, className: `sia-upload-dragger ${className}`.trim(), children: children ?? /* @__PURE__ */ jsxs8("span", { className: "sia-upload-dragger__content", children: [
1964
1966
  /* @__PURE__ */ jsx8(Icon, { name: "upload", size: 32 }),
1965
1967
  /* @__PURE__ */ jsxs8("strong", { children: [
@@ -1979,9 +1981,10 @@ var Upload = Object.assign(UploadRoot, {
1979
1981
  });
1980
1982
 
1981
1983
  // src/components/Breadcrumb.tsx
1984
+ import { forwardRef as forwardRef4 } from "react";
1982
1985
  import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1983
- function Breadcrumb({ items, separator = "/", itemRender, className = "", ...props }) {
1984
- return /* @__PURE__ */ jsx9("nav", { "aria-label": "\u9762\u5305\u5C51\u5BFC\u822A", ...withTitleTooltip(props), className: `sia-breadcrumb ${className}`.trim(), children: /* @__PURE__ */ jsx9("ol", { className: "sia-breadcrumb__list", children: items.map((item, index) => {
1986
+ var Breadcrumb = forwardRef4(function Breadcrumb2({ items, separator = "/", itemRender, className = "", ...props }, forwardedRef) {
1987
+ return /* @__PURE__ */ jsx9("nav", { ref: forwardedRef, "aria-label": "\u9762\u5305\u5C51\u5BFC\u822A", ...withTitleTooltip(props), className: `sia-breadcrumb ${className}`.trim(), children: /* @__PURE__ */ jsx9("ol", { className: "sia-breadcrumb__list", children: items.map((item, index) => {
1985
1988
  const current = index === items.length - 1;
1986
1989
  const content = /* @__PURE__ */ jsxs9(Fragment6, { children: [
1987
1990
  item.icon ? /* @__PURE__ */ jsx9("span", { className: "sia-breadcrumb__icon", "aria-hidden": "true", children: item.icon }) : null,
@@ -1997,7 +2000,7 @@ function Breadcrumb({ items, separator = "/", itemRender, className = "", ...pro
1997
2000
  !current ? /* @__PURE__ */ jsx9("span", { className: "sia-breadcrumb__separator", "aria-hidden": "true", children: item.separator === void 0 ? separator : item.separator }) : null
1998
2001
  ] }, item.key ?? index);
1999
2002
  }) }) });
2000
- }
2003
+ });
2001
2004
 
2002
2005
  // src/components/Typography.tsx
2003
2006
  import { useEffect as useEffect6, useLayoutEffect as useLayoutEffect3, useRef as useRef7, useState as useState7 } from "react";
@@ -2157,10 +2160,10 @@ var Typography = Object.assign(TypographyRoot, {
2157
2160
  });
2158
2161
 
2159
2162
  // src/components/FloatButton.tsx
2160
- import { createContext as createContext2, forwardRef as forwardRef2, useContext as useContext2, useEffect as useEffect7, useId as useId3, useRef as useRef8, useState as useState8 } from "react";
2163
+ import { createContext as createContext2, forwardRef as forwardRef5, useContext as useContext2, useEffect as useEffect7, useId as useId3, useRef as useRef8, useState as useState8 } from "react";
2161
2164
  import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
2162
2165
  var GroupShape = createContext2(void 0);
2163
- var FloatButtonRoot = forwardRef2(function FloatButton({
2166
+ var FloatButtonRoot = forwardRef5(function FloatButton({
2164
2167
  icon,
2165
2168
  description,
2166
2169
  tooltip,
@@ -2297,6 +2300,7 @@ var FloatButton2 = Object.assign(FloatButtonRoot, {
2297
2300
  });
2298
2301
 
2299
2302
  // src/components/Result.tsx
2303
+ import { forwardRef as forwardRef6 } from "react";
2300
2304
  import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
2301
2305
  var icons = {
2302
2306
  success: "circle-check",
@@ -2304,17 +2308,17 @@ var icons = {
2304
2308
  info: "info",
2305
2309
  warning: "warning"
2306
2310
  };
2307
- function Result({ status = "info", title, subTitle, icon, extra, children, className = "", ...props }) {
2311
+ var Result = forwardRef6(function Result2({ status = "info", title, subTitle, icon, extra, children, className = "", ...props }, forwardedRef) {
2308
2312
  const resultIcon = icon === void 0 ? /* @__PURE__ */ jsx12(Icon, { name: icons[status], size: 72, variant: "filled" }) : icon;
2309
2313
  const present = (value) => value !== void 0 && value !== null && value !== false;
2310
- return /* @__PURE__ */ jsxs12("div", { ...props, className: `sia-result sia-result--${status} ${className}`.trim(), children: [
2314
+ return /* @__PURE__ */ jsxs12("div", { ref: forwardedRef, ...props, className: `sia-result sia-result--${status} ${className}`.trim(), children: [
2311
2315
  present(resultIcon) && /* @__PURE__ */ jsx12("div", { className: "sia-result__icon", "aria-hidden": "true", children: resultIcon }),
2312
2316
  present(title) && /* @__PURE__ */ jsx12("div", { className: "sia-result__title", children: title }),
2313
2317
  present(subTitle) && /* @__PURE__ */ jsx12("div", { className: "sia-result__subtitle", children: subTitle }),
2314
2318
  present(children) && /* @__PURE__ */ jsx12("div", { className: "sia-result__content", children }),
2315
2319
  present(extra) && /* @__PURE__ */ jsx12("div", { className: "sia-result__extra", children: extra })
2316
2320
  ] });
2317
- }
2321
+ });
2318
2322
 
2319
2323
  export {
2320
2324
  Toolbar,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Dropdown,
3
3
  Input
4
- } from "./chunk-23FQ5ARA.js";
4
+ } from "./chunk-XS7AVCHO.js";
5
5
  import {
6
6
  Icon
7
- } from "./chunk-G5EJJFUI.js";
7
+ } from "./chunk-FSO46WEJ.js";
8
8
  import {
9
9
  Button
10
10
  } from "./chunk-PAWEP65C.js";