@kjun-ui/react 0.0.0-stage → 0.3.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/README.md +44 -2
- package/dist/LICENSE +21 -0
- package/dist/Tabler-LICENSE +21 -0
- package/dist/index.cjs +6897 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6946 -0
- package/dist/styles.css +7695 -0
- package/dist/types/packages/react/src/actions.d.cts +58 -0
- package/dist/types/packages/react/src/actions.d.ts +58 -0
- package/dist/types/packages/react/src/app-navigation.d.cts +35 -0
- package/dist/types/packages/react/src/app-navigation.d.ts +35 -0
- package/dist/types/packages/react/src/button.d.cts +23 -0
- package/dist/types/packages/react/src/button.d.ts +23 -0
- package/dist/types/packages/react/src/card.d.cts +18 -0
- package/dist/types/packages/react/src/card.d.ts +18 -0
- package/dist/types/packages/react/src/chip.d.cts +10 -0
- package/dist/types/packages/react/src/chip.d.ts +10 -0
- package/dist/types/packages/react/src/collapse.d.cts +5 -0
- package/dist/types/packages/react/src/collapse.d.ts +5 -0
- package/dist/types/packages/react/src/combobox.d.cts +48 -0
- package/dist/types/packages/react/src/combobox.d.ts +48 -0
- package/dist/types/packages/react/src/composition.d.cts +6 -0
- package/dist/types/packages/react/src/composition.d.ts +6 -0
- package/dist/types/packages/react/src/compound-control.d.cts +1 -0
- package/dist/types/packages/react/src/compound-control.d.ts +1 -0
- package/dist/types/packages/react/src/controls.d.cts +85 -0
- package/dist/types/packages/react/src/controls.d.ts +85 -0
- package/dist/types/packages/react/src/data-state.d.cts +53 -0
- package/dist/types/packages/react/src/data-state.d.ts +53 -0
- package/dist/types/packages/react/src/date-picker.d.cts +10 -0
- package/dist/types/packages/react/src/date-picker.d.ts +10 -0
- package/dist/types/packages/react/src/display.d.cts +55 -0
- package/dist/types/packages/react/src/display.d.ts +55 -0
- package/dist/types/packages/react/src/drawer.d.cts +18 -0
- package/dist/types/packages/react/src/drawer.d.ts +18 -0
- package/dist/types/packages/react/src/dropdown.d.cts +41 -0
- package/dist/types/packages/react/src/dropdown.d.ts +41 -0
- package/dist/types/packages/react/src/feedback-context.d.cts +3 -0
- package/dist/types/packages/react/src/feedback-context.d.ts +3 -0
- package/dist/types/packages/react/src/feedback.d.cts +7 -0
- package/dist/types/packages/react/src/feedback.d.ts +7 -0
- package/dist/types/packages/react/src/financial-display.d.cts +86 -0
- package/dist/types/packages/react/src/financial-display.d.ts +86 -0
- package/dist/types/packages/react/src/financial.d.cts +4 -0
- package/dist/types/packages/react/src/financial.d.ts +4 -0
- package/dist/types/packages/react/src/floating-panel.d.cts +15 -0
- package/dist/types/packages/react/src/floating-panel.d.ts +15 -0
- package/dist/types/packages/react/src/index.d.cts +39 -0
- package/dist/types/packages/react/src/index.d.ts +39 -0
- package/dist/types/packages/react/src/input.d.cts +37 -0
- package/dist/types/packages/react/src/input.d.ts +37 -0
- package/dist/types/packages/react/src/kpi.d.cts +64 -0
- package/dist/types/packages/react/src/kpi.d.ts +64 -0
- package/dist/types/packages/react/src/layers.d.cts +4 -0
- package/dist/types/packages/react/src/layers.d.ts +4 -0
- package/dist/types/packages/react/src/list.d.cts +20 -0
- package/dist/types/packages/react/src/list.d.ts +20 -0
- package/dist/types/packages/react/src/market-cards.d.cts +2 -0
- package/dist/types/packages/react/src/market-cards.d.ts +2 -0
- package/dist/types/packages/react/src/market-layout.d.cts +7 -0
- package/dist/types/packages/react/src/market-layout.d.ts +7 -0
- package/dist/types/packages/react/src/market-list.d.cts +2 -0
- package/dist/types/packages/react/src/market-list.d.ts +2 -0
- package/dist/types/packages/react/src/market-model.d.cts +109 -0
- package/dist/types/packages/react/src/market-model.d.ts +109 -0
- package/dist/types/packages/react/src/market-panel.d.cts +5 -0
- package/dist/types/packages/react/src/market-panel.d.ts +5 -0
- package/dist/types/packages/react/src/market-parts.d.cts +8 -0
- package/dist/types/packages/react/src/market-parts.d.ts +8 -0
- package/dist/types/packages/react/src/market-skeleton.d.cts +13 -0
- package/dist/types/packages/react/src/market-skeleton.d.ts +13 -0
- package/dist/types/packages/react/src/market-table.d.cts +2 -0
- package/dist/types/packages/react/src/market-table.d.ts +2 -0
- package/dist/types/packages/react/src/market.d.cts +7 -0
- package/dist/types/packages/react/src/market.d.ts +7 -0
- package/dist/types/packages/react/src/media.d.cts +25 -0
- package/dist/types/packages/react/src/media.d.ts +25 -0
- package/dist/types/packages/react/src/modal.d.cts +46 -0
- package/dist/types/packages/react/src/modal.d.ts +46 -0
- package/dist/types/packages/react/src/navigation.d.cts +73 -0
- package/dist/types/packages/react/src/navigation.d.ts +73 -0
- package/dist/types/packages/react/src/number-display.d.cts +44 -0
- package/dist/types/packages/react/src/number-display.d.ts +44 -0
- package/dist/types/packages/react/src/overlay-host.d.cts +8 -0
- package/dist/types/packages/react/src/overlay-host.d.ts +8 -0
- package/dist/types/packages/react/src/popover.d.cts +23 -0
- package/dist/types/packages/react/src/popover.d.ts +23 -0
- package/dist/types/packages/react/src/provider.d.cts +8 -0
- package/dist/types/packages/react/src/provider.d.ts +8 -0
- package/dist/types/packages/react/src/quantity-stepper.d.cts +18 -0
- package/dist/types/packages/react/src/quantity-stepper.d.ts +18 -0
- package/dist/types/packages/react/src/range-input.d.cts +31 -0
- package/dist/types/packages/react/src/range-input.d.ts +31 -0
- package/dist/types/packages/react/src/search-input.d.cts +21 -0
- package/dist/types/packages/react/src/search-input.d.ts +21 -0
- package/dist/types/packages/react/src/select-control.d.cts +30 -0
- package/dist/types/packages/react/src/select-control.d.ts +30 -0
- package/dist/types/packages/react/src/select-options.d.cts +2 -0
- package/dist/types/packages/react/src/select-options.d.ts +2 -0
- package/dist/types/packages/react/src/select.d.cts +10 -0
- package/dist/types/packages/react/src/select.d.ts +10 -0
- package/dist/types/packages/react/src/skeletons.d.cts +28 -0
- package/dist/types/packages/react/src/skeletons.d.ts +28 -0
- package/dist/types/packages/react/src/table-cards.d.cts +9 -0
- package/dist/types/packages/react/src/table-cards.d.ts +9 -0
- package/dist/types/packages/react/src/table-check.d.cts +3 -0
- package/dist/types/packages/react/src/table-check.d.ts +3 -0
- package/dist/types/packages/react/src/table-grid.d.cts +9 -0
- package/dist/types/packages/react/src/table-grid.d.ts +9 -0
- package/dist/types/packages/react/src/table-model.d.cts +21 -0
- package/dist/types/packages/react/src/table-model.d.ts +21 -0
- package/dist/types/packages/react/src/table-toolbar.d.cts +2 -0
- package/dist/types/packages/react/src/table-toolbar.d.ts +2 -0
- package/dist/types/packages/react/src/table-view.d.cts +2 -0
- package/dist/types/packages/react/src/table-view.d.ts +2 -0
- package/dist/types/packages/react/src/table.d.cts +3 -0
- package/dist/types/packages/react/src/table.d.ts +3 -0
- package/dist/types/packages/react/src/time-picker.d.cts +17 -0
- package/dist/types/packages/react/src/time-picker.d.ts +17 -0
- package/dist/types/packages/react/src/toast-stack.d.cts +6 -0
- package/dist/types/packages/react/src/toast-stack.d.ts +6 -0
- package/dist/types/packages/react/src/toast.d.cts +5 -0
- package/dist/types/packages/react/src/toast.d.ts +5 -0
- package/dist/types/packages/react/src/top-navigation-context.d.cts +4 -0
- package/dist/types/packages/react/src/top-navigation-context.d.ts +4 -0
- package/dist/types/packages/react/src/typography.d.cts +19 -0
- package/dist/types/packages/react/src/typography.d.ts +19 -0
- package/dist/types/packages/react/src/use-reduced-motion.d.cts +1 -0
- package/dist/types/packages/react/src/use-reduced-motion.d.ts +1 -0
- package/dist/types/packages/react/src/use-selection-indicator.d.cts +4 -0
- package/dist/types/packages/react/src/use-selection-indicator.d.ts +4 -0
- package/dist/types/shared/package-runtime/action-size.d.cts +9 -0
- package/dist/types/shared/package-runtime/action-size.d.ts +9 -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/css-contract.d.cts +5 -0
- package/dist/types/shared/package-runtime/css-contract.d.ts +5 -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/portal-scope.d.cts +6 -0
- package/dist/types/shared/package-runtime/portal-scope.d.ts +6 -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/tab-keyboard.d.cts +2 -0
- package/dist/types/shared/package-runtime/tab-keyboard.d.ts +2 -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/toast-layout.d.cts +4 -0
- package/dist/types/shared/package-runtime/toast-layout.d.ts +4 -0
- package/dist/types/shared/package-runtime/trailing-overflow.d.cts +1 -0
- package/dist/types/shared/package-runtime/trailing-overflow.d.ts +1 -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/dist/types/shared/package-runtime/use-presence.d.cts +4 -0
- package/dist/types/shared/package-runtime/use-presence.d.ts +4 -0
- package/package.json +50 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { DsCombobox } from "./combobox.js";
|
|
2
|
+
export type { DsComboboxProps } from "./combobox.js";
|
|
3
|
+
export { DsDatePicker } from "./date-picker.js";
|
|
4
|
+
export type { DsDatePickerProps } from "./date-picker.js";
|
|
5
|
+
export { DsSearchInput } from "./search-input.js";
|
|
6
|
+
export type { DsSearchInputProps } from "./search-input.js";
|
|
7
|
+
export { DsSelect } from "./select-control.js";
|
|
8
|
+
export type { DsSelectProps } from "./select-control.js";
|
|
9
|
+
export { optionLabel, optionValue } from "./select-options.js";
|
|
10
|
+
export type { OptionValue, SelectOption } from "./select-options.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
import { type CSSProperties } from "react";
|
|
3
|
+
export interface DsListSkeletonProps {
|
|
4
|
+
rows?: number;
|
|
5
|
+
variant?: "market" | "compact" | "notification";
|
|
6
|
+
avatar?: boolean;
|
|
7
|
+
avatarSize?: CSSProperties["width"];
|
|
8
|
+
quote?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function DsListSkeleton({ rows, variant, avatar, avatarSize, quote, }: DsListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface DsFormSkeletonProps {
|
|
12
|
+
fields?: (string | {
|
|
13
|
+
label?: string;
|
|
14
|
+
height?: CSSProperties["height"];
|
|
15
|
+
})[];
|
|
16
|
+
columns?: number;
|
|
17
|
+
multiline?: boolean;
|
|
18
|
+
size?: InputSize;
|
|
19
|
+
}
|
|
20
|
+
export declare function DsFormSkeleton({ fields, columns, multiline, size, }: DsFormSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface DsChartSkeletonProps {
|
|
22
|
+
loadingText?: string;
|
|
23
|
+
kind?: "grid" | "line" | "bar" | "donut" | "candle" | "matrix";
|
|
24
|
+
height?: CSSProperties["height"];
|
|
25
|
+
}
|
|
26
|
+
export declare function DsChartSkeleton({ loadingText, kind, height, }: DsChartSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export { DsMarketTableSkeleton } from "./market-skeleton.cjs";
|
|
28
|
+
export type { DsMarketTableSkeletonProps } from "./market-skeleton.cjs";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
import { type CSSProperties } from "react";
|
|
3
|
+
export interface DsListSkeletonProps {
|
|
4
|
+
rows?: number;
|
|
5
|
+
variant?: "market" | "compact" | "notification";
|
|
6
|
+
avatar?: boolean;
|
|
7
|
+
avatarSize?: CSSProperties["width"];
|
|
8
|
+
quote?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function DsListSkeleton({ rows, variant, avatar, avatarSize, quote, }: DsListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface DsFormSkeletonProps {
|
|
12
|
+
fields?: (string | {
|
|
13
|
+
label?: string;
|
|
14
|
+
height?: CSSProperties["height"];
|
|
15
|
+
})[];
|
|
16
|
+
columns?: number;
|
|
17
|
+
multiline?: boolean;
|
|
18
|
+
size?: InputSize;
|
|
19
|
+
}
|
|
20
|
+
export declare function DsFormSkeleton({ fields, columns, multiline, size, }: DsFormSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface DsChartSkeletonProps {
|
|
22
|
+
loadingText?: string;
|
|
23
|
+
kind?: "grid" | "line" | "bar" | "donut" | "candle" | "matrix";
|
|
24
|
+
height?: CSSProperties["height"];
|
|
25
|
+
}
|
|
26
|
+
export declare function DsChartSkeleton({ loadingText, kind, height, }: DsChartSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export { DsMarketTableSkeleton } from "./market-skeleton.js";
|
|
28
|
+
export type { DsMarketTableSkeletonProps } from "./market-skeleton.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { KeyboardEvent } from "react";
|
|
2
|
+
import type { TableCardsProps } from "../../../shared/package-runtime/table-presentation.cjs";
|
|
3
|
+
interface Props<Row extends object> extends TableCardsProps<Row> {
|
|
4
|
+
ariaLabel: string;
|
|
5
|
+
customClass: (row: Row, index: number) => string;
|
|
6
|
+
rowKeyDown: (event: KeyboardEvent<HTMLElement>, row: Row, index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function TableCards<Row extends object>({ initialLoading, skeletonRows, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, layout, ariaLabel, customClass, rowKeyDown }: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { KeyboardEvent } from "react";
|
|
2
|
+
import type { TableCardsProps } from "../../../shared/package-runtime/table-presentation.js";
|
|
3
|
+
interface Props<Row extends object> extends TableCardsProps<Row> {
|
|
4
|
+
ariaLabel: string;
|
|
5
|
+
customClass: (row: Row, index: number) => string;
|
|
6
|
+
rowKeyDown: (event: KeyboardEvent<HTMLElement>, row: Row, index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function TableCards<Row extends object>({ initialLoading, skeletonRows, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, layout, ariaLabel, customClass, rowKeyDown }: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
/** A native checkbox (role, indeterminate, row click isolation) drawn like DsCheckbox sm. */
|
|
3
|
+
export declare const TableCheck: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from "react";
|
|
2
|
+
/** A native checkbox (role, indeterminate, row click isolation) drawn like DsCheckbox sm. */
|
|
3
|
+
export declare const TableCheck: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CSSProperties, type KeyboardEvent } from "react";
|
|
2
|
+
import type { TableGridProps } from "../../../shared/package-runtime/table-presentation.cjs";
|
|
3
|
+
interface Props<Row extends object> extends TableGridProps<Row, CSSProperties["maxHeight"]> {
|
|
4
|
+
ariaLabel: string;
|
|
5
|
+
customClass: (row: Row, index: number) => string;
|
|
6
|
+
rowKeyDown: (event: KeyboardEvent<HTMLElement>, row: Row, index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function TableGrid<Row extends object>({ initialLoading, skeletonRows, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, sortable, compact, striped, hoverable, ariaLabel, customClass, rowKeyDown }: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CSSProperties, type KeyboardEvent } from "react";
|
|
2
|
+
import type { TableGridProps } from "../../../shared/package-runtime/table-presentation.js";
|
|
3
|
+
interface Props<Row extends object> extends TableGridProps<Row, CSSProperties["maxHeight"]> {
|
|
4
|
+
ariaLabel: string;
|
|
5
|
+
customClass: (row: Row, index: number) => string;
|
|
6
|
+
rowKeyDown: (event: KeyboardEvent<HTMLElement>, row: Row, index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function TableGrid<Row extends object>({ initialLoading, skeletonRows, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, sortable, compact, striped, hoverable, ariaLabel, customClass, rowKeyDown }: Props<Row>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import { type TableProps } from "../../../shared/package-runtime/table.cjs";
|
|
3
|
+
export { getValue } from "../../../shared/package-runtime/table.cjs";
|
|
4
|
+
export type { TableSort, TableColumn, TableCardSection, TablePagination } from "../../../shared/package-runtime/table.cjs";
|
|
5
|
+
export interface DsTableProps<Row extends object = Record<string, unknown>> extends TableProps<Row, CSSProperties["maxHeight"]> {
|
|
6
|
+
}
|
|
7
|
+
export declare function useTableModel<Row extends object>(props: DsTableProps<Row>): {
|
|
8
|
+
rows: Row[];
|
|
9
|
+
key: (row: Row, index?: number) => string | number;
|
|
10
|
+
sort: import("@kjun-ui/tokens").TableSort;
|
|
11
|
+
search: string;
|
|
12
|
+
all: boolean;
|
|
13
|
+
some: boolean;
|
|
14
|
+
selectedRow: (row: Row) => boolean;
|
|
15
|
+
expanded: (string | number)[];
|
|
16
|
+
searchChange: (q: string) => void;
|
|
17
|
+
sortColumn: (col: import("./table-model.cjs").TableColumn<Row>) => void;
|
|
18
|
+
toggleRow: (row: Row) => void | undefined;
|
|
19
|
+
toggleAll: () => void | undefined;
|
|
20
|
+
toggleExpand: (row: Row, index: number) => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import { type TableProps } from "../../../shared/package-runtime/table.js";
|
|
3
|
+
export { getValue } from "../../../shared/package-runtime/table.js";
|
|
4
|
+
export type { TableSort, TableColumn, TableCardSection, TablePagination } from "../../../shared/package-runtime/table.js";
|
|
5
|
+
export interface DsTableProps<Row extends object = Record<string, unknown>> extends TableProps<Row, CSSProperties["maxHeight"]> {
|
|
6
|
+
}
|
|
7
|
+
export declare function useTableModel<Row extends object>(props: DsTableProps<Row>): {
|
|
8
|
+
rows: Row[];
|
|
9
|
+
key: (row: Row, index?: number) => string | number;
|
|
10
|
+
sort: import("@kjun-ui/tokens").TableSort;
|
|
11
|
+
search: string;
|
|
12
|
+
all: boolean;
|
|
13
|
+
some: boolean;
|
|
14
|
+
selectedRow: (row: Row) => boolean;
|
|
15
|
+
expanded: (string | number)[];
|
|
16
|
+
searchChange: (q: string) => void;
|
|
17
|
+
sortColumn: (col: import("./table-model.js").TableColumn<Row>) => void;
|
|
18
|
+
toggleRow: (row: Row) => void | undefined;
|
|
19
|
+
toggleAll: () => void | undefined;
|
|
20
|
+
toggleExpand: (row: Row, index: number) => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { TableToolbarProps } from "../../../shared/package-runtime/table-presentation.cjs";
|
|
2
|
+
export declare function TableToolbar<Row extends object>({ selectable, selected, toggleAll, clearSelection, renderSelectionToolbar, searchable, search, searchChange, searchPlaceholder, toolbar }: TableToolbarProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { TableToolbarProps } from "../../../shared/package-runtime/table-presentation.js";
|
|
2
|
+
export declare function TableToolbar<Row extends object>({ selectable, selected, toggleAll, clearSelection, renderSelectionToolbar, searchable, search, searchChange, searchPlaceholder, toolbar }: TableToolbarProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TimePrecision, type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
export interface DsTimePickerProps {
|
|
3
|
+
value: string | null;
|
|
4
|
+
precision?: TimePrecision;
|
|
5
|
+
min?: string;
|
|
6
|
+
max?: string;
|
|
7
|
+
minuteStep?: number;
|
|
8
|
+
secondStep?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
clearable?: boolean;
|
|
12
|
+
size?: InputSize;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
onValueChange?: (value: string | null) => void;
|
|
15
|
+
onChangeCommit?: (value: string | null) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function DsTimePicker({ value, precision, min, max, minuteStep, secondStep, disabled, error, clearable, size, ariaLabel, onValueChange, onChangeCommit }: DsTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TimePrecision, type InputSize } from "@kjun-ui/tokens";
|
|
2
|
+
export interface DsTimePickerProps {
|
|
3
|
+
value: string | null;
|
|
4
|
+
precision?: TimePrecision;
|
|
5
|
+
min?: string;
|
|
6
|
+
max?: string;
|
|
7
|
+
minuteStep?: number;
|
|
8
|
+
secondStep?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
clearable?: boolean;
|
|
12
|
+
size?: InputSize;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
onValueChange?: (value: string | null) => void;
|
|
15
|
+
onChangeCommit?: (value: string | null) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function DsTimePicker({ value, precision, min, max, minuteStep, secondStep, disabled, error, clearable, size, ariaLabel, onValueChange, onChangeCommit }: DsTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { createFeedbackController } from "@kjun-ui/tokens";
|
|
2
|
+
import { type PresentedToast } from "../../../shared/package-runtime/feedback-motion.cjs";
|
|
3
|
+
export declare function ToastStack({ items, controller }: {
|
|
4
|
+
items: PresentedToast[];
|
|
5
|
+
controller: ReturnType<typeof createFeedbackController>;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { createFeedbackController } from "@kjun-ui/tokens";
|
|
2
|
+
import { type PresentedToast } from "../../../shared/package-runtime/feedback-motion.js";
|
|
3
|
+
export declare function ToastStack({ items, controller }: {
|
|
4
|
+
items: PresentedToast[];
|
|
5
|
+
controller: ReturnType<typeof createFeedbackController>;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ButtonSize, type InputSize, type TypographyRole, type TypographyToken } from "@kjun-ui/tokens";
|
|
2
|
+
export declare function typeStyle(role: TypographyRole | TypographyToken): {
|
|
3
|
+
fontSize: string;
|
|
4
|
+
lineHeight: string;
|
|
5
|
+
fontWeight: 700 | 400 | 600 | 500;
|
|
6
|
+
letterSpacing: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function selectionTypeStyle(size: ButtonSize, active: boolean): {
|
|
9
|
+
fontWeight: 600 | 500;
|
|
10
|
+
fontSize: string;
|
|
11
|
+
lineHeight: string;
|
|
12
|
+
letterSpacing: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function inputTypeStyle(size: InputSize): {
|
|
15
|
+
fontSize: string;
|
|
16
|
+
lineHeight: string;
|
|
17
|
+
letterSpacing: string;
|
|
18
|
+
fontWeight: 700 | 400 | 600 | 500;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ButtonSize, type InputSize, type TypographyRole, type TypographyToken } from "@kjun-ui/tokens";
|
|
2
|
+
export declare function typeStyle(role: TypographyRole | TypographyToken): {
|
|
3
|
+
fontSize: string;
|
|
4
|
+
lineHeight: string;
|
|
5
|
+
fontWeight: 700 | 400 | 600 | 500;
|
|
6
|
+
letterSpacing: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function selectionTypeStyle(size: ButtonSize, active: boolean): {
|
|
9
|
+
fontWeight: 600 | 500;
|
|
10
|
+
fontSize: string;
|
|
11
|
+
lineHeight: string;
|
|
12
|
+
letterSpacing: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function inputTypeStyle(size: InputSize): {
|
|
15
|
+
fontSize: string;
|
|
16
|
+
lineHeight: string;
|
|
17
|
+
letterSpacing: string;
|
|
18
|
+
fontWeight: 700 | 400 | 600 | 500;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useReducedMotion(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useReducedMotion(): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonSize } from "@kjun-ui/tokens";
|
|
2
|
+
/** Alert actions stay one button step below the alert's own control line. */
|
|
3
|
+
export declare const alertActionSizes: {
|
|
4
|
+
readonly sm: "xs";
|
|
5
|
+
readonly md: "sm";
|
|
6
|
+
};
|
|
7
|
+
/** A container's default size for buttons that leave `size` unset; an explicit size always wins. */
|
|
8
|
+
export declare const ActionSizeContext: import("react").Context<"xs" | "sm" | "md" | "lg" | "xl" | null>;
|
|
9
|
+
export declare function useActionSize(requested: ButtonSize | undefined, fallback: ButtonSize): ButtonSize;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonSize } from "@kjun-ui/tokens";
|
|
2
|
+
/** Alert actions stay one button step below the alert's own control line. */
|
|
3
|
+
export declare const alertActionSizes: {
|
|
4
|
+
readonly sm: "xs";
|
|
5
|
+
readonly md: "sm";
|
|
6
|
+
};
|
|
7
|
+
/** A container's default size for buttons that leave `size` unset; an explicit size always wins. */
|
|
8
|
+
export declare const ActionSizeContext: import("react").Context<"xs" | "sm" | "md" | "lg" | "xl" | null>;
|
|
9
|
+
export declare function useActionSize(requested: ButtonSize | undefined, fallback: ButtonSize): ButtonSize;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type OptionValue, type SelectOption } from "./options.cjs";
|
|
2
|
+
export declare function useComboboxModel<T extends SelectOption>({ value, options, labelKey, valueKey, disabled, filterFn, onValueChange, onChange, onSearch, onClear, }: {
|
|
3
|
+
value: OptionValue | null;
|
|
4
|
+
options: T[];
|
|
5
|
+
labelKey: string;
|
|
6
|
+
valueKey: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
filterFn?: (option: T, query: string) => boolean;
|
|
9
|
+
onValueChange?: (value: OptionValue | null) => void;
|
|
10
|
+
onChange?: (value: OptionValue | null) => void;
|
|
11
|
+
onSearch?: (value: string) => void;
|
|
12
|
+
onClear?: () => void;
|
|
13
|
+
}): {
|
|
14
|
+
open: boolean;
|
|
15
|
+
displayValue: string;
|
|
16
|
+
options: T[];
|
|
17
|
+
changeOpen(next: boolean): void;
|
|
18
|
+
search(next: string, openOnInput: boolean): void;
|
|
19
|
+
select(option: T): void;
|
|
20
|
+
clear(): void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type OptionValue, type SelectOption } from "./options.js";
|
|
2
|
+
export declare function useComboboxModel<T extends SelectOption>({ value, options, labelKey, valueKey, disabled, filterFn, onValueChange, onChange, onSearch, onClear, }: {
|
|
3
|
+
value: OptionValue | null;
|
|
4
|
+
options: T[];
|
|
5
|
+
labelKey: string;
|
|
6
|
+
valueKey: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
filterFn?: (option: T, query: string) => boolean;
|
|
9
|
+
onValueChange?: (value: OptionValue | null) => void;
|
|
10
|
+
onChange?: (value: OptionValue | null) => void;
|
|
11
|
+
onSearch?: (value: string) => void;
|
|
12
|
+
onClear?: () => void;
|
|
13
|
+
}): {
|
|
14
|
+
open: boolean;
|
|
15
|
+
displayValue: string;
|
|
16
|
+
options: T[];
|
|
17
|
+
changeOpen(next: boolean): void;
|
|
18
|
+
search(next: string, openOnInput: boolean): void;
|
|
19
|
+
select(option: T): void;
|
|
20
|
+
clear(): void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Check app-owned bindings after the scope has entered the document. */
|
|
2
|
+
export declare function validateKjunCssScope(element: Element): void;
|
|
3
|
+
/** Financial colors are required only by components rendering domain expressions. */
|
|
4
|
+
export declare function validateKjunDomainCss(element: Element): void;
|
|
5
|
+
export declare const domainColorRef: (required: boolean) => ((element: Element | null) => void) | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Check app-owned bindings after the scope has entered the document. */
|
|
2
|
+
export declare function validateKjunCssScope(element: Element): void;
|
|
3
|
+
/** Financial colors are required only by components rendering domain expressions. */
|
|
4
|
+
export declare function validateKjunDomainCss(element: Element): void;
|
|
5
|
+
export declare const domainColorRef: (required: boolean) => ((element: Element | null) => void) | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { createFeedbackController, ConfirmOptions, FeedbackRequest, PromptOptions } from "@kjun-ui/tokens";
|
|
2
|
+
export declare function useFeedbackDialog(controller: ReturnType<typeof createFeedbackController>, request: FeedbackRequest): {
|
|
3
|
+
options: PromptOptions & ConfirmOptions;
|
|
4
|
+
value: string;
|
|
5
|
+
error: string;
|
|
6
|
+
busy: boolean;
|
|
7
|
+
edit(next: string): void;
|
|
8
|
+
cancel(): void;
|
|
9
|
+
submit(): Promise<void>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { createFeedbackController, ConfirmOptions, FeedbackRequest, PromptOptions } from "@kjun-ui/tokens";
|
|
2
|
+
export declare function useFeedbackDialog(controller: ReturnType<typeof createFeedbackController>, request: FeedbackRequest): {
|
|
3
|
+
options: PromptOptions & ConfirmOptions;
|
|
4
|
+
value: string;
|
|
5
|
+
error: string;
|
|
6
|
+
busy: boolean;
|
|
7
|
+
edit(next: string): void;
|
|
8
|
+
cancel(): void;
|
|
9
|
+
submit(): Promise<void>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FeedbackRequest, ToastItem } from "@kjun-ui/tokens";
|
|
2
|
+
export interface PresentedToast {
|
|
3
|
+
toast: ToastItem;
|
|
4
|
+
exiting: boolean;
|
|
5
|
+
born: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function usePresentedToasts(toasts: ToastItem[], reduced: boolean): PresentedToast[];
|
|
8
|
+
export declare function usePresentedRequest(current: FeedbackRequest | null, reduced: boolean): {
|
|
9
|
+
request: FeedbackRequest | null;
|
|
10
|
+
open: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FeedbackRequest, ToastItem } from "@kjun-ui/tokens";
|
|
2
|
+
export interface PresentedToast {
|
|
3
|
+
toast: ToastItem;
|
|
4
|
+
exiting: boolean;
|
|
5
|
+
born: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function usePresentedToasts(toasts: ToastItem[], reduced: boolean): PresentedToast[];
|
|
8
|
+
export declare function usePresentedRequest(current: FeedbackRequest | null, reduced: boolean): {
|
|
9
|
+
request: FeedbackRequest | null;
|
|
10
|
+
open: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { KjunIconRegistry } from "@kjun-ui/icons";
|
|
3
|
+
export declare function IconProvider({ icons, children }: {
|
|
4
|
+
icons?: KjunIconRegistry;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function IconFallbacks({ icons, children }: {
|
|
8
|
+
icons: KjunIconRegistry;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useIcon(name: string, filled: boolean): {
|
|
12
|
+
nodes: readonly import("@kjun-ui/icons").IconNode[];
|
|
13
|
+
filled: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { KjunIconRegistry } from "@kjun-ui/icons";
|
|
3
|
+
export declare function IconProvider({ icons, children }: {
|
|
4
|
+
icons?: KjunIconRegistry;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function IconFallbacks({ icons, children }: {
|
|
8
|
+
icons: KjunIconRegistry;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useIcon(name: string, filled: boolean): {
|
|
12
|
+
nodes: readonly import("@kjun-ui/icons").IconNode[];
|
|
13
|
+
filled: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defaultIcons } from "@kjun-ui/icons/defaults";
|
|
2
|
+
import type { KjunIconRegistry } from "@kjun-ui/icons";
|
|
3
|
+
export { defaultIcons };
|
|
4
|
+
export declare function mergeIcons(parent: KjunIconRegistry, own?: KjunIconRegistry): KjunIconRegistry;
|
|
5
|
+
/** Adds component-owned icons without overriding a project's registration. */
|
|
6
|
+
export declare function withFallbackIcons(registry: KjunIconRegistry, fallbacks: KjunIconRegistry): KjunIconRegistry;
|
|
7
|
+
export declare function resolveIcon(registry: KjunIconRegistry, name: string, filled?: boolean): {
|
|
8
|
+
nodes: readonly import("@kjun-ui/icons").IconNode[];
|
|
9
|
+
filled: boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defaultIcons } from "@kjun-ui/icons/defaults";
|
|
2
|
+
import type { KjunIconRegistry } from "@kjun-ui/icons";
|
|
3
|
+
export { defaultIcons };
|
|
4
|
+
export declare function mergeIcons(parent: KjunIconRegistry, own?: KjunIconRegistry): KjunIconRegistry;
|
|
5
|
+
/** Adds component-owned icons without overriding a project's registration. */
|
|
6
|
+
export declare function withFallbackIcons(registry: KjunIconRegistry, fallbacks: KjunIconRegistry): KjunIconRegistry;
|
|
7
|
+
export declare function resolveIcon(registry: KjunIconRegistry, name: string, filled?: boolean): {
|
|
8
|
+
nodes: readonly import("@kjun-ui/icons").IconNode[];
|
|
9
|
+
filled: boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Internal window ownership. Paint order, dismissal and surface appearance are independent. */
|
|
2
|
+
export type LayerKind = 'window' | 'popup' | 'tooltip';
|
|
3
|
+
export interface FocusTarget {
|
|
4
|
+
focus?: (options?: {
|
|
5
|
+
preventScroll?: boolean;
|
|
6
|
+
}) => void;
|
|
7
|
+
isConnected?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface LayerEntry {
|
|
10
|
+
id: string;
|
|
11
|
+
kind: LayerKind;
|
|
12
|
+
parent?: string;
|
|
13
|
+
owner?: string;
|
|
14
|
+
order: number;
|
|
15
|
+
windowOrder: number;
|
|
16
|
+
blocked: boolean;
|
|
17
|
+
closing: boolean;
|
|
18
|
+
closeRequested: boolean;
|
|
19
|
+
dismiss: () => void;
|
|
20
|
+
returnTarget?: FocusTarget | null;
|
|
21
|
+
root?: FocusTarget | null;
|
|
22
|
+
}
|
|
23
|
+
export declare function createLayerState(): {
|
|
24
|
+
entries: Map<string, LayerEntry>;
|
|
25
|
+
topWindow: () => LayerEntry | undefined;
|
|
26
|
+
top: () => LayerEntry | undefined;
|
|
27
|
+
windowOf: (id?: string) => string | undefined;
|
|
28
|
+
isRestoredFocus(target?: FocusTarget | null): boolean;
|
|
29
|
+
clearRestoredFocus(target?: FocusTarget | null): void;
|
|
30
|
+
markClosing(id: string): void;
|
|
31
|
+
subscribe(listener: () => void): () => void;
|
|
32
|
+
snapshot: () => number;
|
|
33
|
+
open(id: string, kind: LayerKind, parent: string | undefined, dismissCallback: () => void, returnTarget?: FocusTarget | null): LayerEntry;
|
|
34
|
+
remove(id: string, focused?: FocusTarget | null): FocusTarget | null | undefined;
|
|
35
|
+
requestClose(id: string): void;
|
|
36
|
+
isActive(id: string): boolean;
|
|
37
|
+
isBlocked(id: string): boolean;
|
|
38
|
+
zIndex(id?: string, role?: "backdrop" | "content" | "popup" | "tooltip" | "toast"): number;
|
|
39
|
+
};
|
|
40
|
+
export type LayerState = ReturnType<typeof createLayerState>;
|