@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,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;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DsCheckbox, DsRadio, DsRadioGroup, DsSwitch } from "./choice-controls.cjs";
|
|
2
|
+
export type { ChoiceOption, ChoiceValue, DsCheckboxProps, DsRadioGroupProps, DsRadioProps, DsSwitchProps } from "./choice-controls.cjs";
|
|
3
|
+
export { DsButtonGroup, DsFilterGroup } from "./selection-groups.cjs";
|
|
4
|
+
export type { DsButtonGroupProps, DsFilterGroupProps } from "./selection-groups.cjs";
|
|
5
|
+
export { DsTextarea } from "./textarea.cjs";
|
|
6
|
+
export type { DsTextareaProps } from "./textarea.cjs";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DsCheckbox, DsRadio, DsRadioGroup, DsSwitch } from "./choice-controls.js";
|
|
2
|
+
export type { ChoiceOption, ChoiceValue, DsCheckboxProps, DsRadioGroupProps, DsRadioProps, DsSwitchProps } from "./choice-controls.js";
|
|
3
|
+
export { DsButtonGroup, DsFilterGroup } from "./selection-groups.js";
|
|
4
|
+
export type { DsButtonGroupProps, DsFilterGroupProps } from "./selection-groups.js";
|
|
5
|
+
export { DsTextarea } from "./textarea.js";
|
|
6
|
+
export type { DsTextareaProps } from "./textarea.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DataStateContentContext: import("react").Context<"empty" | "message" | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DataStateContentContext: import("react").Context<"empty" | "message" | null>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type QueryDisplayProps } from "@kjun-ui/tokens";
|
|
2
|
+
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
3
|
+
import { type DsSkeletonProps } from "./display.cjs";
|
|
4
|
+
export declare function useQueryDisplay(props: QueryDisplayProps): {
|
|
5
|
+
usesQueryState: boolean;
|
|
6
|
+
hasCurrentResult: boolean;
|
|
7
|
+
hasQueryResult: boolean;
|
|
8
|
+
initialLoading: boolean;
|
|
9
|
+
queryRefreshing: boolean;
|
|
10
|
+
};
|
|
11
|
+
export interface DsDataStateProps extends QueryDisplayProps {
|
|
12
|
+
preserveContent?: boolean;
|
|
13
|
+
refreshing?: boolean;
|
|
14
|
+
refreshError?: string | null;
|
|
15
|
+
refreshingText?: string;
|
|
16
|
+
loadingPadding?: "default" | "none";
|
|
17
|
+
empty?: boolean;
|
|
18
|
+
emptyText?: string;
|
|
19
|
+
emptyIcon?: string;
|
|
20
|
+
emptyActionText?: string;
|
|
21
|
+
loadingText?: string;
|
|
22
|
+
retryText?: string;
|
|
23
|
+
size?: "sm" | "md" | "lg";
|
|
24
|
+
skeleton?: boolean;
|
|
25
|
+
skeletonType?: DsSkeletonProps["type"];
|
|
26
|
+
skeletonCount?: number;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
loadingContent?: ReactNode;
|
|
29
|
+
emptyContent?: ReactNode;
|
|
30
|
+
errorContent?: ReactNode;
|
|
31
|
+
onRetry?: () => void;
|
|
32
|
+
onEmptyAction?: () => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function DsDataState({ preserveContent, refreshing, refreshError, refreshingText, loadingPadding, empty, emptyText, emptyIcon, emptyActionText, loadingText, retryText, size, skeleton, skeletonType, skeletonCount, children, loadingContent, emptyContent, errorContent, onRetry, onEmptyAction, ...query }: DsDataStateProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface DsErrorBoundaryProps {
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
fallbackMessage?: string;
|
|
38
|
+
fallback?: ReactNode;
|
|
39
|
+
onError?: (error: Error, info: ErrorInfo) => void;
|
|
40
|
+
onReset?: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare class DsErrorBoundary extends Component<DsErrorBoundaryProps, {
|
|
43
|
+
error: boolean;
|
|
44
|
+
}> {
|
|
45
|
+
state: {
|
|
46
|
+
error: boolean;
|
|
47
|
+
};
|
|
48
|
+
static getDerivedStateFromError(): {
|
|
49
|
+
error: boolean;
|
|
50
|
+
};
|
|
51
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
52
|
+
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;
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type QueryDisplayProps } from "@kjun-ui/tokens";
|
|
2
|
+
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
3
|
+
import { type DsSkeletonProps } from "./display.js";
|
|
4
|
+
export declare function useQueryDisplay(props: QueryDisplayProps): {
|
|
5
|
+
usesQueryState: boolean;
|
|
6
|
+
hasCurrentResult: boolean;
|
|
7
|
+
hasQueryResult: boolean;
|
|
8
|
+
initialLoading: boolean;
|
|
9
|
+
queryRefreshing: boolean;
|
|
10
|
+
};
|
|
11
|
+
export interface DsDataStateProps extends QueryDisplayProps {
|
|
12
|
+
preserveContent?: boolean;
|
|
13
|
+
refreshing?: boolean;
|
|
14
|
+
refreshError?: string | null;
|
|
15
|
+
refreshingText?: string;
|
|
16
|
+
loadingPadding?: "default" | "none";
|
|
17
|
+
empty?: boolean;
|
|
18
|
+
emptyText?: string;
|
|
19
|
+
emptyIcon?: string;
|
|
20
|
+
emptyActionText?: string;
|
|
21
|
+
loadingText?: string;
|
|
22
|
+
retryText?: string;
|
|
23
|
+
size?: "sm" | "md" | "lg";
|
|
24
|
+
skeleton?: boolean;
|
|
25
|
+
skeletonType?: DsSkeletonProps["type"];
|
|
26
|
+
skeletonCount?: number;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
loadingContent?: ReactNode;
|
|
29
|
+
emptyContent?: ReactNode;
|
|
30
|
+
errorContent?: ReactNode;
|
|
31
|
+
onRetry?: () => void;
|
|
32
|
+
onEmptyAction?: () => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function DsDataState({ preserveContent, refreshing, refreshError, refreshingText, loadingPadding, empty, emptyText, emptyIcon, emptyActionText, loadingText, retryText, size, skeleton, skeletonType, skeletonCount, children, loadingContent, emptyContent, errorContent, onRetry, onEmptyAction, ...query }: DsDataStateProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface DsErrorBoundaryProps {
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
fallbackMessage?: string;
|
|
38
|
+
fallback?: ReactNode;
|
|
39
|
+
onError?: (error: Error, info: ErrorInfo) => void;
|
|
40
|
+
onReset?: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare class DsErrorBoundary extends Component<DsErrorBoundaryProps, {
|
|
43
|
+
error: boolean;
|
|
44
|
+
}> {
|
|
45
|
+
state: {
|
|
46
|
+
error: boolean;
|
|
47
|
+
};
|
|
48
|
+
static getDerivedStateFromError(): {
|
|
49
|
+
error: boolean;
|
|
50
|
+
};
|
|
51
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
52
|
+
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;
|
|
53
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
export interface DsDatePickerProps {
|
|
3
|
+
value: string;
|
|
4
|
+
min?: string;
|
|
5
|
+
max?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
size?: InputSize;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
onValueChange?: (v: string) => void;
|
|
12
|
+
onChange?: (v: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function DsDatePicker({ value, min, max, placeholder, size, disabled, ariaLabel, error, onValueChange, onChange, }: DsDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
export interface DsDatePickerProps {
|
|
3
|
+
value: string;
|
|
4
|
+
min?: string;
|
|
5
|
+
max?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
size?: InputSize;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
onValueChange?: (v: string) => void;
|
|
12
|
+
onChange?: (v: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function DsDatePicker({ value, min, max, placeholder, size, disabled, ariaLabel, error, onValueChange, onChange, }: DsDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export type DisplaySize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export type SemanticTone = "primary" | "success" | "warning" | "danger" | "info";
|
|
5
|
+
export interface DsBadgeProps {
|
|
6
|
+
variant?: "default" | "secondary" | SemanticTone | "price-up" | "price-down";
|
|
7
|
+
size?: DisplaySize;
|
|
8
|
+
dot?: boolean;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
}
|
|
12
|
+
export declare function DsBadge(props: DsBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/** Internal composition keeps KPI dots on their own shared geometry role. */
|
|
14
|
+
export declare function BadgeView({ variant, size, dot, children, style, dotSize, }: DsBadgeProps & {
|
|
15
|
+
dotSize?: number;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface DsEmptyProps {
|
|
18
|
+
text?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
icon?: string;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function DsEmpty({ text, description, icon, children, }: DsEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface DsSpinnerProps {
|
|
25
|
+
size?: DisplaySize;
|
|
26
|
+
text?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function DsSpinner({ size, text }: DsSpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export interface DsAlertProps {
|
|
30
|
+
type?: "info" | "success" | "warning" | "danger" | "error";
|
|
31
|
+
variant?: SemanticTone;
|
|
32
|
+
size?: "sm" | "md" | "lg";
|
|
33
|
+
title?: ReactNode;
|
|
34
|
+
closable?: boolean;
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
/** Buttons placed under the message; unsized DsButtons follow the alert size. */
|
|
37
|
+
actions?: ReactNode;
|
|
38
|
+
onClose?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare function DsAlert({ type, variant, size, title, closable, children, actions, onClose, }: DsAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
41
|
+
export interface DsProgressProps {
|
|
42
|
+
value?: number;
|
|
43
|
+
max?: number;
|
|
44
|
+
size?: "sm" | "md" | "lg";
|
|
45
|
+
variant?: SemanticTone;
|
|
46
|
+
showLabel?: boolean;
|
|
47
|
+
label?: ReactNode;
|
|
48
|
+
subLabel?: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
export declare function DsProgress({ value, max, size, variant, showLabel, label, subLabel, }: DsProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export type DisplaySize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export type SemanticTone = "primary" | "success" | "warning" | "danger" | "info";
|
|
5
|
+
export interface DsBadgeProps {
|
|
6
|
+
variant?: "default" | "secondary" | SemanticTone | "price-up" | "price-down";
|
|
7
|
+
size?: DisplaySize;
|
|
8
|
+
dot?: boolean;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
}
|
|
12
|
+
export declare function DsBadge(props: DsBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/** Internal composition keeps KPI dots on their own shared geometry role. */
|
|
14
|
+
export declare function BadgeView({ variant, size, dot, children, style, dotSize, }: DsBadgeProps & {
|
|
15
|
+
dotSize?: number;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface DsEmptyProps {
|
|
18
|
+
text?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
icon?: string;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function DsEmpty({ text, description, icon, children, }: DsEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface DsSpinnerProps {
|
|
25
|
+
size?: DisplaySize;
|
|
26
|
+
text?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function DsSpinner({ size, text }: DsSpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export interface DsAlertProps {
|
|
30
|
+
type?: "info" | "success" | "warning" | "danger" | "error";
|
|
31
|
+
variant?: SemanticTone;
|
|
32
|
+
size?: "sm" | "md" | "lg";
|
|
33
|
+
title?: ReactNode;
|
|
34
|
+
closable?: boolean;
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
/** Buttons placed under the message; unsized DsButtons follow the alert size. */
|
|
37
|
+
actions?: ReactNode;
|
|
38
|
+
onClose?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare function DsAlert({ type, variant, size, title, closable, children, actions, onClose, }: DsAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
41
|
+
export interface DsProgressProps {
|
|
42
|
+
value?: number;
|
|
43
|
+
max?: number;
|
|
44
|
+
size?: "sm" | "md" | "lg";
|
|
45
|
+
variant?: SemanticTone;
|
|
46
|
+
showLabel?: boolean;
|
|
47
|
+
label?: ReactNode;
|
|
48
|
+
subLabel?: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
export declare function DsProgress({ value, max, size, variant, showLabel, label, subLabel, }: DsProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DsCard } from "./card.cjs";
|
|
2
|
+
export type { DsCardProps } from "./card.cjs";
|
|
3
|
+
export { DsAlert, DsBadge, DsEmpty, DsProgress, DsSpinner } from "./display-primitives.cjs";
|
|
4
|
+
export type { DisplaySize, DsAlertProps, DsBadgeProps, DsEmptyProps, DsProgressProps, DsSpinnerProps, SemanticTone } from "./display-primitives.cjs";
|
|
5
|
+
export { DsSkeleton } from "./skeleton-base.cjs";
|
|
6
|
+
export type { DsSkeletonProps } from "./skeleton-base.cjs";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DsCard } from "./card.js";
|
|
2
|
+
export type { DsCardProps } from "./card.js";
|
|
3
|
+
export { DsAlert, DsBadge, DsEmpty, DsProgress, DsSpinner } from "./display-primitives.js";
|
|
4
|
+
export type { DisplaySize, DsAlertProps, DsBadgeProps, DsEmptyProps, DsProgressProps, DsSpinnerProps, SemanticTone } from "./display-primitives.js";
|
|
5
|
+
export { DsSkeleton } from "./skeleton-base.js";
|
|
6
|
+
export type { DsSkeletonProps } from "./skeleton-base.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface DsDrawerProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (v: boolean) => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
position?: "left" | "right" | "top" | "bottom";
|
|
7
|
+
width?: number;
|
|
8
|
+
closable?: boolean;
|
|
9
|
+
closeOnOverlay?: boolean;
|
|
10
|
+
closeOnEsc?: boolean;
|
|
11
|
+
noPadding?: boolean;
|
|
12
|
+
header?: ReactNode;
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function DsDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, ariaLabel, }: DsDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface DsDrawerProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (v: boolean) => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
position?: "left" | "right" | "top" | "bottom";
|
|
7
|
+
width?: number;
|
|
8
|
+
closable?: boolean;
|
|
9
|
+
closeOnOverlay?: boolean;
|
|
10
|
+
closeOnEsc?: boolean;
|
|
11
|
+
noPadding?: boolean;
|
|
12
|
+
header?: ReactNode;
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function DsDrawer({ open, onOpenChange, title, position, width, closable, closeOnOverlay, closeOnEsc, noPadding, header, footer, children, onClose, ariaLabel, }: DsDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type DsButtonProps } from "./button.cjs";
|
|
3
|
+
import { type DsTooltipProps } from "./popover.cjs";
|
|
4
|
+
export declare const DropdownContext: import("react").Context<(() => void) | null>;
|
|
5
|
+
export interface DsDropdownProps {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
8
|
+
menuId?: string;
|
|
9
|
+
triggerId?: string;
|
|
10
|
+
trigger: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
onOpen?: () => void;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function DsDropdown({ disabled, placement, trigger, children, onOpen, onClose, }: DsDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export interface DsDropdownItemProps {
|
|
17
|
+
id?: string;
|
|
18
|
+
variant?: "default" | "danger";
|
|
19
|
+
icon?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
selected?: boolean | null;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
onPress?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function DsDropdownItem({ variant, icon, disabled, selected, children, onPress, }: DsDropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function DsDropdownDivider(): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export interface DsMenuButtonProps extends Omit<DsDropdownProps, "trigger"> {
|
|
28
|
+
label?: string;
|
|
29
|
+
size?: DsButtonProps["size"];
|
|
30
|
+
variant?: DsButtonProps["variant"];
|
|
31
|
+
/** Show a square dots-vertical button; label remains its accessible name. */
|
|
32
|
+
compact?: boolean;
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
tooltip?: string;
|
|
35
|
+
tooltipPlacement?: DsTooltipProps["placement"];
|
|
36
|
+
tooltipDelay?: number;
|
|
37
|
+
ariaLabel?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function DsMenuButton({ label, size, variant, compact, loading, tooltip, tooltipPlacement, tooltipDelay, ariaLabel, onOpen, onClose, ...props }: DsMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type DsButtonProps } from "./button.js";
|
|
3
|
+
import { type DsTooltipProps } from "./popover.js";
|
|
4
|
+
export declare const DropdownContext: import("react").Context<(() => void) | null>;
|
|
5
|
+
export interface DsDropdownProps {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
8
|
+
menuId?: string;
|
|
9
|
+
triggerId?: string;
|
|
10
|
+
trigger: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
onOpen?: () => void;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function DsDropdown({ disabled, placement, trigger, children, onOpen, onClose, }: DsDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export interface DsDropdownItemProps {
|
|
17
|
+
id?: string;
|
|
18
|
+
variant?: "default" | "danger";
|
|
19
|
+
icon?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
selected?: boolean | null;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
onPress?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function DsDropdownItem({ variant, icon, disabled, selected, children, onPress, }: DsDropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function DsDropdownDivider(): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export interface DsMenuButtonProps extends Omit<DsDropdownProps, "trigger"> {
|
|
28
|
+
label?: string;
|
|
29
|
+
size?: DsButtonProps["size"];
|
|
30
|
+
variant?: DsButtonProps["variant"];
|
|
31
|
+
/** Show a square dots-vertical button; label remains its accessible name. */
|
|
32
|
+
compact?: boolean;
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
tooltip?: string;
|
|
35
|
+
tooltipPlacement?: DsTooltipProps["placement"];
|
|
36
|
+
tooltipDelay?: number;
|
|
37
|
+
ariaLabel?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function DsMenuButton({ label, size, variant, compact, loading, tooltip, tooltipPlacement, tooltipDelay, ariaLabel, onOpen, onClose, ...props }: DsMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type KjunFeedback } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
export declare function useKjunFeedback(): KjunFeedback;
|
|
4
|
+
export declare function KjunFeedbackProvider({ children }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export type { ConfirmOptions, KjunFeedback, PromptOptions, ToastOptions } from "@kjun-ui/tokens";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type KjunFeedback } from "@kjun-ui/tokens";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
export declare function useKjunFeedback(): KjunFeedback;
|
|
4
|
+
export declare function KjunFeedbackProvider({ children }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export type { ConfirmOptions, KjunFeedback, PromptOptions, ToastOptions } from "@kjun-ui/tokens";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
/** The visual clear affordance is smaller than its 44px activation target. */
|
|
3
|
+
export declare function FieldClear({ size, disabled, label, onPress }: {
|
|
4
|
+
size: InputSize;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
label: string;
|
|
7
|
+
onPress: () => void;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
/** The visual clear affordance is smaller than its 44px activation target. */
|
|
3
|
+
export declare function FieldClear({ size, disabled, label, onPress }: {
|
|
4
|
+
size: InputSize;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
label: string;
|
|
7
|
+
onPress: () => void;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Animated, TextInput, type ViewStyle } from "react-native";
|
|
2
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
3
|
+
export declare const FieldTextInput: typeof TextInput;
|
|
4
|
+
export declare const FieldPressable: import("react").ForwardRefExoticComponent<import("react-native").PressableProps & {
|
|
5
|
+
focusRingInset?: boolean;
|
|
6
|
+
focusRing?: boolean;
|
|
7
|
+
focusRingRadius?: number;
|
|
8
|
+
} & import("react").RefAttributes<import("react-native").View>> | Animated.AnimatedComponent<import("react").ForwardRefExoticComponent<import("react-native").PressableProps & {
|
|
9
|
+
focusRingInset?: boolean;
|
|
10
|
+
focusRing?: boolean;
|
|
11
|
+
focusRingRadius?: number;
|
|
12
|
+
} & import("react").RefAttributes<import("react-native").View>>>;
|
|
13
|
+
/** Activate only the spare area around a small field, without duplicating child actions. */
|
|
14
|
+
export declare function fieldTarget(action: () => void, disabled: boolean): {
|
|
15
|
+
onClick: (event: {
|
|
16
|
+
target: unknown;
|
|
17
|
+
currentTarget: unknown;
|
|
18
|
+
}) => void;
|
|
19
|
+
onTouchEnd?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
onTouchEnd: (event: {
|
|
22
|
+
target: unknown;
|
|
23
|
+
currentTarget: unknown;
|
|
24
|
+
}) => void;
|
|
25
|
+
onClick?: undefined;
|
|
26
|
+
};
|
|
27
|
+
/** Shared field state, independent of each control's value and keyboard model. */
|
|
28
|
+
export declare function useFieldSurface(size: InputSize, { disabled, readOnly, invalid, open }?: {
|
|
29
|
+
disabled?: boolean | undefined;
|
|
30
|
+
readOnly?: boolean | undefined;
|
|
31
|
+
invalid?: boolean | undefined;
|
|
32
|
+
open?: boolean | undefined;
|
|
33
|
+
}): {
|
|
34
|
+
spec: {
|
|
35
|
+
readonly height: 32;
|
|
36
|
+
readonly fontSize: 16;
|
|
37
|
+
readonly placeholderSize: 16;
|
|
38
|
+
readonly radius: 10;
|
|
39
|
+
readonly padding: 12;
|
|
40
|
+
readonly iconSize: 16;
|
|
41
|
+
readonly lineHeight: 24;
|
|
42
|
+
readonly clearSize: 24;
|
|
43
|
+
readonly textareaPaddingY: 8;
|
|
44
|
+
readonly affixGap: 8;
|
|
45
|
+
} | {
|
|
46
|
+
readonly height: 40;
|
|
47
|
+
readonly fontSize: 16;
|
|
48
|
+
readonly placeholderSize: 16;
|
|
49
|
+
readonly radius: 12;
|
|
50
|
+
readonly padding: 16;
|
|
51
|
+
readonly iconSize: 16;
|
|
52
|
+
readonly lineHeight: 24;
|
|
53
|
+
readonly clearSize: 28;
|
|
54
|
+
readonly textareaPaddingY: 12;
|
|
55
|
+
readonly affixGap: 8;
|
|
56
|
+
} | {
|
|
57
|
+
readonly height: 48;
|
|
58
|
+
readonly fontSize: 16;
|
|
59
|
+
readonly placeholderSize: 16;
|
|
60
|
+
readonly radius: 14;
|
|
61
|
+
readonly padding: 20;
|
|
62
|
+
readonly iconSize: 18;
|
|
63
|
+
readonly lineHeight: 24;
|
|
64
|
+
readonly clearSize: 32;
|
|
65
|
+
readonly textareaPaddingY: 16;
|
|
66
|
+
readonly affixGap: 8;
|
|
67
|
+
};
|
|
68
|
+
style: ViewStyle;
|
|
69
|
+
setFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
70
|
+
active: boolean;
|
|
71
|
+
hovered: boolean;
|
|
72
|
+
ink: import("react-native").ColorValue;
|
|
73
|
+
icon: import("react-native").ColorValue;
|
|
74
|
+
hit: number;
|
|
75
|
+
hover: {
|
|
76
|
+
onHoverIn: () => void;
|
|
77
|
+
onHoverOut: () => void;
|
|
78
|
+
};
|
|
79
|
+
webHover: {
|
|
80
|
+
onMouseEnter: () => void;
|
|
81
|
+
onMouseLeave: () => void;
|
|
82
|
+
} | {
|
|
83
|
+
onMouseEnter?: undefined;
|
|
84
|
+
onMouseLeave?: undefined;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Animated, TextInput, type ViewStyle } from "react-native";
|
|
2
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
3
|
+
export declare const FieldTextInput: typeof TextInput;
|
|
4
|
+
export declare const FieldPressable: import("react").ForwardRefExoticComponent<import("react-native").PressableProps & {
|
|
5
|
+
focusRingInset?: boolean;
|
|
6
|
+
focusRing?: boolean;
|
|
7
|
+
focusRingRadius?: number;
|
|
8
|
+
} & import("react").RefAttributes<import("react-native").View>> | Animated.AnimatedComponent<import("react").ForwardRefExoticComponent<import("react-native").PressableProps & {
|
|
9
|
+
focusRingInset?: boolean;
|
|
10
|
+
focusRing?: boolean;
|
|
11
|
+
focusRingRadius?: number;
|
|
12
|
+
} & import("react").RefAttributes<import("react-native").View>>>;
|
|
13
|
+
/** Activate only the spare area around a small field, without duplicating child actions. */
|
|
14
|
+
export declare function fieldTarget(action: () => void, disabled: boolean): {
|
|
15
|
+
onClick: (event: {
|
|
16
|
+
target: unknown;
|
|
17
|
+
currentTarget: unknown;
|
|
18
|
+
}) => void;
|
|
19
|
+
onTouchEnd?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
onTouchEnd: (event: {
|
|
22
|
+
target: unknown;
|
|
23
|
+
currentTarget: unknown;
|
|
24
|
+
}) => void;
|
|
25
|
+
onClick?: undefined;
|
|
26
|
+
};
|
|
27
|
+
/** Shared field state, independent of each control's value and keyboard model. */
|
|
28
|
+
export declare function useFieldSurface(size: InputSize, { disabled, readOnly, invalid, open }?: {
|
|
29
|
+
disabled?: boolean | undefined;
|
|
30
|
+
readOnly?: boolean | undefined;
|
|
31
|
+
invalid?: boolean | undefined;
|
|
32
|
+
open?: boolean | undefined;
|
|
33
|
+
}): {
|
|
34
|
+
spec: {
|
|
35
|
+
readonly height: 32;
|
|
36
|
+
readonly fontSize: 16;
|
|
37
|
+
readonly placeholderSize: 16;
|
|
38
|
+
readonly radius: 10;
|
|
39
|
+
readonly padding: 12;
|
|
40
|
+
readonly iconSize: 16;
|
|
41
|
+
readonly lineHeight: 24;
|
|
42
|
+
readonly clearSize: 24;
|
|
43
|
+
readonly textareaPaddingY: 8;
|
|
44
|
+
readonly affixGap: 8;
|
|
45
|
+
} | {
|
|
46
|
+
readonly height: 40;
|
|
47
|
+
readonly fontSize: 16;
|
|
48
|
+
readonly placeholderSize: 16;
|
|
49
|
+
readonly radius: 12;
|
|
50
|
+
readonly padding: 16;
|
|
51
|
+
readonly iconSize: 16;
|
|
52
|
+
readonly lineHeight: 24;
|
|
53
|
+
readonly clearSize: 28;
|
|
54
|
+
readonly textareaPaddingY: 12;
|
|
55
|
+
readonly affixGap: 8;
|
|
56
|
+
} | {
|
|
57
|
+
readonly height: 48;
|
|
58
|
+
readonly fontSize: 16;
|
|
59
|
+
readonly placeholderSize: 16;
|
|
60
|
+
readonly radius: 14;
|
|
61
|
+
readonly padding: 20;
|
|
62
|
+
readonly iconSize: 18;
|
|
63
|
+
readonly lineHeight: 24;
|
|
64
|
+
readonly clearSize: 32;
|
|
65
|
+
readonly textareaPaddingY: 16;
|
|
66
|
+
readonly affixGap: 8;
|
|
67
|
+
};
|
|
68
|
+
style: ViewStyle;
|
|
69
|
+
setFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
70
|
+
active: boolean;
|
|
71
|
+
hovered: boolean;
|
|
72
|
+
ink: import("react-native").ColorValue;
|
|
73
|
+
icon: import("react-native").ColorValue;
|
|
74
|
+
hit: number;
|
|
75
|
+
hover: {
|
|
76
|
+
onHoverIn: () => void;
|
|
77
|
+
onHoverOut: () => void;
|
|
78
|
+
};
|
|
79
|
+
webHover: {
|
|
80
|
+
onMouseEnter: () => void;
|
|
81
|
+
onMouseLeave: () => void;
|
|
82
|
+
} | {
|
|
83
|
+
onMouseEnter?: undefined;
|
|
84
|
+
onMouseLeave?: undefined;
|
|
85
|
+
};
|
|
86
|
+
};
|