@kjun-ui/native 0.0.0-stage → 0.3.1
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/README.md +44 -2
- package/dist/LICENSE +21 -0
- package/dist/Tabler-LICENSE +21 -0
- package/dist/index.cjs +9683 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9818 -0
- package/dist/index.web.cjs +9938 -0
- package/dist/index.web.js +10073 -0
- package/dist/styles.css +7695 -0
- package/dist/types/packages/native/src/a11y.d.cts +7 -0
- package/dist/types/packages/native/src/a11y.d.ts +7 -0
- package/dist/types/packages/native/src/actions.d.cts +58 -0
- package/dist/types/packages/native/src/actions.d.ts +58 -0
- package/dist/types/packages/native/src/alert-actions-context.d.cts +1 -0
- package/dist/types/packages/native/src/alert-actions-context.d.ts +1 -0
- package/dist/types/packages/native/src/app-navigation.d.cts +36 -0
- package/dist/types/packages/native/src/app-navigation.d.ts +36 -0
- package/dist/types/packages/native/src/bottom-action-bar-context.d.cts +1 -0
- package/dist/types/packages/native/src/bottom-action-bar-context.d.ts +1 -0
- package/dist/types/packages/native/src/button-group-motion.d.cts +17 -0
- package/dist/types/packages/native/src/button-group-motion.d.ts +17 -0
- package/dist/types/packages/native/src/button.d.cts +25 -0
- package/dist/types/packages/native/src/button.d.ts +25 -0
- package/dist/types/packages/native/src/card-actions-context.d.cts +1 -0
- package/dist/types/packages/native/src/card-actions-context.d.ts +1 -0
- package/dist/types/packages/native/src/card.d.cts +21 -0
- package/dist/types/packages/native/src/card.d.ts +21 -0
- package/dist/types/packages/native/src/chip.d.cts +10 -0
- package/dist/types/packages/native/src/chip.d.ts +10 -0
- package/dist/types/packages/native/src/choice-accessibility.d.cts +4 -0
- package/dist/types/packages/native/src/choice-accessibility.d.ts +4 -0
- package/dist/types/packages/native/src/choice-controls.d.cts +60 -0
- package/dist/types/packages/native/src/choice-controls.d.ts +60 -0
- package/dist/types/packages/native/src/collapse.d.cts +5 -0
- package/dist/types/packages/native/src/collapse.d.ts +5 -0
- package/dist/types/packages/native/src/combobox.d.cts +48 -0
- package/dist/types/packages/native/src/combobox.d.ts +48 -0
- package/dist/types/packages/native/src/compound-control.d.cts +14 -0
- package/dist/types/packages/native/src/compound-control.d.ts +14 -0
- package/dist/types/packages/native/src/controls.d.cts +6 -0
- package/dist/types/packages/native/src/controls.d.ts +6 -0
- package/dist/types/packages/native/src/data-state-context.d.cts +1 -0
- package/dist/types/packages/native/src/data-state-context.d.ts +1 -0
- package/dist/types/packages/native/src/data-state.d.cts +53 -0
- package/dist/types/packages/native/src/data-state.d.ts +53 -0
- package/dist/types/packages/native/src/date-picker.d.cts +14 -0
- package/dist/types/packages/native/src/date-picker.d.ts +14 -0
- package/dist/types/packages/native/src/display-primitives.d.cts +50 -0
- package/dist/types/packages/native/src/display-primitives.d.ts +50 -0
- package/dist/types/packages/native/src/display.d.cts +6 -0
- package/dist/types/packages/native/src/display.d.ts +6 -0
- package/dist/types/packages/native/src/drawer.d.cts +18 -0
- package/dist/types/packages/native/src/drawer.d.ts +18 -0
- package/dist/types/packages/native/src/dropdown.d.cts +39 -0
- package/dist/types/packages/native/src/dropdown.d.ts +39 -0
- package/dist/types/packages/native/src/feedback-context.d.cts +3 -0
- package/dist/types/packages/native/src/feedback-context.d.ts +3 -0
- package/dist/types/packages/native/src/feedback.d.cts +7 -0
- package/dist/types/packages/native/src/feedback.d.ts +7 -0
- package/dist/types/packages/native/src/field-clear.d.cts +8 -0
- package/dist/types/packages/native/src/field-clear.d.ts +8 -0
- package/dist/types/packages/native/src/field-surface.d.cts +86 -0
- package/dist/types/packages/native/src/field-surface.d.ts +86 -0
- package/dist/types/packages/native/src/financial-display.d.cts +87 -0
- package/dist/types/packages/native/src/financial-display.d.ts +87 -0
- package/dist/types/packages/native/src/financial.d.cts +4 -0
- package/dist/types/packages/native/src/financial.d.ts +4 -0
- package/dist/types/packages/native/src/floating-panel.d.cts +31 -0
- package/dist/types/packages/native/src/floating-panel.d.ts +31 -0
- package/dist/types/packages/native/src/form-actions-context.d.cts +3 -0
- package/dist/types/packages/native/src/form-actions-context.d.ts +3 -0
- package/dist/types/packages/native/src/index.d.cts +39 -0
- package/dist/types/packages/native/src/index.d.ts +39 -0
- package/dist/types/packages/native/src/input.d.cts +44 -0
- package/dist/types/packages/native/src/input.d.ts +44 -0
- package/dist/types/packages/native/src/internal.d.cts +7 -0
- package/dist/types/packages/native/src/internal.d.ts +7 -0
- package/dist/types/packages/native/src/kpi-hero.d.cts +35 -0
- package/dist/types/packages/native/src/kpi-hero.d.ts +35 -0
- package/dist/types/packages/native/src/kpi-number-line.d.cts +12 -0
- package/dist/types/packages/native/src/kpi-number-line.d.ts +12 -0
- package/dist/types/packages/native/src/kpi-row.d.cts +32 -0
- package/dist/types/packages/native/src/kpi-row.d.ts +32 -0
- package/dist/types/packages/native/src/kpi.d.cts +4 -0
- package/dist/types/packages/native/src/kpi.d.ts +4 -0
- package/dist/types/packages/native/src/layer-backdrop.d.cts +6 -0
- package/dist/types/packages/native/src/layer-backdrop.d.ts +6 -0
- package/dist/types/packages/native/src/layers.d.cts +8 -0
- package/dist/types/packages/native/src/layers.d.ts +8 -0
- package/dist/types/packages/native/src/list.d.cts +21 -0
- package/dist/types/packages/native/src/list.d.ts +21 -0
- package/dist/types/packages/native/src/market-cards.d.cts +2 -0
- package/dist/types/packages/native/src/market-cards.d.ts +2 -0
- package/dist/types/packages/native/src/market-layout.d.cts +10 -0
- package/dist/types/packages/native/src/market-layout.d.ts +10 -0
- package/dist/types/packages/native/src/market-list.d.cts +2 -0
- package/dist/types/packages/native/src/market-list.d.ts +2 -0
- package/dist/types/packages/native/src/market-model.d.cts +109 -0
- package/dist/types/packages/native/src/market-model.d.ts +109 -0
- package/dist/types/packages/native/src/market-panel.d.cts +5 -0
- package/dist/types/packages/native/src/market-panel.d.ts +5 -0
- package/dist/types/packages/native/src/market-parts.d.cts +10 -0
- package/dist/types/packages/native/src/market-parts.d.ts +10 -0
- package/dist/types/packages/native/src/market-skeleton.d.cts +11 -0
- package/dist/types/packages/native/src/market-skeleton.d.ts +11 -0
- package/dist/types/packages/native/src/market-table.d.cts +2 -0
- package/dist/types/packages/native/src/market-table.d.ts +2 -0
- package/dist/types/packages/native/src/market.d.cts +7 -0
- package/dist/types/packages/native/src/market.d.ts +7 -0
- package/dist/types/packages/native/src/media.d.cts +27 -0
- package/dist/types/packages/native/src/media.d.ts +27 -0
- package/dist/types/packages/native/src/modal-window.d.cts +5 -0
- package/dist/types/packages/native/src/modal-window.d.ts +5 -0
- package/dist/types/packages/native/src/modal.d.cts +46 -0
- package/dist/types/packages/native/src/modal.d.ts +46 -0
- package/dist/types/packages/native/src/motion.d.cts +18 -0
- package/dist/types/packages/native/src/motion.d.ts +18 -0
- package/dist/types/packages/native/src/navigation.d.cts +45 -0
- package/dist/types/packages/native/src/navigation.d.ts +45 -0
- package/dist/types/packages/native/src/number-display.d.cts +49 -0
- package/dist/types/packages/native/src/number-display.d.ts +49 -0
- package/dist/types/packages/native/src/overlay-host.d.cts +9 -0
- package/dist/types/packages/native/src/overlay-host.d.ts +9 -0
- package/dist/types/packages/native/src/popover.d.cts +24 -0
- package/dist/types/packages/native/src/popover.d.ts +24 -0
- package/dist/types/packages/native/src/provider.d.cts +20 -0
- package/dist/types/packages/native/src/provider.d.ts +20 -0
- package/dist/types/packages/native/src/quantity-stepper.d.cts +18 -0
- package/dist/types/packages/native/src/quantity-stepper.d.ts +18 -0
- package/dist/types/packages/native/src/range-input.d.cts +31 -0
- package/dist/types/packages/native/src/range-input.d.ts +31 -0
- package/dist/types/packages/native/src/search-input.d.cts +21 -0
- package/dist/types/packages/native/src/search-input.d.ts +21 -0
- package/dist/types/packages/native/src/select-control.d.cts +30 -0
- package/dist/types/packages/native/src/select-control.d.ts +30 -0
- package/dist/types/packages/native/src/select-options.d.cts +13 -0
- package/dist/types/packages/native/src/select-options.d.ts +13 -0
- package/dist/types/packages/native/src/select.d.cts +10 -0
- package/dist/types/packages/native/src/select.d.ts +10 -0
- package/dist/types/packages/native/src/selection-groups.d.cts +22 -0
- package/dist/types/packages/native/src/selection-groups.d.ts +22 -0
- package/dist/types/packages/native/src/skeleton-base.d.cts +11 -0
- package/dist/types/packages/native/src/skeleton-base.d.ts +11 -0
- package/dist/types/packages/native/src/skeletons.d.cts +28 -0
- package/dist/types/packages/native/src/skeletons.d.ts +28 -0
- package/dist/types/packages/native/src/table-cards.d.cts +2 -0
- package/dist/types/packages/native/src/table-cards.d.ts +2 -0
- package/dist/types/packages/native/src/table-grid.d.cts +2 -0
- package/dist/types/packages/native/src/table-grid.d.ts +2 -0
- package/dist/types/packages/native/src/table-model.d.cts +20 -0
- package/dist/types/packages/native/src/table-model.d.ts +20 -0
- package/dist/types/packages/native/src/table-toolbar.d.cts +2 -0
- package/dist/types/packages/native/src/table-toolbar.d.ts +2 -0
- package/dist/types/packages/native/src/table-view.d.cts +2 -0
- package/dist/types/packages/native/src/table-view.d.ts +2 -0
- package/dist/types/packages/native/src/table.d.cts +3 -0
- package/dist/types/packages/native/src/table.d.ts +3 -0
- package/dist/types/packages/native/src/tabs-accessibility.d.cts +4 -0
- package/dist/types/packages/native/src/tabs-accessibility.d.ts +4 -0
- package/dist/types/packages/native/src/tabs.d.cts +31 -0
- package/dist/types/packages/native/src/tabs.d.ts +31 -0
- package/dist/types/packages/native/src/textarea.d.cts +12 -0
- package/dist/types/packages/native/src/textarea.d.ts +12 -0
- package/dist/types/packages/native/src/time-picker.d.cts +17 -0
- package/dist/types/packages/native/src/time-picker.d.ts +17 -0
- package/dist/types/packages/native/src/toast-reflow.d.cts +3 -0
- package/dist/types/packages/native/src/toast-reflow.d.ts +3 -0
- package/dist/types/packages/native/src/toast-stack.d.cts +6 -0
- package/dist/types/packages/native/src/toast-stack.d.ts +6 -0
- package/dist/types/packages/native/src/toast.d.cts +5 -0
- package/dist/types/packages/native/src/toast.d.ts +5 -0
- package/dist/types/packages/native/src/top-navigation-context.d.cts +5 -0
- package/dist/types/packages/native/src/top-navigation-context.d.ts +5 -0
- package/dist/types/packages/native/src/typography.d.cts +20 -0
- package/dist/types/packages/native/src/typography.d.ts +20 -0
- package/dist/types/shared/package-runtime/action-size.d.cts +5 -0
- package/dist/types/shared/package-runtime/action-size.d.ts +5 -0
- package/dist/types/shared/package-runtime/alert-action-size.d.cts +5 -0
- package/dist/types/shared/package-runtime/alert-action-size.d.ts +5 -0
- package/dist/types/shared/package-runtime/combobox.d.cts +21 -0
- package/dist/types/shared/package-runtime/combobox.d.ts +21 -0
- package/dist/types/shared/package-runtime/component-icons.d.cts +2 -0
- package/dist/types/shared/package-runtime/component-icons.d.ts +2 -0
- package/dist/types/shared/package-runtime/content-presence.d.cts +3 -0
- package/dist/types/shared/package-runtime/content-presence.d.ts +3 -0
- package/dist/types/shared/package-runtime/elevation.d.cts +10 -0
- package/dist/types/shared/package-runtime/elevation.d.ts +10 -0
- package/dist/types/shared/package-runtime/feedback-dialog.d.cts +10 -0
- package/dist/types/shared/package-runtime/feedback-dialog.d.ts +10 -0
- package/dist/types/shared/package-runtime/feedback-motion.d.cts +11 -0
- package/dist/types/shared/package-runtime/feedback-motion.d.ts +11 -0
- package/dist/types/shared/package-runtime/form-actions.d.cts +3 -0
- package/dist/types/shared/package-runtime/form-actions.d.ts +3 -0
- package/dist/types/shared/package-runtime/icon-context.d.cts +14 -0
- package/dist/types/shared/package-runtime/icon-context.d.ts +14 -0
- package/dist/types/shared/package-runtime/icon-registry.d.cts +10 -0
- package/dist/types/shared/package-runtime/icon-registry.d.ts +10 -0
- package/dist/types/shared/package-runtime/layer-keyboard.d.cts +3 -0
- package/dist/types/shared/package-runtime/layer-keyboard.d.ts +3 -0
- package/dist/types/shared/package-runtime/layer-state.d.cts +40 -0
- package/dist/types/shared/package-runtime/layer-state.d.ts +40 -0
- package/dist/types/shared/package-runtime/market-cards.d.cts +44 -0
- package/dist/types/shared/package-runtime/market-cards.d.ts +44 -0
- package/dist/types/shared/package-runtime/market-layout.d.cts +40 -0
- package/dist/types/shared/package-runtime/market-layout.d.ts +40 -0
- package/dist/types/shared/package-runtime/navigation.d.cts +6 -0
- package/dist/types/shared/package-runtime/navigation.d.ts +6 -0
- package/dist/types/shared/package-runtime/number-motion.d.cts +4 -0
- package/dist/types/shared/package-runtime/number-motion.d.ts +4 -0
- package/dist/types/shared/package-runtime/options.d.cts +34 -0
- package/dist/types/shared/package-runtime/options.d.ts +34 -0
- package/dist/types/shared/package-runtime/relative-time.d.cts +1 -0
- package/dist/types/shared/package-runtime/relative-time.d.ts +1 -0
- package/dist/types/shared/package-runtime/search-input.d.cts +20 -0
- package/dist/types/shared/package-runtime/search-input.d.ts +20 -0
- package/dist/types/shared/package-runtime/select.d.cts +10 -0
- package/dist/types/shared/package-runtime/select.d.ts +10 -0
- package/dist/types/shared/package-runtime/table-presentation.d.cts +56 -0
- package/dist/types/shared/package-runtime/table-presentation.d.ts +56 -0
- package/dist/types/shared/package-runtime/table.d.cts +96 -0
- package/dist/types/shared/package-runtime/table.d.ts +96 -0
- package/dist/types/shared/package-runtime/use-layer.d.cts +64 -0
- package/dist/types/shared/package-runtime/use-layer.d.ts +64 -0
- package/dist/types/shared/package-runtime/use-number-motion.d.cts +1 -0
- package/dist/types/shared/package-runtime/use-number-motion.d.ts +1 -0
- package/package.json +62 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PressableProps, type View } from "react-native";
|
|
2
|
+
export declare function focusVisible(target: unknown): boolean;
|
|
3
|
+
export declare const AccessiblePressable: import("react").ForwardRefExoticComponent<PressableProps & {
|
|
4
|
+
focusRingInset?: boolean;
|
|
5
|
+
focusRing?: boolean;
|
|
6
|
+
focusRingRadius?: number;
|
|
7
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PressableProps, type View } from "react-native";
|
|
2
|
+
export declare function focusVisible(target: unknown): boolean;
|
|
3
|
+
export declare const AccessiblePressable: import("react").ForwardRefExoticComponent<PressableProps & {
|
|
4
|
+
focusRingInset?: boolean;
|
|
5
|
+
focusRing?: boolean;
|
|
6
|
+
focusRingRadius?: number;
|
|
7
|
+
} & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ButtonSize } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type ColorValue } from "react-native";
|
|
4
|
+
import { type DsButtonProps } from "./button.cjs";
|
|
5
|
+
import { type DsTooltipProps } from "./popover.cjs";
|
|
6
|
+
export interface DsIconToggleProps {
|
|
7
|
+
active?: boolean;
|
|
8
|
+
activeIcon: string;
|
|
9
|
+
inactiveIcon?: string;
|
|
10
|
+
activeColor?: ColorValue;
|
|
11
|
+
inactiveColor?: ColorValue;
|
|
12
|
+
size?: ButtonSize;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
ariaLabel: string;
|
|
16
|
+
/** Defaults to ariaLabel, like RefreshButton; an empty string disables the hint. */
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
tooltipPlacement?: DsTooltipProps["placement"];
|
|
19
|
+
tooltipDelay?: number;
|
|
20
|
+
onToggle?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function DsIconToggle({ active, activeIcon, inactiveIcon, activeColor, inactiveColor, size, disabled, loading, ariaLabel, tooltip, tooltipPlacement, tooltipDelay, onToggle, }: DsIconToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export interface DsCopyButtonProps {
|
|
24
|
+
value: string;
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
text?: string;
|
|
27
|
+
successText?: string;
|
|
28
|
+
inline?: boolean;
|
|
29
|
+
size?: "xs" | "sm" | "md";
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
copyText: (value: string) => void | Promise<void>;
|
|
32
|
+
onCopied?: (value: string) => void;
|
|
33
|
+
onCopyError?: (error: unknown) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function DsCopyButton({ value, ariaLabel, text, successText, inline, size, disabled, copyText, onCopied, onCopyError, }: DsCopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export interface DsRefreshButtonProps extends Omit<DsButtonProps, "onPress" | "children"> {
|
|
37
|
+
targetName?: string;
|
|
38
|
+
mode?: "icon" | "text";
|
|
39
|
+
text?: string;
|
|
40
|
+
/** Defaults to the icon button's accessible label; an empty string disables it. */
|
|
41
|
+
tooltip?: string;
|
|
42
|
+
tooltipPlacement?: DsTooltipProps["placement"];
|
|
43
|
+
tooltipDelay?: number;
|
|
44
|
+
onRefresh?: () => void;
|
|
45
|
+
}
|
|
46
|
+
export declare function DsRefreshButton({ targetName, mode, text, size, variant, ariaLabel, tooltip, tooltipPlacement, tooltipDelay, spinOnLoading, onRefresh, ...props }: DsRefreshButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function safeExternalUrl(href: string): string;
|
|
48
|
+
export interface DsExternalLinkProps {
|
|
49
|
+
href?: string;
|
|
50
|
+
mode?: "icon" | "text";
|
|
51
|
+
label?: string;
|
|
52
|
+
children?: ReactNode;
|
|
53
|
+
openUrl: (url: string) => void | Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
export declare function DsExternalLink({ href, mode, label, children, openUrl, }: DsExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare function DsScrollFade({ children }: {
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ButtonSize } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type ColorValue } from "react-native";
|
|
4
|
+
import { type DsButtonProps } from "./button.js";
|
|
5
|
+
import { type DsTooltipProps } from "./popover.js";
|
|
6
|
+
export interface DsIconToggleProps {
|
|
7
|
+
active?: boolean;
|
|
8
|
+
activeIcon: string;
|
|
9
|
+
inactiveIcon?: string;
|
|
10
|
+
activeColor?: ColorValue;
|
|
11
|
+
inactiveColor?: ColorValue;
|
|
12
|
+
size?: ButtonSize;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
ariaLabel: string;
|
|
16
|
+
/** Defaults to ariaLabel, like RefreshButton; an empty string disables the hint. */
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
tooltipPlacement?: DsTooltipProps["placement"];
|
|
19
|
+
tooltipDelay?: number;
|
|
20
|
+
onToggle?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function DsIconToggle({ active, activeIcon, inactiveIcon, activeColor, inactiveColor, size, disabled, loading, ariaLabel, tooltip, tooltipPlacement, tooltipDelay, onToggle, }: DsIconToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export interface DsCopyButtonProps {
|
|
24
|
+
value: string;
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
text?: string;
|
|
27
|
+
successText?: string;
|
|
28
|
+
inline?: boolean;
|
|
29
|
+
size?: "xs" | "sm" | "md";
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
copyText: (value: string) => void | Promise<void>;
|
|
32
|
+
onCopied?: (value: string) => void;
|
|
33
|
+
onCopyError?: (error: unknown) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function DsCopyButton({ value, ariaLabel, text, successText, inline, size, disabled, copyText, onCopied, onCopyError, }: DsCopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export interface DsRefreshButtonProps extends Omit<DsButtonProps, "onPress" | "children"> {
|
|
37
|
+
targetName?: string;
|
|
38
|
+
mode?: "icon" | "text";
|
|
39
|
+
text?: string;
|
|
40
|
+
/** Defaults to the icon button's accessible label; an empty string disables it. */
|
|
41
|
+
tooltip?: string;
|
|
42
|
+
tooltipPlacement?: DsTooltipProps["placement"];
|
|
43
|
+
tooltipDelay?: number;
|
|
44
|
+
onRefresh?: () => void;
|
|
45
|
+
}
|
|
46
|
+
export declare function DsRefreshButton({ targetName, mode, text, size, variant, ariaLabel, tooltip, tooltipPlacement, tooltipDelay, spinOnLoading, onRefresh, ...props }: DsRefreshButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function safeExternalUrl(href: string): string;
|
|
48
|
+
export interface DsExternalLinkProps {
|
|
49
|
+
href?: string;
|
|
50
|
+
mode?: "icon" | "text";
|
|
51
|
+
label?: string;
|
|
52
|
+
children?: ReactNode;
|
|
53
|
+
openUrl: (url: string) => void | Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
export declare function DsExternalLink({ href, mode, label, children, openUrl, }: DsExternalLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare function DsScrollFade({ children }: {
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AlertActionsContext: import("react").Context<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AlertActionsContext: import("react").Context<boolean>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type GestureResponderEvent } from "react-native";
|
|
3
|
+
export interface DsTopNavigationProps {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
leading?: ReactNode;
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
safeAreaTop?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function DsTopNavigation({ title, description, leading, actions, safeAreaTop }: DsTopNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface NavigationDestination {
|
|
12
|
+
key: string;
|
|
13
|
+
label: string;
|
|
14
|
+
href?: string;
|
|
15
|
+
icon?: string;
|
|
16
|
+
badge?: string | number;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface DsBottomNavigationProps {
|
|
20
|
+
items: NavigationDestination[];
|
|
21
|
+
value: string;
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
safeAreaBottom?: number;
|
|
24
|
+
keyboardVisible?: boolean;
|
|
25
|
+
hideOnKeyboard?: boolean;
|
|
26
|
+
onNavigate?: (key: string, event: GestureResponderEvent) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function DsBottomNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate }: DsBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
export interface DsBottomActionBarProps {
|
|
30
|
+
description?: string;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
safeAreaBottom?: number;
|
|
33
|
+
keyboardVisible?: boolean;
|
|
34
|
+
hideOnKeyboard?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function DsBottomActionBar({ description, children, safeAreaBottom, keyboardVisible, hideOnKeyboard }: DsBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type GestureResponderEvent } from "react-native";
|
|
3
|
+
export interface DsTopNavigationProps {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
leading?: ReactNode;
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
safeAreaTop?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function DsTopNavigation({ title, description, leading, actions, safeAreaTop }: DsTopNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface NavigationDestination {
|
|
12
|
+
key: string;
|
|
13
|
+
label: string;
|
|
14
|
+
href?: string;
|
|
15
|
+
icon?: string;
|
|
16
|
+
badge?: string | number;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface DsBottomNavigationProps {
|
|
20
|
+
items: NavigationDestination[];
|
|
21
|
+
value: string;
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
safeAreaBottom?: number;
|
|
24
|
+
keyboardVisible?: boolean;
|
|
25
|
+
hideOnKeyboard?: boolean;
|
|
26
|
+
onNavigate?: (key: string, event: GestureResponderEvent) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function DsBottomNavigation({ items, value, ariaLabel, safeAreaBottom, keyboardVisible, hideOnKeyboard, onNavigate }: DsBottomNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
export interface DsBottomActionBarProps {
|
|
30
|
+
description?: string;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
safeAreaBottom?: number;
|
|
33
|
+
keyboardVisible?: boolean;
|
|
34
|
+
hideOnKeyboard?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function DsBottomActionBar({ description, children, safeAreaBottom, keyboardVisible, hideOnKeyboard }: DsBottomActionBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BottomActionBarContext: import("react").Context<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BottomActionBarContext: import("react").Context<boolean>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Animated, type LayoutChangeEvent, type LayoutRectangle } from "react-native";
|
|
2
|
+
import { type ButtonSize } from "@kjun-ui/tokens";
|
|
3
|
+
import type { ChoiceOption, ChoiceValue } from "./choice-controls.cjs";
|
|
4
|
+
export declare function useButtonGroupMotion(selected: ChoiceOption | undefined): {
|
|
5
|
+
x: Animated.Value;
|
|
6
|
+
width: Animated.Value;
|
|
7
|
+
layout: LayoutRectangle | undefined;
|
|
8
|
+
measure: (value: ChoiceValue, event: LayoutChangeEvent) => void;
|
|
9
|
+
updateLayout: (value: ChoiceValue, box: LayoutRectangle) => void;
|
|
10
|
+
reduced: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function ButtonGroupLabel({ label, active, size, reduced }: {
|
|
13
|
+
label: string;
|
|
14
|
+
active: boolean;
|
|
15
|
+
size: ButtonSize;
|
|
16
|
+
reduced: boolean;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Animated, type LayoutChangeEvent, type LayoutRectangle } from "react-native";
|
|
2
|
+
import { type ButtonSize } from "@kjun-ui/tokens";
|
|
3
|
+
import type { ChoiceOption, ChoiceValue } from "./choice-controls.js";
|
|
4
|
+
export declare function useButtonGroupMotion(selected: ChoiceOption | undefined): {
|
|
5
|
+
x: Animated.Value;
|
|
6
|
+
width: Animated.Value;
|
|
7
|
+
layout: LayoutRectangle | undefined;
|
|
8
|
+
measure: (value: ChoiceValue, event: LayoutChangeEvent) => void;
|
|
9
|
+
updateLayout: (value: ChoiceValue, box: LayoutRectangle) => void;
|
|
10
|
+
reduced: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function ButtonGroupLabel({ label, active, size, reduced }: {
|
|
13
|
+
label: string;
|
|
14
|
+
active: boolean;
|
|
15
|
+
size: ButtonSize;
|
|
16
|
+
reduced: boolean;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ButtonSize, type ButtonVariant } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type ColorValue, type PressableProps, type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
export declare function DsIcon({ name, size, color, spin, filled, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
color?: ColorValue;
|
|
8
|
+
spin?: boolean;
|
|
9
|
+
filled?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface DsButtonProps extends Omit<PressableProps, "children" | "style"> {
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
variant?: ButtonVariant;
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
block?: boolean;
|
|
17
|
+
prefixIcon?: string;
|
|
18
|
+
suffixIcon?: string;
|
|
19
|
+
prefixIconFilled?: boolean;
|
|
20
|
+
suffixIconFilled?: boolean;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
spinOnLoading?: boolean;
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
}
|
|
25
|
+
export declare function DsButton(input: DsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ButtonSize, type ButtonVariant } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type ColorValue, type PressableProps, type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
export declare function DsIcon({ name, size, color, spin, filled, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
color?: ColorValue;
|
|
8
|
+
spin?: boolean;
|
|
9
|
+
filled?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface DsButtonProps extends Omit<PressableProps, "children" | "style"> {
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
variant?: ButtonVariant;
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
block?: boolean;
|
|
17
|
+
prefixIcon?: string;
|
|
18
|
+
suffixIcon?: string;
|
|
19
|
+
prefixIconFilled?: boolean;
|
|
20
|
+
suffixIconFilled?: boolean;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
spinOnLoading?: boolean;
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
}
|
|
25
|
+
export declare function DsButton(input: DsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CardActionsContext: import("react").Context<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CardActionsContext: import("react").Context<boolean>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type CardElevation, type CardPadding, type CardRadius, type CardSurface } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
export interface DsCardProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
header?: ReactNode;
|
|
8
|
+
headerActions?: ReactNode;
|
|
9
|
+
media?: ReactNode;
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
padding?: CardPadding;
|
|
12
|
+
bodyPadding?: CardPadding;
|
|
13
|
+
radius?: CardRadius;
|
|
14
|
+
surface?: CardSurface;
|
|
15
|
+
elevation?: CardElevation;
|
|
16
|
+
border?: boolean;
|
|
17
|
+
dividers?: boolean;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
}
|
|
21
|
+
export declare function DsCard({ title, subtitle, header, headerActions, media, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, children, style, }: DsCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type CardElevation, type CardPadding, type CardRadius, type CardSurface } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
export interface DsCardProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
header?: ReactNode;
|
|
8
|
+
headerActions?: ReactNode;
|
|
9
|
+
media?: ReactNode;
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
padding?: CardPadding;
|
|
12
|
+
bodyPadding?: CardPadding;
|
|
13
|
+
radius?: CardRadius;
|
|
14
|
+
surface?: CardSurface;
|
|
15
|
+
elevation?: CardElevation;
|
|
16
|
+
border?: boolean;
|
|
17
|
+
dividers?: boolean;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
}
|
|
21
|
+
export declare function DsCard({ title, subtitle, header, headerActions, media, footer, padding, bodyPadding, radius, surface, elevation, border, dividers, children, style, }: DsCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DsChipProps {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
removable?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
removeLabel?: string;
|
|
8
|
+
onRemove?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function DsChip({ label, icon, removable, disabled, size, removeLabel, onRemove }: DsChipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DsChipProps {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
removable?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
removeLabel?: string;
|
|
8
|
+
onRemove?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function DsChip({ label, icon, removable, disabled, size, removeLabel, onRemove }: DsChipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import type { View } from "react-native";
|
|
3
|
+
export declare function useChoiceSpace(_root: RefObject<View | null>, _role?: string, _disabled?: boolean): void;
|
|
4
|
+
export declare function useRadioKeyboard(_root: RefObject<View | null>): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import type { View } from "react-native";
|
|
3
|
+
export declare function useChoiceSpace(_root: RefObject<View | null>, _role?: string, _disabled?: boolean): void;
|
|
4
|
+
export declare function useRadioKeyboard(_root: RefObject<View | null>): void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type ColorValue } from "react-native";
|
|
4
|
+
export type ChoiceValue = string | number | boolean | null;
|
|
5
|
+
export interface ChoiceOption<T = ChoiceValue> {
|
|
6
|
+
value: T;
|
|
7
|
+
label: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: string;
|
|
10
|
+
dot?: ColorValue;
|
|
11
|
+
}
|
|
12
|
+
export interface DsCheckboxProps<T = ChoiceValue> {
|
|
13
|
+
value: boolean | T[];
|
|
14
|
+
val?: T;
|
|
15
|
+
label?: string;
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
size?: InputSize;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
onValueChange?: (value: boolean | T[]) => void;
|
|
21
|
+
onChange?: (value: boolean | T[]) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function DsCheckbox<T = ChoiceValue>({ value, val, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: DsCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface DsSwitchProps {
|
|
25
|
+
value: boolean;
|
|
26
|
+
label?: string;
|
|
27
|
+
ariaLabel?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
size?: InputSize;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
onValueChange?: (value: boolean) => void;
|
|
32
|
+
onChange?: (value: boolean) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function DsSwitch({ value, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: DsSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const RadioContext: import("react").Context<{
|
|
36
|
+
value: ChoiceValue;
|
|
37
|
+
change: (v: ChoiceValue) => void;
|
|
38
|
+
} | null>;
|
|
39
|
+
export interface DsRadioProps {
|
|
40
|
+
value?: ChoiceValue;
|
|
41
|
+
val: ChoiceValue;
|
|
42
|
+
label?: string;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
name?: string;
|
|
45
|
+
ariaLabel?: string;
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
onValueChange?: (value: ChoiceValue) => void;
|
|
48
|
+
onChange?: (value: ChoiceValue) => void;
|
|
49
|
+
}
|
|
50
|
+
export declare function DsRadio({ value, val, label, disabled, ariaLabel, children, onValueChange, onChange, }: DsRadioProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export interface DsRadioGroupProps {
|
|
52
|
+
value: ChoiceValue;
|
|
53
|
+
options?: ChoiceOption[];
|
|
54
|
+
direction?: "horizontal" | "vertical";
|
|
55
|
+
ariaLabel?: string;
|
|
56
|
+
children?: ReactNode;
|
|
57
|
+
onValueChange?: (value: ChoiceValue) => void;
|
|
58
|
+
onChange?: (value: ChoiceValue) => void;
|
|
59
|
+
}
|
|
60
|
+
export declare function DsRadioGroup({ value, options, direction, ariaLabel, children, onValueChange, onChange, }: DsRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type ColorValue } from "react-native";
|
|
4
|
+
export type ChoiceValue = string | number | boolean | null;
|
|
5
|
+
export interface ChoiceOption<T = ChoiceValue> {
|
|
6
|
+
value: T;
|
|
7
|
+
label: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: string;
|
|
10
|
+
dot?: ColorValue;
|
|
11
|
+
}
|
|
12
|
+
export interface DsCheckboxProps<T = ChoiceValue> {
|
|
13
|
+
value: boolean | T[];
|
|
14
|
+
val?: T;
|
|
15
|
+
label?: string;
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
size?: InputSize;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
onValueChange?: (value: boolean | T[]) => void;
|
|
21
|
+
onChange?: (value: boolean | T[]) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function DsCheckbox<T = ChoiceValue>({ value, val, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: DsCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface DsSwitchProps {
|
|
25
|
+
value: boolean;
|
|
26
|
+
label?: string;
|
|
27
|
+
ariaLabel?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
size?: InputSize;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
onValueChange?: (value: boolean) => void;
|
|
32
|
+
onChange?: (value: boolean) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function DsSwitch({ value, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: DsSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const RadioContext: import("react").Context<{
|
|
36
|
+
value: ChoiceValue;
|
|
37
|
+
change: (v: ChoiceValue) => void;
|
|
38
|
+
} | null>;
|
|
39
|
+
export interface DsRadioProps {
|
|
40
|
+
value?: ChoiceValue;
|
|
41
|
+
val: ChoiceValue;
|
|
42
|
+
label?: string;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
name?: string;
|
|
45
|
+
ariaLabel?: string;
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
onValueChange?: (value: ChoiceValue) => void;
|
|
48
|
+
onChange?: (value: ChoiceValue) => void;
|
|
49
|
+
}
|
|
50
|
+
export declare function DsRadio({ value, val, label, disabled, ariaLabel, children, onValueChange, onChange, }: DsRadioProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export interface DsRadioGroupProps {
|
|
52
|
+
value: ChoiceValue;
|
|
53
|
+
options?: ChoiceOption[];
|
|
54
|
+
direction?: "horizontal" | "vertical";
|
|
55
|
+
ariaLabel?: string;
|
|
56
|
+
children?: ReactNode;
|
|
57
|
+
onValueChange?: (value: ChoiceValue) => void;
|
|
58
|
+
onChange?: (value: ChoiceValue) => void;
|
|
59
|
+
}
|
|
60
|
+
export declare function DsRadioGroup({ value, options, direction, ariaLabel, children, onValueChange, onChange, }: DsRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { OptionValue, SelectOption } from "./select-options.cjs";
|
|
4
|
+
export interface DsComboboxProps<T extends SelectOption = SelectOption> {
|
|
5
|
+
value: OptionValue | null;
|
|
6
|
+
options?: T[];
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
labelKey?: string;
|
|
10
|
+
valueKey?: string;
|
|
11
|
+
filterFn?: (option: T, query: string) => boolean;
|
|
12
|
+
size?: InputSize;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
error?: boolean;
|
|
15
|
+
clearable?: boolean;
|
|
16
|
+
emptyText?: string;
|
|
17
|
+
renderOption?: (option: T) => ReactNode;
|
|
18
|
+
onValueChange?: (v: OptionValue | null) => void;
|
|
19
|
+
onChange?: (v: OptionValue | null) => void;
|
|
20
|
+
onSearch?: (v: string) => void;
|
|
21
|
+
onClear?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function DsCombobox<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, valueKey, filterFn, size, disabled, error, clearable, emptyText, renderOption, onValueChange, onChange, onSearch, onClear, }: DsComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface SearchFieldProps<T extends SelectOption> {
|
|
25
|
+
value: string;
|
|
26
|
+
size: InputSize;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
ariaLabel?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
error?: boolean;
|
|
31
|
+
clearable?: boolean;
|
|
32
|
+
open: boolean;
|
|
33
|
+
onOpenChange: (v: boolean) => void;
|
|
34
|
+
options: T[];
|
|
35
|
+
labelKey: string;
|
|
36
|
+
itemKey: string;
|
|
37
|
+
emptyText: string;
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
/** A failed request; shown instead of the empty text so the two never look alike. */
|
|
40
|
+
failed?: boolean;
|
|
41
|
+
errorText?: string;
|
|
42
|
+
renderOption?: (o: T) => ReactNode;
|
|
43
|
+
onValueChange: (v: string) => void;
|
|
44
|
+
onSelect: (o: T) => void;
|
|
45
|
+
onClear?: () => void;
|
|
46
|
+
onEnter?: () => void;
|
|
47
|
+
}
|
|
48
|
+
export declare function SearchField<T extends SelectOption>({ value, size, placeholder, ariaLabel, disabled, error, clearable, open, onOpenChange, options, labelKey, itemKey, emptyText, loading, failed, errorText, renderOption, onValueChange, onSelect, onClear, onEnter, }: SearchFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { OptionValue, SelectOption } from "./select-options.js";
|
|
4
|
+
export interface DsComboboxProps<T extends SelectOption = SelectOption> {
|
|
5
|
+
value: OptionValue | null;
|
|
6
|
+
options?: T[];
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
labelKey?: string;
|
|
10
|
+
valueKey?: string;
|
|
11
|
+
filterFn?: (option: T, query: string) => boolean;
|
|
12
|
+
size?: InputSize;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
error?: boolean;
|
|
15
|
+
clearable?: boolean;
|
|
16
|
+
emptyText?: string;
|
|
17
|
+
renderOption?: (option: T) => ReactNode;
|
|
18
|
+
onValueChange?: (v: OptionValue | null) => void;
|
|
19
|
+
onChange?: (v: OptionValue | null) => void;
|
|
20
|
+
onSearch?: (v: string) => void;
|
|
21
|
+
onClear?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function DsCombobox<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, valueKey, filterFn, size, disabled, error, clearable, emptyText, renderOption, onValueChange, onChange, onSearch, onClear, }: DsComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface SearchFieldProps<T extends SelectOption> {
|
|
25
|
+
value: string;
|
|
26
|
+
size: InputSize;
|
|
27
|
+
placeholder: string;
|
|
28
|
+
ariaLabel?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
error?: boolean;
|
|
31
|
+
clearable?: boolean;
|
|
32
|
+
open: boolean;
|
|
33
|
+
onOpenChange: (v: boolean) => void;
|
|
34
|
+
options: T[];
|
|
35
|
+
labelKey: string;
|
|
36
|
+
itemKey: string;
|
|
37
|
+
emptyText: string;
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
/** A failed request; shown instead of the empty text so the two never look alike. */
|
|
40
|
+
failed?: boolean;
|
|
41
|
+
errorText?: string;
|
|
42
|
+
renderOption?: (o: T) => ReactNode;
|
|
43
|
+
onValueChange: (v: string) => void;
|
|
44
|
+
onSelect: (o: T) => void;
|
|
45
|
+
onClear?: () => void;
|
|
46
|
+
onEnter?: () => void;
|
|
47
|
+
}
|
|
48
|
+
export declare function SearchField<T extends SelectOption>({ value, size, placeholder, ariaLabel, disabled, error, clearable, open, onOpenChange, options, labelKey, itemKey, emptyText, loading, failed, errorText, renderOption, onValueChange, onSelect, onClear, onEnter, }: SearchFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
4
|
+
export declare const CompoundControlContext: import("react").Context<{
|
|
5
|
+
size: InputSize;
|
|
6
|
+
focusRef?: RefObject<View | null>;
|
|
7
|
+
onFocusChange?: (focused: boolean) => void;
|
|
8
|
+
/** First time segment: its value starts on the field text line. */
|
|
9
|
+
leading?: boolean;
|
|
10
|
+
} | null>;
|
|
11
|
+
export declare function CompoundTarget({ children, square }: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
square?: boolean;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|