@kjun-ui/react 0.20.0 → 0.21.0
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 +3911 -1680
- package/dist/index.js +3591 -1360
- package/dist/styles.css +1410 -356
- package/dist/types/packages/react/src/app-navigation.d.cts +9 -4
- package/dist/types/packages/react/src/app-navigation.d.ts +9 -4
- package/dist/types/packages/react/src/card-actions-context.d.cts +2 -0
- package/dist/types/packages/react/src/card-actions-context.d.ts +2 -0
- package/dist/types/packages/react/src/card.d.cts +15 -5
- package/dist/types/packages/react/src/card.d.ts +15 -5
- package/dist/types/packages/react/src/chip.d.cts +4 -2
- package/dist/types/packages/react/src/chip.d.ts +4 -2
- package/dist/types/packages/react/src/color-picker-parts.d.cts +58 -0
- package/dist/types/packages/react/src/color-picker-parts.d.ts +58 -0
- package/dist/types/packages/react/src/color-picker.d.cts +51 -0
- package/dist/types/packages/react/src/color-picker.d.ts +51 -0
- package/dist/types/packages/react/src/data-state.d.cts +3 -3
- package/dist/types/packages/react/src/data-state.d.ts +3 -3
- package/dist/types/packages/react/src/display.d.cts +14 -5
- package/dist/types/packages/react/src/display.d.ts +14 -5
- package/dist/types/packages/react/src/fab.d.cts +16 -7
- package/dist/types/packages/react/src/fab.d.ts +16 -7
- package/dist/types/packages/react/src/index.d.cts +4 -0
- package/dist/types/packages/react/src/index.d.ts +4 -0
- package/dist/types/packages/react/src/kpi-hero.d.cts +53 -0
- package/dist/types/packages/react/src/kpi-hero.d.ts +53 -0
- package/dist/types/packages/react/src/kpi-row.d.cts +41 -0
- package/dist/types/packages/react/src/kpi-row.d.ts +41 -0
- package/dist/types/packages/react/src/kpi.d.cts +2 -72
- package/dist/types/packages/react/src/kpi.d.ts +2 -72
- package/dist/types/packages/react/src/list-context.d.cts +8 -0
- package/dist/types/packages/react/src/list-context.d.ts +8 -0
- package/dist/types/packages/react/src/list.d.cts +50 -8
- package/dist/types/packages/react/src/list.d.ts +50 -8
- package/dist/types/packages/react/src/modal.d.cts +5 -2
- package/dist/types/packages/react/src/modal.d.ts +5 -2
- package/dist/types/packages/react/src/navigation.d.cts +2 -1
- package/dist/types/packages/react/src/navigation.d.ts +2 -1
- package/dist/types/packages/react/src/number-display.d.cts +2 -0
- package/dist/types/packages/react/src/number-display.d.ts +2 -0
- package/dist/types/packages/react/src/reorder-controls.d.cts +43 -0
- package/dist/types/packages/react/src/reorder-controls.d.ts +43 -0
- package/dist/types/packages/react/src/skeletons.d.cts +2 -1
- package/dist/types/packages/react/src/skeletons.d.ts +2 -1
- package/dist/types/packages/react/src/split-pane.d.cts +30 -0
- package/dist/types/packages/react/src/split-pane.d.ts +30 -0
- package/dist/types/packages/react/src/stacked-bar.d.cts +22 -0
- package/dist/types/packages/react/src/stacked-bar.d.ts +22 -0
- package/dist/types/packages/react/src/table-grid.d.cts +1 -1
- package/dist/types/packages/react/src/table-grid.d.ts +1 -1
- package/dist/types/packages/react/src/zone-gauge.d.cts +28 -0
- package/dist/types/packages/react/src/zone-gauge.d.ts +28 -0
- package/dist/types/shared/package-runtime/alert-action-size.d.cts +1 -0
- package/dist/types/shared/package-runtime/alert-action-size.d.ts +1 -0
- package/dist/types/shared/package-runtime/bottom-bar.d.cts +15 -0
- package/dist/types/shared/package-runtime/bottom-bar.d.ts +15 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.cts +25 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.ts +25 -0
- package/dist/types/shared/package-runtime/card-layout.d.cts +34 -0
- package/dist/types/shared/package-runtime/card-layout.d.ts +34 -0
- package/dist/types/shared/package-runtime/chart-skeleton.d.cts +1 -1
- package/dist/types/shared/package-runtime/chart-skeleton.d.ts +1 -1
- package/dist/types/shared/package-runtime/chip-size.d.cts +4 -0
- package/dist/types/shared/package-runtime/chip-size.d.ts +4 -0
- package/dist/types/shared/package-runtime/color-picker-model.d.cts +51 -0
- package/dist/types/shared/package-runtime/color-picker-model.d.ts +51 -0
- package/dist/types/shared/package-runtime/color-picker.d.cts +92 -0
- package/dist/types/shared/package-runtime/color-picker.d.ts +92 -0
- package/dist/types/shared/package-runtime/color.d.cts +22 -0
- package/dist/types/shared/package-runtime/color.d.ts +22 -0
- package/dist/types/shared/package-runtime/distribution.d.cts +133 -0
- package/dist/types/shared/package-runtime/distribution.d.ts +133 -0
- package/dist/types/shared/package-runtime/empty-geometry.d.cts +19 -0
- package/dist/types/shared/package-runtime/empty-geometry.d.ts +19 -0
- package/dist/types/shared/package-runtime/kpi.d.cts +89 -0
- package/dist/types/shared/package-runtime/kpi.d.ts +89 -0
- package/dist/types/shared/package-runtime/layer-state.d.cts +2 -1
- package/dist/types/shared/package-runtime/layer-state.d.ts +2 -1
- package/dist/types/shared/package-runtime/list-leading.d.cts +38 -0
- package/dist/types/shared/package-runtime/list-leading.d.ts +38 -0
- package/dist/types/shared/package-runtime/list-row.d.cts +115 -4
- package/dist/types/shared/package-runtime/list-row.d.ts +115 -4
- package/dist/types/shared/package-runtime/market-layout.d.cts +3 -1
- package/dist/types/shared/package-runtime/market-layout.d.ts +3 -1
- package/dist/types/shared/package-runtime/market-query.d.cts +15 -0
- package/dist/types/shared/package-runtime/market-query.d.ts +15 -0
- package/dist/types/shared/package-runtime/messages/ko.d.cts +27 -0
- package/dist/types/shared/package-runtime/messages/ko.d.ts +27 -0
- package/dist/types/shared/package-runtime/messages-context.d.cts +27 -0
- package/dist/types/shared/package-runtime/messages-context.d.ts +27 -0
- package/dist/types/shared/package-runtime/number-sign.d.cts +9 -0
- package/dist/types/shared/package-runtime/number-sign.d.ts +9 -0
- package/dist/types/shared/package-runtime/popover-scroll.d.cts +3 -0
- package/dist/types/shared/package-runtime/popover-scroll.d.ts +3 -0
- package/dist/types/shared/package-runtime/radio-keyboard.d.cts +2 -0
- package/dist/types/shared/package-runtime/radio-keyboard.d.ts +2 -0
- package/dist/types/shared/package-runtime/reorder-session.d.cts +62 -0
- package/dist/types/shared/package-runtime/reorder-session.d.ts +62 -0
- package/dist/types/shared/package-runtime/reorder.d.cts +81 -0
- package/dist/types/shared/package-runtime/reorder.d.ts +81 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.cts +14 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.ts +14 -0
- package/dist/types/shared/package-runtime/split-pane.d.cts +46 -0
- package/dist/types/shared/package-runtime/split-pane.d.ts +46 -0
- package/dist/types/shared/package-runtime/table-columns.d.cts +28 -0
- package/dist/types/shared/package-runtime/table-columns.d.ts +28 -0
- package/dist/types/shared/package-runtime/table-presentation.d.cts +22 -2
- package/dist/types/shared/package-runtime/table-presentation.d.ts +22 -2
- package/dist/types/shared/package-runtime/table.d.cts +29 -0
- package/dist/types/shared/package-runtime/table.d.ts +29 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.cts +51 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.ts +51 -0
- package/dist/types/shared/package-runtime/use-layer.d.cts +4 -2
- package/dist/types/shared/package-runtime/use-layer.d.ts +4 -2
- package/package.json +3 -3
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface KpiValue {
|
|
3
|
+
label?: string;
|
|
4
|
+
/** null, undefined and non-finite numbers are missing and show missingText. */
|
|
5
|
+
value: number | string | null;
|
|
6
|
+
decimals?: number;
|
|
7
|
+
prefix?: string;
|
|
8
|
+
suffix?: string;
|
|
9
|
+
semantic?: "price" | "status";
|
|
10
|
+
showSign?: boolean;
|
|
11
|
+
formatter?: (value: number) => string;
|
|
12
|
+
/** Shown for a missing value; defaults to an em dash. */
|
|
13
|
+
missingText?: string;
|
|
14
|
+
desc?: string;
|
|
15
|
+
descClass?: string;
|
|
16
|
+
valueClass?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Masked digits: the mask is drawn, screen readers hear the hidden word. */
|
|
19
|
+
export declare function KpiMasked({ label }: {
|
|
20
|
+
label: string;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export interface KjunKpiHeroProps {
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
label: string;
|
|
25
|
+
/** null, undefined and non-finite numbers are missing and show missingText. */
|
|
26
|
+
value: number | string | null;
|
|
27
|
+
/** Shown for a missing value; defaults to an em dash. */
|
|
28
|
+
missingText?: string;
|
|
29
|
+
prefix?: string;
|
|
30
|
+
suffix?: string;
|
|
31
|
+
decimals?: number;
|
|
32
|
+
deltaAbsolute?: number | null;
|
|
33
|
+
deltaPercent?: number | null;
|
|
34
|
+
/** Digits after the point in the percent change. Defaults to 1. */
|
|
35
|
+
deltaPercentDecimals?: number;
|
|
36
|
+
deltaDescription?: string;
|
|
37
|
+
secondary?: KpiValue[];
|
|
38
|
+
animated?: boolean;
|
|
39
|
+
size?: "md" | "sm";
|
|
40
|
+
/** "none" drops the card background, padding and radius, for a KPI placed inside a card, modal or full-width list. */
|
|
41
|
+
surface?: "card" | "none";
|
|
42
|
+
aside?: ReactNode;
|
|
43
|
+
/** Narrow screens: "below" (default) moves the aside under the delta line at full width; "hidden" drops it. */
|
|
44
|
+
asideMobile?: "below" | "hidden";
|
|
45
|
+
/** Draws the direction as a filled caret before the first delta number, in place of its sign. */
|
|
46
|
+
deltaIcon?: boolean;
|
|
47
|
+
/** Hides every amount behind a mask, with no direction colour; screen readers hear "hidden". */
|
|
48
|
+
masked?: boolean;
|
|
49
|
+
formatter?: (value: number) => string;
|
|
50
|
+
deltaFormatter?: (value: number, kind: "absolute" | "percent") => string;
|
|
51
|
+
renderSecondary?: (item: KpiValue, index: number) => ReactNode;
|
|
52
|
+
}
|
|
53
|
+
export declare function KjunKpiHero(props: KjunKpiHeroProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface KpiValue {
|
|
3
|
+
label?: string;
|
|
4
|
+
/** null, undefined and non-finite numbers are missing and show missingText. */
|
|
5
|
+
value: number | string | null;
|
|
6
|
+
decimals?: number;
|
|
7
|
+
prefix?: string;
|
|
8
|
+
suffix?: string;
|
|
9
|
+
semantic?: "price" | "status";
|
|
10
|
+
showSign?: boolean;
|
|
11
|
+
formatter?: (value: number) => string;
|
|
12
|
+
/** Shown for a missing value; defaults to an em dash. */
|
|
13
|
+
missingText?: string;
|
|
14
|
+
desc?: string;
|
|
15
|
+
descClass?: string;
|
|
16
|
+
valueClass?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Masked digits: the mask is drawn, screen readers hear the hidden word. */
|
|
19
|
+
export declare function KpiMasked({ label }: {
|
|
20
|
+
label: string;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export interface KjunKpiHeroProps {
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
label: string;
|
|
25
|
+
/** null, undefined and non-finite numbers are missing and show missingText. */
|
|
26
|
+
value: number | string | null;
|
|
27
|
+
/** Shown for a missing value; defaults to an em dash. */
|
|
28
|
+
missingText?: string;
|
|
29
|
+
prefix?: string;
|
|
30
|
+
suffix?: string;
|
|
31
|
+
decimals?: number;
|
|
32
|
+
deltaAbsolute?: number | null;
|
|
33
|
+
deltaPercent?: number | null;
|
|
34
|
+
/** Digits after the point in the percent change. Defaults to 1. */
|
|
35
|
+
deltaPercentDecimals?: number;
|
|
36
|
+
deltaDescription?: string;
|
|
37
|
+
secondary?: KpiValue[];
|
|
38
|
+
animated?: boolean;
|
|
39
|
+
size?: "md" | "sm";
|
|
40
|
+
/** "none" drops the card background, padding and radius, for a KPI placed inside a card, modal or full-width list. */
|
|
41
|
+
surface?: "card" | "none";
|
|
42
|
+
aside?: ReactNode;
|
|
43
|
+
/** Narrow screens: "below" (default) moves the aside under the delta line at full width; "hidden" drops it. */
|
|
44
|
+
asideMobile?: "below" | "hidden";
|
|
45
|
+
/** Draws the direction as a filled caret before the first delta number, in place of its sign. */
|
|
46
|
+
deltaIcon?: boolean;
|
|
47
|
+
/** Hides every amount behind a mask, with no direction colour; screen readers hear "hidden". */
|
|
48
|
+
masked?: boolean;
|
|
49
|
+
formatter?: (value: number) => string;
|
|
50
|
+
deltaFormatter?: (value: number, kind: "absolute" | "percent") => string;
|
|
51
|
+
renderSecondary?: (item: KpiValue, index: number) => ReactNode;
|
|
52
|
+
}
|
|
53
|
+
export declare function KjunKpiHero(props: KjunKpiHeroProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type KpiBadgeVariant } from "../../../shared/package-runtime/kpi.cjs";
|
|
2
|
+
import { type KeyboardEvent, type MouseEvent, type ReactNode } from "react";
|
|
3
|
+
import { type KpiValue } from "./kpi-hero.cjs";
|
|
4
|
+
export interface KpiRowItem extends Omit<KpiValue, "value"> {
|
|
5
|
+
/** null/undefined and non-finite numbers are missing, never zero. Loading still takes precedence. */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
clickable?: boolean;
|
|
9
|
+
/** Draws the cell as a link to this address; it is clickable, and onItemClick still runs with the click event. */
|
|
10
|
+
href?: string;
|
|
11
|
+
mobileFull?: boolean;
|
|
12
|
+
mobileSecondary?: boolean;
|
|
13
|
+
mobileNeutral?: boolean;
|
|
14
|
+
valueKind?: "text" | "number";
|
|
15
|
+
animated?: boolean;
|
|
16
|
+
valueSegments?: {
|
|
17
|
+
text: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
separator?: boolean;
|
|
20
|
+
class?: string;
|
|
21
|
+
}[];
|
|
22
|
+
badge?: {
|
|
23
|
+
text: string;
|
|
24
|
+
variant?: KpiBadgeVariant;
|
|
25
|
+
} | null;
|
|
26
|
+
badgePlacement?: "label" | "value";
|
|
27
|
+
}
|
|
28
|
+
export interface KjunKpiRowProps {
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
items: KpiRowItem[];
|
|
31
|
+
size?: "md" | "sm";
|
|
32
|
+
/** "none" drops the card background, padding and radius, for a KPI placed inside a card, modal or full-width list. */
|
|
33
|
+
surface?: "card" | "none";
|
|
34
|
+
mobileSummary?: boolean;
|
|
35
|
+
/** Hides number values and segments behind a mask, with no direction colour; text values, badges and descriptions stay. */
|
|
36
|
+
masked?: boolean;
|
|
37
|
+
/** The event lets a link cell's router call preventDefault. */
|
|
38
|
+
onItemClick?: (item: KpiRowItem, index: number, event: MouseEvent | KeyboardEvent) => void;
|
|
39
|
+
renderValue?: (item: KpiRowItem, index: number) => ReactNode;
|
|
40
|
+
}
|
|
41
|
+
export declare function KjunKpiRow({ loading, items, size, surface, mobileSummary, masked, onItemClick, renderValue, }: KjunKpiRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type KpiBadgeVariant } from "../../../shared/package-runtime/kpi.js";
|
|
2
|
+
import { type KeyboardEvent, type MouseEvent, type ReactNode } from "react";
|
|
3
|
+
import { type KpiValue } from "./kpi-hero.js";
|
|
4
|
+
export interface KpiRowItem extends Omit<KpiValue, "value"> {
|
|
5
|
+
/** null/undefined and non-finite numbers are missing, never zero. Loading still takes precedence. */
|
|
6
|
+
value?: number | string | null;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
clickable?: boolean;
|
|
9
|
+
/** Draws the cell as a link to this address; it is clickable, and onItemClick still runs with the click event. */
|
|
10
|
+
href?: string;
|
|
11
|
+
mobileFull?: boolean;
|
|
12
|
+
mobileSecondary?: boolean;
|
|
13
|
+
mobileNeutral?: boolean;
|
|
14
|
+
valueKind?: "text" | "number";
|
|
15
|
+
animated?: boolean;
|
|
16
|
+
valueSegments?: {
|
|
17
|
+
text: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
separator?: boolean;
|
|
20
|
+
class?: string;
|
|
21
|
+
}[];
|
|
22
|
+
badge?: {
|
|
23
|
+
text: string;
|
|
24
|
+
variant?: KpiBadgeVariant;
|
|
25
|
+
} | null;
|
|
26
|
+
badgePlacement?: "label" | "value";
|
|
27
|
+
}
|
|
28
|
+
export interface KjunKpiRowProps {
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
items: KpiRowItem[];
|
|
31
|
+
size?: "md" | "sm";
|
|
32
|
+
/** "none" drops the card background, padding and radius, for a KPI placed inside a card, modal or full-width list. */
|
|
33
|
+
surface?: "card" | "none";
|
|
34
|
+
mobileSummary?: boolean;
|
|
35
|
+
/** Hides number values and segments behind a mask, with no direction colour; text values, badges and descriptions stay. */
|
|
36
|
+
masked?: boolean;
|
|
37
|
+
/** The event lets a link cell's router call preventDefault. */
|
|
38
|
+
onItemClick?: (item: KpiRowItem, index: number, event: MouseEvent | KeyboardEvent) => void;
|
|
39
|
+
renderValue?: (item: KpiRowItem, index: number) => ReactNode;
|
|
40
|
+
}
|
|
41
|
+
export declare function KjunKpiRow({ loading, items, size, surface, mobileSummary, masked, onItemClick, renderValue, }: KjunKpiRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,72 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
label?: string;
|
|
4
|
-
value: number | string;
|
|
5
|
-
decimals?: number;
|
|
6
|
-
prefix?: string;
|
|
7
|
-
suffix?: string;
|
|
8
|
-
semantic?: "price" | "status";
|
|
9
|
-
showSign?: boolean;
|
|
10
|
-
formatter?: (value: number) => string;
|
|
11
|
-
desc?: string;
|
|
12
|
-
descClass?: string;
|
|
13
|
-
valueClass?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const kpiFormat: (item: KpiValue, value?: string | number) => string;
|
|
16
|
-
export declare const kpiColor: (value: unknown, semantic?: string, neutral?: string) => string;
|
|
17
|
-
export interface KjunKpiHeroProps {
|
|
18
|
-
loading?: boolean;
|
|
19
|
-
label: string;
|
|
20
|
-
value: number | string;
|
|
21
|
-
prefix?: string;
|
|
22
|
-
suffix?: string;
|
|
23
|
-
decimals?: number;
|
|
24
|
-
deltaAbsolute?: number | null;
|
|
25
|
-
deltaPercent?: number | null;
|
|
26
|
-
deltaDescription?: string;
|
|
27
|
-
secondary?: KpiValue[];
|
|
28
|
-
animated?: boolean;
|
|
29
|
-
size?: "md" | "sm";
|
|
30
|
-
/** "none" drops the card background, padding and radius, for a KPI placed inside a card, modal or full-width list. */
|
|
31
|
-
surface?: "card" | "none";
|
|
32
|
-
aside?: ReactNode;
|
|
33
|
-
formatter?: (value: number) => string;
|
|
34
|
-
deltaFormatter?: (value: number, kind: "absolute" | "percent") => string;
|
|
35
|
-
renderSecondary?: (item: KpiValue, index: number) => ReactNode;
|
|
36
|
-
}
|
|
37
|
-
export declare function KjunKpiHero(props: KjunKpiHeroProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
export interface KpiRowItem extends Omit<KpiValue, "value"> {
|
|
39
|
-
/** null/undefined and non-finite numbers are missing, never zero. Loading still takes precedence. */
|
|
40
|
-
value?: number | string | null;
|
|
41
|
-
/** Shown for a missing value; defaults to an em dash. */
|
|
42
|
-
missingText?: string;
|
|
43
|
-
loading?: boolean;
|
|
44
|
-
clickable?: boolean;
|
|
45
|
-
mobileFull?: boolean;
|
|
46
|
-
mobileSecondary?: boolean;
|
|
47
|
-
mobileNeutral?: boolean;
|
|
48
|
-
valueKind?: "text" | "number";
|
|
49
|
-
animated?: boolean;
|
|
50
|
-
valueSegments?: {
|
|
51
|
-
text: string;
|
|
52
|
-
label?: string;
|
|
53
|
-
separator?: boolean;
|
|
54
|
-
class?: string;
|
|
55
|
-
}[];
|
|
56
|
-
badge?: {
|
|
57
|
-
text: string;
|
|
58
|
-
variant?: "warning" | "success" | "danger" | "price-up" | "price-down" | "info" | "neutral";
|
|
59
|
-
} | null;
|
|
60
|
-
badgePlacement?: "label" | "value";
|
|
61
|
-
}
|
|
62
|
-
export interface KjunKpiRowProps {
|
|
63
|
-
loading?: boolean;
|
|
64
|
-
items: KpiRowItem[];
|
|
65
|
-
size?: "md" | "sm";
|
|
66
|
-
/** "none" drops the card background, padding and radius, for a KPI placed inside a card, modal or full-width list. */
|
|
67
|
-
surface?: "card" | "none";
|
|
68
|
-
mobileSummary?: boolean;
|
|
69
|
-
onItemClick?: (item: KpiRowItem, index: number) => void;
|
|
70
|
-
renderValue?: (item: KpiRowItem, index: number) => ReactNode;
|
|
71
|
-
}
|
|
72
|
-
export declare function KjunKpiRow({ loading, items, size, surface, mobileSummary, onItemClick, renderValue, }: KjunKpiRowProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export { KjunKpiHero, type KjunKpiHeroProps, type KpiValue } from "./kpi-hero.cjs";
|
|
2
|
+
export { KjunKpiRow, type KjunKpiRowProps, type KpiRowItem } from "./kpi-row.cjs";
|
|
@@ -1,72 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
label?: string;
|
|
4
|
-
value: number | string;
|
|
5
|
-
decimals?: number;
|
|
6
|
-
prefix?: string;
|
|
7
|
-
suffix?: string;
|
|
8
|
-
semantic?: "price" | "status";
|
|
9
|
-
showSign?: boolean;
|
|
10
|
-
formatter?: (value: number) => string;
|
|
11
|
-
desc?: string;
|
|
12
|
-
descClass?: string;
|
|
13
|
-
valueClass?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const kpiFormat: (item: KpiValue, value?: string | number) => string;
|
|
16
|
-
export declare const kpiColor: (value: unknown, semantic?: string, neutral?: string) => string;
|
|
17
|
-
export interface KjunKpiHeroProps {
|
|
18
|
-
loading?: boolean;
|
|
19
|
-
label: string;
|
|
20
|
-
value: number | string;
|
|
21
|
-
prefix?: string;
|
|
22
|
-
suffix?: string;
|
|
23
|
-
decimals?: number;
|
|
24
|
-
deltaAbsolute?: number | null;
|
|
25
|
-
deltaPercent?: number | null;
|
|
26
|
-
deltaDescription?: string;
|
|
27
|
-
secondary?: KpiValue[];
|
|
28
|
-
animated?: boolean;
|
|
29
|
-
size?: "md" | "sm";
|
|
30
|
-
/** "none" drops the card background, padding and radius, for a KPI placed inside a card, modal or full-width list. */
|
|
31
|
-
surface?: "card" | "none";
|
|
32
|
-
aside?: ReactNode;
|
|
33
|
-
formatter?: (value: number) => string;
|
|
34
|
-
deltaFormatter?: (value: number, kind: "absolute" | "percent") => string;
|
|
35
|
-
renderSecondary?: (item: KpiValue, index: number) => ReactNode;
|
|
36
|
-
}
|
|
37
|
-
export declare function KjunKpiHero(props: KjunKpiHeroProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
export interface KpiRowItem extends Omit<KpiValue, "value"> {
|
|
39
|
-
/** null/undefined and non-finite numbers are missing, never zero. Loading still takes precedence. */
|
|
40
|
-
value?: number | string | null;
|
|
41
|
-
/** Shown for a missing value; defaults to an em dash. */
|
|
42
|
-
missingText?: string;
|
|
43
|
-
loading?: boolean;
|
|
44
|
-
clickable?: boolean;
|
|
45
|
-
mobileFull?: boolean;
|
|
46
|
-
mobileSecondary?: boolean;
|
|
47
|
-
mobileNeutral?: boolean;
|
|
48
|
-
valueKind?: "text" | "number";
|
|
49
|
-
animated?: boolean;
|
|
50
|
-
valueSegments?: {
|
|
51
|
-
text: string;
|
|
52
|
-
label?: string;
|
|
53
|
-
separator?: boolean;
|
|
54
|
-
class?: string;
|
|
55
|
-
}[];
|
|
56
|
-
badge?: {
|
|
57
|
-
text: string;
|
|
58
|
-
variant?: "warning" | "success" | "danger" | "price-up" | "price-down" | "info" | "neutral";
|
|
59
|
-
} | null;
|
|
60
|
-
badgePlacement?: "label" | "value";
|
|
61
|
-
}
|
|
62
|
-
export interface KjunKpiRowProps {
|
|
63
|
-
loading?: boolean;
|
|
64
|
-
items: KpiRowItem[];
|
|
65
|
-
size?: "md" | "sm";
|
|
66
|
-
/** "none" drops the card background, padding and radius, for a KPI placed inside a card, modal or full-width list. */
|
|
67
|
-
surface?: "card" | "none";
|
|
68
|
-
mobileSummary?: boolean;
|
|
69
|
-
onItemClick?: (item: KpiRowItem, index: number) => void;
|
|
70
|
-
renderValue?: (item: KpiRowItem, index: number) => ReactNode;
|
|
71
|
-
}
|
|
72
|
-
export declare function KjunKpiRow({ loading, items, size, surface, mobileSummary, onItemClick, renderValue, }: KjunKpiRowProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export { KjunKpiHero, type KjunKpiHeroProps, type KpiValue } from "./kpi-hero.js";
|
|
2
|
+
export { KjunKpiRow, type KjunKpiRowProps, type KpiRowItem } from "./kpi-row.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The enclosing KjunListSection's shape: whether it is open and compact, so its rows and a row skeleton in its loading
|
|
3
|
+
* slot draw the same row (open rows' larger lines, compact rows' height).
|
|
4
|
+
*/
|
|
5
|
+
export declare const ListShapeContext: import("react").Context<{
|
|
6
|
+
open: boolean;
|
|
7
|
+
compact: boolean;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The enclosing KjunListSection's shape: whether it is open and compact, so its rows and a row skeleton in its loading
|
|
3
|
+
* slot draw the same row (open rows' larger lines, compact rows' height).
|
|
4
|
+
*/
|
|
5
|
+
export declare const ListShapeContext: import("react").Context<{
|
|
6
|
+
open: boolean;
|
|
7
|
+
compact: boolean;
|
|
8
|
+
}>;
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { type CardRadius } from "@kjun-ui/tokens";
|
|
2
2
|
import { type MouseEvent, type ReactNode } from "react";
|
|
3
|
+
import { type ListChoiceValue, type ListGroupVariant, type ListSectionVariant, type ListSelectionMode } from "../../../shared/package-runtime/list-row.cjs";
|
|
4
|
+
import { type KjunListReorderControls, type KjunListReorderMove } from "./reorder-controls.cjs";
|
|
5
|
+
import { type ListLeadingSize } from "../../../shared/package-runtime/list-leading.cjs";
|
|
6
|
+
export type { ListChoiceValue, ListGroupVariant, ListSectionVariant } from "../../../shared/package-runtime/list-row.cjs";
|
|
7
|
+
export type { ListLeadingSize } from "../../../shared/package-runtime/list-leading.cjs";
|
|
8
|
+
export type { KjunListReorderControls, KjunListReorderMove } from "./reorder-controls.cjs";
|
|
3
9
|
export interface KjunListRowProps {
|
|
4
10
|
title: string;
|
|
5
11
|
description?: string;
|
|
6
|
-
/**
|
|
12
|
+
/** Content after the title, centered on its first line, such as a KjunBadge ("New", a count); a screen reader hears it with the title. */
|
|
13
|
+
badge?: ReactNode;
|
|
14
|
+
/** Icon name drawn in a 24px column (on a 40px rounded square in an open section); custom `leading` content uses a minimum 40px column and takes priority. */
|
|
7
15
|
icon?: string;
|
|
16
|
+
/** Leading square/icon sizes: xs 24/16, sm 32/20, md 40/24, lg 56/28. Custom content keeps its own size. */
|
|
17
|
+
leadingSize?: ListLeadingSize;
|
|
18
|
+
/** App-owned CSS color for the built-in icon; overrides its default/destructive color. */
|
|
19
|
+
iconColor?: string;
|
|
20
|
+
/** App-owned circular background color for the built-in icon; defaults leadingSize to sm. */
|
|
21
|
+
iconBackground?: string;
|
|
8
22
|
leading?: ReactNode;
|
|
9
23
|
trailing?: ReactNode;
|
|
10
24
|
actions?: ReactNode;
|
|
@@ -14,11 +28,15 @@ export interface KjunListRowProps {
|
|
|
14
28
|
destructive?: boolean;
|
|
15
29
|
/** Ends the row with a decorative chevron that marks it as navigation. */
|
|
16
30
|
chevron?: boolean;
|
|
17
|
-
/** One choice in a single-choice list: true draws a check at the end. A pressable row given it (true or false) reads as a radio. */
|
|
31
|
+
/** One choice in a single-choice list: true draws a check at the end (in an open section or a multiple-choice list, a filled mark; unchosen rows an empty one). A pressable row given it (true or false) reads as a radio. */
|
|
18
32
|
selected?: boolean;
|
|
19
33
|
/** Makes the whole row a switch: it draws one at the end and toggles on any press. */
|
|
20
34
|
checked?: boolean;
|
|
21
35
|
onCheckedChange?: (checked: boolean) => void;
|
|
36
|
+
/** The row's last press is still being handled (such as a switch saving): presses (and a link's navigation) are ignored, the row reads as busy and draws a spinner, in a switch row's thumb or in place of its mark, check or chevron. */
|
|
37
|
+
busy?: boolean;
|
|
38
|
+
/** This row's value in a section that owns its selection (`value` on the section): it is selected when the section's value holds it. */
|
|
39
|
+
value?: ListChoiceValue;
|
|
22
40
|
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
23
41
|
/** Name of a pressable or link row, e.g. with the amount a screen reader should hear. */
|
|
24
42
|
ariaLabel?: string;
|
|
@@ -28,7 +46,7 @@ export interface KjunListRowProps {
|
|
|
28
46
|
titleLines?: number;
|
|
29
47
|
descriptionLines?: number;
|
|
30
48
|
}
|
|
31
|
-
export declare function KjunListRow({ title, description, icon, leading, trailing, actions, href, disabled, destructive, chevron, selected, checked, onCheckedChange, onClick, ariaLabel, children, titleLines, descriptionLines }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare function KjunListRow({ title, description, badge, icon, leadingSize, iconColor, iconBackground, leading, trailing, actions, href, disabled, destructive, chevron, selected: ownSelected, checked, onCheckedChange, busy, value, onClick: ownClick, ariaLabel, children, titleLines, descriptionLines }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
32
50
|
export interface KjunListSectionProps {
|
|
33
51
|
title?: string;
|
|
34
52
|
description?: string;
|
|
@@ -37,12 +55,14 @@ export interface KjunListSectionProps {
|
|
|
37
55
|
ariaLabel?: string;
|
|
38
56
|
/** Paints the surface background (default true); false lets the page background show through. */
|
|
39
57
|
surface?: boolean;
|
|
40
|
-
/** Draws dividers between rows (default true). */
|
|
58
|
+
/** Draws dividers between rows (default true). An open section draws none; giving it true warns in development. */
|
|
41
59
|
divider?: boolean;
|
|
42
60
|
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
43
61
|
density?: "default" | "compact";
|
|
44
|
-
/** Rounds the
|
|
62
|
+
/** Rounds the rows into a card on the card radius steps; the title, actions and footer stay outside it (default "none", or the KjunListGroup's). An open section has no card. */
|
|
45
63
|
radius?: CardRadius;
|
|
64
|
+
/** "open" puts the rows on the page with no card or dividers: larger titles, icons on rounded squares, and a filled mark for the chosen row (default "default", or "open" in an open KjunListGroup). */
|
|
65
|
+
variant?: ListSectionVariant;
|
|
46
66
|
/** "title" is the 16px heading, "label" the small caption above the rows; by default a title with a description is a heading and one without is a label. */
|
|
47
67
|
titleVariant?: "title" | "label";
|
|
48
68
|
/** Heading level of the title (default 3). */
|
|
@@ -51,11 +71,33 @@ export interface KjunListSectionProps {
|
|
|
51
71
|
empty?: ReactNode;
|
|
52
72
|
/** Supporting text under the rows, such as what a setting applies to. */
|
|
53
73
|
footer?: ReactNode;
|
|
74
|
+
/** Shown in place of the rows (and the empty content) while they load, such as a KjunListSkeleton with variant "row". */
|
|
75
|
+
loading?: ReactNode;
|
|
76
|
+
/** "single": the rows are one choice and the list a radio group with one Tab stop and arrow keys; "multiple": each row is a checkbox. Rows are choices when given `selected`, or a `value` with the section's `value`. */
|
|
77
|
+
selectionMode?: ListSelectionMode;
|
|
78
|
+
/** The chosen rows' values, owned by the app: one value (null for none) with "single", a list with "multiple". */
|
|
79
|
+
value?: ListChoiceValue | null | ListChoiceValue[];
|
|
80
|
+
/** Called with the next value (a list with "multiple") when a row with a `value` is pressed. */
|
|
81
|
+
onValueChange?: (value: ListChoiceValue | ListChoiceValue[]) => void;
|
|
82
|
+
/** Rows listed in `order` get up and down buttons. The app keeps the order, renders its rows in it and saves it. */
|
|
83
|
+
reorderable?: boolean;
|
|
84
|
+
/** The row values in the order shown; a row whose value is not listed cannot move. */
|
|
85
|
+
order?: readonly ListChoiceValue[];
|
|
86
|
+
/** Called with the next order when a row moves; the app applies it. */
|
|
87
|
+
onOrderChange?: (order: ListChoiceValue[]) => void;
|
|
88
|
+
/** The same move in detail: the row's value, where it was and where it went. */
|
|
89
|
+
onReorder?: (move: KjunListReorderMove) => void;
|
|
90
|
+
/** "buttons" (default): up and down buttons; "handle": a grip that drags with a pointer and is grabbed with Enter or Space, then moved with the arrow keys; "both". */
|
|
91
|
+
reorderControls?: KjunListReorderControls;
|
|
92
|
+
/** Turns the move controls off, such as while the list is sorted by a rule. */
|
|
93
|
+
reorderDisabled?: boolean;
|
|
94
|
+
/** Why moving is off, shown under the rows and read with the buttons. */
|
|
95
|
+
reorderDisabledText?: string;
|
|
54
96
|
}
|
|
55
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density, radius, titleVariant, headingLevel, empty, footer }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider: dividerProp, density, radius, titleVariant, headingLevel, empty, footer, loading, selectionMode, value, onValueChange, variant, reorderable, order, onOrderChange, onReorder, reorderControls, reorderDisabled, reorderDisabledText }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
56
98
|
export interface KjunListGroupProps {
|
|
57
|
-
/** "inset" (default) rounds every section and keeps them 24px apart; "flush" keeps square sections 8px apart. */
|
|
58
|
-
variant?:
|
|
99
|
+
/** "inset" (default) rounds every section and keeps them 24px apart; "flush" keeps square sections 8px apart; "open" puts every section's rows on the page with no card or dividers, 20px apart. */
|
|
100
|
+
variant?: ListGroupVariant;
|
|
59
101
|
children: ReactNode;
|
|
60
102
|
}
|
|
61
103
|
/** Stacks KjunListSections with one spacing and corner rule, so sections never set radius or gaps one by one. */
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { type CardRadius } from "@kjun-ui/tokens";
|
|
2
2
|
import { type MouseEvent, type ReactNode } from "react";
|
|
3
|
+
import { type ListChoiceValue, type ListGroupVariant, type ListSectionVariant, type ListSelectionMode } from "../../../shared/package-runtime/list-row.js";
|
|
4
|
+
import { type KjunListReorderControls, type KjunListReorderMove } from "./reorder-controls.js";
|
|
5
|
+
import { type ListLeadingSize } from "../../../shared/package-runtime/list-leading.js";
|
|
6
|
+
export type { ListChoiceValue, ListGroupVariant, ListSectionVariant } from "../../../shared/package-runtime/list-row.js";
|
|
7
|
+
export type { ListLeadingSize } from "../../../shared/package-runtime/list-leading.js";
|
|
8
|
+
export type { KjunListReorderControls, KjunListReorderMove } from "./reorder-controls.js";
|
|
3
9
|
export interface KjunListRowProps {
|
|
4
10
|
title: string;
|
|
5
11
|
description?: string;
|
|
6
|
-
/**
|
|
12
|
+
/** Content after the title, centered on its first line, such as a KjunBadge ("New", a count); a screen reader hears it with the title. */
|
|
13
|
+
badge?: ReactNode;
|
|
14
|
+
/** Icon name drawn in a 24px column (on a 40px rounded square in an open section); custom `leading` content uses a minimum 40px column and takes priority. */
|
|
7
15
|
icon?: string;
|
|
16
|
+
/** Leading square/icon sizes: xs 24/16, sm 32/20, md 40/24, lg 56/28. Custom content keeps its own size. */
|
|
17
|
+
leadingSize?: ListLeadingSize;
|
|
18
|
+
/** App-owned CSS color for the built-in icon; overrides its default/destructive color. */
|
|
19
|
+
iconColor?: string;
|
|
20
|
+
/** App-owned circular background color for the built-in icon; defaults leadingSize to sm. */
|
|
21
|
+
iconBackground?: string;
|
|
8
22
|
leading?: ReactNode;
|
|
9
23
|
trailing?: ReactNode;
|
|
10
24
|
actions?: ReactNode;
|
|
@@ -14,11 +28,15 @@ export interface KjunListRowProps {
|
|
|
14
28
|
destructive?: boolean;
|
|
15
29
|
/** Ends the row with a decorative chevron that marks it as navigation. */
|
|
16
30
|
chevron?: boolean;
|
|
17
|
-
/** One choice in a single-choice list: true draws a check at the end. A pressable row given it (true or false) reads as a radio. */
|
|
31
|
+
/** One choice in a single-choice list: true draws a check at the end (in an open section or a multiple-choice list, a filled mark; unchosen rows an empty one). A pressable row given it (true or false) reads as a radio. */
|
|
18
32
|
selected?: boolean;
|
|
19
33
|
/** Makes the whole row a switch: it draws one at the end and toggles on any press. */
|
|
20
34
|
checked?: boolean;
|
|
21
35
|
onCheckedChange?: (checked: boolean) => void;
|
|
36
|
+
/** The row's last press is still being handled (such as a switch saving): presses (and a link's navigation) are ignored, the row reads as busy and draws a spinner, in a switch row's thumb or in place of its mark, check or chevron. */
|
|
37
|
+
busy?: boolean;
|
|
38
|
+
/** This row's value in a section that owns its selection (`value` on the section): it is selected when the section's value holds it. */
|
|
39
|
+
value?: ListChoiceValue;
|
|
22
40
|
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
23
41
|
/** Name of a pressable or link row, e.g. with the amount a screen reader should hear. */
|
|
24
42
|
ariaLabel?: string;
|
|
@@ -28,7 +46,7 @@ export interface KjunListRowProps {
|
|
|
28
46
|
titleLines?: number;
|
|
29
47
|
descriptionLines?: number;
|
|
30
48
|
}
|
|
31
|
-
export declare function KjunListRow({ title, description, icon, leading, trailing, actions, href, disabled, destructive, chevron, selected, checked, onCheckedChange, onClick, ariaLabel, children, titleLines, descriptionLines }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare function KjunListRow({ title, description, badge, icon, leadingSize, iconColor, iconBackground, leading, trailing, actions, href, disabled, destructive, chevron, selected: ownSelected, checked, onCheckedChange, busy, value, onClick: ownClick, ariaLabel, children, titleLines, descriptionLines }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
32
50
|
export interface KjunListSectionProps {
|
|
33
51
|
title?: string;
|
|
34
52
|
description?: string;
|
|
@@ -37,12 +55,14 @@ export interface KjunListSectionProps {
|
|
|
37
55
|
ariaLabel?: string;
|
|
38
56
|
/** Paints the surface background (default true); false lets the page background show through. */
|
|
39
57
|
surface?: boolean;
|
|
40
|
-
/** Draws dividers between rows (default true). */
|
|
58
|
+
/** Draws dividers between rows (default true). An open section draws none; giving it true warns in development. */
|
|
41
59
|
divider?: boolean;
|
|
42
60
|
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
43
61
|
density?: "default" | "compact";
|
|
44
|
-
/** Rounds the
|
|
62
|
+
/** Rounds the rows into a card on the card radius steps; the title, actions and footer stay outside it (default "none", or the KjunListGroup's). An open section has no card. */
|
|
45
63
|
radius?: CardRadius;
|
|
64
|
+
/** "open" puts the rows on the page with no card or dividers: larger titles, icons on rounded squares, and a filled mark for the chosen row (default "default", or "open" in an open KjunListGroup). */
|
|
65
|
+
variant?: ListSectionVariant;
|
|
46
66
|
/** "title" is the 16px heading, "label" the small caption above the rows; by default a title with a description is a heading and one without is a label. */
|
|
47
67
|
titleVariant?: "title" | "label";
|
|
48
68
|
/** Heading level of the title (default 3). */
|
|
@@ -51,11 +71,33 @@ export interface KjunListSectionProps {
|
|
|
51
71
|
empty?: ReactNode;
|
|
52
72
|
/** Supporting text under the rows, such as what a setting applies to. */
|
|
53
73
|
footer?: ReactNode;
|
|
74
|
+
/** Shown in place of the rows (and the empty content) while they load, such as a KjunListSkeleton with variant "row". */
|
|
75
|
+
loading?: ReactNode;
|
|
76
|
+
/** "single": the rows are one choice and the list a radio group with one Tab stop and arrow keys; "multiple": each row is a checkbox. Rows are choices when given `selected`, or a `value` with the section's `value`. */
|
|
77
|
+
selectionMode?: ListSelectionMode;
|
|
78
|
+
/** The chosen rows' values, owned by the app: one value (null for none) with "single", a list with "multiple". */
|
|
79
|
+
value?: ListChoiceValue | null | ListChoiceValue[];
|
|
80
|
+
/** Called with the next value (a list with "multiple") when a row with a `value` is pressed. */
|
|
81
|
+
onValueChange?: (value: ListChoiceValue | ListChoiceValue[]) => void;
|
|
82
|
+
/** Rows listed in `order` get up and down buttons. The app keeps the order, renders its rows in it and saves it. */
|
|
83
|
+
reorderable?: boolean;
|
|
84
|
+
/** The row values in the order shown; a row whose value is not listed cannot move. */
|
|
85
|
+
order?: readonly ListChoiceValue[];
|
|
86
|
+
/** Called with the next order when a row moves; the app applies it. */
|
|
87
|
+
onOrderChange?: (order: ListChoiceValue[]) => void;
|
|
88
|
+
/** The same move in detail: the row's value, where it was and where it went. */
|
|
89
|
+
onReorder?: (move: KjunListReorderMove) => void;
|
|
90
|
+
/** "buttons" (default): up and down buttons; "handle": a grip that drags with a pointer and is grabbed with Enter or Space, then moved with the arrow keys; "both". */
|
|
91
|
+
reorderControls?: KjunListReorderControls;
|
|
92
|
+
/** Turns the move controls off, such as while the list is sorted by a rule. */
|
|
93
|
+
reorderDisabled?: boolean;
|
|
94
|
+
/** Why moving is off, shown under the rows and read with the buttons. */
|
|
95
|
+
reorderDisabledText?: string;
|
|
54
96
|
}
|
|
55
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density, radius, titleVariant, headingLevel, empty, footer }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider: dividerProp, density, radius, titleVariant, headingLevel, empty, footer, loading, selectionMode, value, onValueChange, variant, reorderable, order, onOrderChange, onReorder, reorderControls, reorderDisabled, reorderDisabledText }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
56
98
|
export interface KjunListGroupProps {
|
|
57
|
-
/** "inset" (default) rounds every section and keeps them 24px apart; "flush" keeps square sections 8px apart. */
|
|
58
|
-
variant?:
|
|
99
|
+
/** "inset" (default) rounds every section and keeps them 24px apart; "flush" keeps square sections 8px apart; "open" puts every section's rows on the page with no card or dividers, 20px apart. */
|
|
100
|
+
variant?: ListGroupVariant;
|
|
59
101
|
children: ReactNode;
|
|
60
102
|
}
|
|
61
103
|
/** Stacks KjunListSections with one spacing and corner rule, so sections never set radius or gaps one by one. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ButtonVariant, type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import { type FocusReturn } from "./floating-panel.cjs";
|
|
3
4
|
export interface KjunFormActionsProps {
|
|
4
5
|
size?: InputSize;
|
|
5
6
|
cancelText?: string;
|
|
@@ -14,7 +15,7 @@ export interface KjunFormActionsProps {
|
|
|
14
15
|
onCancel?: () => void;
|
|
15
16
|
onConfirm?: () => void;
|
|
16
17
|
}
|
|
17
|
-
export declare function KjunFormActions({ size, cancelText, confirmText, showCancel, showConfirm, cancelDisabled, confirmDisabled, loading, variant, cancelVariant, onCancel, onConfirm, }: KjunFormActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function KjunFormActions({ size: requested, cancelText, confirmText, showCancel, showConfirm, cancelDisabled, confirmDisabled, loading, variant, cancelVariant, onCancel, onConfirm, }: KjunFormActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export interface KjunModalProps {
|
|
19
20
|
open: boolean;
|
|
20
21
|
onOpenChange: (open: boolean) => void;
|
|
@@ -46,5 +47,7 @@ export interface KjunModalProps {
|
|
|
46
47
|
ariaLabel?: string;
|
|
47
48
|
/** Id of the element that describes the dialog (e.g. its message), read after its name. */
|
|
48
49
|
ariaDescribedBy?: string;
|
|
50
|
+
/** Read after the exit finishes; a missing target falls back to the opener or parent window. */
|
|
51
|
+
returnFocus?: FocusReturn;
|
|
49
52
|
}
|
|
50
|
-
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, ariaDescribedBy, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
53
|
+
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, ariaDescribedBy, returnFocus, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ButtonVariant, type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import { type FocusReturn } from "./floating-panel.js";
|
|
3
4
|
export interface KjunFormActionsProps {
|
|
4
5
|
size?: InputSize;
|
|
5
6
|
cancelText?: string;
|
|
@@ -14,7 +15,7 @@ export interface KjunFormActionsProps {
|
|
|
14
15
|
onCancel?: () => void;
|
|
15
16
|
onConfirm?: () => void;
|
|
16
17
|
}
|
|
17
|
-
export declare function KjunFormActions({ size, cancelText, confirmText, showCancel, showConfirm, cancelDisabled, confirmDisabled, loading, variant, cancelVariant, onCancel, onConfirm, }: KjunFormActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function KjunFormActions({ size: requested, cancelText, confirmText, showCancel, showConfirm, cancelDisabled, confirmDisabled, loading, variant, cancelVariant, onCancel, onConfirm, }: KjunFormActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export interface KjunModalProps {
|
|
19
20
|
open: boolean;
|
|
20
21
|
onOpenChange: (open: boolean) => void;
|
|
@@ -46,5 +47,7 @@ export interface KjunModalProps {
|
|
|
46
47
|
ariaLabel?: string;
|
|
47
48
|
/** Id of the element that describes the dialog (e.g. its message), read after its name. */
|
|
48
49
|
ariaDescribedBy?: string;
|
|
50
|
+
/** Read after the exit finishes; a missing target falls back to the opener or parent window. */
|
|
51
|
+
returnFocus?: FocusReturn;
|
|
49
52
|
}
|
|
50
|
-
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, ariaDescribedBy, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
53
|
+
export declare function KjunModal({ open, onOpenChange, onClose, onAfterClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, ariaDescribedBy, returnFocus, }: KjunModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -3,8 +3,9 @@ import { type ReactNode } from "react";
|
|
|
3
3
|
export * from "./tabs.cjs";
|
|
4
4
|
export interface KjunAccordionProps {
|
|
5
5
|
multiple?: boolean;
|
|
6
|
+
/** The group's fill (default muted: an in-flow panel set apart by its fill, not an outline; card sits it on the card colour). */
|
|
6
7
|
tone?: "card" | "muted";
|
|
7
|
-
/** Draws a line between items from the text start, like ListSection (default false
|
|
8
|
+
/** Draws a line between items from the text start, like ListSection (default true; false sets rows apart by height alone). */
|
|
8
9
|
divider?: boolean;
|
|
9
10
|
/** Gives every item its own rounded surface with a gap between them; divider has no effect then. */
|
|
10
11
|
separated?: boolean;
|