@kjun-ui/react 0.19.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 +4254 -1690
- package/dist/index.js +4045 -1481
- package/dist/styles.css +1531 -411
- 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/range-input.d.cts +12 -1
- package/dist/types/packages/react/src/range-input.d.ts +12 -1
- 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-cards.d.cts +1 -1
- package/dist/types/packages/react/src/table-cards.d.ts +1 -1
- 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/slider-view.d.cts +90 -0
- package/dist/types/shared/package-runtime/slider-view.d.ts +90 -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-groups.d.cts +9 -0
- package/dist/types/shared/package-runtime/table-groups.d.ts +9 -0
- package/dist/types/shared/package-runtime/table-presentation.d.cts +24 -2
- package/dist/types/shared/package-runtime/table-presentation.d.ts +24 -2
- package/dist/types/shared/package-runtime/table.d.cts +32 -0
- package/dist/types/shared/package-runtime/table.d.ts +32 -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/dist/types/shared/package-runtime/use-table-group-expansion.d.cts +6 -0
- package/dist/types/shared/package-runtime/use-table-group-expansion.d.ts +6 -0
- package/package.json +3 -3
|
@@ -3,8 +3,9 @@ import { type ReactNode } from "react";
|
|
|
3
3
|
export * from "./tabs.js";
|
|
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;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
/** A leading sign drawn tight to its digits (see splitNumberSign); other content passes through. */
|
|
3
|
+
export declare function signedText(value: ReactNode): ReactNode;
|
|
2
4
|
export declare const finiteNumber: (value: unknown) => number | null;
|
|
3
5
|
export declare const format: (value: number, decimals?: number) => string;
|
|
4
6
|
export declare function useCountUp(value: number | string, animated: boolean, fromPrevious: boolean): string | number;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
/** A leading sign drawn tight to its digits (see splitNumberSign); other content passes through. */
|
|
3
|
+
export declare function signedText(value: ReactNode): ReactNode;
|
|
2
4
|
export declare const finiteNumber: (value: unknown) => number | null;
|
|
3
5
|
export declare const format: (value: number, decimals?: number) => string;
|
|
4
6
|
export declare function useCountUp(value: number | string, animated: boolean, fromPrevious: boolean): string | number;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type SliderMarks, type SliderOrientation } from "../../../shared/package-runtime/slider-view.cjs";
|
|
2
|
+
export type { KjunSliderMark } from "../../../shared/package-runtime/slider-view.cjs";
|
|
1
3
|
export interface KjunSliderProps {
|
|
2
4
|
value: number;
|
|
3
5
|
min?: number;
|
|
@@ -8,8 +10,15 @@ export interface KjunSliderProps {
|
|
|
8
10
|
ariaLabel?: string;
|
|
9
11
|
/** Hides the visible value only; each thumb still reports its value to assistive technology. */
|
|
10
12
|
showValue?: boolean;
|
|
11
|
-
/** Formats the visible value and each thumb's accessible value text. Values stay numeric. */
|
|
13
|
+
/** Formats the visible value and each thumb's accessible value text. Values stay numeric. Defaults to the locale's number format with the step's decimals. */
|
|
12
14
|
formatValue?: (value: number) => string;
|
|
15
|
+
/** Dots on the rail: true for every step (up to 24), or values with optional labels beside the rail. Pressing a label moves the nearer thumb there. */
|
|
16
|
+
marks?: SliderMarks;
|
|
17
|
+
/** sm: 12px text, 4px rail, 16px thumb. The touch area stays 44px. */
|
|
18
|
+
size?: "sm" | "md";
|
|
19
|
+
/** vertical: the rail runs bottom (min) to top (max), `length` px long. */
|
|
20
|
+
orientation?: SliderOrientation;
|
|
21
|
+
length?: number;
|
|
13
22
|
onValueChange?: (value: number) => void;
|
|
14
23
|
onChangeCommit?: (value: number) => void;
|
|
15
24
|
}
|
|
@@ -22,6 +31,8 @@ export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "o
|
|
|
22
31
|
string,
|
|
23
32
|
string
|
|
24
33
|
];
|
|
34
|
+
/** The visible text for the whole range, e.g. "20만~80만 원". Each thumb keeps formatValue. */
|
|
35
|
+
formatRange?: (start: number, end: number) => string;
|
|
25
36
|
onValueChange?: (value: [
|
|
26
37
|
number,
|
|
27
38
|
number
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type SliderMarks, type SliderOrientation } from "../../../shared/package-runtime/slider-view.js";
|
|
2
|
+
export type { KjunSliderMark } from "../../../shared/package-runtime/slider-view.js";
|
|
1
3
|
export interface KjunSliderProps {
|
|
2
4
|
value: number;
|
|
3
5
|
min?: number;
|
|
@@ -8,8 +10,15 @@ export interface KjunSliderProps {
|
|
|
8
10
|
ariaLabel?: string;
|
|
9
11
|
/** Hides the visible value only; each thumb still reports its value to assistive technology. */
|
|
10
12
|
showValue?: boolean;
|
|
11
|
-
/** Formats the visible value and each thumb's accessible value text. Values stay numeric. */
|
|
13
|
+
/** Formats the visible value and each thumb's accessible value text. Values stay numeric. Defaults to the locale's number format with the step's decimals. */
|
|
12
14
|
formatValue?: (value: number) => string;
|
|
15
|
+
/** Dots on the rail: true for every step (up to 24), or values with optional labels beside the rail. Pressing a label moves the nearer thumb there. */
|
|
16
|
+
marks?: SliderMarks;
|
|
17
|
+
/** sm: 12px text, 4px rail, 16px thumb. The touch area stays 44px. */
|
|
18
|
+
size?: "sm" | "md";
|
|
19
|
+
/** vertical: the rail runs bottom (min) to top (max), `length` px long. */
|
|
20
|
+
orientation?: SliderOrientation;
|
|
21
|
+
length?: number;
|
|
13
22
|
onValueChange?: (value: number) => void;
|
|
14
23
|
onChangeCommit?: (value: number) => void;
|
|
15
24
|
}
|
|
@@ -22,6 +31,8 @@ export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "o
|
|
|
22
31
|
string,
|
|
23
32
|
string
|
|
24
33
|
];
|
|
34
|
+
/** The visible text for the whole range, e.g. "20만~80만 원". Each thumb keeps formatValue. */
|
|
35
|
+
formatRange?: (start: number, end: number) => string;
|
|
25
36
|
onValueChange?: (value: [
|
|
26
37
|
number,
|
|
27
38
|
number
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ReorderMove } from "../../../shared/package-runtime/reorder.cjs";
|
|
2
|
+
import { type ReorderSession } from "../../../shared/package-runtime/reorder-session.cjs";
|
|
3
|
+
import type { ListChoiceValue } from "../../../shared/package-runtime/list-row.cjs";
|
|
4
|
+
export type KjunListReorderMove = ReorderMove<ListChoiceValue>;
|
|
5
|
+
export type KjunListReorderControls = "buttons" | "handle" | "both";
|
|
6
|
+
/** A reorderable section's or table's order and its move actions, for the rows inside it; null outside one. */
|
|
7
|
+
export interface ReorderScope {
|
|
8
|
+
order?: readonly ListChoiceValue[];
|
|
9
|
+
/** The rows on screen when they are only part of the order (a table page, a search): a step past a hidden row is off. */
|
|
10
|
+
shown?: ReadonlySet<ListChoiceValue>;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
controls: KjunListReorderControls;
|
|
13
|
+
/** The row held by its handle, by a keyboard grab or a pointer drag. */
|
|
14
|
+
grabbed: ListChoiceValue | null;
|
|
15
|
+
/** Id of the text that says why moving is off. */
|
|
16
|
+
noteId?: string;
|
|
17
|
+
session: ReorderSession;
|
|
18
|
+
}
|
|
19
|
+
export declare const ReorderContext: import("react").Context<ReorderScope | null>;
|
|
20
|
+
/** A row's move controls; the row draws them only when the section's order lists its value. */
|
|
21
|
+
export declare function ReorderControls({ value, name }: {
|
|
22
|
+
value: ListChoiceValue;
|
|
23
|
+
name: string;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
/** The section's side: reports moves, announces them and keeps focus on the moved row's control. */
|
|
26
|
+
export declare function useReorder({ reorderable, order, shown, disabled, controls, noteId, list, selector, owner, onOrderChange, onReorder }: {
|
|
27
|
+
reorderable: boolean;
|
|
28
|
+
order?: readonly ListChoiceValue[];
|
|
29
|
+
shown?: ReadonlySet<ListChoiceValue>;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
controls: KjunListReorderControls;
|
|
32
|
+
noteId?: string;
|
|
33
|
+
list: HTMLElement | null;
|
|
34
|
+
/** Where the movable rows' controls are inside list (a Table's rows rather than a list section's). */
|
|
35
|
+
selector?: string;
|
|
36
|
+
/** The root selector that owns those controls, so a table nested in a row keeps its own. */
|
|
37
|
+
owner?: string;
|
|
38
|
+
onOrderChange?: (order: ListChoiceValue[]) => void;
|
|
39
|
+
onReorder?: (move: KjunListReorderMove) => void;
|
|
40
|
+
}): {
|
|
41
|
+
context: ReorderScope | null;
|
|
42
|
+
said: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ReorderMove } from "../../../shared/package-runtime/reorder.js";
|
|
2
|
+
import { type ReorderSession } from "../../../shared/package-runtime/reorder-session.js";
|
|
3
|
+
import type { ListChoiceValue } from "../../../shared/package-runtime/list-row.js";
|
|
4
|
+
export type KjunListReorderMove = ReorderMove<ListChoiceValue>;
|
|
5
|
+
export type KjunListReorderControls = "buttons" | "handle" | "both";
|
|
6
|
+
/** A reorderable section's or table's order and its move actions, for the rows inside it; null outside one. */
|
|
7
|
+
export interface ReorderScope {
|
|
8
|
+
order?: readonly ListChoiceValue[];
|
|
9
|
+
/** The rows on screen when they are only part of the order (a table page, a search): a step past a hidden row is off. */
|
|
10
|
+
shown?: ReadonlySet<ListChoiceValue>;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
controls: KjunListReorderControls;
|
|
13
|
+
/** The row held by its handle, by a keyboard grab or a pointer drag. */
|
|
14
|
+
grabbed: ListChoiceValue | null;
|
|
15
|
+
/** Id of the text that says why moving is off. */
|
|
16
|
+
noteId?: string;
|
|
17
|
+
session: ReorderSession;
|
|
18
|
+
}
|
|
19
|
+
export declare const ReorderContext: import("react").Context<ReorderScope | null>;
|
|
20
|
+
/** A row's move controls; the row draws them only when the section's order lists its value. */
|
|
21
|
+
export declare function ReorderControls({ value, name }: {
|
|
22
|
+
value: ListChoiceValue;
|
|
23
|
+
name: string;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
/** The section's side: reports moves, announces them and keeps focus on the moved row's control. */
|
|
26
|
+
export declare function useReorder({ reorderable, order, shown, disabled, controls, noteId, list, selector, owner, onOrderChange, onReorder }: {
|
|
27
|
+
reorderable: boolean;
|
|
28
|
+
order?: readonly ListChoiceValue[];
|
|
29
|
+
shown?: ReadonlySet<ListChoiceValue>;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
controls: KjunListReorderControls;
|
|
32
|
+
noteId?: string;
|
|
33
|
+
list: HTMLElement | null;
|
|
34
|
+
/** Where the movable rows' controls are inside list (a Table's rows rather than a list section's). */
|
|
35
|
+
selector?: string;
|
|
36
|
+
/** The root selector that owns those controls, so a table nested in a row keeps its own. */
|
|
37
|
+
owner?: string;
|
|
38
|
+
onOrderChange?: (order: ListChoiceValue[]) => void;
|
|
39
|
+
onReorder?: (move: KjunListReorderMove) => void;
|
|
40
|
+
}): {
|
|
41
|
+
context: ReorderScope | null;
|
|
42
|
+
said: string;
|
|
43
|
+
};
|
|
@@ -6,6 +6,7 @@ export interface KjunListSkeletonProps {
|
|
|
6
6
|
/** "row" is the silhouette of KjunListRow: title and description lines, a text-start divider, no avatar unless asked. */
|
|
7
7
|
variant?: "market" | "compact" | "notification" | "row";
|
|
8
8
|
avatar?: boolean;
|
|
9
|
+
/** Default: ListRow's sm leading square (32) for the row variant, the market avatar (36) otherwise. */
|
|
9
10
|
avatarSize?: CSSProperties["width"];
|
|
10
11
|
quote?: boolean;
|
|
11
12
|
/** Row variant: draws the description line (default true). */
|
|
@@ -15,7 +16,7 @@ export interface KjunListSkeletonProps {
|
|
|
15
16
|
/** Announces loading to screen readers (a status); the skeleton itself stays silent. */
|
|
16
17
|
loadingText?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare function KjunListSkeleton({ rows, variant, avatar, avatarSize, quote, description, trailing, loadingText, }: KjunListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function KjunListSkeleton({ rows, variant, avatar, avatarSize: ownAvatarSize, quote, description, trailing, loadingText, }: KjunListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export interface KjunFormSkeletonProps {
|
|
20
21
|
fields?: (string | {
|
|
21
22
|
label?: string;
|
|
@@ -6,6 +6,7 @@ export interface KjunListSkeletonProps {
|
|
|
6
6
|
/** "row" is the silhouette of KjunListRow: title and description lines, a text-start divider, no avatar unless asked. */
|
|
7
7
|
variant?: "market" | "compact" | "notification" | "row";
|
|
8
8
|
avatar?: boolean;
|
|
9
|
+
/** Default: ListRow's sm leading square (32) for the row variant, the market avatar (36) otherwise. */
|
|
9
10
|
avatarSize?: CSSProperties["width"];
|
|
10
11
|
quote?: boolean;
|
|
11
12
|
/** Row variant: draws the description line (default true). */
|
|
@@ -15,7 +16,7 @@ export interface KjunListSkeletonProps {
|
|
|
15
16
|
/** Announces loading to screen readers (a status); the skeleton itself stays silent. */
|
|
16
17
|
loadingText?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare function KjunListSkeleton({ rows, variant, avatar, avatarSize, quote, description, trailing, loadingText, }: KjunListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function KjunListSkeleton({ rows, variant, avatar, avatarSize: ownAvatarSize, quote, description, trailing, loadingText, }: KjunListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export interface KjunFormSkeletonProps {
|
|
20
21
|
fields?: (string | {
|
|
21
22
|
label?: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type SplitDirection, type SplitMax, type SplitMin } from "../../../shared/package-runtime/split-pane.cjs";
|
|
2
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
3
|
+
export interface KjunSplitPaneProps {
|
|
4
|
+
/** horizontal puts the panes side by side; vertical stacks them and needs a height from its parent. */
|
|
5
|
+
direction?: SplitDirection;
|
|
6
|
+
/** Controlled share (0–1) of the room beside the handle that the first pane takes; pair with onSizeChange. */
|
|
7
|
+
size?: number;
|
|
8
|
+
/** The starting share without size, and the share Enter restores. */
|
|
9
|
+
defaultSize?: number;
|
|
10
|
+
/** Smallest pixels of the first and second pane. A minimum beats the share and the maximums. */
|
|
11
|
+
minSize?: SplitMin;
|
|
12
|
+
/** Largest pixels of the first and second pane; null leaves a pane unlimited. */
|
|
13
|
+
maxSize?: SplitMax;
|
|
14
|
+
/** Names the handle, e.g. "메시지 목록 크기". */
|
|
15
|
+
ariaLabel: string;
|
|
16
|
+
/** Keeps the split where it is: the handle takes no pointer, key or focus. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Every step of a drag or key press. */
|
|
19
|
+
onSizeChange?: (size: number) => void;
|
|
20
|
+
/** Once when a drag ends or a key moves the handle; the place to save the size. */
|
|
21
|
+
onChangeCommit?: (size: number) => void;
|
|
22
|
+
first: ReactNode;
|
|
23
|
+
second: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Outer size and margins only: padding or a border on the root would shift the panes away from the measured sizes. */
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
id?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Two panes with a handle between them; dragging it or pressing arrow keys, Home, End or Enter resizes the first pane. */
|
|
30
|
+
export declare function KjunSplitPane({ direction, size, defaultSize, minSize, maxSize, ariaLabel, disabled, onSizeChange, onChangeCommit, first, second, className, style, id }: KjunSplitPaneProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type SplitDirection, type SplitMax, type SplitMin } from "../../../shared/package-runtime/split-pane.js";
|
|
2
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
3
|
+
export interface KjunSplitPaneProps {
|
|
4
|
+
/** horizontal puts the panes side by side; vertical stacks them and needs a height from its parent. */
|
|
5
|
+
direction?: SplitDirection;
|
|
6
|
+
/** Controlled share (0–1) of the room beside the handle that the first pane takes; pair with onSizeChange. */
|
|
7
|
+
size?: number;
|
|
8
|
+
/** The starting share without size, and the share Enter restores. */
|
|
9
|
+
defaultSize?: number;
|
|
10
|
+
/** Smallest pixels of the first and second pane. A minimum beats the share and the maximums. */
|
|
11
|
+
minSize?: SplitMin;
|
|
12
|
+
/** Largest pixels of the first and second pane; null leaves a pane unlimited. */
|
|
13
|
+
maxSize?: SplitMax;
|
|
14
|
+
/** Names the handle, e.g. "메시지 목록 크기". */
|
|
15
|
+
ariaLabel: string;
|
|
16
|
+
/** Keeps the split where it is: the handle takes no pointer, key or focus. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Every step of a drag or key press. */
|
|
19
|
+
onSizeChange?: (size: number) => void;
|
|
20
|
+
/** Once when a drag ends or a key moves the handle; the place to save the size. */
|
|
21
|
+
onChangeCommit?: (size: number) => void;
|
|
22
|
+
first: ReactNode;
|
|
23
|
+
second: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Outer size and margins only: padding or a border on the root would shift the panes away from the measured sizes. */
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
id?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Two panes with a handle between them; dragging it or pressing arrow keys, Home, End or Enter resizes the first pane. */
|
|
30
|
+
export declare function KjunSplitPane({ direction, size, defaultSize, minSize, maxSize, ariaLabel, disabled, onSizeChange, onChangeCommit, first, second, className, style, id }: KjunSplitPaneProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type StackedItem } from "../../../shared/package-runtime/distribution.cjs";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
|
+
export type KjunStackedBarItem = StackedItem;
|
|
4
|
+
export interface KjunStackedBarProps {
|
|
5
|
+
/** The parts in order. No items, or only missing values, draws the empty rail with the missing mark and no legend; values that add up to 0 draw the empty rail. */
|
|
6
|
+
items: readonly StackedItem[] | null | undefined;
|
|
7
|
+
/** Shown above the bar and read first. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** The accessible name when there is no visible label, or a fuller one than it. */
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
size?: "sm" | "md";
|
|
12
|
+
/** Each part's colour, name, value and share under the bar, so parts are not told apart by colour alone. */
|
|
13
|
+
legend?: boolean;
|
|
14
|
+
formatValue?: (value: number) => string;
|
|
15
|
+
/** Shown for missing data and for a part without a value; defaults to an em dash. */
|
|
16
|
+
missingText?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
id?: string;
|
|
20
|
+
}
|
|
21
|
+
/** The parts of a whole: each segment is as long as its share. It shows a breakdown; it is not a control. */
|
|
22
|
+
export declare function KjunStackedBar({ items, label, ariaLabel, size, legend, formatValue, missingText, className, style, id }: KjunStackedBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type StackedItem } from "../../../shared/package-runtime/distribution.js";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
|
+
export type KjunStackedBarItem = StackedItem;
|
|
4
|
+
export interface KjunStackedBarProps {
|
|
5
|
+
/** The parts in order. No items, or only missing values, draws the empty rail with the missing mark and no legend; values that add up to 0 draw the empty rail. */
|
|
6
|
+
items: readonly StackedItem[] | null | undefined;
|
|
7
|
+
/** Shown above the bar and read first. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** The accessible name when there is no visible label, or a fuller one than it. */
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
size?: "sm" | "md";
|
|
12
|
+
/** Each part's colour, name, value and share under the bar, so parts are not told apart by colour alone. */
|
|
13
|
+
legend?: boolean;
|
|
14
|
+
formatValue?: (value: number) => string;
|
|
15
|
+
/** Shown for missing data and for a part without a value; defaults to an em dash. */
|
|
16
|
+
missingText?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
id?: string;
|
|
20
|
+
}
|
|
21
|
+
/** The parts of a whole: each segment is as long as its share. It shows a breakdown; it is not a control. */
|
|
22
|
+
export declare function KjunStackedBar({ items, label, ariaLabel, size, legend, formatValue, missingText, className, style, id }: KjunStackedBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,6 @@ interface Props<Row extends object> extends TableCardsProps<Row> {
|
|
|
7
7
|
rowKeyDown: (event: KeyboardEvent<HTMLElement>, row: Row, index: number) => void;
|
|
8
8
|
}
|
|
9
9
|
/** Groups as labelled groups, each a header line over its own list; ungrouped rows stay one list. */
|
|
10
|
-
export declare function useTableGroups<Row extends object>({ groupLabel, groupTotals, state }: Pick<TableCardsProps<Row>, "groupLabel" | "groupTotals" | "state">, className: string, itemsClass: string | undefined, item: (row: Row, index: number) => ReactNode): (list: TableRowGroup<Row>[]) => import("react/jsx-runtime").JSX.Element[];
|
|
10
|
+
export declare function useTableGroups<Row extends object>({ groupLabel, groupTotals, state, collapsed, toggleGroup }: Pick<TableCardsProps<Row>, "groupLabel" | "groupTotals" | "state" | "collapsed" | "toggleGroup">, className: string, itemsClass: string | undefined, item: (row: Row, index: number) => ReactNode): (list: TableRowGroup<Row>[]) => import("react/jsx-runtime").JSX.Element[];
|
|
11
11
|
export declare function TableCards<Row extends object>(props: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -7,6 +7,6 @@ interface Props<Row extends object> extends TableCardsProps<Row> {
|
|
|
7
7
|
rowKeyDown: (event: KeyboardEvent<HTMLElement>, row: Row, index: number) => void;
|
|
8
8
|
}
|
|
9
9
|
/** Groups as labelled groups, each a header line over its own list; ungrouped rows stay one list. */
|
|
10
|
-
export declare function useTableGroups<Row extends object>({ groupLabel, groupTotals, state }: Pick<TableCardsProps<Row>, "groupLabel" | "groupTotals" | "state">, className: string, itemsClass: string | undefined, item: (row: Row, index: number) => ReactNode): (list: TableRowGroup<Row>[]) => import("react/jsx-runtime").JSX.Element[];
|
|
10
|
+
export declare function useTableGroups<Row extends object>({ groupLabel, groupTotals, state, collapsed, toggleGroup }: Pick<TableCardsProps<Row>, "groupLabel" | "groupTotals" | "state" | "collapsed" | "toggleGroup">, className: string, itemsClass: string | undefined, item: (row: Row, index: number) => ReactNode): (list: TableRowGroup<Row>[]) => import("react/jsx-runtime").JSX.Element[];
|
|
11
11
|
export declare function TableCards<Row extends object>(props: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -5,5 +5,5 @@ interface Props<Row extends object> extends TableGridProps<Row, CSSProperties["m
|
|
|
5
5
|
customClass: (row: Row, index: number) => string;
|
|
6
6
|
rowKeyDown: (event: KeyboardEvent<HTMLElement>, row: Row, index: number) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function TableGrid<Row extends object>({ initialLoading, skeletonRows, skeletonHidden, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, sortable, compact, striped, hoverable, ariaLabel, customClass, rowKeyDown, groups, collapsed, toggleGroup, groupLabel, summary, stickyOffset }: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function TableGrid<Row extends object>({ columnGroups, cellSpan, mover, initialLoading, skeletonRows, skeletonHidden, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, sortable, compact, striped, hoverable, ariaLabel, customClass, rowKeyDown, groups, collapsed, toggleGroup, groupLabel, summary, stickyOffset }: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,5 +5,5 @@ interface Props<Row extends object> extends TableGridProps<Row, CSSProperties["m
|
|
|
5
5
|
customClass: (row: Row, index: number) => string;
|
|
6
6
|
rowKeyDown: (event: KeyboardEvent<HTMLElement>, row: Row, index: number) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function TableGrid<Row extends object>({ initialLoading, skeletonRows, skeletonHidden, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, sortable, compact, striped, hoverable, ariaLabel, customClass, rowKeyDown, groups, collapsed, toggleGroup, groupLabel, summary, stickyOffset }: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function TableGrid<Row extends object>({ columnGroups, cellSpan, mover, initialLoading, skeletonRows, skeletonHidden, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, sortable, compact, striped, hoverable, ariaLabel, customClass, rowKeyDown, groups, collapsed, toggleGroup, groupLabel, summary, stickyOffset }: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type GaugeZone } from "../../../shared/package-runtime/distribution.cjs";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
|
+
export type KjunGaugeZone = GaugeZone;
|
|
4
|
+
export interface KjunZoneGaugeProps {
|
|
5
|
+
/** Where the marker sits. null, undefined and non-finite numbers are missing: the axis stays, without zone colours or a marker, and 0 is a real value. */
|
|
6
|
+
value: number | null | undefined;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
/** The axis from min to max in order: each zone ends at `to`, with the app's label and colour. */
|
|
10
|
+
zones: readonly GaugeZone[];
|
|
11
|
+
/** Shown above the axis and read first. */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** The accessible name when there is no visible label, or a fuller one than it. */
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
size?: "sm" | "md";
|
|
16
|
+
/** Zone names under the axis, so zones are not told apart by colour alone. */
|
|
17
|
+
zoneLabels?: boolean;
|
|
18
|
+
/** The value and its zone name at the end of the caption line. */
|
|
19
|
+
showValue?: boolean;
|
|
20
|
+
formatValue?: (value: number) => string;
|
|
21
|
+
/** Shown in place of the value when it is missing; defaults to an em dash. */
|
|
22
|
+
missingText?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: CSSProperties;
|
|
25
|
+
id?: string;
|
|
26
|
+
}
|
|
27
|
+
/** A value's place on a fixed axis of zones. It shows a reading; it is not a control. */
|
|
28
|
+
export declare function KjunZoneGauge({ value, min, max, zones, label, ariaLabel, size, zoneLabels, showValue, formatValue, missingText, className, style, id }: KjunZoneGaugeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type GaugeZone } from "../../../shared/package-runtime/distribution.js";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
|
+
export type KjunGaugeZone = GaugeZone;
|
|
4
|
+
export interface KjunZoneGaugeProps {
|
|
5
|
+
/** Where the marker sits. null, undefined and non-finite numbers are missing: the axis stays, without zone colours or a marker, and 0 is a real value. */
|
|
6
|
+
value: number | null | undefined;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
/** The axis from min to max in order: each zone ends at `to`, with the app's label and colour. */
|
|
10
|
+
zones: readonly GaugeZone[];
|
|
11
|
+
/** Shown above the axis and read first. */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** The accessible name when there is no visible label, or a fuller one than it. */
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
size?: "sm" | "md";
|
|
16
|
+
/** Zone names under the axis, so zones are not told apart by colour alone. */
|
|
17
|
+
zoneLabels?: boolean;
|
|
18
|
+
/** The value and its zone name at the end of the caption line. */
|
|
19
|
+
showValue?: boolean;
|
|
20
|
+
formatValue?: (value: number) => string;
|
|
21
|
+
/** Shown in place of the value when it is missing; defaults to an em dash. */
|
|
22
|
+
missingText?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: CSSProperties;
|
|
25
|
+
id?: string;
|
|
26
|
+
}
|
|
27
|
+
/** A value's place on a fixed axis of zones. It shows a reading; it is not a control. */
|
|
28
|
+
export declare function KjunZoneGauge({ value, min, max, zones, label, ariaLabel, size, zoneLabels, showValue, formatValue, missingText, className, style, id }: KjunZoneGaugeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare const alertActionSizes: {
|
|
3
3
|
readonly sm: "xs";
|
|
4
4
|
readonly md: "sm";
|
|
5
|
+
readonly lg: "md";
|
|
5
6
|
};
|
|
6
7
|
/** Popover actions default one step below md so a button never outweighs the small panel; an explicit size wins. */
|
|
7
8
|
export declare const popoverActionSize: "sm";
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare const alertActionSizes: {
|
|
3
3
|
readonly sm: "xs";
|
|
4
4
|
readonly md: "sm";
|
|
5
|
+
readonly lg: "md";
|
|
5
6
|
};
|
|
6
7
|
/** Popover actions default one step below md so a button never outweighs the small panel; an explicit size wins. */
|
|
7
8
|
export declare const popoverActionSize: "sm";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Heights by bar; the total is what a floating component must clear. Native keeps one per outermost KjunProvider. */
|
|
2
|
+
export interface BottomBarStore {
|
|
3
|
+
set(key: object, height: number): void;
|
|
4
|
+
remove(key: object): void;
|
|
5
|
+
subscribe(listener: () => void): () => void;
|
|
6
|
+
total(): number;
|
|
7
|
+
}
|
|
8
|
+
export declare function createBottomBarStore(): BottomBarStore;
|
|
9
|
+
/**
|
|
10
|
+
* Web: writes the bar's height as --_kjun-bottom-bar on the outermost KjunProvider scope while the bar is mounted.
|
|
11
|
+
* A bar the app hides (display: none) measures 0. Returns the cleanup.
|
|
12
|
+
*/
|
|
13
|
+
export declare function trackBottomBar(element: HTMLElement | null): () => void;
|
|
14
|
+
/** A FAB's extra bottom offset in px; anything that is not a positive number counts as 0. */
|
|
15
|
+
export declare const fabOffset: (offsetBottom: unknown) => number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Heights by bar; the total is what a floating component must clear. Native keeps one per outermost KjunProvider. */
|
|
2
|
+
export interface BottomBarStore {
|
|
3
|
+
set(key: object, height: number): void;
|
|
4
|
+
remove(key: object): void;
|
|
5
|
+
subscribe(listener: () => void): () => void;
|
|
6
|
+
total(): number;
|
|
7
|
+
}
|
|
8
|
+
export declare function createBottomBarStore(): BottomBarStore;
|
|
9
|
+
/**
|
|
10
|
+
* Web: writes the bar's height as --_kjun-bottom-bar on the outermost KjunProvider scope while the bar is mounted.
|
|
11
|
+
* A bar the app hides (display: none) measures 0. Returns the cleanup.
|
|
12
|
+
*/
|
|
13
|
+
export declare function trackBottomBar(element: HTMLElement | null): () => void;
|
|
14
|
+
/** A FAB's extra bottom offset in px; anything that is not a positive number counts as 0. */
|
|
15
|
+
export declare const fabOffset: (offsetBottom: unknown) => number;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** How a bottom bar draws its icons: "auto" outlines them and fills the selected one; "filled" and "outline" keep one style for all. */
|
|
2
|
+
export type NavigationIconStyle = "auto" | "filled" | "outline";
|
|
3
|
+
/** Whether a destination's icon draws its filled glyph (icons without one fall back to the outline). */
|
|
4
|
+
export declare const navigationIconFilled: (style: NavigationIconStyle, selected: boolean) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The bar's layout: `hasIcons` when any destination has an icon, and `iconOnly` when labels are off on such a bar (the
|
|
7
|
+
* lower bar). `parts` tells what one destination draws:
|
|
8
|
+
* - `showLabel`: a destination without an icon always shows its label, so it never disappears from an icon-only bar;
|
|
9
|
+
* - `iconBox`: the icon's box. A labelled bar keeps it empty for a destination without an icon so every label sits on
|
|
10
|
+
* one line; an icon-only bar drops it, leaving that destination's label centered;
|
|
11
|
+
* - `badgeOnIcon`: the badge sits on the icon box's corner, otherwise in the line after the label.
|
|
12
|
+
*/
|
|
13
|
+
export declare function bottomNavigationLayout(items: readonly {
|
|
14
|
+
icon?: string;
|
|
15
|
+
}[], showLabels: boolean): {
|
|
16
|
+
hasIcons: boolean;
|
|
17
|
+
iconOnly: boolean;
|
|
18
|
+
parts(item: {
|
|
19
|
+
icon?: string;
|
|
20
|
+
}): {
|
|
21
|
+
showLabel: boolean;
|
|
22
|
+
iconBox: boolean;
|
|
23
|
+
badgeOnIcon: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** How a bottom bar draws its icons: "auto" outlines them and fills the selected one; "filled" and "outline" keep one style for all. */
|
|
2
|
+
export type NavigationIconStyle = "auto" | "filled" | "outline";
|
|
3
|
+
/** Whether a destination's icon draws its filled glyph (icons without one fall back to the outline). */
|
|
4
|
+
export declare const navigationIconFilled: (style: NavigationIconStyle, selected: boolean) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The bar's layout: `hasIcons` when any destination has an icon, and `iconOnly` when labels are off on such a bar (the
|
|
7
|
+
* lower bar). `parts` tells what one destination draws:
|
|
8
|
+
* - `showLabel`: a destination without an icon always shows its label, so it never disappears from an icon-only bar;
|
|
9
|
+
* - `iconBox`: the icon's box. A labelled bar keeps it empty for a destination without an icon so every label sits on
|
|
10
|
+
* one line; an icon-only bar drops it, leaving that destination's label centered;
|
|
11
|
+
* - `badgeOnIcon`: the badge sits on the icon box's corner, otherwise in the line after the label.
|
|
12
|
+
*/
|
|
13
|
+
export declare function bottomNavigationLayout(items: readonly {
|
|
14
|
+
icon?: string;
|
|
15
|
+
}[], showLabels: boolean): {
|
|
16
|
+
hasIcons: boolean;
|
|
17
|
+
iconOnly: boolean;
|
|
18
|
+
parts(item: {
|
|
19
|
+
icon?: string;
|
|
20
|
+
}): {
|
|
21
|
+
showLabel: boolean;
|
|
22
|
+
iconBox: boolean;
|
|
23
|
+
badgeOnIcon: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { tokens, type CardPadding, type CardSurface } from "@kjun-ui/tokens";
|
|
2
|
+
export type CardHeadingLevel = false | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export type CardMediaPosition = "top" | "start";
|
|
4
|
+
export type CardMediaAspect = keyof typeof tokens.card.mediaAspects;
|
|
5
|
+
/** Which parts a card draws; each platform passes its own content checks so React nodes and Vue slots share one rule. */
|
|
6
|
+
export interface CardParts {
|
|
7
|
+
header: boolean;
|
|
8
|
+
title: boolean;
|
|
9
|
+
subtitle: boolean;
|
|
10
|
+
actions: boolean;
|
|
11
|
+
body: boolean;
|
|
12
|
+
footer: boolean;
|
|
13
|
+
media: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Layout decisions every platform makes the same way. */
|
|
16
|
+
export declare function cardLayout(parts: CardParts, options: {
|
|
17
|
+
pressable: boolean;
|
|
18
|
+
headingLevel: CardHeadingLevel;
|
|
19
|
+
surface: CardSurface;
|
|
20
|
+
padding: CardPadding;
|
|
21
|
+
mediaPosition: CardMediaPosition;
|
|
22
|
+
}): {
|
|
23
|
+
heading: boolean;
|
|
24
|
+
header: boolean;
|
|
25
|
+
/** A title drawn from the title prop (not a custom header) keeps a minimum width beside its actions and aligns them to its first line. */
|
|
26
|
+
titled: boolean;
|
|
27
|
+
/** A pressable card is one button, whose content is not a heading. */
|
|
28
|
+
titleLevel: CardHeadingLevel;
|
|
29
|
+
/** A tinted surface lifts its badges onto the plain surface colour. */
|
|
30
|
+
tinted: boolean;
|
|
31
|
+
/** Without a divider the header sits a step closer to the body than to the card edge. */
|
|
32
|
+
headerGap: 0 | 16 | 12 | 8;
|
|
33
|
+
sideMedia: boolean;
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { tokens, type CardPadding, type CardSurface } from "@kjun-ui/tokens";
|
|
2
|
+
export type CardHeadingLevel = false | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export type CardMediaPosition = "top" | "start";
|
|
4
|
+
export type CardMediaAspect = keyof typeof tokens.card.mediaAspects;
|
|
5
|
+
/** Which parts a card draws; each platform passes its own content checks so React nodes and Vue slots share one rule. */
|
|
6
|
+
export interface CardParts {
|
|
7
|
+
header: boolean;
|
|
8
|
+
title: boolean;
|
|
9
|
+
subtitle: boolean;
|
|
10
|
+
actions: boolean;
|
|
11
|
+
body: boolean;
|
|
12
|
+
footer: boolean;
|
|
13
|
+
media: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Layout decisions every platform makes the same way. */
|
|
16
|
+
export declare function cardLayout(parts: CardParts, options: {
|
|
17
|
+
pressable: boolean;
|
|
18
|
+
headingLevel: CardHeadingLevel;
|
|
19
|
+
surface: CardSurface;
|
|
20
|
+
padding: CardPadding;
|
|
21
|
+
mediaPosition: CardMediaPosition;
|
|
22
|
+
}): {
|
|
23
|
+
heading: boolean;
|
|
24
|
+
header: boolean;
|
|
25
|
+
/** A title drawn from the title prop (not a custom header) keeps a minimum width beside its actions and aligns them to its first line. */
|
|
26
|
+
titled: boolean;
|
|
27
|
+
/** A pressable card is one button, whose content is not a heading. */
|
|
28
|
+
titleLevel: CardHeadingLevel;
|
|
29
|
+
/** A tinted surface lifts its badges onto the plain surface colour. */
|
|
30
|
+
tinted: boolean;
|
|
31
|
+
/** Without a divider the header sits a step closer to the body than to the card edge. */
|
|
32
|
+
headerGap: 0 | 16 | 12 | 8;
|
|
33
|
+
sideMedia: boolean;
|
|
34
|
+
};
|
|
@@ -10,7 +10,7 @@ export declare const chartFrameDefaults: {
|
|
|
10
10
|
/** Evenly spaced positions from 0 to 1 for at least two marks (grid lines or ticks). */
|
|
11
11
|
export declare function chartFrameStops(count: number): number[];
|
|
12
12
|
/** A tick label centres on its tick, except at the ends where it stays inside the plot (percent of its width). */
|
|
13
|
-
export declare function chartTickShift(stop: number): 0 | -
|
|
13
|
+
export declare function chartTickShift(stop: number): 0 | -50 | -100;
|
|
14
14
|
/** Grid lines in a 0 0 100 100 viewBox, drawn with non-scaling strokes over the plot area. */
|
|
15
15
|
export declare const chartFrameViewBox = "0 0 100 100";
|
|
16
16
|
export declare function chartFramePath(gridLines: number): string;
|
|
@@ -10,7 +10,7 @@ export declare const chartFrameDefaults: {
|
|
|
10
10
|
/** Evenly spaced positions from 0 to 1 for at least two marks (grid lines or ticks). */
|
|
11
11
|
export declare function chartFrameStops(count: number): number[];
|
|
12
12
|
/** A tick label centres on its tick, except at the ends where it stays inside the plot (percent of its width). */
|
|
13
|
-
export declare function chartTickShift(stop: number): 0 | -
|
|
13
|
+
export declare function chartTickShift(stop: number): 0 | -50 | -100;
|
|
14
14
|
/** Grid lines in a 0 0 100 100 viewBox, drawn with non-scaling strokes over the plot area. */
|
|
15
15
|
export declare const chartFrameViewBox = "0 0 100 100";
|
|
16
16
|
export declare function chartFramePath(gridLines: number): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { tokens } from "@kjun-ui/tokens";
|
|
2
|
+
export type ChipSize = keyof typeof tokens.extensions.chip.typography;
|
|
3
|
+
/** Templates and plain JS can pass any string; an unknown size draws as md instead of losing its icon and spacing. */
|
|
4
|
+
export declare function chipSize(size: unknown): ChipSize;
|