@kjun-ui/native 0.10.0 → 0.11.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/styles.css CHANGED
@@ -417,6 +417,7 @@
417
417
  --_kjun-extension-drawer-bottom-radius: 16px;
418
418
  --_kjun-extension-drawer-radius: 0px;
419
419
  --_kjun-extension-drawer-close-radius: 8px;
420
+ --_kjun-extension-drawer-sheet-gap: 48px;
420
421
  --_kjun-extension-drawer-width: 400px;
421
422
  --_kjun-extension-drawer-close-size: 32px;
422
423
  --_kjun-extension-drawer-close-icon-size: 16px;
@@ -2559,6 +2560,19 @@
2559
2560
  flex-direction: column;
2560
2561
  outline: none;
2561
2562
  }
2563
+ /* Safe areas arrive as --_kjun-drawer-safe-top/bottom on the overlay; the panel surface extends under them. */
2564
+ .kjun-drawer-overlay:not([data-position="bottom"]) .kjun-drawer-dialog { padding-top: var(--_kjun-drawer-safe-top); }
2565
+ .kjun-drawer-overlay:not([data-position="top"]) .kjun-drawer-dialog { padding-bottom: var(--_kjun-drawer-safe-bottom); }
2566
+ /* Top and bottom sheets stop short of the opposite edge (its safe area plus the sheet gap); only the body scrolls. */
2567
+ .kjun-drawer-overlay[data-position="bottom"] {
2568
+ --_kjun-drawer-sheet-max: calc(100dvh - var(--_kjun-drawer-safe-top) - var(--_kjun-extension-drawer-sheet-gap));
2569
+ }
2570
+ .kjun-drawer-overlay[data-position="top"] {
2571
+ --_kjun-drawer-sheet-max: calc(100dvh - var(--_kjun-drawer-safe-bottom) - var(--_kjun-extension-drawer-sheet-gap));
2572
+ }
2573
+ .kjun-drawer-overlay:is([data-position="top"], [data-position="bottom"]) :is(.kjun-drawer, .kjun-drawer-dialog) {
2574
+ max-height: var(--_kjun-drawer-max-height, var(--_kjun-drawer-sheet-max));
2575
+ }
2562
2576
  .kjun-drawer-header {
2563
2577
  display: flex;
2564
2578
  align-items: center;
@@ -4393,6 +4407,8 @@
4393
4407
  .kjun-kpi-row__value {
4394
4408
  white-space: normal;
4395
4409
  overflow-wrap: anywhere;
4410
+ /* Korean labels and values wrap at spaces, not between syllables; anywhere stays the last resort. */
4411
+ word-break: keep-all;
4396
4412
  }
4397
4413
  .kjun-kpi-row--mobile-summary
4398
4414
  .kjun-kpi-row__item--secondary
@@ -14,5 +14,13 @@ export interface KjunDrawerProps {
14
14
  children: ReactNode;
15
15
  onClose?: () => void;
16
16
  ariaLabel?: string;
17
+ /** Top safe area, padded inside top and side drawers and kept clear above a bottom sheet. */
18
+ safeAreaTop?: number;
19
+ /** Bottom safe area, padded inside bottom and side drawers and kept clear below a top sheet. */
20
+ safeAreaBottom?: number;
21
+ /** Height limit for top and bottom drawers; by default they stop a sheet gap short of the opposite edge. */
22
+ maxHeight?: number;
23
+ /** Keeps the panel above the on-screen keyboard (devices only). */
24
+ avoidKeyboard?: boolean;
17
25
  }
18
- export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, ariaLabel, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element;
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;
@@ -14,5 +14,13 @@ export interface KjunDrawerProps {
14
14
  children: ReactNode;
15
15
  onClose?: () => void;
16
16
  ariaLabel?: string;
17
+ /** Top safe area, padded inside top and side drawers and kept clear above a bottom sheet. */
18
+ safeAreaTop?: number;
19
+ /** Bottom safe area, padded inside bottom and side drawers and kept clear below a top sheet. */
20
+ safeAreaBottom?: number;
21
+ /** Height limit for top and bottom drawers; by default they stop a sheet gap short of the opposite edge. */
22
+ maxHeight?: number;
23
+ /** Keeps the panel above the on-screen keyboard (devices only). */
24
+ avoidKeyboard?: boolean;
17
25
  }
18
- export declare function KjunDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, ariaLabel, }: KjunDrawerProps): import("react/jsx-runtime").JSX.Element;
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;
@@ -1,7 +1,10 @@
1
1
  import { type KjunFeedback } from "@kjun-ui/tokens";
2
2
  import { type ReactNode } from "react";
3
+ import { type StyleProp, type ViewStyle } from "react-native";
3
4
  export declare function useKjunFeedback(): KjunFeedback;
4
- export declare function KjunFeedbackProvider({ children }: {
5
+ export interface KjunFeedbackProviderProps {
5
6
  children: ReactNode;
6
- }): import("react/jsx-runtime").JSX.Element;
7
+ style?: StyleProp<ViewStyle>;
8
+ }
9
+ export declare function KjunFeedbackProvider({ children, style }: KjunFeedbackProviderProps): import("react/jsx-runtime").JSX.Element;
7
10
  export type { ConfirmOptions, KjunFeedback, PromptOptions, ToastOptions } from "@kjun-ui/tokens";
@@ -1,7 +1,10 @@
1
1
  import { type KjunFeedback } from "@kjun-ui/tokens";
2
2
  import { type ReactNode } from "react";
3
+ import { type StyleProp, type ViewStyle } from "react-native";
3
4
  export declare function useKjunFeedback(): KjunFeedback;
4
- export declare function KjunFeedbackProvider({ children }: {
5
+ export interface KjunFeedbackProviderProps {
5
6
  children: ReactNode;
6
- }): import("react/jsx-runtime").JSX.Element;
7
+ style?: StyleProp<ViewStyle>;
8
+ }
9
+ export declare function KjunFeedbackProvider({ children, style }: KjunFeedbackProviderProps): import("react/jsx-runtime").JSX.Element;
7
10
  export type { ConfirmOptions, KjunFeedback, PromptOptions, ToastOptions } from "@kjun-ui/tokens";
@@ -0,0 +1,36 @@
1
+ export type DrawerPosition = "left" | "right" | "top" | "bottom";
2
+ export interface DrawerFrameInput {
3
+ position: DrawerPosition;
4
+ windowHeight: number;
5
+ safeAreaTop: number;
6
+ safeAreaBottom: number;
7
+ /** Space a top or bottom sheet leaves at the opposite edge. */
8
+ gap: number;
9
+ /** Height of the window the keyboard covers (0 when hidden). */
10
+ keyboard: number;
11
+ maxHeight?: number;
12
+ }
13
+ export interface DrawerFrame {
14
+ maxHeight: number;
15
+ height: number | undefined;
16
+ paddingTop: number;
17
+ paddingBottom: number;
18
+ lift: number;
19
+ }
20
+ /**
21
+ * Keyboard events a drawer listens to. Only iOS: React Native's Android Modal window is adjustResize,
22
+ * so the system already shrinks the modal and a measured root height covers it.
23
+ */
24
+ export declare function keyboardEvents(os: string): {
25
+ readonly show: "keyboardWillShow";
26
+ readonly hide: "keyboardWillHide";
27
+ } | null;
28
+ /** The part of the window the keyboard covers; 0 when the platform already resized the window. */
29
+ export declare function keyboardOverlap(windowHeight: number, keyboardScreenY: number): number;
30
+ export declare function drawerFrame({ position, windowHeight, safeAreaTop, safeAreaBottom, gap, keyboard, maxHeight }: DrawerFrameInput): DrawerFrame;
31
+ /** Web overlay variables read by the drawer CSS (tokens controls.css). */
32
+ export declare function drawerOverlayVars({ safeAreaTop, safeAreaBottom, maxHeight }: {
33
+ safeAreaTop?: number;
34
+ safeAreaBottom?: number;
35
+ maxHeight?: number;
36
+ }): Record<string, string>;
@@ -0,0 +1,36 @@
1
+ export type DrawerPosition = "left" | "right" | "top" | "bottom";
2
+ export interface DrawerFrameInput {
3
+ position: DrawerPosition;
4
+ windowHeight: number;
5
+ safeAreaTop: number;
6
+ safeAreaBottom: number;
7
+ /** Space a top or bottom sheet leaves at the opposite edge. */
8
+ gap: number;
9
+ /** Height of the window the keyboard covers (0 when hidden). */
10
+ keyboard: number;
11
+ maxHeight?: number;
12
+ }
13
+ export interface DrawerFrame {
14
+ maxHeight: number;
15
+ height: number | undefined;
16
+ paddingTop: number;
17
+ paddingBottom: number;
18
+ lift: number;
19
+ }
20
+ /**
21
+ * Keyboard events a drawer listens to. Only iOS: React Native's Android Modal window is adjustResize,
22
+ * so the system already shrinks the modal and a measured root height covers it.
23
+ */
24
+ export declare function keyboardEvents(os: string): {
25
+ readonly show: "keyboardWillShow";
26
+ readonly hide: "keyboardWillHide";
27
+ } | null;
28
+ /** The part of the window the keyboard covers; 0 when the platform already resized the window. */
29
+ export declare function keyboardOverlap(windowHeight: number, keyboardScreenY: number): number;
30
+ export declare function drawerFrame({ position, windowHeight, safeAreaTop, safeAreaBottom, gap, keyboard, maxHeight }: DrawerFrameInput): DrawerFrame;
31
+ /** Web overlay variables read by the drawer CSS (tokens controls.css). */
32
+ export declare function drawerOverlayVars({ safeAreaTop, safeAreaBottom, maxHeight }: {
33
+ safeAreaTop?: number;
34
+ safeAreaBottom?: number;
35
+ maxHeight?: number;
36
+ }): Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kjun-ui/native",
3
- "version": "0.10.0",
3
+ "version": "0.11.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.10.0",
51
- "@kjun-ui/icons": "0.10.0"
50
+ "@kjun-ui/tokens": "0.11.0",
51
+ "@kjun-ui/icons": "0.11.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": "^19.2.3",