@kjun-ui/react 0.16.0 → 0.18.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 +3406 -1486
- package/dist/index.js +3401 -1479
- package/dist/styles.css +1065 -219
- package/dist/types/packages/react/src/actions.d.cts +12 -3
- package/dist/types/packages/react/src/actions.d.ts +12 -3
- package/dist/types/packages/react/src/app-navigation.d.cts +30 -5
- package/dist/types/packages/react/src/app-navigation.d.ts +30 -5
- package/dist/types/packages/react/src/calendar.d.cts +30 -0
- package/dist/types/packages/react/src/calendar.d.ts +30 -0
- package/dist/types/packages/react/src/carousel.d.cts +39 -0
- package/dist/types/packages/react/src/carousel.d.ts +39 -0
- package/dist/types/packages/react/src/controls.d.cts +19 -12
- package/dist/types/packages/react/src/controls.d.ts +19 -12
- package/dist/types/packages/react/src/date-picker.d.cts +34 -6
- package/dist/types/packages/react/src/date-picker.d.ts +34 -6
- package/dist/types/packages/react/src/display.d.cts +12 -3
- package/dist/types/packages/react/src/display.d.ts +12 -3
- package/dist/types/packages/react/src/dropdown.d.cts +35 -3
- package/dist/types/packages/react/src/dropdown.d.ts +35 -3
- package/dist/types/packages/react/src/financial-display.d.cts +10 -1
- package/dist/types/packages/react/src/financial-display.d.ts +10 -1
- package/dist/types/packages/react/src/financial.d.cts +2 -2
- package/dist/types/packages/react/src/financial.d.ts +2 -2
- package/dist/types/packages/react/src/index.d.cts +8 -6
- package/dist/types/packages/react/src/index.d.ts +8 -6
- package/dist/types/packages/react/src/kpi.d.cts +6 -2
- package/dist/types/packages/react/src/kpi.d.ts +6 -2
- package/dist/types/packages/react/src/layers.d.cts +1 -1
- package/dist/types/packages/react/src/layers.d.ts +1 -1
- package/dist/types/packages/react/src/list.d.cts +29 -4
- package/dist/types/packages/react/src/list.d.ts +29 -4
- package/dist/types/packages/react/src/market-model.d.cts +8 -1
- package/dist/types/packages/react/src/market-model.d.ts +8 -1
- package/dist/types/packages/react/src/media.d.cts +1 -1
- package/dist/types/packages/react/src/media.d.ts +1 -1
- package/dist/types/packages/react/src/navigation.d.cts +24 -38
- package/dist/types/packages/react/src/navigation.d.ts +24 -38
- package/dist/types/packages/react/src/number-display.d.cts +12 -12
- package/dist/types/packages/react/src/number-display.d.ts +12 -12
- package/dist/types/packages/react/src/popover.d.cts +9 -4
- package/dist/types/packages/react/src/popover.d.ts +9 -4
- package/dist/types/packages/react/src/range-input.d.cts +4 -0
- package/dist/types/packages/react/src/range-input.d.ts +4 -0
- package/dist/types/packages/react/src/select-control.d.cts +3 -1
- package/dist/types/packages/react/src/select-control.d.ts +3 -1
- package/dist/types/packages/react/src/select.d.cts +2 -2
- package/dist/types/packages/react/src/select.d.ts +2 -2
- 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/table-list.d.cts +14 -0
- package/dist/types/packages/react/src/table-list.d.ts +14 -0
- package/dist/types/packages/react/src/table-model.d.cts +1 -0
- package/dist/types/packages/react/src/table-model.d.ts +1 -0
- package/dist/types/packages/react/src/table-toolbar.d.cts +1 -1
- package/dist/types/packages/react/src/table-toolbar.d.ts +1 -1
- package/dist/types/packages/react/src/tabs.d.cts +38 -0
- package/dist/types/packages/react/src/tabs.d.ts +38 -0
- package/dist/types/packages/react/src/textarea.d.cts +29 -0
- package/dist/types/packages/react/src/textarea.d.ts +29 -0
- package/dist/types/packages/react/src/time-picker.d.cts +10 -1
- package/dist/types/packages/react/src/time-picker.d.ts +10 -1
- package/dist/types/shared/package-runtime/accordion-state.d.cts +11 -0
- package/dist/types/shared/package-runtime/accordion-state.d.ts +11 -0
- package/dist/types/shared/package-runtime/action-size.d.cts +1 -1
- package/dist/types/shared/package-runtime/action-size.d.ts +1 -1
- package/dist/types/shared/package-runtime/alert-action-size.d.cts +2 -0
- package/dist/types/shared/package-runtime/alert-action-size.d.ts +2 -0
- package/dist/types/shared/package-runtime/alert-exit.d.cts +5 -0
- package/dist/types/shared/package-runtime/alert-exit.d.ts +5 -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/badge-tone.d.cts +59 -0
- package/dist/types/shared/package-runtime/badge-tone.d.ts +59 -0
- package/dist/types/shared/package-runtime/breadcrumb.d.cts +20 -0
- package/dist/types/shared/package-runtime/breadcrumb.d.ts +20 -0
- package/dist/types/shared/package-runtime/calendar.d.cts +106 -0
- package/dist/types/shared/package-runtime/calendar.d.ts +106 -0
- package/dist/types/shared/package-runtime/carousel-scroll.d.cts +22 -0
- package/dist/types/shared/package-runtime/carousel-scroll.d.ts +22 -0
- package/dist/types/shared/package-runtime/carousel.d.cts +47 -0
- package/dist/types/shared/package-runtime/carousel.d.ts +47 -0
- package/dist/types/shared/package-runtime/center-option.d.cts +1 -0
- package/dist/types/shared/package-runtime/center-option.d.ts +1 -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/list-row.d.cts +14 -0
- package/dist/types/shared/package-runtime/list-row.d.ts +14 -0
- package/dist/types/shared/package-runtime/messages/ko.d.cts +38 -5
- package/dist/types/shared/package-runtime/messages/ko.d.ts +38 -5
- package/dist/types/shared/package-runtime/messages-context.d.cts +38 -5
- package/dist/types/shared/package-runtime/messages-context.d.ts +38 -5
- package/dist/types/shared/package-runtime/navigation-badge.d.cts +12 -0
- package/dist/types/shared/package-runtime/navigation-badge.d.ts +12 -0
- package/dist/types/shared/package-runtime/navigation.d.cts +1 -1
- package/dist/types/shared/package-runtime/navigation.d.ts +1 -1
- 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/dist/types/shared/package-runtime/scroll-fade.d.cts +25 -0
- package/dist/types/shared/package-runtime/scroll-fade.d.ts +25 -0
- package/dist/types/shared/package-runtime/sparkline.d.cts +58 -0
- package/dist/types/shared/package-runtime/sparkline.d.ts +58 -0
- package/dist/types/shared/package-runtime/table-groups.d.cts +11 -0
- package/dist/types/shared/package-runtime/table-groups.d.ts +11 -0
- package/dist/types/shared/package-runtime/table-model.d.cts +25 -2
- package/dist/types/shared/package-runtime/table-model.d.ts +25 -2
- package/dist/types/shared/package-runtime/table-presentation.d.cts +30 -4
- package/dist/types/shared/package-runtime/table-presentation.d.ts +30 -4
- package/dist/types/shared/package-runtime/table.d.cts +18 -2
- package/dist/types/shared/package-runtime/table.d.ts +18 -2
- package/dist/types/shared/package-runtime/textarea-grow.d.cts +1 -0
- package/dist/types/shared/package-runtime/textarea-grow.d.ts +1 -0
- package/dist/types/shared/package-runtime/textarea.d.cts +53 -0
- package/dist/types/shared/package-runtime/textarea.d.ts +53 -0
- package/dist/types/shared/package-runtime/time-segments.d.cts +25 -0
- package/dist/types/shared/package-runtime/time-segments.d.ts +25 -0
- package/package.json +3 -3
- package/dist/types/shared/package-runtime/relative-time.d.cts +0 -1
- package/dist/types/shared/package-runtime/relative-time.d.ts +0 -1
|
@@ -2,6 +2,7 @@ import { type ButtonSize } from "@kjun-ui/tokens";
|
|
|
2
2
|
import { type CSSProperties, type ReactNode } from "react";
|
|
3
3
|
import { type KjunButtonProps } from "./button.cjs";
|
|
4
4
|
import { type KjunTooltipProps } from "./popover.cjs";
|
|
5
|
+
import { type ScrollFadeDirection } from "../../../shared/package-runtime/scroll-fade.cjs";
|
|
5
6
|
export interface KjunIconToggleProps {
|
|
6
7
|
active?: boolean;
|
|
7
8
|
activeIcon: string;
|
|
@@ -53,6 +54,14 @@ export interface KjunExternalLinkProps {
|
|
|
53
54
|
children?: ReactNode;
|
|
54
55
|
}
|
|
55
56
|
export declare function KjunExternalLink({ href, mode, label, children, }: KjunExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
export
|
|
57
|
-
children
|
|
58
|
-
|
|
57
|
+
export interface KjunScrollFadeProps {
|
|
58
|
+
children?: ReactNode;
|
|
59
|
+
/** Which way the content scrolls; vertical needs a height (style or class) to scroll within. */
|
|
60
|
+
direction?: ScrollFadeDirection;
|
|
61
|
+
/** Names the scroller; it then becomes a focusable region so the keyboard can scroll it. */
|
|
62
|
+
ariaLabel?: string;
|
|
63
|
+
className?: string;
|
|
64
|
+
style?: CSSProperties;
|
|
65
|
+
}
|
|
66
|
+
/** Fades whichever edge along `direction` still has content to scroll to. */
|
|
67
|
+
export declare function KjunScrollFade({ children, direction, ariaLabel, className, style }: KjunScrollFadeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import { type ButtonSize } from "@kjun-ui/tokens";
|
|
|
2
2
|
import { type CSSProperties, type ReactNode } from "react";
|
|
3
3
|
import { type KjunButtonProps } from "./button.js";
|
|
4
4
|
import { type KjunTooltipProps } from "./popover.js";
|
|
5
|
+
import { type ScrollFadeDirection } from "../../../shared/package-runtime/scroll-fade.js";
|
|
5
6
|
export interface KjunIconToggleProps {
|
|
6
7
|
active?: boolean;
|
|
7
8
|
activeIcon: string;
|
|
@@ -53,6 +54,14 @@ export interface KjunExternalLinkProps {
|
|
|
53
54
|
children?: ReactNode;
|
|
54
55
|
}
|
|
55
56
|
export declare function KjunExternalLink({ href, mode, label, children, }: KjunExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
export
|
|
57
|
-
children
|
|
58
|
-
|
|
57
|
+
export interface KjunScrollFadeProps {
|
|
58
|
+
children?: ReactNode;
|
|
59
|
+
/** Which way the content scrolls; vertical needs a height (style or class) to scroll within. */
|
|
60
|
+
direction?: ScrollFadeDirection;
|
|
61
|
+
/** Names the scroller; it then becomes a focusable region so the keyboard can scroll it. */
|
|
62
|
+
ariaLabel?: string;
|
|
63
|
+
className?: string;
|
|
64
|
+
style?: CSSProperties;
|
|
65
|
+
}
|
|
66
|
+
/** Fades whichever edge along `direction` still has content to scroll to. */
|
|
67
|
+
export declare function KjunScrollFade({ children, direction, ariaLabel, className, style }: KjunScrollFadeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type NavigationBadge } from "../../../shared/package-runtime/navigation-badge.cjs";
|
|
1
2
|
import type { MouseEvent, ReactNode } from "react";
|
|
2
3
|
export interface KjunTopNavigationProps {
|
|
3
4
|
title: string;
|
|
@@ -5,16 +6,20 @@ export interface KjunTopNavigationProps {
|
|
|
5
6
|
leading?: ReactNode;
|
|
6
7
|
actions?: ReactNode;
|
|
7
8
|
safeAreaTop?: number;
|
|
9
|
+
/** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
|
|
10
|
+
surface?: boolean;
|
|
8
11
|
}
|
|
9
|
-
export declare function KjunTopNavigation({ title, description, leading, actions, safeAreaTop }: KjunTopNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function KjunTopNavigation({ title, description, leading, actions, safeAreaTop, surface }: KjunTopNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
export interface NavigationDestination {
|
|
11
14
|
key: string;
|
|
12
15
|
label: string;
|
|
13
16
|
href: string;
|
|
14
17
|
icon?: string;
|
|
15
|
-
|
|
18
|
+
/** A count or short text; true draws a dot. Numbers over 99 show 99+, and the accessible name keeps the value. 0 and "" draw nothing. */
|
|
19
|
+
badge?: NavigationBadge;
|
|
16
20
|
disabled?: boolean;
|
|
17
21
|
}
|
|
22
|
+
type Navigate = (key: string, event: MouseEvent<HTMLAnchorElement>) => void;
|
|
18
23
|
export interface KjunBottomNavigationProps {
|
|
19
24
|
items: NavigationDestination[];
|
|
20
25
|
value: string;
|
|
@@ -22,14 +27,34 @@ export interface KjunBottomNavigationProps {
|
|
|
22
27
|
safeAreaBottom?: number;
|
|
23
28
|
keyboardVisible?: boolean;
|
|
24
29
|
hideOnKeyboard?: boolean;
|
|
25
|
-
onNavigate?:
|
|
30
|
+
onNavigate?: Navigate;
|
|
31
|
+
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
32
|
+
onReselect?: Navigate;
|
|
33
|
+
/** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
|
|
34
|
+
surface?: boolean;
|
|
26
35
|
}
|
|
27
|
-
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
+
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
37
|
+
export interface KjunFloatingNavigationProps {
|
|
38
|
+
items: NavigationDestination[];
|
|
39
|
+
value: string;
|
|
40
|
+
ariaLabel?: string;
|
|
41
|
+
safeAreaBottom?: number;
|
|
42
|
+
keyboardVisible?: boolean;
|
|
43
|
+
hideOnKeyboard?: boolean;
|
|
44
|
+
onNavigate?: Navigate;
|
|
45
|
+
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
46
|
+
onReselect?: Navigate;
|
|
47
|
+
}
|
|
48
|
+
/** A capsule detached from the screen edge. Destinations with an icon show only the icon; the label stays their accessible name. */
|
|
49
|
+
export declare function KjunFloatingNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate, onReselect }: KjunFloatingNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
50
|
export interface KjunBottomActionBarProps {
|
|
29
51
|
description?: string;
|
|
30
52
|
children: ReactNode;
|
|
31
53
|
safeAreaBottom?: number;
|
|
32
54
|
keyboardVisible?: boolean;
|
|
33
55
|
hideOnKeyboard?: boolean;
|
|
56
|
+
/** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
|
|
57
|
+
surface?: boolean;
|
|
34
58
|
}
|
|
35
|
-
export declare function KjunBottomActionBar({ description, children, safeAreaBottom, keyboardVisible, hideOnKeyboard }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
|
+
export declare function KjunBottomActionBar({ description, children, safeAreaBottom, keyboardVisible, hideOnKeyboard, surface }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
60
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type NavigationBadge } from "../../../shared/package-runtime/navigation-badge.js";
|
|
1
2
|
import type { MouseEvent, ReactNode } from "react";
|
|
2
3
|
export interface KjunTopNavigationProps {
|
|
3
4
|
title: string;
|
|
@@ -5,16 +6,20 @@ export interface KjunTopNavigationProps {
|
|
|
5
6
|
leading?: ReactNode;
|
|
6
7
|
actions?: ReactNode;
|
|
7
8
|
safeAreaTop?: number;
|
|
9
|
+
/** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
|
|
10
|
+
surface?: boolean;
|
|
8
11
|
}
|
|
9
|
-
export declare function KjunTopNavigation({ title, description, leading, actions, safeAreaTop }: KjunTopNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function KjunTopNavigation({ title, description, leading, actions, safeAreaTop, surface }: KjunTopNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
export interface NavigationDestination {
|
|
11
14
|
key: string;
|
|
12
15
|
label: string;
|
|
13
16
|
href: string;
|
|
14
17
|
icon?: string;
|
|
15
|
-
|
|
18
|
+
/** A count or short text; true draws a dot. Numbers over 99 show 99+, and the accessible name keeps the value. 0 and "" draw nothing. */
|
|
19
|
+
badge?: NavigationBadge;
|
|
16
20
|
disabled?: boolean;
|
|
17
21
|
}
|
|
22
|
+
type Navigate = (key: string, event: MouseEvent<HTMLAnchorElement>) => void;
|
|
18
23
|
export interface KjunBottomNavigationProps {
|
|
19
24
|
items: NavigationDestination[];
|
|
20
25
|
value: string;
|
|
@@ -22,14 +27,34 @@ export interface KjunBottomNavigationProps {
|
|
|
22
27
|
safeAreaBottom?: number;
|
|
23
28
|
keyboardVisible?: boolean;
|
|
24
29
|
hideOnKeyboard?: boolean;
|
|
25
|
-
onNavigate?:
|
|
30
|
+
onNavigate?: Navigate;
|
|
31
|
+
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
32
|
+
onReselect?: Navigate;
|
|
33
|
+
/** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
|
|
34
|
+
surface?: boolean;
|
|
26
35
|
}
|
|
27
|
-
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
+
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
37
|
+
export interface KjunFloatingNavigationProps {
|
|
38
|
+
items: NavigationDestination[];
|
|
39
|
+
value: string;
|
|
40
|
+
ariaLabel?: string;
|
|
41
|
+
safeAreaBottom?: number;
|
|
42
|
+
keyboardVisible?: boolean;
|
|
43
|
+
hideOnKeyboard?: boolean;
|
|
44
|
+
onNavigate?: Navigate;
|
|
45
|
+
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
46
|
+
onReselect?: Navigate;
|
|
47
|
+
}
|
|
48
|
+
/** A capsule detached from the screen edge. Destinations with an icon show only the icon; the label stays their accessible name. */
|
|
49
|
+
export declare function KjunFloatingNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate, onReselect }: KjunFloatingNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
50
|
export interface KjunBottomActionBarProps {
|
|
29
51
|
description?: string;
|
|
30
52
|
children: ReactNode;
|
|
31
53
|
safeAreaBottom?: number;
|
|
32
54
|
keyboardVisible?: boolean;
|
|
33
55
|
hideOnKeyboard?: boolean;
|
|
56
|
+
/** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
|
|
57
|
+
surface?: boolean;
|
|
34
58
|
}
|
|
35
|
-
export declare function KjunBottomActionBar({ description, children, safeAreaBottom, keyboardVisible, hideOnKeyboard }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
|
+
export declare function KjunBottomActionBar({ description, children, safeAreaBottom, keyboardVisible, hideOnKeyboard, surface }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type DateRange, type DateUnavailable, type WeekStart } from "../../../shared/package-runtime/calendar.cjs";
|
|
2
|
+
export interface CalendarOptions {
|
|
3
|
+
/** The first column of the week: 0 Sunday (default), 1 Monday. */
|
|
4
|
+
weekStart?: WeekStart;
|
|
5
|
+
/** Paints Sundays with the danger role, as Korean calendars do (default true). */
|
|
6
|
+
markSunday?: boolean;
|
|
7
|
+
/** Days that cannot be picked inside the bounds, such as holidays; a range cannot run across one. */
|
|
8
|
+
isDateUnavailable?: DateUnavailable;
|
|
9
|
+
}
|
|
10
|
+
export interface CalendarViewProps extends CalendarOptions {
|
|
11
|
+
value?: string;
|
|
12
|
+
range?: DateRange;
|
|
13
|
+
min?: string;
|
|
14
|
+
max?: string;
|
|
15
|
+
clearable?: boolean;
|
|
16
|
+
onSelect: (iso: string) => void;
|
|
17
|
+
onClear?: () => void;
|
|
18
|
+
/** Range mode: the footer applies the picked range instead of jumping to today. */
|
|
19
|
+
onApply?: () => void;
|
|
20
|
+
/** Range mode: ready-made ranges shown as chips above the days. */
|
|
21
|
+
presets?: readonly DateRangePreset[];
|
|
22
|
+
onPreset?: (range: DateRange) => void;
|
|
23
|
+
}
|
|
24
|
+
/** A named range offered as a chip, such as "최근 7일". */
|
|
25
|
+
export interface DateRangePreset {
|
|
26
|
+
label: string;
|
|
27
|
+
value: DateRange;
|
|
28
|
+
}
|
|
29
|
+
/** KJUN's calendar: a day grid with keyboard movement, and month and year views opened from the heading. */
|
|
30
|
+
export declare function CalendarView({ value, range, min, max, clearable, weekStart, markSunday, isDateUnavailable, onSelect, onClear, onApply, presets, onPreset }: CalendarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type DateRange, type DateUnavailable, type WeekStart } from "../../../shared/package-runtime/calendar.js";
|
|
2
|
+
export interface CalendarOptions {
|
|
3
|
+
/** The first column of the week: 0 Sunday (default), 1 Monday. */
|
|
4
|
+
weekStart?: WeekStart;
|
|
5
|
+
/** Paints Sundays with the danger role, as Korean calendars do (default true). */
|
|
6
|
+
markSunday?: boolean;
|
|
7
|
+
/** Days that cannot be picked inside the bounds, such as holidays; a range cannot run across one. */
|
|
8
|
+
isDateUnavailable?: DateUnavailable;
|
|
9
|
+
}
|
|
10
|
+
export interface CalendarViewProps extends CalendarOptions {
|
|
11
|
+
value?: string;
|
|
12
|
+
range?: DateRange;
|
|
13
|
+
min?: string;
|
|
14
|
+
max?: string;
|
|
15
|
+
clearable?: boolean;
|
|
16
|
+
onSelect: (iso: string) => void;
|
|
17
|
+
onClear?: () => void;
|
|
18
|
+
/** Range mode: the footer applies the picked range instead of jumping to today. */
|
|
19
|
+
onApply?: () => void;
|
|
20
|
+
/** Range mode: ready-made ranges shown as chips above the days. */
|
|
21
|
+
presets?: readonly DateRangePreset[];
|
|
22
|
+
onPreset?: (range: DateRange) => void;
|
|
23
|
+
}
|
|
24
|
+
/** A named range offered as a chip, such as "최근 7일". */
|
|
25
|
+
export interface DateRangePreset {
|
|
26
|
+
label: string;
|
|
27
|
+
value: DateRange;
|
|
28
|
+
}
|
|
29
|
+
/** KJUN's calendar: a day grid with keyboard movement, and month and year views opened from the heading. */
|
|
30
|
+
export declare function CalendarView({ value, range, min, max, clearable, weekStart, markSunday, isDateUnavailable, onSelect, onClear, onApply, presets, onPreset }: CalendarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type CarouselBleed, type CarouselGap, type CarouselIndicatorPlacement, type CarouselIndicators, type CarouselSlideSize, type CarouselSnapAlign, type CarouselTitleTag } from "../../../shared/package-runtime/carousel.cjs";
|
|
2
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
3
|
+
export interface KjunCarouselProps {
|
|
4
|
+
/** Names the region, e.g. "추천 상품". Required unless title names it. */
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
/** A section title above the slides; the region takes its name, and previous and next buttons move beside it. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** The title's heading level (default h2). */
|
|
9
|
+
titleAs?: CarouselTitleTag;
|
|
10
|
+
/** Each direct child is one slide. */
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/** full: as wide as the carousel; peek: the next slide shows at the edge; auto: each slide keeps its own width. */
|
|
13
|
+
slideSize?: CarouselSlideSize;
|
|
14
|
+
gap?: CarouselGap;
|
|
15
|
+
/** Controlled current slide; pair with onIndexChange. */
|
|
16
|
+
index?: number;
|
|
17
|
+
defaultIndex?: number;
|
|
18
|
+
onIndexChange?: (index: number) => void;
|
|
19
|
+
/** Dots under the slides (true or "dots"), the position as "3 / 24" text ("count") for many slides, or none (false). */
|
|
20
|
+
indicators?: CarouselIndicators;
|
|
21
|
+
/**
|
|
22
|
+
* Previous and next buttons for pointers that can hover; touch screens swipe instead. Without a title they float at
|
|
23
|
+
* the slide edges while the pointer or focus is inside, and only toward a slide that exists.
|
|
24
|
+
*/
|
|
25
|
+
controls?: boolean;
|
|
26
|
+
/** start lines each slide up with the start edge; center keeps the current slide centred (with peek, a neighbour shows on each side). */
|
|
27
|
+
snapAlign?: CarouselSnapAlign;
|
|
28
|
+
/** Reaches past the page's side padding by this inset (12, 16 or 24) while the first slide lines up with the content. */
|
|
29
|
+
bleed?: CarouselBleed;
|
|
30
|
+
/** below: under the slides; overlay: on the slides, in a scrim pill that stays legible over images. */
|
|
31
|
+
indicatorPlacement?: CarouselIndicatorPlacement;
|
|
32
|
+
/** A mouse can drag the slides; a drag past a fifth of the view moves one slide. A mouse wheel does not move a carousel. */
|
|
33
|
+
mouseDrag?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
style?: CSSProperties;
|
|
36
|
+
id?: string;
|
|
37
|
+
}
|
|
38
|
+
/** A row of slides moved by swipe, drag, keyboard, buttons or dots. It never moves on its own. */
|
|
39
|
+
export declare function KjunCarousel({ ariaLabel, title, titleAs: Title, children, slideSize, gap, index, defaultIndex, onIndexChange, indicators, controls, mouseDrag, snapAlign, bleed, indicatorPlacement, className, style, id }: KjunCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type CarouselBleed, type CarouselGap, type CarouselIndicatorPlacement, type CarouselIndicators, type CarouselSlideSize, type CarouselSnapAlign, type CarouselTitleTag } from "../../../shared/package-runtime/carousel.js";
|
|
2
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
3
|
+
export interface KjunCarouselProps {
|
|
4
|
+
/** Names the region, e.g. "추천 상품". Required unless title names it. */
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
/** A section title above the slides; the region takes its name, and previous and next buttons move beside it. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** The title's heading level (default h2). */
|
|
9
|
+
titleAs?: CarouselTitleTag;
|
|
10
|
+
/** Each direct child is one slide. */
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/** full: as wide as the carousel; peek: the next slide shows at the edge; auto: each slide keeps its own width. */
|
|
13
|
+
slideSize?: CarouselSlideSize;
|
|
14
|
+
gap?: CarouselGap;
|
|
15
|
+
/** Controlled current slide; pair with onIndexChange. */
|
|
16
|
+
index?: number;
|
|
17
|
+
defaultIndex?: number;
|
|
18
|
+
onIndexChange?: (index: number) => void;
|
|
19
|
+
/** Dots under the slides (true or "dots"), the position as "3 / 24" text ("count") for many slides, or none (false). */
|
|
20
|
+
indicators?: CarouselIndicators;
|
|
21
|
+
/**
|
|
22
|
+
* Previous and next buttons for pointers that can hover; touch screens swipe instead. Without a title they float at
|
|
23
|
+
* the slide edges while the pointer or focus is inside, and only toward a slide that exists.
|
|
24
|
+
*/
|
|
25
|
+
controls?: boolean;
|
|
26
|
+
/** start lines each slide up with the start edge; center keeps the current slide centred (with peek, a neighbour shows on each side). */
|
|
27
|
+
snapAlign?: CarouselSnapAlign;
|
|
28
|
+
/** Reaches past the page's side padding by this inset (12, 16 or 24) while the first slide lines up with the content. */
|
|
29
|
+
bleed?: CarouselBleed;
|
|
30
|
+
/** below: under the slides; overlay: on the slides, in a scrim pill that stays legible over images. */
|
|
31
|
+
indicatorPlacement?: CarouselIndicatorPlacement;
|
|
32
|
+
/** A mouse can drag the slides; a drag past a fifth of the view moves one slide. A mouse wheel does not move a carousel. */
|
|
33
|
+
mouseDrag?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
style?: CSSProperties;
|
|
36
|
+
id?: string;
|
|
37
|
+
}
|
|
38
|
+
/** A row of slides moved by swipe, drag, keyboard, buttons or dots. It never moves on its own. */
|
|
39
|
+
export declare function KjunCarousel({ ariaLabel, title, titleAs: Title, children, slideSize, gap, index, defaultIndex, onIndexChange, indicators, controls, mouseDrag, snapAlign, bleed, indicatorPlacement, className, style, id }: KjunCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ButtonSize, type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
import { type ReactNode, type
|
|
2
|
+
import { type ReactNode, type Ref } from "react";
|
|
3
3
|
import { groupKeydown } from "../../../shared/package-runtime/group-keyboard.cjs";
|
|
4
4
|
export type ChoiceValue = string | number | boolean | null;
|
|
5
5
|
export interface ChoiceOption<T = ChoiceValue> {
|
|
@@ -11,6 +11,8 @@ export interface ChoiceOption<T = ChoiceValue> {
|
|
|
11
11
|
}
|
|
12
12
|
export interface KjunCheckboxProps<T = ChoiceValue> {
|
|
13
13
|
value: boolean | T[];
|
|
14
|
+
/** Mixed selection display; value and change callbacks keep their boolean/array shape. */
|
|
15
|
+
indeterminate?: boolean;
|
|
14
16
|
val?: T;
|
|
15
17
|
label?: string;
|
|
16
18
|
ariaLabel?: string;
|
|
@@ -20,7 +22,7 @@ export interface KjunCheckboxProps<T = ChoiceValue> {
|
|
|
20
22
|
onValueChange?: (value: boolean | T[]) => void;
|
|
21
23
|
onChange?: (value: boolean | T[]) => void;
|
|
22
24
|
}
|
|
23
|
-
export declare function KjunCheckbox<T = ChoiceValue>({ value, val, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: KjunCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function KjunCheckbox<T = ChoiceValue>({ value, indeterminate, val, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: KjunCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
26
|
export interface KjunSwitchProps {
|
|
25
27
|
value: boolean;
|
|
26
28
|
label?: string;
|
|
@@ -29,11 +31,23 @@ export interface KjunSwitchProps {
|
|
|
29
31
|
size?: InputSize;
|
|
30
32
|
/** Supporting text under the label; it also describes the switch to screen readers. */
|
|
31
33
|
description?: string;
|
|
34
|
+
/** Saving: a spinner turns in the thumb and presses are ignored, without dimming the switch like disabled. */
|
|
35
|
+
loading?: boolean;
|
|
32
36
|
children?: ReactNode;
|
|
37
|
+
/** Submits with a form under this name while the switch is on. */
|
|
38
|
+
name?: string;
|
|
39
|
+
/** The value a form submits while on (default "on"). */
|
|
40
|
+
formValue?: string;
|
|
41
|
+
id?: string;
|
|
42
|
+
autoFocus?: boolean;
|
|
43
|
+
onFocus?: () => void;
|
|
44
|
+
onBlur?: () => void;
|
|
45
|
+
/** The switch's input, e.g. to move focus back after a failed save. */
|
|
46
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
33
47
|
onValueChange?: (value: boolean) => void;
|
|
34
48
|
onChange?: (value: boolean) => void;
|
|
35
49
|
}
|
|
36
|
-
export declare function KjunSwitch({ value, label, ariaLabel, disabled, size, description, children, onValueChange, onChange, }: KjunSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare function KjunSwitch({ value, label, ariaLabel, disabled, size, description, loading, children, name, formValue, id, autoFocus, onFocus, onBlur, inputRef, onValueChange, onChange, }: KjunSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
37
51
|
export interface KjunRadioProps {
|
|
38
52
|
value?: ChoiceValue;
|
|
39
53
|
val: ChoiceValue;
|
|
@@ -56,15 +70,8 @@ export interface KjunRadioGroupProps {
|
|
|
56
70
|
onChange?: (value: ChoiceValue) => void;
|
|
57
71
|
}
|
|
58
72
|
export declare function KjunRadioGroup({ value, options, direction, ariaLabel, children, onValueChange, onChange, }: KjunRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
size?: InputSize;
|
|
62
|
-
error?: boolean;
|
|
63
|
-
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
64
|
-
ariaLabel?: string;
|
|
65
|
-
onValueChange?: (value: string) => void;
|
|
66
|
-
}
|
|
67
|
-
export declare const KjunTextarea: import("react").ForwardRefExoticComponent<KjunTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
73
|
+
export { KjunTextarea } from "./textarea.cjs";
|
|
74
|
+
export type { KjunTextareaProps } from "./textarea.cjs";
|
|
68
75
|
export { groupKeydown };
|
|
69
76
|
export interface KjunButtonGroupProps {
|
|
70
77
|
value: ChoiceValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ButtonSize, type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
import { type ReactNode, type
|
|
2
|
+
import { type ReactNode, type Ref } from "react";
|
|
3
3
|
import { groupKeydown } from "../../../shared/package-runtime/group-keyboard.js";
|
|
4
4
|
export type ChoiceValue = string | number | boolean | null;
|
|
5
5
|
export interface ChoiceOption<T = ChoiceValue> {
|
|
@@ -11,6 +11,8 @@ export interface ChoiceOption<T = ChoiceValue> {
|
|
|
11
11
|
}
|
|
12
12
|
export interface KjunCheckboxProps<T = ChoiceValue> {
|
|
13
13
|
value: boolean | T[];
|
|
14
|
+
/** Mixed selection display; value and change callbacks keep their boolean/array shape. */
|
|
15
|
+
indeterminate?: boolean;
|
|
14
16
|
val?: T;
|
|
15
17
|
label?: string;
|
|
16
18
|
ariaLabel?: string;
|
|
@@ -20,7 +22,7 @@ export interface KjunCheckboxProps<T = ChoiceValue> {
|
|
|
20
22
|
onValueChange?: (value: boolean | T[]) => void;
|
|
21
23
|
onChange?: (value: boolean | T[]) => void;
|
|
22
24
|
}
|
|
23
|
-
export declare function KjunCheckbox<T = ChoiceValue>({ value, val, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: KjunCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function KjunCheckbox<T = ChoiceValue>({ value, indeterminate, val, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: KjunCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
26
|
export interface KjunSwitchProps {
|
|
25
27
|
value: boolean;
|
|
26
28
|
label?: string;
|
|
@@ -29,11 +31,23 @@ export interface KjunSwitchProps {
|
|
|
29
31
|
size?: InputSize;
|
|
30
32
|
/** Supporting text under the label; it also describes the switch to screen readers. */
|
|
31
33
|
description?: string;
|
|
34
|
+
/** Saving: a spinner turns in the thumb and presses are ignored, without dimming the switch like disabled. */
|
|
35
|
+
loading?: boolean;
|
|
32
36
|
children?: ReactNode;
|
|
37
|
+
/** Submits with a form under this name while the switch is on. */
|
|
38
|
+
name?: string;
|
|
39
|
+
/** The value a form submits while on (default "on"). */
|
|
40
|
+
formValue?: string;
|
|
41
|
+
id?: string;
|
|
42
|
+
autoFocus?: boolean;
|
|
43
|
+
onFocus?: () => void;
|
|
44
|
+
onBlur?: () => void;
|
|
45
|
+
/** The switch's input, e.g. to move focus back after a failed save. */
|
|
46
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
33
47
|
onValueChange?: (value: boolean) => void;
|
|
34
48
|
onChange?: (value: boolean) => void;
|
|
35
49
|
}
|
|
36
|
-
export declare function KjunSwitch({ value, label, ariaLabel, disabled, size, description, children, onValueChange, onChange, }: KjunSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare function KjunSwitch({ value, label, ariaLabel, disabled, size, description, loading, children, name, formValue, id, autoFocus, onFocus, onBlur, inputRef, onValueChange, onChange, }: KjunSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
37
51
|
export interface KjunRadioProps {
|
|
38
52
|
value?: ChoiceValue;
|
|
39
53
|
val: ChoiceValue;
|
|
@@ -56,15 +70,8 @@ export interface KjunRadioGroupProps {
|
|
|
56
70
|
onChange?: (value: ChoiceValue) => void;
|
|
57
71
|
}
|
|
58
72
|
export declare function KjunRadioGroup({ value, options, direction, ariaLabel, children, onValueChange, onChange, }: KjunRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
size?: InputSize;
|
|
62
|
-
error?: boolean;
|
|
63
|
-
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
64
|
-
ariaLabel?: string;
|
|
65
|
-
onValueChange?: (value: string) => void;
|
|
66
|
-
}
|
|
67
|
-
export declare const KjunTextarea: import("react").ForwardRefExoticComponent<KjunTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
73
|
+
export { KjunTextarea } from "./textarea.js";
|
|
74
|
+
export type { KjunTextareaProps } from "./textarea.js";
|
|
68
75
|
export { groupKeydown };
|
|
69
76
|
export interface KjunButtonGroupProps {
|
|
70
77
|
value: ChoiceValue;
|
|
@@ -1,12 +1,40 @@
|
|
|
1
|
+
import { type DateRange } from "../../../shared/package-runtime/calendar.cjs";
|
|
1
2
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
value: string;
|
|
3
|
+
import { type CalendarOptions, type DateRangePreset } from "./calendar.cjs";
|
|
4
|
+
interface DateFieldProps extends CalendarOptions {
|
|
5
5
|
size?: InputSize;
|
|
6
|
-
/** Shows a clear button while there is a value
|
|
6
|
+
/** Shows a clear button while there is a value. */
|
|
7
7
|
clearable?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
8
9
|
ariaLabel?: string;
|
|
9
10
|
error?: boolean;
|
|
10
|
-
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
/** Earliest and latest selectable dates (YYYY-MM-DD). */
|
|
14
|
+
min?: string;
|
|
15
|
+
max?: string;
|
|
16
|
+
/** Trigger id for an outside <label for>; defaults to the FormGroup's id. */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** Submits the value with a form through a hidden input. */
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface KjunDatePickerProps extends DateFieldProps {
|
|
22
|
+
/** YYYY-MM-DD, or an empty string. */
|
|
23
|
+
value: string;
|
|
24
|
+
onValueChange?: (value: string) => void;
|
|
25
|
+
onChange?: (value: string) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function KjunDatePicker({ value, placeholder, clearable, min, max, weekStart, markSunday, isDateUnavailable, onValueChange, onChange, ...field }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export interface KjunDateRangePickerProps extends DateFieldProps {
|
|
29
|
+
/** Start and end as YYYY-MM-DD; empty strings while unset. A reversed or out-of-bounds range is shown in order and inside the bounds. */
|
|
30
|
+
value: DateRange;
|
|
31
|
+
onValueChange?: (value: DateRange) => void;
|
|
32
|
+
onChange?: (value: DateRange) => void;
|
|
33
|
+
/** Ready-made ranges shown as chips above the days, such as "최근 7일". */
|
|
34
|
+
presets?: readonly DateRangePreset[];
|
|
35
|
+
/** Commits as soon as the second day is picked, without Apply. */
|
|
36
|
+
autoApply?: boolean;
|
|
11
37
|
}
|
|
12
|
-
|
|
38
|
+
/** Two dates picked in one calendar: the first pick starts the range, the second ends it, and Apply commits it. */
|
|
39
|
+
export declare function KjunDateRangePicker({ value: given, placeholder, clearable, min, max, weekStart, markSunday, isDateUnavailable, presets, autoApply, onValueChange, onChange, ...field }: KjunDateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export type { DateRange, DateRangePreset };
|
|
@@ -1,12 +1,40 @@
|
|
|
1
|
+
import { type DateRange } from "../../../shared/package-runtime/calendar.js";
|
|
1
2
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
value: string;
|
|
3
|
+
import { type CalendarOptions, type DateRangePreset } from "./calendar.js";
|
|
4
|
+
interface DateFieldProps extends CalendarOptions {
|
|
5
5
|
size?: InputSize;
|
|
6
|
-
/** Shows a clear button while there is a value
|
|
6
|
+
/** Shows a clear button while there is a value. */
|
|
7
7
|
clearable?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
8
9
|
ariaLabel?: string;
|
|
9
10
|
error?: boolean;
|
|
10
|
-
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
/** Earliest and latest selectable dates (YYYY-MM-DD). */
|
|
14
|
+
min?: string;
|
|
15
|
+
max?: string;
|
|
16
|
+
/** Trigger id for an outside <label for>; defaults to the FormGroup's id. */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** Submits the value with a form through a hidden input. */
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface KjunDatePickerProps extends DateFieldProps {
|
|
22
|
+
/** YYYY-MM-DD, or an empty string. */
|
|
23
|
+
value: string;
|
|
24
|
+
onValueChange?: (value: string) => void;
|
|
25
|
+
onChange?: (value: string) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function KjunDatePicker({ value, placeholder, clearable, min, max, weekStart, markSunday, isDateUnavailable, onValueChange, onChange, ...field }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export interface KjunDateRangePickerProps extends DateFieldProps {
|
|
29
|
+
/** Start and end as YYYY-MM-DD; empty strings while unset. A reversed or out-of-bounds range is shown in order and inside the bounds. */
|
|
30
|
+
value: DateRange;
|
|
31
|
+
onValueChange?: (value: DateRange) => void;
|
|
32
|
+
onChange?: (value: DateRange) => void;
|
|
33
|
+
/** Ready-made ranges shown as chips above the days, such as "최근 7일". */
|
|
34
|
+
presets?: readonly DateRangePreset[];
|
|
35
|
+
/** Commits as soon as the second day is picked, without Apply. */
|
|
36
|
+
autoApply?: boolean;
|
|
11
37
|
}
|
|
12
|
-
|
|
38
|
+
/** Two dates picked in one calendar: the first pick starts the range, the second ends it, and Apply commits it. */
|
|
39
|
+
export declare function KjunDateRangePicker({ value: given, placeholder, clearable, min, max, weekStart, markSunday, isDateUnavailable, presets, autoApply, onValueChange, onChange, ...field }: KjunDateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export type { DateRange, DateRangePreset };
|
|
@@ -6,8 +6,14 @@ export interface KjunBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
6
6
|
variant?: "default" | "secondary" | SemanticTone | "price-up" | "price-down";
|
|
7
7
|
size?: DisplaySize;
|
|
8
8
|
dot?: boolean;
|
|
9
|
+
/** Shows this number instead of children; over max it shows "99+", and 0 or less draws no badge at all. */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** The largest count shown in full (default 99). */
|
|
12
|
+
max?: number;
|
|
13
|
+
/** What the badge means to a screen reader, e.g. "읽지 않은 알림 3개"; the drawn text is then hidden from it. Give it to a dot-only badge. */
|
|
14
|
+
label?: string;
|
|
9
15
|
}
|
|
10
|
-
export declare function KjunBadge({ variant, size, dot, children, style, ...props }: KjunBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function KjunBadge({ variant, size, dot, count, max, label, children, style, ...props }: KjunBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
17
|
export { KjunCard } from "./card.cjs";
|
|
12
18
|
export type { KjunCardProps } from "./card.cjs";
|
|
13
19
|
export interface KjunEmptyProps {
|
|
@@ -37,7 +43,10 @@ export interface KjunAlertProps {
|
|
|
37
43
|
}
|
|
38
44
|
export declare function KjunAlert({ type, variant, size, title, closable, live, children, actions, onClose, }: KjunAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
45
|
export interface KjunProgressProps {
|
|
40
|
-
|
|
46
|
+
/** null is missing data; omission keeps the zero default. */
|
|
47
|
+
value?: number | null;
|
|
48
|
+
/** Work is active but its completion percentage is unknown; takes precedence over null. */
|
|
49
|
+
indeterminate?: boolean;
|
|
41
50
|
max?: number;
|
|
42
51
|
size?: "sm" | "md" | "lg";
|
|
43
52
|
variant?: SemanticTone;
|
|
@@ -46,7 +55,7 @@ export interface KjunProgressProps {
|
|
|
46
55
|
subLabel?: ReactNode;
|
|
47
56
|
shape?: "bar" | "circle";
|
|
48
57
|
}
|
|
49
|
-
export declare function KjunProgress({ value, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function KjunProgress({ value, indeterminate, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
50
59
|
export interface KjunSkeletonProps {
|
|
51
60
|
type?: "text" | "avatar" | "card" | "table" | "stat" | "block";
|
|
52
61
|
rows?: number;
|
|
@@ -6,8 +6,14 @@ export interface KjunBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
6
6
|
variant?: "default" | "secondary" | SemanticTone | "price-up" | "price-down";
|
|
7
7
|
size?: DisplaySize;
|
|
8
8
|
dot?: boolean;
|
|
9
|
+
/** Shows this number instead of children; over max it shows "99+", and 0 or less draws no badge at all. */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** The largest count shown in full (default 99). */
|
|
12
|
+
max?: number;
|
|
13
|
+
/** What the badge means to a screen reader, e.g. "읽지 않은 알림 3개"; the drawn text is then hidden from it. Give it to a dot-only badge. */
|
|
14
|
+
label?: string;
|
|
9
15
|
}
|
|
10
|
-
export declare function KjunBadge({ variant, size, dot, children, style, ...props }: KjunBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function KjunBadge({ variant, size, dot, count, max, label, children, style, ...props }: KjunBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
17
|
export { KjunCard } from "./card.js";
|
|
12
18
|
export type { KjunCardProps } from "./card.js";
|
|
13
19
|
export interface KjunEmptyProps {
|
|
@@ -37,7 +43,10 @@ export interface KjunAlertProps {
|
|
|
37
43
|
}
|
|
38
44
|
export declare function KjunAlert({ type, variant, size, title, closable, live, children, actions, onClose, }: KjunAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
45
|
export interface KjunProgressProps {
|
|
40
|
-
|
|
46
|
+
/** null is missing data; omission keeps the zero default. */
|
|
47
|
+
value?: number | null;
|
|
48
|
+
/** Work is active but its completion percentage is unknown; takes precedence over null. */
|
|
49
|
+
indeterminate?: boolean;
|
|
41
50
|
max?: number;
|
|
42
51
|
size?: "sm" | "md" | "lg";
|
|
43
52
|
variant?: SemanticTone;
|
|
@@ -46,7 +55,7 @@ export interface KjunProgressProps {
|
|
|
46
55
|
subLabel?: ReactNode;
|
|
47
56
|
shape?: "bar" | "circle";
|
|
48
57
|
}
|
|
49
|
-
export declare function KjunProgress({ value, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function KjunProgress({ value, indeterminate, max, size, variant, showLabel, label, subLabel, shape, }: KjunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
50
59
|
export interface KjunSkeletonProps {
|
|
51
60
|
type?: "text" | "avatar" | "card" | "table" | "stat" | "block";
|
|
52
61
|
rows?: number;
|