@kjun-ui/react 0.17.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.
Files changed (106) hide show
  1. package/dist/index.cjs +3279 -1407
  2. package/dist/index.js +3226 -1353
  3. package/dist/styles.css +993 -191
  4. package/dist/types/packages/react/src/actions.d.cts +12 -3
  5. package/dist/types/packages/react/src/actions.d.ts +12 -3
  6. package/dist/types/packages/react/src/app-navigation.d.cts +22 -3
  7. package/dist/types/packages/react/src/app-navigation.d.ts +22 -3
  8. package/dist/types/packages/react/src/calendar.d.cts +30 -0
  9. package/dist/types/packages/react/src/calendar.d.ts +30 -0
  10. package/dist/types/packages/react/src/carousel.d.cts +39 -0
  11. package/dist/types/packages/react/src/carousel.d.ts +39 -0
  12. package/dist/types/packages/react/src/controls.d.cts +16 -11
  13. package/dist/types/packages/react/src/controls.d.ts +16 -11
  14. package/dist/types/packages/react/src/date-picker.d.cts +34 -6
  15. package/dist/types/packages/react/src/date-picker.d.ts +34 -6
  16. package/dist/types/packages/react/src/display.d.cts +7 -1
  17. package/dist/types/packages/react/src/display.d.ts +7 -1
  18. package/dist/types/packages/react/src/dropdown.d.cts +35 -3
  19. package/dist/types/packages/react/src/dropdown.d.ts +35 -3
  20. package/dist/types/packages/react/src/financial-display.d.cts +10 -1
  21. package/dist/types/packages/react/src/financial-display.d.ts +10 -1
  22. package/dist/types/packages/react/src/financial.d.cts +2 -2
  23. package/dist/types/packages/react/src/financial.d.ts +2 -2
  24. package/dist/types/packages/react/src/index.d.cts +8 -6
  25. package/dist/types/packages/react/src/index.d.ts +8 -6
  26. package/dist/types/packages/react/src/layers.d.cts +1 -1
  27. package/dist/types/packages/react/src/layers.d.ts +1 -1
  28. package/dist/types/packages/react/src/list.d.cts +27 -4
  29. package/dist/types/packages/react/src/list.d.ts +27 -4
  30. package/dist/types/packages/react/src/market-model.d.cts +8 -1
  31. package/dist/types/packages/react/src/market-model.d.ts +8 -1
  32. package/dist/types/packages/react/src/navigation.d.cts +24 -42
  33. package/dist/types/packages/react/src/navigation.d.ts +24 -42
  34. package/dist/types/packages/react/src/number-display.d.cts +12 -12
  35. package/dist/types/packages/react/src/number-display.d.ts +12 -12
  36. package/dist/types/packages/react/src/popover.d.cts +9 -4
  37. package/dist/types/packages/react/src/popover.d.ts +9 -4
  38. package/dist/types/packages/react/src/select-control.d.cts +3 -1
  39. package/dist/types/packages/react/src/select-control.d.ts +3 -1
  40. package/dist/types/packages/react/src/select.d.cts +2 -2
  41. package/dist/types/packages/react/src/select.d.ts +2 -2
  42. package/dist/types/packages/react/src/table-cards.d.cts +1 -1
  43. package/dist/types/packages/react/src/table-cards.d.ts +1 -1
  44. package/dist/types/packages/react/src/table-grid.d.cts +1 -1
  45. package/dist/types/packages/react/src/table-grid.d.ts +1 -1
  46. package/dist/types/packages/react/src/table-list.d.cts +14 -0
  47. package/dist/types/packages/react/src/table-list.d.ts +14 -0
  48. package/dist/types/packages/react/src/table-model.d.cts +1 -0
  49. package/dist/types/packages/react/src/table-model.d.ts +1 -0
  50. package/dist/types/packages/react/src/table-toolbar.d.cts +1 -1
  51. package/dist/types/packages/react/src/table-toolbar.d.ts +1 -1
  52. package/dist/types/packages/react/src/tabs.d.cts +38 -0
  53. package/dist/types/packages/react/src/tabs.d.ts +38 -0
  54. package/dist/types/packages/react/src/textarea.d.cts +29 -0
  55. package/dist/types/packages/react/src/textarea.d.ts +29 -0
  56. package/dist/types/packages/react/src/time-picker.d.cts +10 -1
  57. package/dist/types/packages/react/src/time-picker.d.ts +10 -1
  58. package/dist/types/shared/package-runtime/accordion-state.d.cts +11 -0
  59. package/dist/types/shared/package-runtime/accordion-state.d.ts +11 -0
  60. package/dist/types/shared/package-runtime/action-size.d.cts +1 -1
  61. package/dist/types/shared/package-runtime/action-size.d.ts +1 -1
  62. package/dist/types/shared/package-runtime/alert-action-size.d.cts +2 -0
  63. package/dist/types/shared/package-runtime/alert-action-size.d.ts +2 -0
  64. package/dist/types/shared/package-runtime/badge-tone.d.cts +59 -0
  65. package/dist/types/shared/package-runtime/badge-tone.d.ts +59 -0
  66. package/dist/types/shared/package-runtime/breadcrumb.d.cts +20 -0
  67. package/dist/types/shared/package-runtime/breadcrumb.d.ts +20 -0
  68. package/dist/types/shared/package-runtime/calendar.d.cts +106 -0
  69. package/dist/types/shared/package-runtime/calendar.d.ts +106 -0
  70. package/dist/types/shared/package-runtime/carousel-scroll.d.cts +22 -0
  71. package/dist/types/shared/package-runtime/carousel-scroll.d.ts +22 -0
  72. package/dist/types/shared/package-runtime/carousel.d.cts +47 -0
  73. package/dist/types/shared/package-runtime/carousel.d.ts +47 -0
  74. package/dist/types/shared/package-runtime/center-option.d.cts +1 -0
  75. package/dist/types/shared/package-runtime/center-option.d.ts +1 -0
  76. package/dist/types/shared/package-runtime/list-row.d.cts +14 -0
  77. package/dist/types/shared/package-runtime/list-row.d.ts +14 -0
  78. package/dist/types/shared/package-runtime/messages/ko.d.cts +38 -5
  79. package/dist/types/shared/package-runtime/messages/ko.d.ts +38 -5
  80. package/dist/types/shared/package-runtime/messages-context.d.cts +38 -5
  81. package/dist/types/shared/package-runtime/messages-context.d.ts +38 -5
  82. package/dist/types/shared/package-runtime/navigation-badge.d.cts +12 -0
  83. package/dist/types/shared/package-runtime/navigation-badge.d.ts +12 -0
  84. package/dist/types/shared/package-runtime/navigation.d.cts +1 -1
  85. package/dist/types/shared/package-runtime/navigation.d.ts +1 -1
  86. package/dist/types/shared/package-runtime/scroll-fade.d.cts +25 -0
  87. package/dist/types/shared/package-runtime/scroll-fade.d.ts +25 -0
  88. package/dist/types/shared/package-runtime/sparkline.d.cts +58 -0
  89. package/dist/types/shared/package-runtime/sparkline.d.ts +58 -0
  90. package/dist/types/shared/package-runtime/table-groups.d.cts +11 -0
  91. package/dist/types/shared/package-runtime/table-groups.d.ts +11 -0
  92. package/dist/types/shared/package-runtime/table-model.d.cts +25 -2
  93. package/dist/types/shared/package-runtime/table-model.d.ts +25 -2
  94. package/dist/types/shared/package-runtime/table-presentation.d.cts +30 -4
  95. package/dist/types/shared/package-runtime/table-presentation.d.ts +30 -4
  96. package/dist/types/shared/package-runtime/table.d.cts +18 -2
  97. package/dist/types/shared/package-runtime/table.d.ts +18 -2
  98. package/dist/types/shared/package-runtime/textarea-grow.d.cts +1 -0
  99. package/dist/types/shared/package-runtime/textarea-grow.d.ts +1 -0
  100. package/dist/types/shared/package-runtime/textarea.d.cts +53 -0
  101. package/dist/types/shared/package-runtime/textarea.d.ts +53 -0
  102. package/dist/types/shared/package-runtime/time-segments.d.cts +25 -0
  103. package/dist/types/shared/package-runtime/time-segments.d.ts +25 -0
  104. package/package.json +3 -3
  105. package/dist/types/shared/package-runtime/relative-time.d.cts +0 -1
  106. 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 declare function KjunScrollFade({ children }: {
57
- children: ReactNode;
58
- }): import("react/jsx-runtime").JSX.Element;
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 declare function KjunScrollFade({ children }: {
57
- children: ReactNode;
58
- }): import("react/jsx-runtime").JSX.Element;
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;
@@ -14,9 +15,11 @@ export interface NavigationDestination {
14
15
  label: string;
15
16
  href: string;
16
17
  icon?: string;
17
- badge?: string | number;
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;
18
20
  disabled?: boolean;
19
21
  }
22
+ type Navigate = (key: string, event: MouseEvent<HTMLAnchorElement>) => void;
20
23
  export interface KjunBottomNavigationProps {
21
24
  items: NavigationDestination[];
22
25
  value: string;
@@ -24,11 +27,26 @@ export interface KjunBottomNavigationProps {
24
27
  safeAreaBottom?: number;
25
28
  keyboardVisible?: boolean;
26
29
  hideOnKeyboard?: boolean;
27
- onNavigate?: (key: string, event: MouseEvent<HTMLAnchorElement>) => void;
30
+ onNavigate?: Navigate;
31
+ /** The current destination was pressed again, e.g. to scroll its page back to the top. */
32
+ onReselect?: Navigate;
28
33
  /** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
29
34
  surface?: boolean;
30
35
  }
31
- export declare function KjunBottomNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate, surface }: 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;
32
50
  export interface KjunBottomActionBarProps {
33
51
  description?: string;
34
52
  children: ReactNode;
@@ -39,3 +57,4 @@ export interface KjunBottomActionBarProps {
39
57
  surface?: boolean;
40
58
  }
41
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;
@@ -14,9 +15,11 @@ export interface NavigationDestination {
14
15
  label: string;
15
16
  href: string;
16
17
  icon?: string;
17
- badge?: string | number;
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;
18
20
  disabled?: boolean;
19
21
  }
22
+ type Navigate = (key: string, event: MouseEvent<HTMLAnchorElement>) => void;
20
23
  export interface KjunBottomNavigationProps {
21
24
  items: NavigationDestination[];
22
25
  value: string;
@@ -24,11 +27,26 @@ export interface KjunBottomNavigationProps {
24
27
  safeAreaBottom?: number;
25
28
  keyboardVisible?: boolean;
26
29
  hideOnKeyboard?: boolean;
27
- onNavigate?: (key: string, event: MouseEvent<HTMLAnchorElement>) => void;
30
+ onNavigate?: Navigate;
31
+ /** The current destination was pressed again, e.g. to scroll its page back to the top. */
32
+ onReselect?: Navigate;
28
33
  /** Paints the surface background (default true); false lets the page background show through, so the bar does not read as a separate band. */
29
34
  surface?: boolean;
30
35
  }
31
- export declare function KjunBottomNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate, surface }: 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;
32
50
  export interface KjunBottomActionBarProps {
33
51
  description?: string;
34
52
  children: ReactNode;
@@ -39,3 +57,4 @@ export interface KjunBottomActionBarProps {
39
57
  surface?: boolean;
40
58
  }
41
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 TextareaHTMLAttributes } from "react";
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> {
@@ -31,11 +31,23 @@ export interface KjunSwitchProps {
31
31
  size?: InputSize;
32
32
  /** Supporting text under the label; it also describes the switch to screen readers. */
33
33
  description?: string;
34
+ /** Saving: a spinner turns in the thumb and presses are ignored, without dimming the switch like disabled. */
35
+ loading?: boolean;
34
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>;
35
47
  onValueChange?: (value: boolean) => void;
36
48
  onChange?: (value: boolean) => void;
37
49
  }
38
- 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;
39
51
  export interface KjunRadioProps {
40
52
  value?: ChoiceValue;
41
53
  val: ChoiceValue;
@@ -58,15 +70,8 @@ export interface KjunRadioGroupProps {
58
70
  onChange?: (value: ChoiceValue) => void;
59
71
  }
60
72
  export declare function KjunRadioGroup({ value, options, direction, ariaLabel, children, onValueChange, onChange, }: KjunRadioGroupProps): import("react/jsx-runtime").JSX.Element;
61
- export interface KjunTextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "value"> {
62
- value: string;
63
- size?: InputSize;
64
- error?: boolean;
65
- resize?: "none" | "vertical" | "horizontal" | "both";
66
- ariaLabel?: string;
67
- onValueChange?: (value: string) => void;
68
- }
69
- 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";
70
75
  export { groupKeydown };
71
76
  export interface KjunButtonGroupProps {
72
77
  value: ChoiceValue;
@@ -1,5 +1,5 @@
1
1
  import { type ButtonSize, type InputSize } from "@kjun-ui/tokens";
2
- import { type ReactNode, type TextareaHTMLAttributes } from "react";
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> {
@@ -31,11 +31,23 @@ export interface KjunSwitchProps {
31
31
  size?: InputSize;
32
32
  /** Supporting text under the label; it also describes the switch to screen readers. */
33
33
  description?: string;
34
+ /** Saving: a spinner turns in the thumb and presses are ignored, without dimming the switch like disabled. */
35
+ loading?: boolean;
34
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>;
35
47
  onValueChange?: (value: boolean) => void;
36
48
  onChange?: (value: boolean) => void;
37
49
  }
38
- 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;
39
51
  export interface KjunRadioProps {
40
52
  value?: ChoiceValue;
41
53
  val: ChoiceValue;
@@ -58,15 +70,8 @@ export interface KjunRadioGroupProps {
58
70
  onChange?: (value: ChoiceValue) => void;
59
71
  }
60
72
  export declare function KjunRadioGroup({ value, options, direction, ariaLabel, children, onValueChange, onChange, }: KjunRadioGroupProps): import("react/jsx-runtime").JSX.Element;
61
- export interface KjunTextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "value"> {
62
- value: string;
63
- size?: InputSize;
64
- error?: boolean;
65
- resize?: "none" | "vertical" | "horizontal" | "both";
66
- ariaLabel?: string;
67
- onValueChange?: (value: string) => void;
68
- }
69
- 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";
70
75
  export { groupKeydown };
71
76
  export interface KjunButtonGroupProps {
72
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 InputHTMLAttributes } from "react";
3
- export interface KjunDatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value"> {
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; it reports an empty string. */
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
- onValueChange?: (v: string) => void;
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
- export declare function KjunDatePicker({ value, size, clearable, placeholder, ariaLabel, error, onValueChange, onFocus, onBlur, ...props }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
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 InputHTMLAttributes } from "react";
3
- export interface KjunDatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value"> {
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; it reports an empty string. */
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
- onValueChange?: (v: string) => void;
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
- export declare function KjunDatePicker({ value, size, clearable, placeholder, ariaLabel, error, onValueChange, onFocus, onBlur, ...props }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
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 {
@@ -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 {
@@ -8,6 +8,8 @@ export interface KjunDropdownProps {
8
8
  menuId?: string;
9
9
  triggerId?: string;
10
10
  menuClass?: string;
11
+ /** compact: 32px rows for desktop tables and toolbars (touch keeps 44px). */
12
+ density?: "comfortable" | "compact";
11
13
  trigger: ReactNode;
12
14
  children: ReactNode;
13
15
  onOpen?: () => void;
@@ -15,19 +17,49 @@ export interface KjunDropdownProps {
15
17
  /** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
16
18
  returnFocus?: FocusReturn;
17
19
  }
18
- export declare function KjunDropdown({ disabled, placement, menuId, triggerId, menuClass, trigger, children, onOpen, onClose, returnFocus, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function KjunDropdown({ disabled, placement, menuId, triggerId, menuClass, density, trigger, children, onOpen, onClose, returnFocus, }: KjunDropdownProps): import("react/jsx-runtime").JSX.Element;
19
21
  export interface KjunDropdownItemProps {
20
22
  id?: string;
21
23
  variant?: "default" | "danger";
22
24
  icon?: string;
23
25
  disabled?: boolean;
26
+ /** Single choice: a check in the leading column, announced as a radio item. */
24
27
  selected?: boolean | null;
28
+ /** Independent toggle: a check in the leading column, announced as a checkbox item. */
29
+ checked?: boolean | null;
30
+ /** Second line under the label. */
31
+ description?: string;
32
+ /** Keyboard hint shown at the end, such as "⌘D". It only describes; wiring the keys is the app's job. */
33
+ shortcut?: string;
25
34
  textValue?: string;
35
+ /** Keeps the menu open after choosing, for toggles the user flips several times. */
36
+ keepOpen?: boolean;
37
+ /** Makes the item a link; the browser follows it. */
38
+ href?: string;
39
+ target?: string;
26
40
  children: ReactNode;
27
41
  onClick?: () => void;
28
42
  }
29
- export declare function KjunDropdownItem({ id, variant, icon, disabled, selected, textValue, children, onClick, }: KjunDropdownItemProps): import("react/jsx-runtime").JSX.Element;
30
- export declare function KjunDropdownDivider(): import("react/jsx-runtime").JSX.Element;
43
+ export declare function KjunDropdownItem({ id, variant, icon, disabled, selected, checked, description, shortcut, textValue, keepOpen, href, target, children, onClick, }: KjunDropdownItemProps): import("react/jsx-runtime").JSX.Element | null;
44
+ export interface KjunDropdownSectionProps {
45
+ /** Small heading over the group; it names the group for screen readers. */
46
+ title?: string;
47
+ /** Names the group for screen readers when it has no visible title. */
48
+ ariaLabel?: string;
49
+ children: ReactNode;
50
+ }
51
+ export declare function KjunDropdownSection({ title, ariaLabel, children }: KjunDropdownSectionProps): import("react/jsx-runtime").JSX.Element;
52
+ export interface KjunDropdownSubmenuProps {
53
+ /** Stable key for the submenu; defaults to the label. */
54
+ id?: string;
55
+ label: string;
56
+ icon?: string;
57
+ disabled?: boolean;
58
+ children: ReactNode;
59
+ }
60
+ /** An item that opens its own items in place of the menu, with a back row; → opens it and ← returns. */
61
+ export declare function KjunDropdownSubmenu({ id, label, icon, disabled, children }: KjunDropdownSubmenuProps): import("react/jsx-runtime").JSX.Element;
62
+ export declare function KjunDropdownDivider(): import("react/jsx-runtime").JSX.Element | null;
31
63
  export interface KjunMenuButtonProps extends Omit<KjunDropdownProps, "trigger"> {
32
64
  label?: string;
33
65
  size?: KjunButtonProps["size"];