@kjun-ui/react 0.8.0 → 0.8.1
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/index.cjs +5 -2
- package/dist/index.js +5 -2
- package/dist/styles.css +3 -1
- package/dist/types/packages/react/src/skeletons.d.cts +1 -1
- package/dist/types/packages/react/src/skeletons.d.ts +1 -1
- package/dist/types/shared/package-runtime/chart-skeleton.d.cts +5 -1
- package/dist/types/shared/package-runtime/chart-skeleton.d.ts +5 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4654,6 +4654,9 @@ function chartSkeletonCount(value) {
|
|
|
4654
4654
|
function chartMatrixMuted(row, column) {
|
|
4655
4655
|
return (row + column + 2) % 3 === 0;
|
|
4656
4656
|
}
|
|
4657
|
+
function chartSkeletonKind(kind) {
|
|
4658
|
+
return kind === "donut" || kind === "matrix" ? kind : "frame";
|
|
4659
|
+
}
|
|
4657
4660
|
|
|
4658
4661
|
// packages/react/src/market-skeleton.tsx
|
|
4659
4662
|
var import_tokens28 = require("@kjun-ui/tokens");
|
|
@@ -4772,7 +4775,7 @@ function KjunFormSkeleton({
|
|
|
4772
4775
|
);
|
|
4773
4776
|
}
|
|
4774
4777
|
function KjunChartSkeleton({
|
|
4775
|
-
kind = "frame",
|
|
4778
|
+
kind: requestedKind = "frame",
|
|
4776
4779
|
height = import_tokens29.tokens.extensions.chartSkeleton.height,
|
|
4777
4780
|
loadingText = "\uCC28\uD2B8\uB97C \uBD88\uB7EC\uC624\uB294 \uC911",
|
|
4778
4781
|
skeleton = true,
|
|
@@ -4780,7 +4783,7 @@ function KjunChartSkeleton({
|
|
|
4780
4783
|
rows = 8,
|
|
4781
4784
|
columns = 14
|
|
4782
4785
|
}) {
|
|
4783
|
-
const revealed = useLoadingReveal(true, loadingDelay), status = revealed && loadingText ? "status" : void 0, rowCount = chartSkeletonCount(rows), columnCount = chartSkeletonCount(columns);
|
|
4786
|
+
const kind = chartSkeletonKind(requestedKind), revealed = useLoadingReveal(true, loadingDelay), status = revealed && loadingText ? "status" : void 0, rowCount = chartSkeletonCount(rows), columnCount = chartSkeletonCount(columns);
|
|
4784
4787
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4785
4788
|
"div",
|
|
4786
4789
|
{
|
package/dist/index.js
CHANGED
|
@@ -4618,6 +4618,9 @@ function chartSkeletonCount(value) {
|
|
|
4618
4618
|
function chartMatrixMuted(row, column) {
|
|
4619
4619
|
return (row + column + 2) % 3 === 0;
|
|
4620
4620
|
}
|
|
4621
|
+
function chartSkeletonKind(kind) {
|
|
4622
|
+
return kind === "donut" || kind === "matrix" ? kind : "frame";
|
|
4623
|
+
}
|
|
4621
4624
|
|
|
4622
4625
|
// packages/react/src/market-skeleton.tsx
|
|
4623
4626
|
import { tokens as tokens24 } from "@kjun-ui/tokens";
|
|
@@ -4736,7 +4739,7 @@ function KjunFormSkeleton({
|
|
|
4736
4739
|
);
|
|
4737
4740
|
}
|
|
4738
4741
|
function KjunChartSkeleton({
|
|
4739
|
-
kind = "frame",
|
|
4742
|
+
kind: requestedKind = "frame",
|
|
4740
4743
|
height = tokens25.extensions.chartSkeleton.height,
|
|
4741
4744
|
loadingText = "\uCC28\uD2B8\uB97C \uBD88\uB7EC\uC624\uB294 \uC911",
|
|
4742
4745
|
skeleton = true,
|
|
@@ -4744,7 +4747,7 @@ function KjunChartSkeleton({
|
|
|
4744
4747
|
rows = 8,
|
|
4745
4748
|
columns = 14
|
|
4746
4749
|
}) {
|
|
4747
|
-
const revealed = useLoadingReveal(true, loadingDelay), status = revealed && loadingText ? "status" : void 0, rowCount = chartSkeletonCount(rows), columnCount = chartSkeletonCount(columns);
|
|
4750
|
+
const kind = chartSkeletonKind(requestedKind), revealed = useLoadingReveal(true, loadingDelay), status = revealed && loadingText ? "status" : void 0, rowCount = chartSkeletonCount(rows), columnCount = chartSkeletonCount(columns);
|
|
4748
4751
|
return /* @__PURE__ */ jsx27(
|
|
4749
4752
|
"div",
|
|
4750
4753
|
{
|
package/dist/styles.css
CHANGED
|
@@ -3100,6 +3100,8 @@
|
|
|
3100
3100
|
height: 100%;
|
|
3101
3101
|
}
|
|
3102
3102
|
.kjun-chart-skeleton-donut {
|
|
3103
|
+
/* The hole is 80% − 2 × thickness only in border-box, whatever the app's reset. */
|
|
3104
|
+
box-sizing: border-box;
|
|
3103
3105
|
height: 80%;
|
|
3104
3106
|
aspect-ratio: 1;
|
|
3105
3107
|
border: var(--_kjun-extension-chart-skeleton-donut-thickness) solid var(--_kjun-color-skeleton);
|
|
@@ -3135,7 +3137,7 @@
|
|
|
3135
3137
|
|
|
3136
3138
|
.kjun-chart-skeleton-status { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:var(--_kjun-extension-skeleton-gap); pointer-events:none; }
|
|
3137
3139
|
.kjun-chart-skeleton-status>span { max-width:90%; padding:var(--_kjun-geometry-dimension-value4) var(--_kjun-geometry-dimension-value12); border-radius:var(--_kjun-geometry-radius-radius6); font-size:var(--_kjun-type-body-size); text-align:center; overflow-wrap:anywhere; background:var(--_kjun-color-surface); color:var(--_kjun-color-text-secondary); line-height: var(--_kjun-type-body-line); font-weight: var(--_kjun-type-body-weight); letter-spacing: var(--_kjun-type-body-tracking); border:var(--_kjun-border-default-width) solid var(--_kjun-color-chart-grid); }
|
|
3138
|
-
.kjun-chart-skeleton[data-kjun-chart-kind="donut"] .kjun-chart-skeleton-status>span { border:0; max-width:calc(80cqh - 2 * var(--_kjun-extension-chart-skeleton-donut-thickness)); }
|
|
3140
|
+
.kjun-chart-skeleton[data-kjun-chart-kind="donut"] .kjun-chart-skeleton-status>span { box-sizing:border-box; border:0; max-width:calc(80cqh - 2 * var(--_kjun-extension-chart-skeleton-donut-thickness)); }
|
|
3139
3141
|
|
|
3140
3142
|
.kjun-data-status > .kjun-spinner { flex-shrink: 0; }
|
|
3141
3143
|
.kjun-data-status > span:last-child { min-width: 0; overflow-wrap: anywhere; }
|
|
@@ -28,6 +28,6 @@ export interface KjunChartSkeletonProps {
|
|
|
28
28
|
rows?: number;
|
|
29
29
|
columns?: number;
|
|
30
30
|
}
|
|
31
|
-
export declare function KjunChartSkeleton({ kind, height, loadingText, skeleton, loadingDelay, rows, columns, }: KjunChartSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function KjunChartSkeleton({ kind: requestedKind, height, loadingText, skeleton, loadingDelay, rows, columns, }: KjunChartSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export { KjunMarketTableSkeleton } from "./market-skeleton.cjs";
|
|
33
33
|
export type { KjunMarketTableSkeletonProps } from "./market-skeleton.cjs";
|
|
@@ -28,6 +28,6 @@ export interface KjunChartSkeletonProps {
|
|
|
28
28
|
rows?: number;
|
|
29
29
|
columns?: number;
|
|
30
30
|
}
|
|
31
|
-
export declare function KjunChartSkeleton({ kind, height, loadingText, skeleton, loadingDelay, rows, columns, }: KjunChartSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function KjunChartSkeleton({ kind: requestedKind, height, loadingText, skeleton, loadingDelay, rows, columns, }: KjunChartSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export { KjunMarketTableSkeleton } from "./market-skeleton.js";
|
|
33
33
|
export type { KjunMarketTableSkeletonProps } from "./market-skeleton.js";
|
|
@@ -8,5 +8,9 @@ export declare const chartSkeletonMaxCount = 100;
|
|
|
8
8
|
export declare function chartSkeletonCount(value: number): number;
|
|
9
9
|
/** Every third diagonal cell is drawn at the pending opacity so the matrix reads as a heatmap. */
|
|
10
10
|
export declare function chartMatrixMuted(row: number, column: number): boolean;
|
|
11
|
-
/**
|
|
11
|
+
/** Donut ring diameter as a share of the skeleton height; data-state.css repeats it as 80% and 80cqh. */
|
|
12
|
+
export declare const chartDonutRatio = 0.8;
|
|
13
|
+
/** Inner diameter of the donut ring. */
|
|
12
14
|
export declare function chartDonutHole(height: number, thickness: number): number;
|
|
15
|
+
/** Kinds removed in 0.8.0 (line, bar, candle, grid) or any other value draw, and are named, frame. */
|
|
16
|
+
export declare function chartSkeletonKind(kind: unknown): KjunChartSkeletonKind;
|
|
@@ -8,5 +8,9 @@ export declare const chartSkeletonMaxCount = 100;
|
|
|
8
8
|
export declare function chartSkeletonCount(value: number): number;
|
|
9
9
|
/** Every third diagonal cell is drawn at the pending opacity so the matrix reads as a heatmap. */
|
|
10
10
|
export declare function chartMatrixMuted(row: number, column: number): boolean;
|
|
11
|
-
/**
|
|
11
|
+
/** Donut ring diameter as a share of the skeleton height; data-state.css repeats it as 80% and 80cqh. */
|
|
12
|
+
export declare const chartDonutRatio = 0.8;
|
|
13
|
+
/** Inner diameter of the donut ring. */
|
|
12
14
|
export declare function chartDonutHole(height: number, thickness: number): number;
|
|
15
|
+
/** Kinds removed in 0.8.0 (line, bar, candle, grid) or any other value draw, and are named, frame. */
|
|
16
|
+
export declare function chartSkeletonKind(kind: unknown): KjunChartSkeletonKind;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjun-ui/react",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://ui.kjun.dev",
|
|
6
6
|
"repository": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"./package.json": "./package.json"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@kjun-ui/tokens": "0.8.
|
|
44
|
+
"@kjun-ui/tokens": "0.8.1",
|
|
45
45
|
"react-aria-components": "1.21.1",
|
|
46
|
-
"@kjun-ui/icons": "0.8.
|
|
46
|
+
"@kjun-ui/icons": "0.8.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": "^19.2.3",
|