@kjun-ui/react 0.4.2 → 0.5.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 +4 -4
- package/dist/index.cjs +368 -356
- package/dist/index.js +368 -356
- package/dist/styles.css +2057 -2133
- package/dist/types/packages/react/src/actions.d.cts +13 -13
- package/dist/types/packages/react/src/actions.d.ts +13 -13
- package/dist/types/packages/react/src/app-navigation.d.cts +6 -6
- package/dist/types/packages/react/src/app-navigation.d.ts +6 -6
- package/dist/types/packages/react/src/button.d.cts +4 -4
- package/dist/types/packages/react/src/button.d.ts +4 -4
- package/dist/types/packages/react/src/card.d.cts +2 -2
- package/dist/types/packages/react/src/card.d.ts +2 -2
- package/dist/types/packages/react/src/chip.d.cts +2 -2
- package/dist/types/packages/react/src/chip.d.ts +2 -2
- package/dist/types/packages/react/src/combobox.d.cts +2 -2
- package/dist/types/packages/react/src/combobox.d.ts +2 -2
- package/dist/types/packages/react/src/controls.d.cts +14 -14
- package/dist/types/packages/react/src/controls.d.ts +14 -14
- package/dist/types/packages/react/src/data-state.d.cts +6 -6
- package/dist/types/packages/react/src/data-state.d.ts +6 -6
- package/dist/types/packages/react/src/date-picker.d.cts +2 -2
- package/dist/types/packages/react/src/date-picker.d.ts +2 -2
- package/dist/types/packages/react/src/display.d.cts +15 -15
- package/dist/types/packages/react/src/display.d.ts +15 -15
- package/dist/types/packages/react/src/drawer.d.cts +2 -2
- package/dist/types/packages/react/src/drawer.d.ts +2 -2
- package/dist/types/packages/react/src/dropdown.d.cts +12 -12
- package/dist/types/packages/react/src/dropdown.d.ts +12 -12
- package/dist/types/packages/react/src/financial-display.d.cts +12 -12
- package/dist/types/packages/react/src/financial-display.d.ts +12 -12
- package/dist/types/packages/react/src/financial.d.cts +4 -4
- package/dist/types/packages/react/src/financial.d.ts +4 -4
- package/dist/types/packages/react/src/index.d.cts +22 -22
- package/dist/types/packages/react/src/index.d.ts +22 -22
- package/dist/types/packages/react/src/input.d.cts +4 -4
- package/dist/types/packages/react/src/input.d.ts +4 -4
- package/dist/types/packages/react/src/kpi.d.cts +4 -4
- package/dist/types/packages/react/src/kpi.d.ts +4 -4
- package/dist/types/packages/react/src/layers.d.cts +3 -3
- package/dist/types/packages/react/src/layers.d.ts +3 -3
- package/dist/types/packages/react/src/list.d.cts +4 -4
- package/dist/types/packages/react/src/list.d.ts +4 -4
- package/dist/types/packages/react/src/market-cards.d.cts +2 -2
- package/dist/types/packages/react/src/market-cards.d.ts +2 -2
- package/dist/types/packages/react/src/market-list.d.cts +2 -2
- package/dist/types/packages/react/src/market-list.d.ts +2 -2
- package/dist/types/packages/react/src/market-model.d.cts +4 -4
- package/dist/types/packages/react/src/market-model.d.ts +4 -4
- package/dist/types/packages/react/src/market-panel.d.cts +1 -1
- package/dist/types/packages/react/src/market-panel.d.ts +1 -1
- package/dist/types/packages/react/src/market-skeleton.d.cts +2 -2
- package/dist/types/packages/react/src/market-skeleton.d.ts +2 -2
- package/dist/types/packages/react/src/market-table.d.cts +2 -2
- package/dist/types/packages/react/src/market-table.d.ts +2 -2
- package/dist/types/packages/react/src/market.d.cts +5 -5
- package/dist/types/packages/react/src/market.d.ts +5 -5
- package/dist/types/packages/react/src/media.d.cts +4 -4
- package/dist/types/packages/react/src/media.d.ts +4 -4
- package/dist/types/packages/react/src/modal.d.cts +4 -4
- package/dist/types/packages/react/src/modal.d.ts +4 -4
- package/dist/types/packages/react/src/navigation.d.cts +12 -12
- package/dist/types/packages/react/src/navigation.d.ts +12 -12
- package/dist/types/packages/react/src/number-display.d.cts +8 -8
- package/dist/types/packages/react/src/number-display.d.ts +8 -8
- package/dist/types/packages/react/src/popover.d.cts +4 -4
- package/dist/types/packages/react/src/popover.d.ts +4 -4
- package/dist/types/packages/react/src/quantity-stepper.d.cts +2 -2
- package/dist/types/packages/react/src/quantity-stepper.d.ts +2 -2
- package/dist/types/packages/react/src/range-input.d.cts +4 -4
- package/dist/types/packages/react/src/range-input.d.ts +4 -4
- package/dist/types/packages/react/src/search-input.d.cts +2 -2
- package/dist/types/packages/react/src/search-input.d.ts +2 -2
- package/dist/types/packages/react/src/select-control.d.cts +2 -2
- package/dist/types/packages/react/src/select-control.d.ts +2 -2
- package/dist/types/packages/react/src/select.d.cts +8 -8
- package/dist/types/packages/react/src/select.d.ts +8 -8
- package/dist/types/packages/react/src/skeletons.d.cts +8 -8
- package/dist/types/packages/react/src/skeletons.d.ts +8 -8
- package/dist/types/packages/react/src/table-check.d.cts +1 -1
- package/dist/types/packages/react/src/table-check.d.ts +1 -1
- package/dist/types/packages/react/src/table-model.d.cts +2 -2
- package/dist/types/packages/react/src/table-model.d.ts +2 -2
- package/dist/types/packages/react/src/table-view.d.cts +2 -2
- package/dist/types/packages/react/src/table-view.d.ts +2 -2
- package/dist/types/packages/react/src/table.d.cts +2 -2
- package/dist/types/packages/react/src/table.d.ts +2 -2
- package/dist/types/packages/react/src/time-picker.d.cts +2 -2
- package/dist/types/packages/react/src/time-picker.d.ts +2 -2
- package/dist/types/packages/react/src/typography.d.cts +1 -19
- package/dist/types/packages/react/src/typography.d.ts +1 -19
- package/dist/types/shared/package-runtime/table-model.d.cts +15 -0
- package/dist/types/shared/package-runtime/table-model.d.ts +15 -0
- package/dist/types/shared/package-runtime/table.d.cts +1 -1
- package/dist/types/shared/package-runtime/table.d.ts +1 -1
- package/dist/types/shared/package-runtime/typography.d.cts +19 -0
- package/dist/types/shared/package-runtime/typography.d.ts +19 -0
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const finiteNumber: (value: unknown) => number | null;
|
|
2
2
|
export declare const format: (value: number, decimals?: number) => string;
|
|
3
3
|
export declare function useCountUp(value: number | string, animated: boolean, fromPrevious: boolean): string | number;
|
|
4
|
-
export interface
|
|
4
|
+
export interface KjunAnimatedNumberProps {
|
|
5
5
|
value: number | string;
|
|
6
6
|
decimals?: number;
|
|
7
7
|
prefix?: string;
|
|
@@ -11,23 +11,23 @@ export interface DsAnimatedNumberProps {
|
|
|
11
11
|
formatter?: (value: number) => string;
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare function
|
|
15
|
-
export interface
|
|
14
|
+
export declare function KjunAnimatedNumber({ value, decimals, prefix, suffix, animated, fromPrevious, formatter, className, }: KjunAnimatedNumberProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface KjunFreshnessProps {
|
|
16
16
|
stale?: boolean;
|
|
17
17
|
source?: string | null;
|
|
18
18
|
fetchedAt?: string | null;
|
|
19
19
|
formatter?: (time: string) => string;
|
|
20
20
|
}
|
|
21
|
-
export declare function
|
|
22
|
-
export interface
|
|
21
|
+
export declare function KjunFreshness({ stale, source, fetchedAt, formatter, }: KjunFreshnessProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export interface KjunPriceCellProps extends Omit<KjunFreshnessProps, "formatter"> {
|
|
23
23
|
value?: number | null;
|
|
24
24
|
formatter?: (value: number) => string;
|
|
25
25
|
flashClass?: string;
|
|
26
26
|
fromPrevious?: boolean;
|
|
27
27
|
showFreshness?: boolean;
|
|
28
28
|
}
|
|
29
|
-
export declare function
|
|
30
|
-
export interface
|
|
29
|
+
export declare function KjunPriceCell({ value, formatter, stale, showFreshness, source, fetchedAt, flashClass, fromPrevious, }: KjunPriceCellProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export interface KjunSignedValueProps {
|
|
31
31
|
value?: number | string | null;
|
|
32
32
|
format?: "number" | "percent";
|
|
33
33
|
isRaw?: boolean;
|
|
@@ -41,4 +41,4 @@ export interface DsSignedValueProps {
|
|
|
41
41
|
showFreshness?: boolean;
|
|
42
42
|
formatter?: (value: number) => string;
|
|
43
43
|
}
|
|
44
|
-
export declare function
|
|
44
|
+
export declare function KjunSignedValue({ value, format: kind, isRaw, decimals, prefix, suffix, showSign, tone, loading, stale, showFreshness, formatter, }: KjunSignedValueProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
-
export interface
|
|
2
|
+
export interface KjunPopoverProps {
|
|
3
3
|
noPadding?: boolean;
|
|
4
4
|
open?: boolean;
|
|
5
5
|
onOpenChange?: (v: boolean) => void;
|
|
@@ -13,11 +13,11 @@ export interface DsPopoverProps {
|
|
|
13
13
|
trigger: ReactNode | ((open: boolean) => ReactNode);
|
|
14
14
|
children: ReactNode | ((close: () => void) => ReactNode);
|
|
15
15
|
}
|
|
16
|
-
export declare function
|
|
17
|
-
export interface
|
|
16
|
+
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, maxHeight, flip, focusOnOpen, ariaLabel, placement, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface KjunTooltipProps {
|
|
18
18
|
content?: string;
|
|
19
19
|
placement?: "top" | "bottom" | "left" | "right";
|
|
20
20
|
delay?: number;
|
|
21
21
|
children: ReactNode;
|
|
22
22
|
}
|
|
23
|
-
export declare function
|
|
23
|
+
export declare function KjunTooltip({ content, placement, delay, children, }: KjunTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
-
export interface
|
|
2
|
+
export interface KjunPopoverProps {
|
|
3
3
|
noPadding?: boolean;
|
|
4
4
|
open?: boolean;
|
|
5
5
|
onOpenChange?: (v: boolean) => void;
|
|
@@ -13,11 +13,11 @@ export interface DsPopoverProps {
|
|
|
13
13
|
trigger: ReactNode | ((open: boolean) => ReactNode);
|
|
14
14
|
children: ReactNode | ((close: () => void) => ReactNode);
|
|
15
15
|
}
|
|
16
|
-
export declare function
|
|
17
|
-
export interface
|
|
16
|
+
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, maxHeight, flip, focusOnOpen, ariaLabel, placement, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface KjunTooltipProps {
|
|
18
18
|
content?: string;
|
|
19
19
|
placement?: "top" | "bottom" | "left" | "right";
|
|
20
20
|
delay?: number;
|
|
21
21
|
children: ReactNode;
|
|
22
22
|
}
|
|
23
|
-
export declare function
|
|
23
|
+
export declare function KjunTooltip({ content, placement, delay, children, }: KjunTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
export interface
|
|
2
|
+
export interface KjunQuantityStepperProps {
|
|
3
3
|
value: number;
|
|
4
4
|
min?: number;
|
|
5
5
|
max?: number;
|
|
@@ -15,4 +15,4 @@ export interface DsQuantityStepperProps {
|
|
|
15
15
|
onChangeCommit?: (value: number) => void;
|
|
16
16
|
onInvalidInput?: (draft: string) => void;
|
|
17
17
|
}
|
|
18
|
-
export declare function
|
|
18
|
+
export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
export interface
|
|
2
|
+
export interface KjunQuantityStepperProps {
|
|
3
3
|
value: number;
|
|
4
4
|
min?: number;
|
|
5
5
|
max?: number;
|
|
@@ -15,4 +15,4 @@ export interface DsQuantityStepperProps {
|
|
|
15
15
|
onChangeCommit?: (value: number) => void;
|
|
16
16
|
onInvalidInput?: (draft: string) => void;
|
|
17
17
|
}
|
|
18
|
-
export declare function
|
|
18
|
+
export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface KjunSliderProps {
|
|
2
2
|
value: number;
|
|
3
3
|
min?: number;
|
|
4
4
|
max?: number;
|
|
@@ -9,7 +9,7 @@ export interface DsSliderProps {
|
|
|
9
9
|
onValueChange?: (value: number) => void;
|
|
10
10
|
onChangeCommit?: (value: number) => void;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "onValueChange" | "onChangeCommit"> {
|
|
13
13
|
value: [
|
|
14
14
|
number,
|
|
15
15
|
number
|
|
@@ -27,5 +27,5 @@ export interface DsRangeSliderProps extends Omit<DsSliderProps, "value" | "onVal
|
|
|
27
27
|
number
|
|
28
28
|
]) => void;
|
|
29
29
|
}
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function
|
|
30
|
+
export declare function KjunSlider(props: KjunSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function KjunRangeSlider(props: KjunRangeSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface KjunSliderProps {
|
|
2
2
|
value: number;
|
|
3
3
|
min?: number;
|
|
4
4
|
max?: number;
|
|
@@ -9,7 +9,7 @@ export interface DsSliderProps {
|
|
|
9
9
|
onValueChange?: (value: number) => void;
|
|
10
10
|
onChangeCommit?: (value: number) => void;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "onValueChange" | "onChangeCommit"> {
|
|
13
13
|
value: [
|
|
14
14
|
number,
|
|
15
15
|
number
|
|
@@ -27,5 +27,5 @@ export interface DsRangeSliderProps extends Omit<DsSliderProps, "value" | "onVal
|
|
|
27
27
|
number
|
|
28
28
|
]) => void;
|
|
29
29
|
}
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function
|
|
30
|
+
export declare function KjunSlider(props: KjunSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function KjunRangeSlider(props: KjunRangeSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { type InputSize } from "@kjun-ui/tokens";
|
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { type SearchInputModelProps } from "../../../shared/package-runtime/search-input.cjs";
|
|
4
4
|
import { SelectOption } from "./select-options.cjs";
|
|
5
|
-
export interface
|
|
5
|
+
export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T> {
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
error?: boolean;
|
|
@@ -18,4 +18,4 @@ export interface DsSearchInputProps<T extends SelectOption = SelectOption> exten
|
|
|
18
18
|
onEnter?: () => void;
|
|
19
19
|
onClear?: () => void;
|
|
20
20
|
}
|
|
21
|
-
export declare function
|
|
21
|
+
export declare function KjunSearchInput<T extends SelectOption = SelectOption>({ value, placeholder, ariaLabel, disabled, error, clearable, debounce, size, loadOptions, itemKey, labelField, minChars, emptyText, errorText, renderOption, onValueChange, onSelect, onSearchError, onEnter, onClear, }: KjunSearchInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { type InputSize } from "@kjun-ui/tokens";
|
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { type SearchInputModelProps } from "../../../shared/package-runtime/search-input.js";
|
|
4
4
|
import { SelectOption } from "./select-options.js";
|
|
5
|
-
export interface
|
|
5
|
+
export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T> {
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
error?: boolean;
|
|
@@ -18,4 +18,4 @@ export interface DsSearchInputProps<T extends SelectOption = SelectOption> exten
|
|
|
18
18
|
onEnter?: () => void;
|
|
19
19
|
onClear?: () => void;
|
|
20
20
|
}
|
|
21
|
-
export declare function
|
|
21
|
+
export declare function KjunSearchInput<T extends SelectOption = SelectOption>({ value, placeholder, ariaLabel, disabled, error, clearable, debounce, size, loadOptions, itemKey, labelField, minChars, emptyText, errorText, renderOption, onValueChange, onSelect, onSearchError, onEnter, onClear, }: KjunSearchInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { OptionValue, SelectOption } from "./select-options.cjs";
|
|
4
|
-
export interface
|
|
4
|
+
export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
5
5
|
value: OptionValue | OptionValue[] | null;
|
|
6
6
|
options?: T[];
|
|
7
7
|
placeholder?: string;
|
|
@@ -27,4 +27,4 @@ export interface DsSelectProps<T extends SelectOption = SelectOption> {
|
|
|
27
27
|
onSearch?: (v: string) => void;
|
|
28
28
|
onClear?: () => void;
|
|
29
29
|
}
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, valueKey, size, disabled, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { OptionValue, SelectOption } from "./select-options.js";
|
|
4
|
-
export interface
|
|
4
|
+
export interface KjunSelectProps<T extends SelectOption = SelectOption> {
|
|
5
5
|
value: OptionValue | OptionValue[] | null;
|
|
6
6
|
options?: T[];
|
|
7
7
|
placeholder?: string;
|
|
@@ -27,4 +27,4 @@ export interface DsSelectProps<T extends SelectOption = SelectOption> {
|
|
|
27
27
|
onSearch?: (v: string) => void;
|
|
28
28
|
onClear?: () => void;
|
|
29
29
|
}
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, valueKey, size, disabled, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
5
|
-
export {
|
|
6
|
-
export type {
|
|
7
|
-
export {
|
|
8
|
-
export type {
|
|
1
|
+
export { KjunCombobox } from "./combobox.cjs";
|
|
2
|
+
export type { KjunComboboxProps } from "./combobox.cjs";
|
|
3
|
+
export { KjunDatePicker } from "./date-picker.cjs";
|
|
4
|
+
export type { KjunDatePickerProps } from "./date-picker.cjs";
|
|
5
|
+
export { KjunSearchInput } from "./search-input.cjs";
|
|
6
|
+
export type { KjunSearchInputProps } from "./search-input.cjs";
|
|
7
|
+
export { KjunSelect } from "./select-control.cjs";
|
|
8
|
+
export type { KjunSelectProps } from "./select-control.cjs";
|
|
9
9
|
export { optionLabel, optionValue } from "./select-options.cjs";
|
|
10
10
|
export type { OptionValue, SelectOption } from "./select-options.cjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
5
|
-
export {
|
|
6
|
-
export type {
|
|
7
|
-
export {
|
|
8
|
-
export type {
|
|
1
|
+
export { KjunCombobox } from "./combobox.js";
|
|
2
|
+
export type { KjunComboboxProps } from "./combobox.js";
|
|
3
|
+
export { KjunDatePicker } from "./date-picker.js";
|
|
4
|
+
export type { KjunDatePickerProps } from "./date-picker.js";
|
|
5
|
+
export { KjunSearchInput } from "./search-input.js";
|
|
6
|
+
export type { KjunSearchInputProps } from "./search-input.js";
|
|
7
|
+
export { KjunSelect } from "./select-control.js";
|
|
8
|
+
export type { KjunSelectProps } from "./select-control.js";
|
|
9
9
|
export { optionLabel, optionValue } from "./select-options.js";
|
|
10
10
|
export type { OptionValue, SelectOption } from "./select-options.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type CSSProperties } from "react";
|
|
3
|
-
export interface
|
|
3
|
+
export interface KjunListSkeletonProps {
|
|
4
4
|
rows?: number;
|
|
5
5
|
variant?: "market" | "compact" | "notification";
|
|
6
6
|
avatar?: boolean;
|
|
7
7
|
avatarSize?: CSSProperties["width"];
|
|
8
8
|
quote?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function
|
|
11
|
-
export interface
|
|
10
|
+
export declare function KjunListSkeleton({ rows, variant, avatar, avatarSize, quote, }: KjunListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface KjunFormSkeletonProps {
|
|
12
12
|
fields?: (string | {
|
|
13
13
|
label?: string;
|
|
14
14
|
height?: CSSProperties["height"];
|
|
@@ -17,12 +17,12 @@ export interface DsFormSkeletonProps {
|
|
|
17
17
|
multiline?: boolean;
|
|
18
18
|
size?: InputSize;
|
|
19
19
|
}
|
|
20
|
-
export declare function
|
|
21
|
-
export interface
|
|
20
|
+
export declare function KjunFormSkeleton({ fields, columns, multiline, size, }: KjunFormSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface KjunChartSkeletonProps {
|
|
22
22
|
loadingText?: string;
|
|
23
23
|
kind?: "grid" | "line" | "bar" | "donut" | "candle" | "matrix";
|
|
24
24
|
height?: CSSProperties["height"];
|
|
25
25
|
}
|
|
26
|
-
export declare function
|
|
27
|
-
export {
|
|
28
|
-
export type {
|
|
26
|
+
export declare function KjunChartSkeleton({ loadingText, kind, height, }: KjunChartSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export { KjunMarketTableSkeleton } from "./market-skeleton.cjs";
|
|
28
|
+
export type { KjunMarketTableSkeletonProps } from "./market-skeleton.cjs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
import { type CSSProperties } from "react";
|
|
3
|
-
export interface
|
|
3
|
+
export interface KjunListSkeletonProps {
|
|
4
4
|
rows?: number;
|
|
5
5
|
variant?: "market" | "compact" | "notification";
|
|
6
6
|
avatar?: boolean;
|
|
7
7
|
avatarSize?: CSSProperties["width"];
|
|
8
8
|
quote?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function
|
|
11
|
-
export interface
|
|
10
|
+
export declare function KjunListSkeleton({ rows, variant, avatar, avatarSize, quote, }: KjunListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface KjunFormSkeletonProps {
|
|
12
12
|
fields?: (string | {
|
|
13
13
|
label?: string;
|
|
14
14
|
height?: CSSProperties["height"];
|
|
@@ -17,12 +17,12 @@ export interface DsFormSkeletonProps {
|
|
|
17
17
|
multiline?: boolean;
|
|
18
18
|
size?: InputSize;
|
|
19
19
|
}
|
|
20
|
-
export declare function
|
|
21
|
-
export interface
|
|
20
|
+
export declare function KjunFormSkeleton({ fields, columns, multiline, size, }: KjunFormSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface KjunChartSkeletonProps {
|
|
22
22
|
loadingText?: string;
|
|
23
23
|
kind?: "grid" | "line" | "bar" | "donut" | "candle" | "matrix";
|
|
24
24
|
height?: CSSProperties["height"];
|
|
25
25
|
}
|
|
26
|
-
export declare function
|
|
27
|
-
export {
|
|
28
|
-
export type {
|
|
26
|
+
export declare function KjunChartSkeleton({ loadingText, kind, height, }: KjunChartSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export { KjunMarketTableSkeleton } from "./market-skeleton.js";
|
|
28
|
+
export type { KjunMarketTableSkeletonProps } from "./market-skeleton.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type InputHTMLAttributes } from "react";
|
|
2
|
-
/** A native checkbox (role, indeterminate, row click isolation) drawn like
|
|
2
|
+
/** A native checkbox (role, indeterminate, row click isolation) drawn like KjunCheckbox sm. */
|
|
3
3
|
export declare const TableCheck: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type InputHTMLAttributes } from "react";
|
|
2
|
-
/** A native checkbox (role, indeterminate, row click isolation) drawn like
|
|
2
|
+
/** A native checkbox (role, indeterminate, row click isolation) drawn like KjunCheckbox sm. */
|
|
3
3
|
export declare const TableCheck: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -2,9 +2,9 @@ import type { CSSProperties } from "react";
|
|
|
2
2
|
import { type TableProps } from "../../../shared/package-runtime/table.cjs";
|
|
3
3
|
export { getValue } from "../../../shared/package-runtime/table.cjs";
|
|
4
4
|
export type { TableSort, TableColumn, TableCardSection, TablePagination } from "../../../shared/package-runtime/table.cjs";
|
|
5
|
-
export interface
|
|
5
|
+
export interface KjunTableProps<Row extends object = Record<string, unknown>> extends TableProps<Row, CSSProperties["maxHeight"]> {
|
|
6
6
|
}
|
|
7
|
-
export declare function useTableModel<Row extends object>(props:
|
|
7
|
+
export declare function useTableModel<Row extends object>(props: KjunTableProps<Row>): {
|
|
8
8
|
rows: Row[];
|
|
9
9
|
key: (row: Row, index?: number) => string | number;
|
|
10
10
|
sort: import("@kjun-ui/tokens").TableSort;
|
|
@@ -2,9 +2,9 @@ import type { CSSProperties } from "react";
|
|
|
2
2
|
import { type TableProps } from "../../../shared/package-runtime/table.js";
|
|
3
3
|
export { getValue } from "../../../shared/package-runtime/table.js";
|
|
4
4
|
export type { TableSort, TableColumn, TableCardSection, TablePagination } from "../../../shared/package-runtime/table.js";
|
|
5
|
-
export interface
|
|
5
|
+
export interface KjunTableProps<Row extends object = Record<string, unknown>> extends TableProps<Row, CSSProperties["maxHeight"]> {
|
|
6
6
|
}
|
|
7
|
-
export declare function useTableModel<Row extends object>(props:
|
|
7
|
+
export declare function useTableModel<Row extends object>(props: KjunTableProps<Row>): {
|
|
8
8
|
rows: Row[];
|
|
9
9
|
key: (row: Row, index?: number) => string | number;
|
|
10
10
|
sort: import("@kjun-ui/tokens").TableSort;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function
|
|
1
|
+
import { KjunTableProps } from "./table-model.cjs";
|
|
2
|
+
export declare function KjunTable<Row extends object = Record<string, unknown>>(props: KjunTableProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function
|
|
1
|
+
import { KjunTableProps } from "./table-model.js";
|
|
2
|
+
export declare function KjunTable<Row extends object = Record<string, unknown>>(props: KjunTableProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { getValue, useTableModel } from "./table-model.cjs";
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
2
|
+
export type { KjunTableProps, TableCardSection, TableColumn, TablePagination, TableSort } from "./table-model.cjs";
|
|
3
|
+
export { KjunTable } from "./table-view.cjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { getValue, useTableModel } from "./table-model.js";
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
2
|
+
export type { KjunTableProps, TableCardSection, TableColumn, TablePagination, TableSort } from "./table-model.js";
|
|
3
|
+
export { KjunTable } from "./table-view.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TimePrecision, type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
export interface
|
|
2
|
+
export interface KjunTimePickerProps {
|
|
3
3
|
value: string | null;
|
|
4
4
|
precision?: TimePrecision;
|
|
5
5
|
min?: string;
|
|
@@ -14,4 +14,4 @@ export interface DsTimePickerProps {
|
|
|
14
14
|
onValueChange?: (value: string | null) => void;
|
|
15
15
|
onChangeCommit?: (value: string | null) => void;
|
|
16
16
|
}
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function KjunTimePicker({ value, precision, min, max, minuteStep, secondStep, disabled, error, clearable, size, ariaLabel, onValueChange, onChangeCommit }: KjunTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TimePrecision, type InputSize } from "@kjun-ui/tokens";
|
|
2
|
-
export interface
|
|
2
|
+
export interface KjunTimePickerProps {
|
|
3
3
|
value: string | null;
|
|
4
4
|
precision?: TimePrecision;
|
|
5
5
|
min?: string;
|
|
@@ -14,4 +14,4 @@ export interface DsTimePickerProps {
|
|
|
14
14
|
onValueChange?: (value: string | null) => void;
|
|
15
15
|
onChangeCommit?: (value: string | null) => void;
|
|
16
16
|
}
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function KjunTimePicker({ value, precision, min, max, minuteStep, secondStep, disabled, error, clearable, size, ariaLabel, onValueChange, onChangeCommit }: KjunTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1 @@
|
|
|
1
|
-
|
|
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
|
-
};
|
|
1
|
+
export { typeStyle, selectionTypeStyle, inputTypeStyle } from "../../../shared/package-runtime/typography.cjs";
|
|
@@ -1,19 +1 @@
|
|
|
1
|
-
|
|
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
|
-
};
|
|
1
|
+
export { typeStyle, selectionTypeStyle, inputTypeStyle } from "../../../shared/package-runtime/typography.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TableSort } from "@kjun-ui/tokens";
|
|
2
|
+
export declare function getValue(row: object, key: string): unknown;
|
|
3
|
+
export declare function sortTableRows<Row extends object>(data: readonly Row[], sort: TableSort, { sortable, sortMode }: {
|
|
4
|
+
sortable?: boolean;
|
|
5
|
+
sortMode?: "client" | "server";
|
|
6
|
+
}): readonly Row[];
|
|
7
|
+
export declare const tableRowKey: (row: object, rowKey: string, index?: number) => string | number;
|
|
8
|
+
export declare function tableSelection<Row extends object>(rows: readonly Row[], selected: readonly Row[], rowKey: string): {
|
|
9
|
+
isSelected: (row: Row) => boolean;
|
|
10
|
+
all: boolean;
|
|
11
|
+
some: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const toggleSelectedRow: <Row extends object>(selected: readonly Row[], row: Row, rowKey: string) => Row[];
|
|
14
|
+
export declare const toggleAllRows: <Row extends object>(rows: readonly Row[], all: boolean) => Row[];
|
|
15
|
+
export declare const toggleExpandedRow: (expanded: readonly (string | number)[], id: string | number, single: boolean) => (string | number)[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TableSort } from "@kjun-ui/tokens";
|
|
2
|
+
export declare function getValue(row: object, key: string): unknown;
|
|
3
|
+
export declare function sortTableRows<Row extends object>(data: readonly Row[], sort: TableSort, { sortable, sortMode }: {
|
|
4
|
+
sortable?: boolean;
|
|
5
|
+
sortMode?: "client" | "server";
|
|
6
|
+
}): readonly Row[];
|
|
7
|
+
export declare const tableRowKey: (row: object, rowKey: string, index?: number) => string | number;
|
|
8
|
+
export declare function tableSelection<Row extends object>(rows: readonly Row[], selected: readonly Row[], rowKey: string): {
|
|
9
|
+
isSelected: (row: Row) => boolean;
|
|
10
|
+
all: boolean;
|
|
11
|
+
some: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const toggleSelectedRow: <Row extends object>(selected: readonly Row[], row: Row, rowKey: string) => Row[];
|
|
14
|
+
export declare const toggleAllRows: <Row extends object>(rows: readonly Row[], all: boolean) => Row[];
|
|
15
|
+
export declare const toggleExpandedRow: (expanded: readonly (string | number)[], id: string | number, single: boolean) => (string | number)[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type TableSort, type QueryDisplayProps } from "@kjun-ui/tokens";
|
|
2
2
|
export type { TableSort } from "@kjun-ui/tokens";
|
|
3
3
|
import { type ReactNode } from "react";
|
|
4
|
+
export { getValue } from "./table-model.cjs";
|
|
4
5
|
export interface TableColumn<Row extends object = Record<string, unknown>> {
|
|
5
6
|
key: string;
|
|
6
7
|
label: string;
|
|
@@ -78,7 +79,6 @@ export interface TableProps<Row extends object = Record<string, unknown>, MaxHei
|
|
|
78
79
|
onSearch?: (query: string) => void;
|
|
79
80
|
onRetry?: () => void;
|
|
80
81
|
}
|
|
81
|
-
export declare function getValue(row: object, key: string): unknown;
|
|
82
82
|
export declare function useTableModel<Row extends object>(props: TableProps<Row, unknown>): {
|
|
83
83
|
rows: Row[];
|
|
84
84
|
key: (row: Row, index?: number) => string | number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type TableSort, type QueryDisplayProps } from "@kjun-ui/tokens";
|
|
2
2
|
export type { TableSort } from "@kjun-ui/tokens";
|
|
3
3
|
import { type ReactNode } from "react";
|
|
4
|
+
export { getValue } from "./table-model.js";
|
|
4
5
|
export interface TableColumn<Row extends object = Record<string, unknown>> {
|
|
5
6
|
key: string;
|
|
6
7
|
label: string;
|
|
@@ -78,7 +79,6 @@ export interface TableProps<Row extends object = Record<string, unknown>, MaxHei
|
|
|
78
79
|
onSearch?: (query: string) => void;
|
|
79
80
|
onRetry?: () => void;
|
|
80
81
|
}
|
|
81
|
-
export declare function getValue(row: object, key: string): unknown;
|
|
82
82
|
export declare function useTableModel<Row extends object>(props: TableProps<Row, unknown>): {
|
|
83
83
|
rows: Row[];
|
|
84
84
|
key: (row: Row, index?: number) => string | number;
|
|
@@ -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
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjun-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://ui.kjun.dev",
|
|
6
6
|
"repository": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"./package.json": "./package.json"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@kjun-ui/tokens": "0.
|
|
44
|
+
"@kjun-ui/tokens": "0.5.1",
|
|
45
45
|
"react-aria-components": "1.21.1",
|
|
46
|
-
"@kjun-ui/icons": "0.
|
|
46
|
+
"@kjun-ui/icons": "0.5.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": "^19.2.3",
|