@sia.soul/sia-react-ui 0.1.23 → 0.1.24

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-BoVx-D0D.d.ts → Select-O_yY51vc.d.ts} +4 -2
  2. package/dist/{Select-BO3VyE2n.d.cts → Select-W_xpkpOW.d.cts} +4 -2
  3. package/dist/chart.cjs +1401 -1160
  4. package/dist/chart.css +21 -0
  5. package/dist/chart.js +4 -4
  6. package/dist/{chunk-VX2JECOU.js → chunk-6R7JY7IY.js} +20 -16
  7. package/dist/{chunk-TZGUBGA4.js → chunk-6WBABNAX.js} +4 -3
  8. package/dist/{chunk-OKP4DIQH.js → chunk-GUXAWU63.js} +29 -26
  9. package/dist/{chunk-QJ4OQNQ4.js → chunk-LA7O3PN4.js} +4 -3
  10. package/dist/{chunk-NPB33IXJ.js → chunk-LIYCU2GU.js} +349 -278
  11. package/dist/{chunk-KLI65JVD.js → chunk-LRPQ5FGE.js} +68 -186
  12. package/dist/chunk-NSSPGXNM.js +284 -0
  13. package/dist/{chunk-YT6E3X2K.js → chunk-OH6YILJW.js} +4 -3
  14. package/dist/{chunk-RWGSZW32.js → chunk-RGXVPS37.js} +7 -6
  15. package/dist/{chunk-GM47DAAN.js → chunk-T2QIW4OO.js} +8 -7
  16. package/dist/{core-Cqgl6Z7h.d.ts → core-BOzLwiXG.d.ts} +44 -5
  17. package/dist/{core-DF0pknX6.d.cts → core-tbb9ZiBY.d.cts} +44 -5
  18. package/dist/core.cjs +1637 -1443
  19. package/dist/core.css +52 -0
  20. package/dist/core.d.cts +2 -2
  21. package/dist/core.d.ts +2 -2
  22. package/dist/core.js +8 -6
  23. package/dist/index.cjs +3705 -3505
  24. package/dist/index.css +52 -0
  25. package/dist/index.d.cts +28 -15
  26. package/dist/index.d.ts +28 -15
  27. package/dist/index.js +90 -83
  28. package/dist/markdown-editor.cjs +269 -28
  29. package/dist/markdown-editor.css +20 -0
  30. package/dist/markdown-editor.js +2 -2
  31. package/dist/rich-text-editor.cjs +1156 -1031
  32. package/dist/rich-text-editor.css +20 -0
  33. package/dist/rich-text-editor.js +4 -4
  34. package/dist/{select-date-range-a6nzK7Wu.d.ts → select-date-range-BjqFUeU6.d.ts} +1 -1
  35. package/dist/{select-date-range-IOe6MMqu.d.cts → select-date-range-C9w8z3G8.d.cts} +1 -1
  36. package/dist/select-date-range.cjs +1188 -1059
  37. package/dist/select-date-range.css +20 -0
  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 +5 -5
  41. package/package.json +2 -2
  42. package/dist/chunk-3VJ4CZDQ.js +0 -43
@@ -0,0 +1,20 @@
1
+ /* src/title-tooltip.css */
2
+ body > .sia-title-tooltip[data-sia-popup-layer] {
3
+ position: fixed;
4
+ z-index: 1800;
5
+ display: block;
6
+ box-sizing: border-box;
7
+ width: max-content;
8
+ max-width: min(320px, calc(100vw - 16px));
9
+ max-height: calc(100vh - 16px);
10
+ padding: 7px 10px;
11
+ color: var(--sia-color-text, #1f2329);
12
+ background: var(--sia-color-surface, #fff);
13
+ border: 1px solid var(--sia-color-border, #d9d9d9);
14
+ border-radius: var(--sia-radius, 6px);
15
+ box-shadow: var(--sia-shadow-popup, 0 4px 16px rgb(0 0 0 / 12%));
16
+ font: 400 13px/1.5 system-ui, sans-serif;
17
+ pointer-events: none;
18
+ overflow-wrap: anywhere;
19
+ white-space: pre-wrap;
20
+ }
@@ -1,4 +1,4 @@
1
- export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-IOe6MMqu.cjs';
1
+ export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-C9w8z3G8.cjs';
2
2
  import 'react';
3
3
  import './shared-Bx4B28Wh.cjs';
4
- import './Select-BO3VyE2n.cjs';
4
+ import './Select-W_xpkpOW.cjs';
@@ -1,4 +1,4 @@
1
- export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-a6nzK7Wu.js';
1
+ export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-BjqFUeU6.js';
2
2
  import 'react';
3
3
  import './shared-Bx4B28Wh.js';
4
- import './Select-BoVx-D0D.js';
4
+ import './Select-O_yY51vc.js';
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  SelectDateRange
3
- } from "./chunk-GM47DAAN.js";
4
- import "./chunk-VX2JECOU.js";
5
- import "./chunk-KLI65JVD.js";
6
- import "./chunk-TZGUBGA4.js";
7
- import "./chunk-3VJ4CZDQ.js";
3
+ } from "./chunk-T2QIW4OO.js";
4
+ import "./chunk-6R7JY7IY.js";
5
+ import "./chunk-LRPQ5FGE.js";
6
+ import "./chunk-6WBABNAX.js";
7
+ import "./chunk-NSSPGXNM.js";
8
8
  export {
9
9
  SelectDateRange
10
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -53,7 +53,7 @@
53
53
  "scripts": {
54
54
  "build": "tsup src/index.ts src/core.ts src/select-date-range.ts src/rich-text-editor.ts src/markdown-editor.ts src/chart.ts --format esm,cjs --dts --clean",
55
55
  "typecheck": "tsc -p tsconfig.json",
56
- "prepublishOnly": "pnpm typecheck && pnpm build"
56
+ "prepublishOnly": "node ../../scripts/check-api-docs.cjs && pnpm typecheck && pnpm build && node ../../scripts/test-api-docs.cjs"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "react": ">=18",
@@ -1,43 +0,0 @@
1
- // src/components/shared.ts
2
- import { createContext, useCallback, useContext, useState } from "react";
3
- var ControlSizeContext = createContext("medium");
4
- function useControlSize(size) {
5
- const inherited = useContext(ControlSizeContext);
6
- return size ?? inherited;
7
- }
8
- var PlaceholderModeContext = createContext("default");
9
- function usePlaceholderMode(mode) {
10
- const inherited = useContext(PlaceholderModeContext);
11
- return mode ?? inherited;
12
- }
13
- function useControllableState({ value, defaultValue, onChange }) {
14
- const [internalValue, setInternalValue] = useState(defaultValue);
15
- const controlled = value !== void 0;
16
- const currentValue = controlled ? value : internalValue;
17
- const setValue = useCallback((nextValue) => {
18
- if (Object.is(currentValue, nextValue)) return;
19
- if (!controlled) setInternalValue(nextValue);
20
- onChange?.(nextValue);
21
- }, [controlled, currentValue, onChange]);
22
- return [currentValue, setValue];
23
- }
24
-
25
- // src/components/FloatingPlaceholder.tsx
26
- import { jsx } from "react/jsx-runtime";
27
- function useFloatingPlaceholder({ mode, placeholder, filled, active = false }) {
28
- const enabled = usePlaceholderMode(mode) === "floating" && Boolean(placeholder);
29
- return {
30
- enabled,
31
- className: enabled ? ` sia-placeholder-floating${filled ? " sia-placeholder-floating--filled" : ""}${active ? " sia-placeholder-floating--active" : ""}` : "",
32
- label: enabled ? /* @__PURE__ */ jsx("span", { className: "sia-floating-placeholder", "aria-hidden": "true", children: placeholder }) : null
33
- };
34
- }
35
-
36
- export {
37
- ControlSizeContext,
38
- useControlSize,
39
- PlaceholderModeContext,
40
- usePlaceholderMode,
41
- useControllableState,
42
- useFloatingPlaceholder
43
- };