@kjun-ui/native 0.15.0 → 0.17.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 +2009 -1925
- package/dist/index.js +1888 -1803
- package/dist/index.web.cjs +2031 -1947
- package/dist/index.web.js +1905 -1820
- package/dist/styles.css +99 -32
- package/dist/types/packages/native/src/alert-actions-context.d.cts +3 -0
- package/dist/types/packages/native/src/alert-actions-context.d.ts +3 -0
- package/dist/types/packages/native/src/app-navigation.d.cts +9 -3
- package/dist/types/packages/native/src/app-navigation.d.ts +9 -3
- package/dist/types/packages/native/src/choice-controls.d.cts +3 -1
- package/dist/types/packages/native/src/choice-controls.d.ts +3 -1
- package/dist/types/packages/native/src/display-primitives.d.cts +1 -11
- package/dist/types/packages/native/src/display-primitives.d.ts +1 -11
- package/dist/types/packages/native/src/kpi-row.d.cts +6 -2
- package/dist/types/packages/native/src/kpi-row.d.ts +6 -2
- package/dist/types/packages/native/src/layer-backdrop.d.cts +5 -0
- package/dist/types/packages/native/src/layer-backdrop.d.ts +5 -0
- package/dist/types/packages/native/src/list.d.cts +7 -2
- package/dist/types/packages/native/src/list.d.ts +7 -2
- package/dist/types/packages/native/src/media.d.cts +1 -1
- package/dist/types/packages/native/src/media.d.ts +1 -1
- package/dist/types/packages/native/src/popover.d.cts +6 -1
- package/dist/types/packages/native/src/popover.d.ts +6 -1
- package/dist/types/packages/native/src/progress.d.cts +16 -0
- package/dist/types/packages/native/src/progress.d.ts +16 -0
- package/dist/types/packages/native/src/range-input.d.cts +4 -0
- package/dist/types/packages/native/src/range-input.d.ts +4 -0
- package/dist/types/shared/package-runtime/alert-tone.d.cts +11 -0
- package/dist/types/shared/package-runtime/alert-tone.d.ts +11 -0
- package/dist/types/shared/package-runtime/drawer-geometry.d.cts +10 -4
- package/dist/types/shared/package-runtime/drawer-geometry.d.ts +10 -4
- package/dist/types/shared/package-runtime/progress-circle.d.cts +5 -0
- package/dist/types/shared/package-runtime/progress-circle.d.ts +5 -0
- package/package.json +3 -3
|
@@ -21,6 +21,11 @@ export interface KjunPopoverProps {
|
|
|
21
21
|
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, maxHeight, flip, focusOnOpen, ariaLabel, placement, header, modal, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export interface KjunTooltipProps extends Pick<PressableProps, "onPress" | "disabled"> {
|
|
23
23
|
content?: string;
|
|
24
|
+
/** A bolder line above content (a file name above its path). Read together with content. */
|
|
25
|
+
title?: string;
|
|
26
|
+
align?: "start" | "center";
|
|
27
|
+
/** Maximum width step (tooltip.maxWidths); default is md, the earlier width. */
|
|
28
|
+
width?: "sm" | "md" | "lg";
|
|
24
29
|
placement?: "top" | "bottom" | "left" | "right";
|
|
25
30
|
delay?: number;
|
|
26
31
|
/** Controlled visibility; omit to let hover and focus drive it. */
|
|
@@ -28,4 +33,4 @@ export interface KjunTooltipProps extends Pick<PressableProps, "onPress" | "disa
|
|
|
28
33
|
onOpenChange?: (open: boolean) => void;
|
|
29
34
|
children: ReactNode;
|
|
30
35
|
}
|
|
31
|
-
export declare function KjunTooltip({ content:
|
|
36
|
+
export declare function KjunTooltip({ content: body, title, align, width, placement, delay, children, onPress, disabled, open: controlled, onOpenChange, }: KjunTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { SemanticTone } from "./display-primitives.cjs";
|
|
3
|
+
export interface KjunProgressProps {
|
|
4
|
+
/** null is missing data; omission keeps the zero default. */
|
|
5
|
+
value?: number | null;
|
|
6
|
+
/** Work is active but its completion percentage is unknown; takes precedence over null. */
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
max?: number;
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
variant?: SemanticTone;
|
|
11
|
+
showLabel?: boolean;
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
subLabel?: ReactNode;
|
|
14
|
+
shape?: "bar" | "circle";
|
|
15
|
+
}
|
|
16
|
+
export declare function KjunProgress({ value, indeterminate, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { SemanticTone } from "./display-primitives.js";
|
|
3
|
+
export interface KjunProgressProps {
|
|
4
|
+
/** null is missing data; omission keeps the zero default. */
|
|
5
|
+
value?: number | null;
|
|
6
|
+
/** Work is active but its completion percentage is unknown; takes precedence over null. */
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
max?: number;
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
variant?: SemanticTone;
|
|
11
|
+
showLabel?: boolean;
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
subLabel?: ReactNode;
|
|
14
|
+
shape?: "bar" | "circle";
|
|
15
|
+
}
|
|
16
|
+
export declare function KjunProgress({ value, indeterminate, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,6 +6,10 @@ export interface KjunSliderProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
label?: string;
|
|
8
8
|
ariaLabel?: string;
|
|
9
|
+
/** Hides the visible value only; each thumb still reports its value to assistive technology. */
|
|
10
|
+
showValue?: boolean;
|
|
11
|
+
/** Formats the visible value and each thumb's accessible value text. Values stay numeric. */
|
|
12
|
+
formatValue?: (value: number) => string;
|
|
9
13
|
onValueChange?: (value: number) => void;
|
|
10
14
|
onChangeCommit?: (value: number) => void;
|
|
11
15
|
}
|
|
@@ -6,6 +6,10 @@ export interface KjunSliderProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
label?: string;
|
|
8
8
|
ariaLabel?: string;
|
|
9
|
+
/** Hides the visible value only; each thumb still reports its value to assistive technology. */
|
|
10
|
+
showValue?: boolean;
|
|
11
|
+
/** Formats the visible value and each thumb's accessible value text. Values stay numeric. */
|
|
12
|
+
formatValue?: (value: number) => string;
|
|
9
13
|
onValueChange?: (value: number) => void;
|
|
10
14
|
onChangeCommit?: (value: number) => void;
|
|
11
15
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color roles a soft-fill Alert paints per tone. Info has no fill role: it uses a translucent text tint so it
|
|
3
|
+
* stays visible on any page background; the semantic tones carry the color, titles stay on the text role.
|
|
4
|
+
*/
|
|
5
|
+
export declare function alertToneRoles(tone: string): {
|
|
6
|
+
bg: string | null;
|
|
7
|
+
icon: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const alertIcons: Record<string, string>;
|
|
10
|
+
/** Native has no color-mix: tints a hex or rgb() color with alpha, or returns undefined for other formats. */
|
|
11
|
+
export declare function tintColor(color: string, alpha: number): string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color roles a soft-fill Alert paints per tone. Info has no fill role: it uses a translucent text tint so it
|
|
3
|
+
* stays visible on any page background; the semantic tones carry the color, titles stay on the text role.
|
|
4
|
+
*/
|
|
5
|
+
export declare function alertToneRoles(tone: string): {
|
|
6
|
+
bg: string | null;
|
|
7
|
+
icon: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const alertIcons: Record<string, string>;
|
|
10
|
+
/** Native has no color-mix: tints a hex or rgb() color with alpha, or returns undefined for other formats. */
|
|
11
|
+
export declare function tintColor(color: string, alpha: number): string | undefined;
|
|
@@ -18,15 +18,21 @@ export interface DrawerFrame {
|
|
|
18
18
|
lift: number;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Keyboard events a drawer listens to.
|
|
22
|
-
*
|
|
21
|
+
* Keyboard events a drawer listens to. Android reports only after the keyboard moved; edge-to-edge
|
|
22
|
+
* windows no longer resize for it (adjustResize), so the drawer lifts itself there too.
|
|
23
23
|
*/
|
|
24
24
|
export declare function keyboardEvents(os: string): {
|
|
25
25
|
readonly show: "keyboardWillShow";
|
|
26
26
|
readonly hide: "keyboardWillHide";
|
|
27
|
+
} | {
|
|
28
|
+
readonly show: "keyboardDidShow";
|
|
29
|
+
readonly hide: "keyboardDidHide";
|
|
27
30
|
} | null;
|
|
28
|
-
/**
|
|
29
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The part of the modal root the keyboard covers. Measured against the root, a window the platform
|
|
33
|
+
* already resized ends at or above the keyboard and gives 0, so the drawer never lifts twice.
|
|
34
|
+
*/
|
|
35
|
+
export declare function keyboardOverlap(rootHeight: number, keyboardScreenY: number): number;
|
|
30
36
|
export declare function drawerFrame({ position, windowHeight, safeAreaTop, safeAreaBottom, gap, keyboard, maxHeight }: DrawerFrameInput): DrawerFrame;
|
|
31
37
|
/** Web overlay variables read by the drawer CSS (tokens controls.css). */
|
|
32
38
|
export declare function drawerOverlayVars({ safeAreaTop, safeAreaBottom, maxHeight }: {
|
|
@@ -18,15 +18,21 @@ export interface DrawerFrame {
|
|
|
18
18
|
lift: number;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Keyboard events a drawer listens to.
|
|
22
|
-
*
|
|
21
|
+
* Keyboard events a drawer listens to. Android reports only after the keyboard moved; edge-to-edge
|
|
22
|
+
* windows no longer resize for it (adjustResize), so the drawer lifts itself there too.
|
|
23
23
|
*/
|
|
24
24
|
export declare function keyboardEvents(os: string): {
|
|
25
25
|
readonly show: "keyboardWillShow";
|
|
26
26
|
readonly hide: "keyboardWillHide";
|
|
27
|
+
} | {
|
|
28
|
+
readonly show: "keyboardDidShow";
|
|
29
|
+
readonly hide: "keyboardDidHide";
|
|
27
30
|
} | null;
|
|
28
|
-
/**
|
|
29
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The part of the modal root the keyboard covers. Measured against the root, a window the platform
|
|
33
|
+
* already resized ends at or above the keyboard and gives 0, so the drawer never lifts twice.
|
|
34
|
+
*/
|
|
35
|
+
export declare function keyboardOverlap(rootHeight: number, keyboardScreenY: number): number;
|
|
30
36
|
export declare function drawerFrame({ position, windowHeight, safeAreaTop, safeAreaBottom, gap, keyboard, maxHeight }: DrawerFrameInput): DrawerFrame;
|
|
31
37
|
/** Web overlay variables read by the drawer CSS (tokens controls.css). */
|
|
32
38
|
export declare function drawerOverlayVars({ safeAreaTop, safeAreaBottom, maxHeight }: {
|
|
@@ -9,3 +9,8 @@ export declare function progressCircle(size: ProgressCircleSize, percentage: num
|
|
|
9
9
|
offset: number;
|
|
10
10
|
showsPercentage: boolean;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* What a progress value means: indeterminate work wins, then a null, non-finite value or an invalid max is
|
|
14
|
+
* missing data (never 0%). An omitted value keeps the 0 default before it reaches here.
|
|
15
|
+
*/
|
|
16
|
+
export declare function progressState(value: number | null, max: number, indeterminate: boolean): "indeterminate" | "missing" | "determinate";
|
|
@@ -9,3 +9,8 @@ export declare function progressCircle(size: ProgressCircleSize, percentage: num
|
|
|
9
9
|
offset: number;
|
|
10
10
|
showsPercentage: boolean;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* What a progress value means: indeterminate work wins, then a null, non-finite value or an invalid max is
|
|
14
|
+
* missing data (never 0%). An omitted value keeps the 0 default before it reaches here.
|
|
15
|
+
*/
|
|
16
|
+
export declare function progressState(value: number | null, max: number, indeterminate: boolean): "indeterminate" | "missing" | "determinate";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjun-ui/native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://ui.kjun.dev",
|
|
6
6
|
"repository": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@kjun-ui/tokens": "0.
|
|
51
|
-
"@kjun-ui/icons": "0.
|
|
50
|
+
"@kjun-ui/tokens": "0.17.0",
|
|
51
|
+
"@kjun-ui/icons": "0.17.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "^19.2.3",
|