@kjun-ui/native 0.14.0 → 0.16.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 +364 -302
- package/dist/index.js +234 -170
- package/dist/index.web.cjs +375 -313
- package/dist/index.web.js +238 -174
- package/dist/styles.css +26 -3
- package/dist/types/packages/native/src/collapse.d.cts +3 -1
- package/dist/types/packages/native/src/collapse.d.ts +3 -1
- package/dist/types/packages/native/src/drawer.d.cts +3 -1
- package/dist/types/packages/native/src/drawer.d.ts +3 -1
- package/dist/types/packages/native/src/layout-primitives.d.cts +5 -3
- package/dist/types/packages/native/src/layout-primitives.d.ts +5 -3
- package/dist/types/packages/native/src/list.d.cts +9 -2
- package/dist/types/packages/native/src/list.d.ts +9 -2
- package/dist/types/packages/native/src/modal.d.cts +3 -1
- package/dist/types/packages/native/src/modal.d.ts +3 -1
- package/dist/types/packages/native/src/navigation.d.cts +7 -1
- package/dist/types/packages/native/src/navigation.d.ts +7 -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/shared/package-runtime/use-after-close.d.cts +6 -0
- package/dist/types/shared/package-runtime/use-after-close.d.ts +6 -0
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -79,6 +79,8 @@
|
|
|
79
79
|
--_kjun-color-selected-bg: var(--kjun-selected-bg, var(--kjun-active));
|
|
80
80
|
--_kjun-color-on-brand: var(--kjun-on-brand, var(--kjun-inverse));
|
|
81
81
|
--_kjun-color-switch-thumb-on: var(--kjun-switch-thumb-on, var(--kjun-on-brand, var(--kjun-inverse)));
|
|
82
|
+
--_kjun-color-filter-selected-bg: var(--kjun-filter-selected-bg, var(--kjun-text));
|
|
83
|
+
--_kjun-color-filter-selected-text: var(--kjun-filter-selected-text, var(--kjun-inverse));
|
|
82
84
|
--_kjun-color-on-danger: var(--kjun-on-danger, var(--kjun-inverse));
|
|
83
85
|
--_kjun-color-on-success: var(--kjun-on-success, var(--kjun-inverse));
|
|
84
86
|
--_kjun-color-on-warning: var(--kjun-on-warning, var(--kjun-inverse));
|
|
@@ -182,6 +184,8 @@
|
|
|
182
184
|
--_kjun-selected-bg: var(--_kjun-color-selected-bg);
|
|
183
185
|
--_kjun-on-brand: var(--_kjun-color-on-brand);
|
|
184
186
|
--_kjun-switch-thumb-on: var(--_kjun-color-switch-thumb-on);
|
|
187
|
+
--_kjun-filter-selected-bg: var(--_kjun-color-filter-selected-bg);
|
|
188
|
+
--_kjun-filter-selected-text: var(--_kjun-color-filter-selected-text);
|
|
185
189
|
--_kjun-on-danger: var(--_kjun-color-on-danger);
|
|
186
190
|
--_kjun-on-success: var(--_kjun-color-on-success);
|
|
187
191
|
--_kjun-on-warning: var(--_kjun-color-on-warning);
|
|
@@ -532,6 +536,9 @@
|
|
|
532
536
|
--_kjun-extension-switch-label-gap: 8px;
|
|
533
537
|
--_kjun-extension-tooltip-padding-x: 8px;
|
|
534
538
|
--_kjun-extension-tooltip-padding-y: 4px;
|
|
539
|
+
--_kjun-extension-tooltip-max-widths-sm: 192px;
|
|
540
|
+
--_kjun-extension-tooltip-max-widths-md: 256px;
|
|
541
|
+
--_kjun-extension-tooltip-max-widths-lg: 320px;
|
|
535
542
|
--_kjun-extension-tooltip-max-width: 256px;
|
|
536
543
|
--_kjun-extension-tooltip-arrow-size: 8px;
|
|
537
544
|
--_kjun-extension-financial-affix-gap: 4px;
|
|
@@ -833,6 +840,7 @@
|
|
|
833
840
|
--_kjun-geometry-card-radii-sm: 8px;
|
|
834
841
|
--_kjun-geometry-card-radii-md: 12px;
|
|
835
842
|
--_kjun-geometry-card-radii-lg: 16px;
|
|
843
|
+
--_kjun-geometry-card-radii-xl: 24px;
|
|
836
844
|
--_kjun-geometry-card-subtitle-gap: 4px;
|
|
837
845
|
--_kjun-geometry-card-title-gap: 8px;
|
|
838
846
|
--_kjun-geometry-card-glass-blur: 10px;
|
|
@@ -882,6 +890,7 @@
|
|
|
882
890
|
--_kjun-geometry-radius-radius9999: 9999px;
|
|
883
891
|
--_kjun-geometry-radius-radius14: 14px;
|
|
884
892
|
--_kjun-geometry-radius-radius20: 20px;
|
|
893
|
+
--_kjun-geometry-radius-radius24: 24px;
|
|
885
894
|
--_kjun-geometry-native-minimum-touch-target: 44px;
|
|
886
895
|
--_kjun-geometry-space-inline-xs: 4px;
|
|
887
896
|
--_kjun-geometry-space-inline-sm: 8px;
|
|
@@ -2421,8 +2430,8 @@
|
|
|
2421
2430
|
white-space: nowrap;
|
|
2422
2431
|
}
|
|
2423
2432
|
.kjun-filter-chip[aria-pressed="true"] > span {
|
|
2424
|
-
background: var(--_kjun-color-
|
|
2425
|
-
color: var(--_kjun-color-
|
|
2433
|
+
background: var(--_kjun-color-filter-selected-bg);
|
|
2434
|
+
color: var(--_kjun-color-filter-selected-text);
|
|
2426
2435
|
font-weight: var(--_kjun-type-control-weight);
|
|
2427
2436
|
}
|
|
2428
2437
|
.kjun-filter-chip:disabled {
|
|
@@ -2520,6 +2529,17 @@
|
|
|
2520
2529
|
font-weight: var(--_kjun-type-caption-weight);
|
|
2521
2530
|
letter-spacing: var(--_kjun-type-caption-tracking);
|
|
2522
2531
|
}
|
|
2532
|
+
/* Title above the body: a bolder small role in the same tooltip text color. */
|
|
2533
|
+
.kjun-tooltip-title {
|
|
2534
|
+
display: block;
|
|
2535
|
+
font-size: var(--_kjun-type-control-small-size);
|
|
2536
|
+
line-height: var(--_kjun-type-control-small-line);
|
|
2537
|
+
font-weight: var(--_kjun-type-control-small-weight);
|
|
2538
|
+
letter-spacing: var(--_kjun-type-control-small-tracking);
|
|
2539
|
+
}
|
|
2540
|
+
.kjun-tooltip-body { display: block; }
|
|
2541
|
+
.kjun-tooltip[data-align="start"] { text-align: start; }
|
|
2542
|
+
.kjun-tooltip[data-align="center"] { text-align: center; }
|
|
2523
2543
|
.kjun-tooltip svg {
|
|
2524
2544
|
display: block;
|
|
2525
2545
|
color: var(--_kjun-color-chart-tooltip-bg);
|
|
@@ -4800,7 +4820,7 @@
|
|
|
4800
4820
|
|
|
4801
4821
|
.kjun-list-section,.kjun-top-navigation,.kjun-bottom-navigation,.kjun-bottom-action-bar{min-width:0;max-width:100%;color:var(--_kjun-color-text);background:var(--_kjun-color-surface)}
|
|
4802
4822
|
.kjun-list-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--_kjun-extension-list-gap);padding:var(--_kjun-extension-list-padding)}.kjun-list-heading h3{font-size:var(--_kjun-type-card-title-size);margin:0;line-height:var(--_kjun-type-card-title-line);font-weight:var(--_kjun-type-card-title-weight);letter-spacing:var(--_kjun-type-card-title-tracking)}.kjun-list-heading p{margin:var(--_kjun-geometry-dimension-value4) 0 0;font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);overflow-wrap:anywhere;line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}
|
|
4803
|
-
.kjun-list{list-style:none;padding:0;margin:0}.kjun-list-row{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}.kjun-list-row:last-child{border-bottom:0}.kjun-list[data-divider=false]>.kjun-list-row{border-bottom:0}.kjun-list[data-density=compact] .kjun-list-main{min-height:var(--_kjun-extension-list-compact-minimum-height);padding-block:var(--_kjun-extension-list-compact-padding-y)}.kjun-list-main{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);flex:1;min-width:0;min-height:var(--_kjun-extension-list-minimum-height);padding:var(--_kjun-extension-list-padding);text-align:start;color:inherit;text-decoration:none;background:transparent;border:0;font:inherit}.kjun-list-main:is(button,a):hover{background:var(--_kjun-color-hover)}.kjun-list-body{flex:1;min-width:0}.kjun-list-title,.kjun-list-description{display:block;overflow-wrap:anywhere;line-height:1.5}.kjun-list-title{font-size:var(--_kjun-type-label-size);line-height:var(--_kjun-type-label-line);font-weight:var(--_kjun-type-label-weight);letter-spacing:var(--_kjun-type-label-tracking)}.kjun-list-description{font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}.kjun-list-leading{flex-shrink:0}.kjun-list-trailing{overflow-wrap:anywhere;max-width:35%}.kjun-list-actions{display:flex;flex-wrap:wrap;gap:var(--_kjun-extension-list-actions-gap);padding-inline-end:var(--_kjun-extension-list-actions-padding);max-width:45%}
|
|
4823
|
+
.kjun-list{list-style:none;padding:0;margin:0}.kjun-list-row{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}.kjun-list-row:last-child{border-bottom:0}.kjun-list[data-divider=false]>.kjun-list-row{border-bottom:0}.kjun-list[data-density=compact] .kjun-list-main{min-height:var(--_kjun-extension-list-compact-minimum-height);padding-block:var(--_kjun-extension-list-compact-padding-y)}.kjun-list-main{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);flex:1;min-width:0;min-height:var(--_kjun-extension-list-minimum-height);padding:var(--_kjun-extension-list-padding);text-align:start;color:inherit;text-decoration:none;background:transparent;border:0;font:inherit}.kjun-list-main:is(button,a):hover{background:var(--_kjun-color-hover)}.kjun-list-body{flex:1;min-width:0}.kjun-list-content{display:block;margin-top:var(--_kjun-extension-list-description-gap)}.kjun-list-title,.kjun-list-description{display:block;overflow-wrap:anywhere;line-height:1.5}.kjun-list-title{font-size:var(--_kjun-type-label-size);line-height:var(--_kjun-type-label-line);font-weight:var(--_kjun-type-label-weight);letter-spacing:var(--_kjun-type-label-tracking)}.kjun-list-description{font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}.kjun-list-leading{flex-shrink:0}.kjun-list-trailing{overflow-wrap:anywhere;max-width:35%}.kjun-list-actions{display:flex;flex-wrap:wrap;gap:var(--_kjun-extension-list-actions-gap);padding-inline-end:var(--_kjun-extension-list-actions-padding);max-width:45%}
|
|
4804
4824
|
/* A disabled row disables its actions too, so the row never reads as partly available. */
|
|
4805
4825
|
.kjun-list-actions[data-disabled]{opacity:var(--_kjun-state-opacity-disabled)}
|
|
4806
4826
|
.kjun-navigation-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--_kjun-extension-navigation-actions-gap);min-width:0}
|
|
@@ -5023,6 +5043,9 @@
|
|
|
5023
5043
|
|
|
5024
5044
|
/* 0.14.0: plain sections, destructive rows, decorative chevrons and non-row list items share the row inset. */
|
|
5025
5045
|
.kjun-list-section[data-surface="false"]{background:transparent}
|
|
5046
|
+
/* A rounded section clips its rows to the corners; row focus rings move inside so the clip does not cut them. */
|
|
5047
|
+
.kjun-list-section[data-radius]{overflow:hidden;overflow:clip}
|
|
5048
|
+
.kjun-list-section[data-radius] .kjun-list-main:focus-visible{outline-offset:var(--_kjun-state-focus-inset-offset)}
|
|
5026
5049
|
.kjun-list-row[data-destructive] .kjun-list-title{color:var(--_kjun-color-danger)}
|
|
5027
5050
|
.kjun-list-chevron{flex-shrink:0;color:var(--_kjun-color-text-tertiary)}
|
|
5028
5051
|
.kjun-list-item{padding:var(--_kjun-extension-list-padding);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
/** keepMounted: once opened, the body stays mounted (height 0, hidden from assistive technology) while closed. */
|
|
3
|
+
export declare function Collapse({ open, keepMounted, children }: {
|
|
3
4
|
open: boolean;
|
|
5
|
+
keepMounted?: boolean;
|
|
4
6
|
children: ReactNode;
|
|
5
7
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
/** keepMounted: once opened, the body stays mounted (height 0, hidden from assistive technology) while closed. */
|
|
3
|
+
export declare function Collapse({ open, keepMounted, children }: {
|
|
3
4
|
open: boolean;
|
|
5
|
+
keepMounted?: boolean;
|
|
4
6
|
children: ReactNode;
|
|
5
7
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -13,6 +13,8 @@ export interface KjunDrawerProps {
|
|
|
13
13
|
footer?: ReactNode;
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
onClose?: () => void;
|
|
16
|
+
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
17
|
+
onAfterClose?: () => void;
|
|
16
18
|
ariaLabel?: string;
|
|
17
19
|
/** Top safe area, padded inside top and side drawers and kept clear above a bottom sheet. */
|
|
18
20
|
safeAreaTop?: number;
|
|
@@ -23,4 +25,4 @@ export interface KjunDrawerProps {
|
|
|
23
25
|
/** Keeps the panel above the on-screen keyboard (devices only). */
|
|
24
26
|
avoidKeyboard?: boolean;
|
|
25
27
|
}
|
|
26
|
-
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, ariaLabel, safeAreaTop, safeAreaBottom, maxHeight, avoidKeyboard, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, onAfterClose, ariaLabel, safeAreaTop, safeAreaBottom, maxHeight, avoidKeyboard, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,8 @@ export interface KjunDrawerProps {
|
|
|
13
13
|
footer?: ReactNode;
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
onClose?: () => void;
|
|
16
|
+
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
17
|
+
onAfterClose?: () => void;
|
|
16
18
|
ariaLabel?: string;
|
|
17
19
|
/** Top safe area, padded inside top and side drawers and kept clear above a bottom sheet. */
|
|
18
20
|
safeAreaTop?: number;
|
|
@@ -23,4 +25,4 @@ export interface KjunDrawerProps {
|
|
|
23
25
|
/** Keeps the panel above the on-screen keyboard (devices only). */
|
|
24
26
|
avoidKeyboard?: boolean;
|
|
25
27
|
}
|
|
26
|
-
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, ariaLabel, safeAreaTop, safeAreaBottom, maxHeight, avoidKeyboard, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, onAfterClose, ariaLabel, safeAreaTop, safeAreaBottom, maxHeight, avoidKeyboard, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type StyleProp, type TextStyle, type ViewStyle } from "react-native";
|
|
2
|
+
import { type StyleProp, type TextProps, type TextStyle, type ViewStyle } from "react-native";
|
|
3
3
|
import { type InlineAlign, type InlineGap, type InlineJustify, type StackAlign, type StackGap, type TextAlign, type TextTone, type TextVariant } from "../../../shared/package-runtime/layout-primitives.cjs";
|
|
4
4
|
export type { InlineAlign, InlineGap, InlineJustify, StackAlign, StackGap, TextAlign, TextTone, TextVariant };
|
|
5
|
-
|
|
5
|
+
/** Other React Native Text props (accessibilityLabel, testID, selectable, allowFontScaling, adjustsFontSizeToFit…) pass through.
|
|
6
|
+
* adjustsFontSizeToFit only shrinks: the variant size stays the largest. */
|
|
7
|
+
export interface KjunTextProps extends Omit<TextProps, "style" | "children" | "numberOfLines"> {
|
|
6
8
|
/** Typography role; every size, line height and weight comes from tokens.typography. */
|
|
7
9
|
variant?: TextVariant;
|
|
8
10
|
/** Text color role. */
|
|
@@ -13,7 +15,7 @@ export interface KjunTextProps {
|
|
|
13
15
|
style?: StyleProp<TextStyle>;
|
|
14
16
|
children?: ReactNode;
|
|
15
17
|
}
|
|
16
|
-
export declare function KjunText({ variant, tone, align, maxLines, style, children }: KjunTextProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function KjunText({ variant, tone, align, maxLines, style, children, ...rest }: KjunTextProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export interface KjunStackProps {
|
|
18
20
|
/** Space between children: space.stack (sm·md·lg) or space.section (section-sm·md·lg). */
|
|
19
21
|
gap?: StackGap;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type StyleProp, type TextStyle, type ViewStyle } from "react-native";
|
|
2
|
+
import { type StyleProp, type TextProps, type TextStyle, type ViewStyle } from "react-native";
|
|
3
3
|
import { type InlineAlign, type InlineGap, type InlineJustify, type StackAlign, type StackGap, type TextAlign, type TextTone, type TextVariant } from "../../../shared/package-runtime/layout-primitives.js";
|
|
4
4
|
export type { InlineAlign, InlineGap, InlineJustify, StackAlign, StackGap, TextAlign, TextTone, TextVariant };
|
|
5
|
-
|
|
5
|
+
/** Other React Native Text props (accessibilityLabel, testID, selectable, allowFontScaling, adjustsFontSizeToFit…) pass through.
|
|
6
|
+
* adjustsFontSizeToFit only shrinks: the variant size stays the largest. */
|
|
7
|
+
export interface KjunTextProps extends Omit<TextProps, "style" | "children" | "numberOfLines"> {
|
|
6
8
|
/** Typography role; every size, line height and weight comes from tokens.typography. */
|
|
7
9
|
variant?: TextVariant;
|
|
8
10
|
/** Text color role. */
|
|
@@ -13,7 +15,7 @@ export interface KjunTextProps {
|
|
|
13
15
|
style?: StyleProp<TextStyle>;
|
|
14
16
|
children?: ReactNode;
|
|
15
17
|
}
|
|
16
|
-
export declare function KjunText({ variant, tone, align, maxLines, style, children }: KjunTextProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function KjunText({ variant, tone, align, maxLines, style, children, ...rest }: KjunTextProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export interface KjunStackProps {
|
|
18
20
|
/** Space between children: space.stack (sm·md·lg) or space.section (section-sm·md·lg). */
|
|
19
21
|
gap?: StackGap;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CardRadius } from "@kjun-ui/tokens";
|
|
1
2
|
import { type ReactNode } from "react";
|
|
2
3
|
import { type GestureResponderEvent } from "react-native";
|
|
3
4
|
export interface KjunListRowProps {
|
|
@@ -13,8 +14,12 @@ export interface KjunListRowProps {
|
|
|
13
14
|
/** Ends the row with a decorative chevron that marks it as navigation. */
|
|
14
15
|
chevron?: boolean;
|
|
15
16
|
onPress?: (event: GestureResponderEvent) => void;
|
|
17
|
+
/** Name of a pressable or link row, e.g. with the amount a screen reader should hear. */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** Display-only content under the description (a budget bar); no buttons or links inside a pressable row. */
|
|
20
|
+
children?: ReactNode;
|
|
16
21
|
}
|
|
17
|
-
export declare function KjunListRow({ title, description, leading, trailing, actions, href, disabled, destructive, chevron, onPress }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function KjunListRow({ title, description, leading, trailing, actions, href, disabled, destructive, chevron, onPress, ariaLabel, children }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
18
23
|
export interface KjunListSectionProps {
|
|
19
24
|
title?: string;
|
|
20
25
|
description?: string;
|
|
@@ -27,8 +32,10 @@ export interface KjunListSectionProps {
|
|
|
27
32
|
divider?: boolean;
|
|
28
33
|
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
29
34
|
density?: "default" | "compact";
|
|
35
|
+
/** Rounds the section on the card radius steps and clips its rows to the corners (default "none"). */
|
|
36
|
+
radius?: CardRadius;
|
|
30
37
|
}
|
|
31
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density, radius }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
32
39
|
export interface KjunListItemProps {
|
|
33
40
|
children: ReactNode;
|
|
34
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CardRadius } from "@kjun-ui/tokens";
|
|
1
2
|
import { type ReactNode } from "react";
|
|
2
3
|
import { type GestureResponderEvent } from "react-native";
|
|
3
4
|
export interface KjunListRowProps {
|
|
@@ -13,8 +14,12 @@ export interface KjunListRowProps {
|
|
|
13
14
|
/** Ends the row with a decorative chevron that marks it as navigation. */
|
|
14
15
|
chevron?: boolean;
|
|
15
16
|
onPress?: (event: GestureResponderEvent) => void;
|
|
17
|
+
/** Name of a pressable or link row, e.g. with the amount a screen reader should hear. */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** Display-only content under the description (a budget bar); no buttons or links inside a pressable row. */
|
|
20
|
+
children?: ReactNode;
|
|
16
21
|
}
|
|
17
|
-
export declare function KjunListRow({ title, description, leading, trailing, actions, href, disabled, destructive, chevron, onPress }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function KjunListRow({ title, description, leading, trailing, actions, href, disabled, destructive, chevron, onPress, ariaLabel, children }: KjunListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
18
23
|
export interface KjunListSectionProps {
|
|
19
24
|
title?: string;
|
|
20
25
|
description?: string;
|
|
@@ -27,8 +32,10 @@ export interface KjunListSectionProps {
|
|
|
27
32
|
divider?: boolean;
|
|
28
33
|
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
29
34
|
density?: "default" | "compact";
|
|
35
|
+
/** Rounds the section on the card radius steps and clips its rows to the corners (default "none"). */
|
|
36
|
+
radius?: CardRadius;
|
|
30
37
|
}
|
|
31
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density, radius }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
32
39
|
export interface KjunListItemProps {
|
|
33
40
|
children: ReactNode;
|
|
34
41
|
}
|
|
@@ -19,6 +19,8 @@ export interface KjunModalProps {
|
|
|
19
19
|
open: boolean;
|
|
20
20
|
onOpenChange: (value: boolean) => void;
|
|
21
21
|
onClose?: () => void;
|
|
22
|
+
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
23
|
+
onAfterClose?: () => void;
|
|
22
24
|
onCancel?: () => void;
|
|
23
25
|
onConfirm?: () => void;
|
|
24
26
|
title?: string;
|
|
@@ -43,4 +45,4 @@ export interface KjunModalProps {
|
|
|
43
45
|
children: ReactNode;
|
|
44
46
|
ariaLabel?: string;
|
|
45
47
|
}
|
|
46
|
-
export declare function KjunModal({ open, onOpenChange, onClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, }: KjunModalProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
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, }: KjunModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,6 +19,8 @@ export interface KjunModalProps {
|
|
|
19
19
|
open: boolean;
|
|
20
20
|
onOpenChange: (value: boolean) => void;
|
|
21
21
|
onClose?: () => void;
|
|
22
|
+
/** Called once after the close finishes and the layer has left the screen (not when it mounts closed or reopens during the exit). */
|
|
23
|
+
onAfterClose?: () => void;
|
|
22
24
|
onCancel?: () => void;
|
|
23
25
|
onConfirm?: () => void;
|
|
24
26
|
title?: string;
|
|
@@ -43,4 +45,4 @@ export interface KjunModalProps {
|
|
|
43
45
|
children: ReactNode;
|
|
44
46
|
ariaLabel?: string;
|
|
45
47
|
}
|
|
46
|
-
export declare function KjunModal({ open, onOpenChange, onClose, onCancel, onConfirm, title, size, closable, closeOnOverlay, closeOnEsc, showHeader, showFooter, showConfirmButton, showCancelButton, confirmText, cancelText, confirmDisabled, loading, noPadding, height, confirmVariant, footerSize, header, footer, children, ariaLabel, }: KjunModalProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
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, }: KjunModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,11 +9,17 @@ export declare function KjunAccordion({ multiple, tone, children, }: KjunAccordi
|
|
|
9
9
|
export interface KjunAccordionItemProps {
|
|
10
10
|
title?: string;
|
|
11
11
|
defaultOpen?: boolean;
|
|
12
|
+
/** Controlled open state. A controlled item follows this value only and stays out of the Accordion's single-open rule. */
|
|
13
|
+
open?: boolean;
|
|
14
|
+
/** Requests a change on a controlled item; reports every change on an uncontrolled one (also when a sibling closes it). */
|
|
15
|
+
onOpenChange?: (open: boolean) => void;
|
|
16
|
+
/** Keeps the body mounted after it first opens, so inputs keep their state while closed. */
|
|
17
|
+
keepMounted?: boolean;
|
|
12
18
|
disabled?: boolean;
|
|
13
19
|
header?: ReactNode;
|
|
14
20
|
children: ReactNode;
|
|
15
21
|
}
|
|
16
|
-
export declare function KjunAccordionItem({ title, defaultOpen, disabled, header, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function KjunAccordionItem({ title, defaultOpen, disabled, header, open: openProp, onOpenChange, keepMounted, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
23
|
export interface BreadcrumbItem {
|
|
18
24
|
label: string;
|
|
19
25
|
to?: string;
|
|
@@ -9,11 +9,17 @@ export declare function KjunAccordion({ multiple, tone, children, }: KjunAccordi
|
|
|
9
9
|
export interface KjunAccordionItemProps {
|
|
10
10
|
title?: string;
|
|
11
11
|
defaultOpen?: boolean;
|
|
12
|
+
/** Controlled open state. A controlled item follows this value only and stays out of the Accordion's single-open rule. */
|
|
13
|
+
open?: boolean;
|
|
14
|
+
/** Requests a change on a controlled item; reports every change on an uncontrolled one (also when a sibling closes it). */
|
|
15
|
+
onOpenChange?: (open: boolean) => void;
|
|
16
|
+
/** Keeps the body mounted after it first opens, so inputs keep their state while closed. */
|
|
17
|
+
keepMounted?: boolean;
|
|
12
18
|
disabled?: boolean;
|
|
13
19
|
header?: ReactNode;
|
|
14
20
|
children: ReactNode;
|
|
15
21
|
}
|
|
16
|
-
export declare function KjunAccordionItem({ title, defaultOpen, disabled, header, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function KjunAccordionItem({ title, defaultOpen, disabled, header, open: openProp, onOpenChange, keepMounted, children, }: KjunAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
23
|
export interface BreadcrumbItem {
|
|
18
24
|
label: string;
|
|
19
25
|
to?: string;
|
|
@@ -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;
|
|
@@ -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,6 @@
|
|
|
1
|
+
/** Calls onAfterClose once when a layer leaves the screen (present true → false). A reopen during the exit keeps
|
|
2
|
+
* present true, so it reports nothing; a layer mounted closed reports nothing either. */
|
|
3
|
+
export declare function useAfterClose(present: boolean, onAfterClose?: () => void, enabled?: boolean): void;
|
|
4
|
+
/** Web overlays can outlive present by a render (react-aria finishes its exit first), so this reports when the
|
|
5
|
+
* overlay element itself leaves the DOM while closed. Attach the returned ref to the overlay. */
|
|
6
|
+
export declare function useAfterCloseRef(open: boolean, onAfterClose?: () => void): (node: Element | null) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Calls onAfterClose once when a layer leaves the screen (present true → false). A reopen during the exit keeps
|
|
2
|
+
* present true, so it reports nothing; a layer mounted closed reports nothing either. */
|
|
3
|
+
export declare function useAfterClose(present: boolean, onAfterClose?: () => void, enabled?: boolean): void;
|
|
4
|
+
/** Web overlays can outlive present by a render (react-aria finishes its exit first), so this reports when the
|
|
5
|
+
* overlay element itself leaves the DOM while closed. Attach the returned ref to the overlay. */
|
|
6
|
+
export declare function useAfterCloseRef(open: boolean, onAfterClose?: () => void): (node: Element | null) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjun-ui/native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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.16.0",
|
|
51
|
+
"@kjun-ui/icons": "0.16.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "^19.2.3",
|