@kjun-ui/react 0.19.0 → 0.21.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 +4254 -1690
- package/dist/index.js +4045 -1481
- package/dist/styles.css +1531 -411
- package/dist/types/packages/react/src/app-navigation.d.cts +9 -4
- package/dist/types/packages/react/src/app-navigation.d.ts +9 -4
- package/dist/types/packages/react/src/card-actions-context.d.cts +2 -0
- package/dist/types/packages/react/src/card-actions-context.d.ts +2 -0
- package/dist/types/packages/react/src/card.d.cts +15 -5
- package/dist/types/packages/react/src/card.d.ts +15 -5
- package/dist/types/packages/react/src/chip.d.cts +4 -2
- package/dist/types/packages/react/src/chip.d.ts +4 -2
- package/dist/types/packages/react/src/color-picker-parts.d.cts +58 -0
- package/dist/types/packages/react/src/color-picker-parts.d.ts +58 -0
- package/dist/types/packages/react/src/color-picker.d.cts +51 -0
- package/dist/types/packages/react/src/color-picker.d.ts +51 -0
- package/dist/types/packages/react/src/data-state.d.cts +3 -3
- package/dist/types/packages/react/src/data-state.d.ts +3 -3
- package/dist/types/packages/react/src/display.d.cts +14 -5
- package/dist/types/packages/react/src/display.d.ts +14 -5
- package/dist/types/packages/react/src/fab.d.cts +16 -7
- package/dist/types/packages/react/src/fab.d.ts +16 -7
- package/dist/types/packages/react/src/index.d.cts +4 -0
- package/dist/types/packages/react/src/index.d.ts +4 -0
- package/dist/types/packages/react/src/kpi-hero.d.cts +53 -0
- package/dist/types/packages/react/src/kpi-hero.d.ts +53 -0
- package/dist/types/packages/react/src/kpi-row.d.cts +41 -0
- package/dist/types/packages/react/src/kpi-row.d.ts +41 -0
- package/dist/types/packages/react/src/kpi.d.cts +2 -72
- package/dist/types/packages/react/src/kpi.d.ts +2 -72
- package/dist/types/packages/react/src/list-context.d.cts +8 -0
- package/dist/types/packages/react/src/list-context.d.ts +8 -0
- package/dist/types/packages/react/src/list.d.cts +50 -8
- package/dist/types/packages/react/src/list.d.ts +50 -8
- package/dist/types/packages/react/src/modal.d.cts +5 -2
- package/dist/types/packages/react/src/modal.d.ts +5 -2
- package/dist/types/packages/react/src/navigation.d.cts +2 -1
- package/dist/types/packages/react/src/navigation.d.ts +2 -1
- package/dist/types/packages/react/src/number-display.d.cts +2 -0
- package/dist/types/packages/react/src/number-display.d.ts +2 -0
- package/dist/types/packages/react/src/range-input.d.cts +12 -1
- package/dist/types/packages/react/src/range-input.d.ts +12 -1
- package/dist/types/packages/react/src/reorder-controls.d.cts +43 -0
- package/dist/types/packages/react/src/reorder-controls.d.ts +43 -0
- package/dist/types/packages/react/src/skeletons.d.cts +2 -1
- package/dist/types/packages/react/src/skeletons.d.ts +2 -1
- package/dist/types/packages/react/src/split-pane.d.cts +30 -0
- package/dist/types/packages/react/src/split-pane.d.ts +30 -0
- package/dist/types/packages/react/src/stacked-bar.d.cts +22 -0
- package/dist/types/packages/react/src/stacked-bar.d.ts +22 -0
- 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/zone-gauge.d.cts +28 -0
- package/dist/types/packages/react/src/zone-gauge.d.ts +28 -0
- package/dist/types/shared/package-runtime/alert-action-size.d.cts +1 -0
- package/dist/types/shared/package-runtime/alert-action-size.d.ts +1 -0
- package/dist/types/shared/package-runtime/bottom-bar.d.cts +15 -0
- package/dist/types/shared/package-runtime/bottom-bar.d.ts +15 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.cts +25 -0
- package/dist/types/shared/package-runtime/bottom-navigation.d.ts +25 -0
- package/dist/types/shared/package-runtime/card-layout.d.cts +34 -0
- package/dist/types/shared/package-runtime/card-layout.d.ts +34 -0
- package/dist/types/shared/package-runtime/chart-skeleton.d.cts +1 -1
- package/dist/types/shared/package-runtime/chart-skeleton.d.ts +1 -1
- package/dist/types/shared/package-runtime/chip-size.d.cts +4 -0
- package/dist/types/shared/package-runtime/chip-size.d.ts +4 -0
- package/dist/types/shared/package-runtime/color-picker-model.d.cts +51 -0
- package/dist/types/shared/package-runtime/color-picker-model.d.ts +51 -0
- package/dist/types/shared/package-runtime/color-picker.d.cts +92 -0
- package/dist/types/shared/package-runtime/color-picker.d.ts +92 -0
- package/dist/types/shared/package-runtime/color.d.cts +22 -0
- package/dist/types/shared/package-runtime/color.d.ts +22 -0
- package/dist/types/shared/package-runtime/distribution.d.cts +133 -0
- package/dist/types/shared/package-runtime/distribution.d.ts +133 -0
- package/dist/types/shared/package-runtime/empty-geometry.d.cts +19 -0
- package/dist/types/shared/package-runtime/empty-geometry.d.ts +19 -0
- package/dist/types/shared/package-runtime/kpi.d.cts +89 -0
- package/dist/types/shared/package-runtime/kpi.d.ts +89 -0
- package/dist/types/shared/package-runtime/layer-state.d.cts +2 -1
- package/dist/types/shared/package-runtime/layer-state.d.ts +2 -1
- package/dist/types/shared/package-runtime/list-leading.d.cts +38 -0
- package/dist/types/shared/package-runtime/list-leading.d.ts +38 -0
- package/dist/types/shared/package-runtime/list-row.d.cts +115 -4
- package/dist/types/shared/package-runtime/list-row.d.ts +115 -4
- package/dist/types/shared/package-runtime/market-layout.d.cts +3 -1
- package/dist/types/shared/package-runtime/market-layout.d.ts +3 -1
- package/dist/types/shared/package-runtime/market-query.d.cts +15 -0
- package/dist/types/shared/package-runtime/market-query.d.ts +15 -0
- package/dist/types/shared/package-runtime/messages/ko.d.cts +27 -0
- package/dist/types/shared/package-runtime/messages/ko.d.ts +27 -0
- package/dist/types/shared/package-runtime/messages-context.d.cts +27 -0
- package/dist/types/shared/package-runtime/messages-context.d.ts +27 -0
- package/dist/types/shared/package-runtime/number-sign.d.cts +9 -0
- package/dist/types/shared/package-runtime/number-sign.d.ts +9 -0
- package/dist/types/shared/package-runtime/popover-scroll.d.cts +3 -0
- package/dist/types/shared/package-runtime/popover-scroll.d.ts +3 -0
- package/dist/types/shared/package-runtime/radio-keyboard.d.cts +2 -0
- package/dist/types/shared/package-runtime/radio-keyboard.d.ts +2 -0
- package/dist/types/shared/package-runtime/reorder-session.d.cts +62 -0
- package/dist/types/shared/package-runtime/reorder-session.d.ts +62 -0
- package/dist/types/shared/package-runtime/reorder.d.cts +81 -0
- package/dist/types/shared/package-runtime/reorder.d.ts +81 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.cts +14 -0
- package/dist/types/shared/package-runtime/skeleton-text.d.ts +14 -0
- package/dist/types/shared/package-runtime/slider-view.d.cts +90 -0
- package/dist/types/shared/package-runtime/slider-view.d.ts +90 -0
- package/dist/types/shared/package-runtime/split-pane.d.cts +46 -0
- package/dist/types/shared/package-runtime/split-pane.d.ts +46 -0
- package/dist/types/shared/package-runtime/table-columns.d.cts +28 -0
- package/dist/types/shared/package-runtime/table-columns.d.ts +28 -0
- package/dist/types/shared/package-runtime/table-groups.d.cts +9 -0
- package/dist/types/shared/package-runtime/table-groups.d.ts +9 -0
- package/dist/types/shared/package-runtime/table-presentation.d.cts +24 -2
- package/dist/types/shared/package-runtime/table-presentation.d.ts +24 -2
- package/dist/types/shared/package-runtime/table.d.cts +32 -0
- package/dist/types/shared/package-runtime/table.d.ts +32 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.cts +51 -0
- package/dist/types/shared/package-runtime/use-color-picker.d.ts +51 -0
- package/dist/types/shared/package-runtime/use-layer.d.cts +4 -2
- package/dist/types/shared/package-runtime/use-layer.d.ts +4 -2
- package/dist/types/shared/package-runtime/use-table-group-expansion.d.cts +6 -0
- package/dist/types/shared/package-runtime/use-table-group-expansion.d.ts +6 -0
- package/package.json +3 -3
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type NavigationBadge } from "../../../shared/package-runtime/navigation-badge.cjs";
|
|
2
|
-
import
|
|
2
|
+
import { type NavigationIconStyle } from "../../../shared/package-runtime/bottom-navigation.cjs";
|
|
3
|
+
export type { NavigationIconStyle };
|
|
4
|
+
import { type MouseEvent, type ReactNode } from "react";
|
|
3
5
|
export interface KjunTopNavigationProps {
|
|
4
6
|
title: string;
|
|
5
7
|
description?: string;
|
|
@@ -32,10 +34,14 @@ export interface KjunBottomNavigationProps {
|
|
|
32
34
|
onNavigate?: Navigate;
|
|
33
35
|
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
34
36
|
onReselect?: Navigate;
|
|
35
|
-
/** Paints the surface
|
|
37
|
+
/** Paints the surface (default true): a square bar with a soft shadow over the content; false lets the page background show through, so the bar does not read as a separate band. */
|
|
36
38
|
surface?: boolean;
|
|
39
|
+
/** "auto" (default) draws outline icons and fills the selected one; "filled" or "outline" keeps one style for every destination, the selection then carried by colour (and stroke weight). */
|
|
40
|
+
iconStyle?: NavigationIconStyle;
|
|
41
|
+
/** Shows each label under its icon (default true); false draws icons alone on a lower bar, each label staying the destination's accessible name. Destinations without icons always show their labels. */
|
|
42
|
+
showLabels?: boolean;
|
|
37
43
|
}
|
|
38
|
-
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
44
|
+
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface, iconStyle, showLabels }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
45
|
export interface KjunFloatingNavigationProps {
|
|
40
46
|
items: NavigationDestination[];
|
|
41
47
|
value: string;
|
|
@@ -61,4 +67,3 @@ export interface KjunBottomActionBarProps {
|
|
|
61
67
|
surface?: boolean;
|
|
62
68
|
}
|
|
63
69
|
export declare function KjunBottomActionBar({ description, children, safeArea, keyboardVisible, hideOnKeyboard, surface }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
64
|
-
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type NavigationBadge } from "../../../shared/package-runtime/navigation-badge.js";
|
|
2
|
-
import
|
|
2
|
+
import { type NavigationIconStyle } from "../../../shared/package-runtime/bottom-navigation.js";
|
|
3
|
+
export type { NavigationIconStyle };
|
|
4
|
+
import { type MouseEvent, type ReactNode } from "react";
|
|
3
5
|
export interface KjunTopNavigationProps {
|
|
4
6
|
title: string;
|
|
5
7
|
description?: string;
|
|
@@ -32,10 +34,14 @@ export interface KjunBottomNavigationProps {
|
|
|
32
34
|
onNavigate?: Navigate;
|
|
33
35
|
/** The current destination was pressed again, e.g. to scroll its page back to the top. */
|
|
34
36
|
onReselect?: Navigate;
|
|
35
|
-
/** Paints the surface
|
|
37
|
+
/** Paints the surface (default true): a square bar with a soft shadow over the content; false lets the page background show through, so the bar does not read as a separate band. */
|
|
36
38
|
surface?: boolean;
|
|
39
|
+
/** "auto" (default) draws outline icons and fills the selected one; "filled" or "outline" keeps one style for every destination, the selection then carried by colour (and stroke weight). */
|
|
40
|
+
iconStyle?: NavigationIconStyle;
|
|
41
|
+
/** Shows each label under its icon (default true); false draws icons alone on a lower bar, each label staying the destination's accessible name. Destinations without icons always show their labels. */
|
|
42
|
+
showLabels?: boolean;
|
|
37
43
|
}
|
|
38
|
-
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
44
|
+
export declare function KjunBottomNavigation({ items, value, ariaLabel, safeArea, keyboardVisible, hideOnKeyboard, onNavigate, onReselect, surface, iconStyle, showLabels }: KjunBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
45
|
export interface KjunFloatingNavigationProps {
|
|
40
46
|
items: NavigationDestination[];
|
|
41
47
|
value: string;
|
|
@@ -61,4 +67,3 @@ export interface KjunBottomActionBarProps {
|
|
|
61
67
|
surface?: boolean;
|
|
62
68
|
}
|
|
63
69
|
export declare function KjunBottomActionBar({ description, children, safeArea, keyboardVisible, hideOnKeyboard, surface }: KjunBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
64
|
-
export {};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type CardHeadingLevel, type CardMediaAspect, type CardMediaPosition } from "../../../shared/package-runtime/card-layout.cjs";
|
|
2
|
+
import { type CardElevation, type CardPadding, type CardRadius, type CardSurface } from "@kjun-ui/tokens";
|
|
2
3
|
import { type HTMLAttributes, type ReactNode } from "react";
|
|
3
|
-
export interface KjunCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
title
|
|
4
|
+
export interface KjunCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
5
|
+
/** The card title; a node can carry an icon or an emphasised number. Give a pressable card with a node title an ariaLabel. */
|
|
6
|
+
title?: ReactNode;
|
|
5
7
|
subtitle?: string;
|
|
6
8
|
header?: ReactNode;
|
|
7
9
|
headerActions?: ReactNode;
|
|
8
10
|
media?: ReactNode;
|
|
11
|
+
/** top (default) puts the media above the header; start puts it in a fixed column beside the content, such as a thumbnail. */
|
|
12
|
+
mediaPosition?: CardMediaPosition;
|
|
13
|
+
/** Fixes the media frame's ratio (wide 16:9, standard 4:3, square 1:1); images and video crop to it. */
|
|
14
|
+
mediaAspect?: CardMediaAspect;
|
|
9
15
|
footer?: ReactNode;
|
|
10
16
|
padding?: CardPadding;
|
|
11
17
|
bodyPadding?: CardPadding;
|
|
@@ -18,7 +24,11 @@ export interface KjunCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
24
|
pressable?: boolean;
|
|
19
25
|
/** Blocks a pressable card and dims it. */
|
|
20
26
|
disabled?: boolean;
|
|
21
|
-
/** Button name of a pressable card; defaults to
|
|
27
|
+
/** Button name of a pressable card; defaults to a text title. */
|
|
22
28
|
ariaLabel?: string;
|
|
29
|
+
/** Title level in the page outline (h2–h6, default 3); false keeps plain text. A pressable card's title is never a heading. */
|
|
30
|
+
headingLevel?: CardHeadingLevel;
|
|
31
|
+
/** Where the footer places its content: start (default) or end, such as confirm and cancel actions. */
|
|
32
|
+
footerAlign?: "start" | "end";
|
|
23
33
|
}
|
|
24
|
-
export declare function KjunCard({ title, subtitle, header, headerActions, media, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, disabled, ariaLabel, children, style, className, onClick, onKeyDown, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function KjunCard({ title, subtitle, header, headerActions, media, mediaPosition, mediaAspect, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, disabled, ariaLabel, headingLevel, footerAlign, children, style, className, onClick, onKeyDown, onKeyUp, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type CardHeadingLevel, type CardMediaAspect, type CardMediaPosition } from "../../../shared/package-runtime/card-layout.js";
|
|
2
|
+
import { type CardElevation, type CardPadding, type CardRadius, type CardSurface } from "@kjun-ui/tokens";
|
|
2
3
|
import { type HTMLAttributes, type ReactNode } from "react";
|
|
3
|
-
export interface KjunCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
title
|
|
4
|
+
export interface KjunCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
5
|
+
/** The card title; a node can carry an icon or an emphasised number. Give a pressable card with a node title an ariaLabel. */
|
|
6
|
+
title?: ReactNode;
|
|
5
7
|
subtitle?: string;
|
|
6
8
|
header?: ReactNode;
|
|
7
9
|
headerActions?: ReactNode;
|
|
8
10
|
media?: ReactNode;
|
|
11
|
+
/** top (default) puts the media above the header; start puts it in a fixed column beside the content, such as a thumbnail. */
|
|
12
|
+
mediaPosition?: CardMediaPosition;
|
|
13
|
+
/** Fixes the media frame's ratio (wide 16:9, standard 4:3, square 1:1); images and video crop to it. */
|
|
14
|
+
mediaAspect?: CardMediaAspect;
|
|
9
15
|
footer?: ReactNode;
|
|
10
16
|
padding?: CardPadding;
|
|
11
17
|
bodyPadding?: CardPadding;
|
|
@@ -18,7 +24,11 @@ export interface KjunCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
24
|
pressable?: boolean;
|
|
19
25
|
/** Blocks a pressable card and dims it. */
|
|
20
26
|
disabled?: boolean;
|
|
21
|
-
/** Button name of a pressable card; defaults to
|
|
27
|
+
/** Button name of a pressable card; defaults to a text title. */
|
|
22
28
|
ariaLabel?: string;
|
|
29
|
+
/** Title level in the page outline (h2–h6, default 3); false keeps plain text. A pressable card's title is never a heading. */
|
|
30
|
+
headingLevel?: CardHeadingLevel;
|
|
31
|
+
/** Where the footer places its content: start (default) or end, such as confirm and cancel actions. */
|
|
32
|
+
footerAlign?: "start" | "end";
|
|
23
33
|
}
|
|
24
|
-
export declare function KjunCard({ title, subtitle, header, headerActions, media, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, disabled, ariaLabel, children, style, className, onClick, onKeyDown, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function KjunCard({ title, subtitle, header, headerActions, media, mediaPosition, mediaAspect, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, pressable, disabled, ariaLabel, headingLevel, footerAlign, children, style, className, onClick, onKeyDown, onKeyUp, ...props }: KjunCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export interface KjunChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
2
3
|
label: string;
|
|
3
4
|
icon?: string;
|
|
4
5
|
removable?: boolean;
|
|
@@ -7,4 +8,5 @@ export interface KjunChipProps {
|
|
|
7
8
|
removeLabel?: string;
|
|
8
9
|
onRemove?: () => void;
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
+
/** The ref reaches the removal button, the chip's only focus target; it is null when the chip is not removable. */
|
|
12
|
+
export declare const KjunChip: import("react").ForwardRefExoticComponent<KjunChipProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export interface KjunChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
2
3
|
label: string;
|
|
3
4
|
icon?: string;
|
|
4
5
|
removable?: boolean;
|
|
@@ -7,4 +8,5 @@ export interface KjunChipProps {
|
|
|
7
8
|
removeLabel?: string;
|
|
8
9
|
onRemove?: () => void;
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
+
/** The ref reaches the removal button, the chip's only focus target; it is null when the chip is not removable. */
|
|
12
|
+
export declare const KjunChip: import("react").ForwardRefExoticComponent<KjunChipProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type Hsv } from "../../../shared/package-runtime/color.cjs";
|
|
2
|
+
/** Drag reports through onMove between onStart and onEnd; a key is a whole pick through onPick. */
|
|
3
|
+
export interface DragHandlers<T> {
|
|
4
|
+
onMove: (value: T) => void;
|
|
5
|
+
onPick: (value: T) => void;
|
|
6
|
+
onStart: () => void;
|
|
7
|
+
onEnd: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** The saturation/brightness area; with no value yet (empty) it shows a hint instead of a thumb. */
|
|
10
|
+
export declare function ColorArea({ hsv, label, valueText, empty, hint, areaRef, onMove, onPick, onStart, onEnd }: {
|
|
11
|
+
hsv: Hsv;
|
|
12
|
+
label: string;
|
|
13
|
+
valueText: string;
|
|
14
|
+
empty: boolean;
|
|
15
|
+
hint: string;
|
|
16
|
+
areaRef: (el: HTMLElement | null) => void;
|
|
17
|
+
} & DragHandlers<Hsv>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function ColorChannel({ channel, value, max, label, valueText, color, onMove, onPick, onStart, onEnd }: {
|
|
19
|
+
channel: "hue" | "alpha";
|
|
20
|
+
value: number;
|
|
21
|
+
max: number;
|
|
22
|
+
label: string;
|
|
23
|
+
valueText: string;
|
|
24
|
+
color: string;
|
|
25
|
+
} & DragHandlers<number>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
/** One radio group of color items; "no color" is the item whose value is null. */
|
|
27
|
+
export declare function SwatchGrid({ items, selected, label, onPick, swatchRef }: {
|
|
28
|
+
items: {
|
|
29
|
+
value: string | null;
|
|
30
|
+
label: string;
|
|
31
|
+
}[];
|
|
32
|
+
selected: number;
|
|
33
|
+
label: string;
|
|
34
|
+
onPick: (value: string | null) => void;
|
|
35
|
+
swatchRef?: (index: number, el: HTMLButtonElement | null) => void;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/** A swatch row under a caption (the swatches when recent colors show too, and the recent colors). */
|
|
38
|
+
export declare function SwatchGroup({ caption, ...grid }: {
|
|
39
|
+
caption: string;
|
|
40
|
+
} & Parameters<typeof SwatchGrid>[0]): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
/** The eyedropper button and the hex and % fields. Typing changes the value once a code is complete;
|
|
42
|
+
* Enter or leaving a field commits it (a short code expands, a bad one reverts). */
|
|
43
|
+
export declare function ColorInputs({ fields, value, alpha, alphaPercent, clearable, hexLabel, alphaLabel, eyeDropper, onEdit, onCommit, hexRef }: {
|
|
44
|
+
fields: boolean;
|
|
45
|
+
value: string | null;
|
|
46
|
+
alpha: boolean;
|
|
47
|
+
alphaPercent: number;
|
|
48
|
+
clearable: boolean;
|
|
49
|
+
hexLabel: string;
|
|
50
|
+
alphaLabel: string;
|
|
51
|
+
eyeDropper: {
|
|
52
|
+
label: string;
|
|
53
|
+
onPick: () => void;
|
|
54
|
+
} | null;
|
|
55
|
+
onEdit: (live: string | null) => void;
|
|
56
|
+
onCommit: (next: string | null | "revert") => void;
|
|
57
|
+
hexRef: (el: HTMLInputElement | null) => void;
|
|
58
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type Hsv } from "../../../shared/package-runtime/color.js";
|
|
2
|
+
/** Drag reports through onMove between onStart and onEnd; a key is a whole pick through onPick. */
|
|
3
|
+
export interface DragHandlers<T> {
|
|
4
|
+
onMove: (value: T) => void;
|
|
5
|
+
onPick: (value: T) => void;
|
|
6
|
+
onStart: () => void;
|
|
7
|
+
onEnd: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** The saturation/brightness area; with no value yet (empty) it shows a hint instead of a thumb. */
|
|
10
|
+
export declare function ColorArea({ hsv, label, valueText, empty, hint, areaRef, onMove, onPick, onStart, onEnd }: {
|
|
11
|
+
hsv: Hsv;
|
|
12
|
+
label: string;
|
|
13
|
+
valueText: string;
|
|
14
|
+
empty: boolean;
|
|
15
|
+
hint: string;
|
|
16
|
+
areaRef: (el: HTMLElement | null) => void;
|
|
17
|
+
} & DragHandlers<Hsv>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function ColorChannel({ channel, value, max, label, valueText, color, onMove, onPick, onStart, onEnd }: {
|
|
19
|
+
channel: "hue" | "alpha";
|
|
20
|
+
value: number;
|
|
21
|
+
max: number;
|
|
22
|
+
label: string;
|
|
23
|
+
valueText: string;
|
|
24
|
+
color: string;
|
|
25
|
+
} & DragHandlers<number>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
/** One radio group of color items; "no color" is the item whose value is null. */
|
|
27
|
+
export declare function SwatchGrid({ items, selected, label, onPick, swatchRef }: {
|
|
28
|
+
items: {
|
|
29
|
+
value: string | null;
|
|
30
|
+
label: string;
|
|
31
|
+
}[];
|
|
32
|
+
selected: number;
|
|
33
|
+
label: string;
|
|
34
|
+
onPick: (value: string | null) => void;
|
|
35
|
+
swatchRef?: (index: number, el: HTMLButtonElement | null) => void;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/** A swatch row under a caption (the swatches when recent colors show too, and the recent colors). */
|
|
38
|
+
export declare function SwatchGroup({ caption, ...grid }: {
|
|
39
|
+
caption: string;
|
|
40
|
+
} & Parameters<typeof SwatchGrid>[0]): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
/** The eyedropper button and the hex and % fields. Typing changes the value once a code is complete;
|
|
42
|
+
* Enter or leaving a field commits it (a short code expands, a bad one reverts). */
|
|
43
|
+
export declare function ColorInputs({ fields, value, alpha, alphaPercent, clearable, hexLabel, alphaLabel, eyeDropper, onEdit, onCommit, hexRef }: {
|
|
44
|
+
fields: boolean;
|
|
45
|
+
value: string | null;
|
|
46
|
+
alpha: boolean;
|
|
47
|
+
alphaPercent: number;
|
|
48
|
+
clearable: boolean;
|
|
49
|
+
hexLabel: string;
|
|
50
|
+
alphaLabel: string;
|
|
51
|
+
eyeDropper: {
|
|
52
|
+
label: string;
|
|
53
|
+
onPick: () => void;
|
|
54
|
+
} | null;
|
|
55
|
+
onEdit: (live: string | null) => void;
|
|
56
|
+
onCommit: (next: string | null | "revert") => void;
|
|
57
|
+
hexRef: (el: HTMLInputElement | null) => void;
|
|
58
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
3
|
+
import { type ColorSwatchInput } from "../../../shared/package-runtime/color-picker.cjs";
|
|
4
|
+
export type KjunColorSwatch = ColorSwatchInput;
|
|
5
|
+
export interface KjunColorPickerProps {
|
|
6
|
+
/** Uppercase #RRGGBB (#RRGGBBAA with alpha), or null for no color. */
|
|
7
|
+
value?: string | null;
|
|
8
|
+
defaultValue?: string | null;
|
|
9
|
+
/** Every change, also while dragging. */
|
|
10
|
+
onValueChange?: (value: string | null) => void;
|
|
11
|
+
/** Once per finished pick: drag released, swatch, key or eyedropper, hex or % field entered (Enter or leaving it). */
|
|
12
|
+
onChangeCommit?: (value: string | null) => void;
|
|
13
|
+
/** Colors the app offers; strings or { value, label }. A label names the color on the trigger and in the swatch's tooltip. */
|
|
14
|
+
swatches?: KjunColorSwatch[];
|
|
15
|
+
/** Saturation/brightness area and hue slider. */
|
|
16
|
+
custom?: boolean;
|
|
17
|
+
/** Opacity slider and % field; the value always carries AA. */
|
|
18
|
+
alpha?: boolean;
|
|
19
|
+
/** Hex field. */
|
|
20
|
+
input?: boolean;
|
|
21
|
+
/** A "no color" swatch that sets the value to null. */
|
|
22
|
+
clearable?: boolean;
|
|
23
|
+
/** Recent colors the app keeps (strings or { value, label }); giving it shows a "recent" row of up to 8 under the swatches,
|
|
24
|
+
* leaving out colors the swatches already offer. */
|
|
25
|
+
recentColors?: KjunColorSwatch[];
|
|
26
|
+
/** The next recent colors, once the panel closes on a new value: that value first, at most 8. Store it to keep the row. */
|
|
27
|
+
onRecentColorsChange?: (colors: string[]) => void;
|
|
28
|
+
/** A button that picks a color from the screen, where the browser has an EyeDropper (Chromium desktop); hidden elsewhere. */
|
|
29
|
+
eyeDropper?: boolean;
|
|
30
|
+
open?: boolean;
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
size?: InputSize;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
ariaLabel?: string;
|
|
36
|
+
error?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/** Trigger id for an outside <label for>; defaults to the FormGroup's id. */
|
|
40
|
+
id?: string;
|
|
41
|
+
/** Submits the value with a form through a hidden input. */
|
|
42
|
+
name?: string;
|
|
43
|
+
/** Draws the trigger's content; the trigger button and its accessibility stay KJUN's. */
|
|
44
|
+
renderTrigger?: (state: {
|
|
45
|
+
value: string | null;
|
|
46
|
+
open: boolean;
|
|
47
|
+
}) => ReactNode;
|
|
48
|
+
className?: string;
|
|
49
|
+
style?: CSSProperties;
|
|
50
|
+
}
|
|
51
|
+
export declare function KjunColorPicker({ value, defaultValue, onValueChange, onChangeCommit, swatches: rawSwatches, custom, alpha, input, clearable, recentColors, onRecentColorsChange, eyeDropper, open: openGiven, defaultOpen, onOpenChange, size, placeholder, ariaLabel, error, disabled, readOnly, id, name, renderTrigger, className, style, }: KjunColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
3
|
+
import { type ColorSwatchInput } from "../../../shared/package-runtime/color-picker.js";
|
|
4
|
+
export type KjunColorSwatch = ColorSwatchInput;
|
|
5
|
+
export interface KjunColorPickerProps {
|
|
6
|
+
/** Uppercase #RRGGBB (#RRGGBBAA with alpha), or null for no color. */
|
|
7
|
+
value?: string | null;
|
|
8
|
+
defaultValue?: string | null;
|
|
9
|
+
/** Every change, also while dragging. */
|
|
10
|
+
onValueChange?: (value: string | null) => void;
|
|
11
|
+
/** Once per finished pick: drag released, swatch, key or eyedropper, hex or % field entered (Enter or leaving it). */
|
|
12
|
+
onChangeCommit?: (value: string | null) => void;
|
|
13
|
+
/** Colors the app offers; strings or { value, label }. A label names the color on the trigger and in the swatch's tooltip. */
|
|
14
|
+
swatches?: KjunColorSwatch[];
|
|
15
|
+
/** Saturation/brightness area and hue slider. */
|
|
16
|
+
custom?: boolean;
|
|
17
|
+
/** Opacity slider and % field; the value always carries AA. */
|
|
18
|
+
alpha?: boolean;
|
|
19
|
+
/** Hex field. */
|
|
20
|
+
input?: boolean;
|
|
21
|
+
/** A "no color" swatch that sets the value to null. */
|
|
22
|
+
clearable?: boolean;
|
|
23
|
+
/** Recent colors the app keeps (strings or { value, label }); giving it shows a "recent" row of up to 8 under the swatches,
|
|
24
|
+
* leaving out colors the swatches already offer. */
|
|
25
|
+
recentColors?: KjunColorSwatch[];
|
|
26
|
+
/** The next recent colors, once the panel closes on a new value: that value first, at most 8. Store it to keep the row. */
|
|
27
|
+
onRecentColorsChange?: (colors: string[]) => void;
|
|
28
|
+
/** A button that picks a color from the screen, where the browser has an EyeDropper (Chromium desktop); hidden elsewhere. */
|
|
29
|
+
eyeDropper?: boolean;
|
|
30
|
+
open?: boolean;
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
size?: InputSize;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
ariaLabel?: string;
|
|
36
|
+
error?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/** Trigger id for an outside <label for>; defaults to the FormGroup's id. */
|
|
40
|
+
id?: string;
|
|
41
|
+
/** Submits the value with a form through a hidden input. */
|
|
42
|
+
name?: string;
|
|
43
|
+
/** Draws the trigger's content; the trigger button and its accessibility stay KJUN's. */
|
|
44
|
+
renderTrigger?: (state: {
|
|
45
|
+
value: string | null;
|
|
46
|
+
open: boolean;
|
|
47
|
+
}) => ReactNode;
|
|
48
|
+
className?: string;
|
|
49
|
+
style?: CSSProperties;
|
|
50
|
+
}
|
|
51
|
+
export declare function KjunColorPicker({ value, defaultValue, onValueChange, onChangeCommit, swatches: rawSwatches, custom, alpha, input, clearable, recentColors, onRecentColorsChange, eyeDropper, open: openGiven, defaultOpen, onOpenChange, size, placeholder, ariaLabel, error, disabled, readOnly, id, name, renderTrigger, className, style, }: KjunColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { KjunMessageScope } from "../../../shared/package-runtime/messages/index.cjs";
|
|
2
1
|
import { type QueryDisplayProps } from "@kjun-ui/tokens";
|
|
3
2
|
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
4
3
|
import { type KjunSkeletonProps } from "./display.cjs";
|
|
@@ -38,6 +37,8 @@ export declare function KjunDataState({ preserveContent, refreshing, refreshErro
|
|
|
38
37
|
export interface KjunErrorBoundaryProps {
|
|
39
38
|
children: ReactNode;
|
|
40
39
|
fallbackMessage?: string;
|
|
40
|
+
/** The default fallback's padding and minimum height, like KjunDataState: md for pages and panels, sm for cards, lg for full pages. */
|
|
41
|
+
size?: "sm" | "md" | "lg";
|
|
41
42
|
fallback?: ReactNode;
|
|
42
43
|
onError?: (error: Error, info: ErrorInfo) => void;
|
|
43
44
|
onReset?: () => void;
|
|
@@ -45,8 +46,6 @@ export interface KjunErrorBoundaryProps {
|
|
|
45
46
|
export declare class KjunErrorBoundary extends Component<KjunErrorBoundaryProps, {
|
|
46
47
|
error: boolean;
|
|
47
48
|
}> {
|
|
48
|
-
static contextType: import("react").Context<KjunMessageScope>;
|
|
49
|
-
context: KjunMessageScope;
|
|
50
49
|
state: {
|
|
51
50
|
error: boolean;
|
|
52
51
|
};
|
|
@@ -54,5 +53,6 @@ export declare class KjunErrorBoundary extends Component<KjunErrorBoundaryProps,
|
|
|
54
53
|
error: boolean;
|
|
55
54
|
};
|
|
56
55
|
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
56
|
+
reset: () => void;
|
|
57
57
|
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
58
58
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { KjunMessageScope } from "../../../shared/package-runtime/messages/index.js";
|
|
2
1
|
import { type QueryDisplayProps } from "@kjun-ui/tokens";
|
|
3
2
|
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
4
3
|
import { type KjunSkeletonProps } from "./display.js";
|
|
@@ -38,6 +37,8 @@ export declare function KjunDataState({ preserveContent, refreshing, refreshErro
|
|
|
38
37
|
export interface KjunErrorBoundaryProps {
|
|
39
38
|
children: ReactNode;
|
|
40
39
|
fallbackMessage?: string;
|
|
40
|
+
/** The default fallback's padding and minimum height, like KjunDataState: md for pages and panels, sm for cards, lg for full pages. */
|
|
41
|
+
size?: "sm" | "md" | "lg";
|
|
41
42
|
fallback?: ReactNode;
|
|
42
43
|
onError?: (error: Error, info: ErrorInfo) => void;
|
|
43
44
|
onReset?: () => void;
|
|
@@ -45,8 +46,6 @@ export interface KjunErrorBoundaryProps {
|
|
|
45
46
|
export declare class KjunErrorBoundary extends Component<KjunErrorBoundaryProps, {
|
|
46
47
|
error: boolean;
|
|
47
48
|
}> {
|
|
48
|
-
static contextType: import("react").Context<KjunMessageScope>;
|
|
49
|
-
context: KjunMessageScope;
|
|
50
49
|
state: {
|
|
51
50
|
error: boolean;
|
|
52
51
|
};
|
|
@@ -54,5 +53,6 @@ export declare class KjunErrorBoundary extends Component<KjunErrorBoundaryProps,
|
|
|
54
53
|
error: boolean;
|
|
55
54
|
};
|
|
56
55
|
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
56
|
+
reset: () => void;
|
|
57
57
|
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
58
58
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type AlertLive } from "../../../shared/package-runtime/alert-live.cjs";
|
|
2
|
+
import { type EmptySize } from "../../../shared/package-runtime/empty-geometry.cjs";
|
|
2
3
|
import { type TypographyRole } from "@kjun-ui/tokens";
|
|
3
|
-
import { type CSSProperties, type HTMLAttributes, type ReactNode } from "react";
|
|
4
|
+
import { type CSSProperties, type HTMLAttributes, type ReactElement, type ReactNode } from "react";
|
|
4
5
|
export type DisplaySize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
6
|
export type SemanticTone = "primary" | "success" | "warning" | "danger" | "info";
|
|
6
7
|
export interface KjunBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
@@ -17,13 +18,21 @@ export interface KjunBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
17
18
|
export declare function KjunBadge({ variant, size, dot, count, max, label, children, style, ...props }: KjunBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
19
|
export { KjunCard } from "./card.cjs";
|
|
19
20
|
export type { KjunCardProps } from "./card.cjs";
|
|
20
|
-
export interface KjunEmptyProps {
|
|
21
|
+
export interface KjunEmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
21
22
|
text?: string;
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
/** Why it is empty and what to do next; a node can carry a link or emphasis. */
|
|
24
|
+
description?: ReactNode;
|
|
25
|
+
/** An icon name drawn as a quiet line icon, or your own element (an illustration, a KjunIcon of another size). */
|
|
26
|
+
icon?: string | ReactElement;
|
|
27
|
+
/** md for pages and panels; sm for cards and list areas. */
|
|
28
|
+
size?: EmptySize;
|
|
29
|
+
/** Renders the title as an h2–h6 so it joins the page outline; false keeps a paragraph. */
|
|
30
|
+
headingLevel?: false | 2 | 3 | 4 | 5 | 6;
|
|
31
|
+
/** polite announces the message when it appears (role status), such as a search that just came back empty. */
|
|
32
|
+
live?: "polite" | "off";
|
|
24
33
|
children?: ReactNode;
|
|
25
34
|
}
|
|
26
|
-
export declare function KjunEmpty({ text, description, icon, children, }: KjunEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare function KjunEmpty({ text, description, icon, size, headingLevel, live, children, className, ...rest }: KjunEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
27
36
|
export interface KjunSpinnerProps {
|
|
28
37
|
size?: DisplaySize;
|
|
29
38
|
text?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type AlertLive } from "../../../shared/package-runtime/alert-live.js";
|
|
2
|
+
import { type EmptySize } from "../../../shared/package-runtime/empty-geometry.js";
|
|
2
3
|
import { type TypographyRole } from "@kjun-ui/tokens";
|
|
3
|
-
import { type CSSProperties, type HTMLAttributes, type ReactNode } from "react";
|
|
4
|
+
import { type CSSProperties, type HTMLAttributes, type ReactElement, type ReactNode } from "react";
|
|
4
5
|
export type DisplaySize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
6
|
export type SemanticTone = "primary" | "success" | "warning" | "danger" | "info";
|
|
6
7
|
export interface KjunBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
@@ -17,13 +18,21 @@ export interface KjunBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
17
18
|
export declare function KjunBadge({ variant, size, dot, count, max, label, children, style, ...props }: KjunBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
19
|
export { KjunCard } from "./card.js";
|
|
19
20
|
export type { KjunCardProps } from "./card.js";
|
|
20
|
-
export interface KjunEmptyProps {
|
|
21
|
+
export interface KjunEmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
21
22
|
text?: string;
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
/** Why it is empty and what to do next; a node can carry a link or emphasis. */
|
|
24
|
+
description?: ReactNode;
|
|
25
|
+
/** An icon name drawn as a quiet line icon, or your own element (an illustration, a KjunIcon of another size). */
|
|
26
|
+
icon?: string | ReactElement;
|
|
27
|
+
/** md for pages and panels; sm for cards and list areas. */
|
|
28
|
+
size?: EmptySize;
|
|
29
|
+
/** Renders the title as an h2–h6 so it joins the page outline; false keeps a paragraph. */
|
|
30
|
+
headingLevel?: false | 2 | 3 | 4 | 5 | 6;
|
|
31
|
+
/** polite announces the message when it appears (role status), such as a search that just came back empty. */
|
|
32
|
+
live?: "polite" | "off";
|
|
24
33
|
children?: ReactNode;
|
|
25
34
|
}
|
|
26
|
-
export declare function KjunEmpty({ text, description, icon, children, }: KjunEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare function KjunEmpty({ text, description, icon, size, headingLevel, live, children, className, ...rest }: KjunEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
27
36
|
export interface KjunSpinnerProps {
|
|
28
37
|
size?: DisplaySize;
|
|
29
38
|
text?: string;
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export
|
|
1
|
+
import { type ButtonHTMLAttributes, type MouseEvent } from "react";
|
|
2
|
+
export type KjunFabSize = "sm" | "md";
|
|
3
|
+
export interface KjunFabProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "type" | "name" | "autoFocus" | "onChange" | "onClick"> {
|
|
3
4
|
icon: string;
|
|
4
|
-
/**
|
|
5
|
-
|
|
5
|
+
/** Visible text beside the icon; the circle becomes a capsule of the same height. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** The accessible name. Required without a label, since the icon alone says nothing. */
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
/** "md" (default) is 56, "sm" is 48. Both take a label, loading and every state. */
|
|
10
|
+
size?: KjunFabSize;
|
|
11
|
+
/** Swaps the icon for a spinner and stops presses; the button keeps its colour. */
|
|
12
|
+
loading?: boolean;
|
|
6
13
|
disabled?: boolean;
|
|
7
14
|
/** Stays above the bottom safe area from KjunProvider (default true). */
|
|
8
15
|
safeArea?: boolean;
|
|
9
|
-
/**
|
|
16
|
+
/** Stays above the app's KjunBottomNavigation and KjunBottomActionBar (default true); false where the bar is not under the FAB. */
|
|
17
|
+
avoidBottomBar?: boolean;
|
|
18
|
+
/** Extra space below, in px. */
|
|
10
19
|
offsetBottom?: number;
|
|
11
20
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
12
21
|
}
|
|
13
|
-
/** A
|
|
14
|
-
export declare
|
|
22
|
+
/** A primary action pinned to the bottom end of the viewport: a circle, or a capsule with a label. */
|
|
23
|
+
export declare const KjunFab: import("react").ForwardRefExoticComponent<KjunFabProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export
|
|
1
|
+
import { type ButtonHTMLAttributes, type MouseEvent } from "react";
|
|
2
|
+
export type KjunFabSize = "sm" | "md";
|
|
3
|
+
export interface KjunFabProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "type" | "name" | "autoFocus" | "onChange" | "onClick"> {
|
|
3
4
|
icon: string;
|
|
4
|
-
/**
|
|
5
|
-
|
|
5
|
+
/** Visible text beside the icon; the circle becomes a capsule of the same height. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** The accessible name. Required without a label, since the icon alone says nothing. */
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
/** "md" (default) is 56, "sm" is 48. Both take a label, loading and every state. */
|
|
10
|
+
size?: KjunFabSize;
|
|
11
|
+
/** Swaps the icon for a spinner and stops presses; the button keeps its colour. */
|
|
12
|
+
loading?: boolean;
|
|
6
13
|
disabled?: boolean;
|
|
7
14
|
/** Stays above the bottom safe area from KjunProvider (default true). */
|
|
8
15
|
safeArea?: boolean;
|
|
9
|
-
/**
|
|
16
|
+
/** Stays above the app's KjunBottomNavigation and KjunBottomActionBar (default true); false where the bar is not under the FAB. */
|
|
17
|
+
avoidBottomBar?: boolean;
|
|
18
|
+
/** Extra space below, in px. */
|
|
10
19
|
offsetBottom?: number;
|
|
11
20
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
12
21
|
}
|
|
13
|
-
/** A
|
|
14
|
-
export declare
|
|
22
|
+
/** A primary action pinned to the bottom end of the viewport: a circle, or a capsule with a label. */
|
|
23
|
+
export declare const KjunFab: import("react").ForwardRefExoticComponent<KjunFabProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -20,7 +20,11 @@ export * from "./navigation.cjs";
|
|
|
20
20
|
export { KjunIconToggle, KjunCopyButton, KjunRefreshButton, KjunExternalLink, KjunScrollFade, } from "./actions.cjs";
|
|
21
21
|
export type { KjunIconToggleProps, KjunCopyButtonProps, KjunRefreshButtonProps, KjunExternalLinkProps, } from "./actions.cjs";
|
|
22
22
|
export { KjunCarousel } from "./carousel.cjs";
|
|
23
|
+
export { KjunColorPicker, type KjunColorPickerProps, type KjunColorSwatch } from "./color-picker.cjs";
|
|
23
24
|
export type { KjunCarouselProps } from "./carousel.cjs";
|
|
25
|
+
export { KjunSplitPane, type KjunSplitPaneProps } from "./split-pane.cjs";
|
|
26
|
+
export { KjunZoneGauge, type KjunZoneGaugeProps, type KjunGaugeZone } from "./zone-gauge.cjs";
|
|
27
|
+
export { KjunStackedBar, type KjunStackedBarProps, type KjunStackedBarItem } from "./stacked-bar.cjs";
|
|
24
28
|
export { KjunDataState, KjunErrorBoundary } from "./data-state.cjs";
|
|
25
29
|
export type { KjunDataStateProps, KjunErrorBoundaryProps } from "./data-state.cjs";
|
|
26
30
|
export * from "./skeletons.cjs";
|
|
@@ -20,7 +20,11 @@ export * from "./navigation.js";
|
|
|
20
20
|
export { KjunIconToggle, KjunCopyButton, KjunRefreshButton, KjunExternalLink, KjunScrollFade, } from "./actions.js";
|
|
21
21
|
export type { KjunIconToggleProps, KjunCopyButtonProps, KjunRefreshButtonProps, KjunExternalLinkProps, } from "./actions.js";
|
|
22
22
|
export { KjunCarousel } from "./carousel.js";
|
|
23
|
+
export { KjunColorPicker, type KjunColorPickerProps, type KjunColorSwatch } from "./color-picker.js";
|
|
23
24
|
export type { KjunCarouselProps } from "./carousel.js";
|
|
25
|
+
export { KjunSplitPane, type KjunSplitPaneProps } from "./split-pane.js";
|
|
26
|
+
export { KjunZoneGauge, type KjunZoneGaugeProps, type KjunGaugeZone } from "./zone-gauge.js";
|
|
27
|
+
export { KjunStackedBar, type KjunStackedBarProps, type KjunStackedBarItem } from "./stacked-bar.js";
|
|
24
28
|
export { KjunDataState, KjunErrorBoundary } from "./data-state.js";
|
|
25
29
|
export type { KjunDataStateProps, KjunErrorBoundaryProps } from "./data-state.js";
|
|
26
30
|
export * from "./skeletons.js";
|