@sia.soul/sia-react-ui 0.1.23 → 0.1.25
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/{Select-BoVx-D0D.d.ts → Select-O_yY51vc.d.ts} +4 -2
- package/dist/{Select-BO3VyE2n.d.cts → Select-W_xpkpOW.d.cts} +4 -2
- package/dist/chart.cjs +1401 -1160
- package/dist/chart.css +21 -0
- package/dist/chart.js +4 -4
- package/dist/{chunk-KLI65JVD.js → chunk-27ZYAKII.js} +68 -186
- package/dist/{chunk-TZGUBGA4.js → chunk-IYNS423D.js} +4 -3
- package/dist/{chunk-GM47DAAN.js → chunk-IYO2JSGQ.js} +8 -7
- package/dist/{chunk-QJ4OQNQ4.js → chunk-PXHBIRQW.js} +4 -3
- package/dist/{chunk-VX2JECOU.js → chunk-QCBKT5FV.js} +20 -16
- package/dist/chunk-RAO3JHDL.js +284 -0
- package/dist/{chunk-RWGSZW32.js → chunk-RWODH2LW.js} +7 -6
- package/dist/{chunk-OKP4DIQH.js → chunk-TZROBD65.js} +29 -26
- package/dist/{chunk-NPB33IXJ.js → chunk-W52CNNWW.js} +349 -278
- package/dist/{chunk-YT6E3X2K.js → chunk-YQDHCORW.js} +4 -3
- package/dist/{core-Cqgl6Z7h.d.ts → core-BOzLwiXG.d.ts} +44 -5
- package/dist/{core-DF0pknX6.d.cts → core-tbb9ZiBY.d.cts} +44 -5
- package/dist/core.cjs +1637 -1443
- package/dist/core.css +53 -0
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +8 -6
- package/dist/index.cjs +3797 -3583
- package/dist/index.css +53 -0
- package/dist/index.d.cts +36 -17
- package/dist/index.d.ts +36 -17
- package/dist/index.js +104 -83
- package/dist/markdown-editor.cjs +269 -28
- package/dist/markdown-editor.css +20 -0
- package/dist/markdown-editor.js +2 -2
- package/dist/rich-text-editor.cjs +1156 -1031
- package/dist/rich-text-editor.css +20 -0
- package/dist/rich-text-editor.js +4 -4
- package/dist/{select-date-range-a6nzK7Wu.d.ts → select-date-range-BjqFUeU6.d.ts} +1 -1
- package/dist/{select-date-range-IOe6MMqu.d.cts → select-date-range-C9w8z3G8.d.cts} +1 -1
- package/dist/select-date-range.cjs +1188 -1059
- package/dist/select-date-range.css +20 -0
- package/dist/select-date-range.d.cts +2 -2
- package/dist/select-date-range.d.ts +2 -2
- package/dist/select-date-range.js +5 -5
- package/package.json +2 -2
- 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-
|
|
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-
|
|
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-
|
|
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-
|
|
4
|
+
import './Select-O_yY51vc.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectDateRange
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-IYO2JSGQ.js";
|
|
4
|
+
import "./chunk-QCBKT5FV.js";
|
|
5
|
+
import "./chunk-27ZYAKII.js";
|
|
6
|
+
import "./chunk-IYNS423D.js";
|
|
7
|
+
import "./chunk-RAO3JHDL.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.
|
|
3
|
+
"version": "0.1.25",
|
|
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",
|
package/dist/chunk-3VJ4CZDQ.js
DELETED
|
@@ -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
|
-
};
|