@sia.soul/sia-react-ui 0.1.105 → 0.1.107

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 (45) hide show
  1. package/dist/Button-BiL3Wjsd.d.ts +44 -0
  2. package/dist/Button-O_pNB3SQ.d.cts +44 -0
  3. package/dist/{Select-DmT9pFRW.d.ts → Select-BddM4uXC.d.ts} +4 -42
  4. package/dist/{Select-DQpfyK7I.d.cts → Select-Cf0xz1Tg.d.cts} +4 -42
  5. package/dist/chart.js +5 -3
  6. package/dist/chunk-4TTHKFJ7.js +706 -0
  7. package/dist/chunk-CZ2ITBRW.js +65 -0
  8. package/dist/{chunk-EYB55TC5.js → chunk-D3HXXEEZ.js} +9 -5
  9. package/dist/{chunk-X4OLHWC3.js → chunk-JEDJQ257.js} +11 -7
  10. package/dist/chunk-KY6A5IJH.js +18 -0
  11. package/dist/{chunk-NURPAO7G.js → chunk-MMSYWDTR.js} +9 -5
  12. package/dist/{chunk-PUZWLIIJ.js → chunk-NZMUW5XI.js} +1 -13
  13. package/dist/{chunk-D456SSL3.js → chunk-OJ2WDC66.js} +6 -4
  14. package/dist/{chunk-V6CRVCSB.js → chunk-QV3AP6A2.js} +40 -729
  15. package/dist/chunk-RX242MUO.js +0 -0
  16. package/dist/chunk-SCEHVGKV.js +75 -0
  17. package/dist/{chunk-TUXNOSCT.js → chunk-SO7IJZIR.js} +4 -2
  18. package/dist/{chunk-T3EGAN7O.js → chunk-WD56MJO2.js} +5 -3
  19. package/dist/{core-_1K1jLyH.d.ts → core-Bm-1bOjF.d.ts} +8 -1
  20. package/dist/{core-DF7gei-P.d.cts → core-zpQkbNf_.d.cts} +8 -1
  21. package/dist/core.cjs +3 -1
  22. package/dist/core.css +40 -0
  23. package/dist/core.d.cts +3 -2
  24. package/dist/core.d.ts +3 -2
  25. package/dist/core.js +12 -7
  26. package/dist/game.cjs +2801 -0
  27. package/dist/game.css +8919 -0
  28. package/dist/game.d.cts +416 -0
  29. package/dist/game.d.ts +416 -0
  30. package/dist/game.js +1020 -0
  31. package/dist/index.cjs +5523 -5461
  32. package/dist/index.css +80 -0
  33. package/dist/index.d.cts +51 -10
  34. package/dist/index.d.ts +51 -10
  35. package/dist/index.js +723 -657
  36. package/dist/markdown-editor.js +3 -2
  37. package/dist/rich-text-editor.cjs +3 -1
  38. package/dist/rich-text-editor.js +7 -4
  39. package/dist/{select-date-range-BT71tp7y.d.cts → select-date-range-Cm5o2xPp.d.cts} +1 -1
  40. package/dist/{select-date-range-CFGzoyLs.d.ts → select-date-range-yGDEA1RP.d.ts} +1 -1
  41. package/dist/select-date-range.d.cts +3 -2
  42. package/dist/select-date-range.d.ts +3 -2
  43. package/dist/select-date-range.js +8 -5
  44. package/package.json +9 -3
  45. package/dist/chunk-SJFT5OSX.js +0 -131
@@ -0,0 +1,65 @@
1
+ import {
2
+ useControlSize,
3
+ withTitleTooltip
4
+ } from "./chunk-NZMUW5XI.js";
5
+
6
+ // src/components/Button.tsx
7
+ import { forwardRef, useRef } from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var Button = forwardRef(function Button2({
10
+ variant = "default",
11
+ size: sizeProp,
12
+ loading = false,
13
+ block = false,
14
+ danger = false,
15
+ icon,
16
+ iconPosition = "start",
17
+ className = "",
18
+ children,
19
+ disabled,
20
+ onClick,
21
+ style,
22
+ ...props
23
+ }, forwardedRef) {
24
+ const size = useControlSize(sizeProp);
25
+ const localRef = useRef(null);
26
+ function setRef(node) {
27
+ localRef.current = node;
28
+ if (typeof forwardedRef === "function") forwardedRef(node);
29
+ else if (forwardedRef) forwardedRef.current = node;
30
+ }
31
+ function handleClick(event) {
32
+ const button = localRef.current;
33
+ if (button && variant === "primary") {
34
+ const rect = button.getBoundingClientRect();
35
+ button.style.setProperty("--sia-wave-x", `${event.clientX - rect.left}px`);
36
+ button.style.setProperty("--sia-wave-y", `${event.clientY - rect.top}px`);
37
+ button.dataset.wave = "active";
38
+ window.setTimeout(() => delete button.dataset.wave, 360);
39
+ }
40
+ onClick?.(event);
41
+ }
42
+ const mergedStyle = block ? { ...style, width: "100%" } : style ?? {};
43
+ return /* @__PURE__ */ jsxs(
44
+ "button",
45
+ {
46
+ ref: setRef,
47
+ type: "button",
48
+ className: `sia-button sia-button--${variant} sia-button--${size}${danger ? " sia-button--danger" : ""} ${className}`.trim(),
49
+ "aria-busy": loading || void 0,
50
+ disabled: disabled || loading,
51
+ onClick: handleClick,
52
+ style: mergedStyle,
53
+ ...withTitleTooltip(props),
54
+ children: [
55
+ loading ? /* @__PURE__ */ jsx("span", { className: "sia-button__spinner", "aria-hidden": "true" }) : icon && iconPosition === "start" ? /* @__PURE__ */ jsx("span", { className: "sia-button__icon", children: icon }) : null,
56
+ children !== void 0 && children !== null ? /* @__PURE__ */ jsx("span", { children }) : null,
57
+ !loading && icon && iconPosition === "end" ? /* @__PURE__ */ jsx("span", { className: "sia-button__icon", children: icon }) : null
58
+ ]
59
+ }
60
+ );
61
+ });
62
+
63
+ export {
64
+ Button
65
+ };
@@ -1,20 +1,24 @@
1
1
  import {
2
2
  Dropdown,
3
+ Input
4
+ } from "./chunk-4TTHKFJ7.js";
5
+ import {
3
6
  Icon,
4
- Input,
5
7
  Modal
6
- } from "./chunk-V6CRVCSB.js";
8
+ } from "./chunk-QV3AP6A2.js";
7
9
  import {
8
10
  Button
9
- } from "./chunk-SJFT5OSX.js";
11
+ } from "./chunk-CZ2ITBRW.js";
12
+ import {
13
+ useFloatingPlaceholder
14
+ } from "./chunk-KY6A5IJH.js";
10
15
  import {
11
16
  ControlSizeContext,
12
17
  PopupPortal,
13
18
  useControlSize,
14
19
  useControllableState,
15
- useFloatingPlaceholder,
16
20
  withTitleTooltip
17
- } from "./chunk-PUZWLIIJ.js";
21
+ } from "./chunk-NZMUW5XI.js";
18
22
 
19
23
  // src/components/Checkbox.tsx
20
24
  import { createContext, forwardRef, useContext, useEffect, useId, useMemo, useRef } from "react";
@@ -1,21 +1,25 @@
1
1
  import {
2
2
  Popover,
3
3
  Tooltip
4
- } from "./chunk-EYB55TC5.js";
4
+ } from "./chunk-D3HXXEEZ.js";
5
+ import {
6
+ Dropdown
7
+ } from "./chunk-4TTHKFJ7.js";
8
+ import {
9
+ TextArea
10
+ } from "./chunk-SCEHVGKV.js";
5
11
  import {
6
- Dropdown,
7
12
  Icon,
8
13
  useOverlayLifecycle
9
- } from "./chunk-V6CRVCSB.js";
14
+ } from "./chunk-QV3AP6A2.js";
10
15
  import {
11
- Button,
12
- TextArea
13
- } from "./chunk-SJFT5OSX.js";
16
+ Button
17
+ } from "./chunk-CZ2ITBRW.js";
14
18
  import {
15
19
  useControlSize,
16
20
  useControllableState,
17
21
  withTitleTooltip
18
- } from "./chunk-PUZWLIIJ.js";
22
+ } from "./chunk-NZMUW5XI.js";
19
23
 
20
24
  // src/components/Toolbar.tsx
21
25
  import { useLayoutEffect, useRef, useState } from "react";
@@ -0,0 +1,18 @@
1
+ import {
2
+ usePlaceholderMode
3
+ } from "./chunk-NZMUW5XI.js";
4
+
5
+ // src/components/FloatingPlaceholder.tsx
6
+ import { jsx } from "react/jsx-runtime";
7
+ function useFloatingPlaceholder({ mode, placeholder, filled, active = false }) {
8
+ const enabled = usePlaceholderMode(mode) === "floating" && Boolean(placeholder);
9
+ return {
10
+ enabled,
11
+ className: enabled ? ` sia-placeholder-floating${filled ? " sia-placeholder-floating--filled" : ""}${active ? " sia-placeholder-floating--active" : ""}` : "",
12
+ label: enabled ? /* @__PURE__ */ jsx("span", { className: "sia-floating-placeholder", "aria-hidden": "true", children: placeholder }) : null
13
+ };
14
+ }
15
+
16
+ export {
17
+ useFloatingPlaceholder
18
+ };
@@ -1,15 +1,19 @@
1
1
  import {
2
2
  Dropdown,
3
- Icon,
4
3
  Input
5
- } from "./chunk-V6CRVCSB.js";
4
+ } from "./chunk-4TTHKFJ7.js";
5
+ import {
6
+ Icon
7
+ } from "./chunk-QV3AP6A2.js";
6
8
  import {
7
9
  Button
8
- } from "./chunk-SJFT5OSX.js";
10
+ } from "./chunk-CZ2ITBRW.js";
11
+ import {
12
+ useFloatingPlaceholder
13
+ } from "./chunk-KY6A5IJH.js";
9
14
  import {
10
- useFloatingPlaceholder,
11
15
  withTitleTooltip
12
- } from "./chunk-PUZWLIIJ.js";
16
+ } from "./chunk-NZMUW5XI.js";
13
17
 
14
18
  // src/components/RichTextEditor.tsx
15
19
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -281,17 +281,6 @@ function useControllableState({ value, defaultValue, onChange }) {
281
281
  return [currentValue, setValue];
282
282
  }
283
283
 
284
- // src/components/FloatingPlaceholder.tsx
285
- import { jsx as jsx3 } from "react/jsx-runtime";
286
- function useFloatingPlaceholder({ mode, placeholder, filled, active = false }) {
287
- const enabled = usePlaceholderMode(mode) === "floating" && Boolean(placeholder);
288
- return {
289
- enabled,
290
- className: enabled ? ` sia-placeholder-floating${filled ? " sia-placeholder-floating--filled" : ""}${active ? " sia-placeholder-floating--active" : ""}` : "",
291
- label: enabled ? /* @__PURE__ */ jsx3("span", { className: "sia-floating-placeholder", "aria-hidden": "true", children: placeholder }) : null
292
- };
293
- }
294
-
295
284
  export {
296
285
  PopupPortal,
297
286
  withTitleTooltip,
@@ -299,6 +288,5 @@ export {
299
288
  useControlSize,
300
289
  PlaceholderModeContext,
301
290
  usePlaceholderMode,
302
- useControllableState,
303
- useFloatingPlaceholder
291
+ useControllableState
304
292
  };
@@ -1,17 +1,19 @@
1
1
  import {
2
2
  FloatingScrollbarProvider,
3
3
  Select
4
- } from "./chunk-EYB55TC5.js";
4
+ } from "./chunk-D3HXXEEZ.js";
5
5
  import {
6
6
  Icon
7
- } from "./chunk-V6CRVCSB.js";
7
+ } from "./chunk-QV3AP6A2.js";
8
+ import {
9
+ useFloatingPlaceholder
10
+ } from "./chunk-KY6A5IJH.js";
8
11
  import {
9
12
  PopupPortal,
10
13
  useControlSize,
11
14
  useControllableState,
12
- useFloatingPlaceholder,
13
15
  withTitleTooltip
14
- } from "./chunk-PUZWLIIJ.js";
16
+ } from "./chunk-NZMUW5XI.js";
15
17
 
16
18
  // src/components/DatePicker.tsx
17
19
  import { useEffect, useId, useLayoutEffect as useLayoutEffect2, useMemo, useRef as useRef2, useState } from "react";