@kjun-ui/native 0.12.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2822 -2219
- package/dist/index.js +2236 -1635
- package/dist/index.web.cjs +2839 -2236
- package/dist/index.web.js +2238 -1637
- package/dist/styles.css +102 -3
- package/dist/types/packages/native/src/button.d.cts +2 -0
- package/dist/types/packages/native/src/button.d.ts +2 -0
- package/dist/types/packages/native/src/card.d.cts +9 -2
- package/dist/types/packages/native/src/card.d.ts +9 -2
- package/dist/types/packages/native/src/choice-controls.d.cts +3 -1
- package/dist/types/packages/native/src/choice-controls.d.ts +3 -1
- package/dist/types/packages/native/src/data-state.d.cts +3 -0
- package/dist/types/packages/native/src/data-state.d.ts +3 -0
- package/dist/types/packages/native/src/date-picker.d.cts +3 -1
- package/dist/types/packages/native/src/date-picker.d.ts +3 -1
- package/dist/types/packages/native/src/display-primitives.d.cts +2 -1
- package/dist/types/packages/native/src/display-primitives.d.ts +2 -1
- package/dist/types/packages/native/src/fab.d.cts +14 -0
- package/dist/types/packages/native/src/fab.d.ts +14 -0
- package/dist/types/packages/native/src/feedback.d.cts +5 -1
- package/dist/types/packages/native/src/feedback.d.ts +5 -1
- package/dist/types/packages/native/src/field-surface.d.cts +1 -0
- package/dist/types/packages/native/src/field-surface.d.ts +1 -0
- package/dist/types/packages/native/src/financial-display.d.cts +8 -8
- package/dist/types/packages/native/src/financial-display.d.ts +8 -8
- package/dist/types/packages/native/src/fonts.d.cts +14 -0
- package/dist/types/packages/native/src/fonts.d.ts +14 -0
- package/dist/types/packages/native/src/index.d.cts +2 -0
- package/dist/types/packages/native/src/index.d.ts +2 -0
- package/dist/types/packages/native/src/input.d.cts +3 -1
- package/dist/types/packages/native/src/input.d.ts +3 -1
- package/dist/types/packages/native/src/internal.d.cts +4 -0
- package/dist/types/packages/native/src/internal.d.ts +4 -0
- package/dist/types/packages/native/src/list.d.cts +17 -2
- package/dist/types/packages/native/src/list.d.ts +17 -2
- package/dist/types/packages/native/src/media.d.cts +4 -2
- package/dist/types/packages/native/src/media.d.ts +4 -2
- package/dist/types/packages/native/src/provider.d.cts +14 -2
- package/dist/types/packages/native/src/provider.d.ts +14 -2
- package/dist/types/shared/package-runtime/feedback-dialog.d.cts +2 -1
- package/dist/types/shared/package-runtime/feedback-dialog.d.ts +2 -1
- package/dist/types/shared/package-runtime/layout-primitives.d.cts +1 -1
- package/dist/types/shared/package-runtime/layout-primitives.d.ts +1 -1
- package/dist/types/shared/package-runtime/messages/en.d.cts +2 -0
- package/dist/types/shared/package-runtime/messages/en.d.ts +2 -0
- package/dist/types/shared/package-runtime/messages/index.d.cts +26 -0
- package/dist/types/shared/package-runtime/messages/index.d.ts +26 -0
- package/dist/types/shared/package-runtime/messages/ko.d.cts +116 -0
- package/dist/types/shared/package-runtime/messages/ko.d.ts +116 -0
- package/dist/types/shared/package-runtime/messages-context.d.cts +124 -0
- package/dist/types/shared/package-runtime/messages-context.d.ts +124 -0
- package/dist/types/shared/package-runtime/options.d.cts +4 -2
- package/dist/types/shared/package-runtime/options.d.ts +4 -2
- package/dist/types/shared/package-runtime/progress-circle.d.cts +11 -0
- package/dist/types/shared/package-runtime/progress-circle.d.ts +11 -0
- package/dist/types/shared/package-runtime/relative-time.d.cts +1 -1
- package/dist/types/shared/package-runtime/relative-time.d.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type KjunMessages, type KjunMessageScope } from "./messages/index.cjs";
|
|
3
|
+
export declare const KjunMessageContext: import("react").Context<KjunMessageScope>;
|
|
4
|
+
export declare function KjunMessagesProvider({ locale, messages, children }: {
|
|
5
|
+
locale?: string;
|
|
6
|
+
messages?: Partial<KjunMessages>;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const useKjunMessageScope: () => KjunMessageScope;
|
|
10
|
+
export declare const useKjunMessages: () => {
|
|
11
|
+
cancel: string;
|
|
12
|
+
confirm: string;
|
|
13
|
+
save: string;
|
|
14
|
+
close: string;
|
|
15
|
+
closeNotification: string;
|
|
16
|
+
confirmTitle: string;
|
|
17
|
+
promptTitle: string;
|
|
18
|
+
invalidInput: string;
|
|
19
|
+
dialog: string;
|
|
20
|
+
panel: string;
|
|
21
|
+
details: string;
|
|
22
|
+
menu: string;
|
|
23
|
+
remove: (label: string) => string;
|
|
24
|
+
user: string;
|
|
25
|
+
loading: string;
|
|
26
|
+
loadingEllipsis: string;
|
|
27
|
+
refreshing: string;
|
|
28
|
+
chartLoading: string;
|
|
29
|
+
noData: string;
|
|
30
|
+
noItems: string;
|
|
31
|
+
noResults: string;
|
|
32
|
+
errorTitle: string;
|
|
33
|
+
retry: string;
|
|
34
|
+
somethingWentWrong: string;
|
|
35
|
+
retryHint: string;
|
|
36
|
+
refreshError: (error: string) => string;
|
|
37
|
+
progress: string;
|
|
38
|
+
search: string;
|
|
39
|
+
searching: string;
|
|
40
|
+
searchOrSelect: string;
|
|
41
|
+
searchFailed: string;
|
|
42
|
+
minChars: (count: number) => string;
|
|
43
|
+
select: string;
|
|
44
|
+
optional: string;
|
|
45
|
+
clearSelection: string;
|
|
46
|
+
searchOptions: string;
|
|
47
|
+
selectedCount: (count: number) => string;
|
|
48
|
+
loadMore: string;
|
|
49
|
+
clearInput: string;
|
|
50
|
+
clearValue: (label: string) => string;
|
|
51
|
+
datePlaceholder: string;
|
|
52
|
+
clearDate: string;
|
|
53
|
+
calendarTitle: (year: number, month: number) => string;
|
|
54
|
+
weekdays: string;
|
|
55
|
+
previousMonth: string;
|
|
56
|
+
nextMonth: string;
|
|
57
|
+
time: string;
|
|
58
|
+
hour: string;
|
|
59
|
+
minute: string;
|
|
60
|
+
second: string;
|
|
61
|
+
value: string;
|
|
62
|
+
minimum: string;
|
|
63
|
+
maximum: string;
|
|
64
|
+
increase: string;
|
|
65
|
+
decrease: string;
|
|
66
|
+
increaseQuantity: string;
|
|
67
|
+
decreaseQuantity: string;
|
|
68
|
+
quantity: string;
|
|
69
|
+
relativeTimeFallback: (amount: number, unit: string) => string;
|
|
70
|
+
copy: string;
|
|
71
|
+
copied: string;
|
|
72
|
+
copyFailed: string;
|
|
73
|
+
refresh: string;
|
|
74
|
+
externalLink: string;
|
|
75
|
+
newWindow: string;
|
|
76
|
+
dataTable: string;
|
|
77
|
+
selectRow: (row: number) => string;
|
|
78
|
+
selectAll: string;
|
|
79
|
+
selectAllPartial: string;
|
|
80
|
+
deselectAll: string;
|
|
81
|
+
selectionActions: string;
|
|
82
|
+
selectedItems: (count: number) => string;
|
|
83
|
+
searchTable: string;
|
|
84
|
+
expandRow: string;
|
|
85
|
+
collapse: string;
|
|
86
|
+
showDetails: string;
|
|
87
|
+
ascending: string;
|
|
88
|
+
descending: string;
|
|
89
|
+
tabs: string;
|
|
90
|
+
breadcrumb: string;
|
|
91
|
+
mainNavigation: string;
|
|
92
|
+
pagination: string;
|
|
93
|
+
itemsPerPage: string;
|
|
94
|
+
perPage: (count: number) => string;
|
|
95
|
+
pageRange: (from: number, to: number, total: string) => string;
|
|
96
|
+
page: (page: number) => string;
|
|
97
|
+
firstPage: string;
|
|
98
|
+
previousPage: string;
|
|
99
|
+
nextPage: string;
|
|
100
|
+
lastPage: string;
|
|
101
|
+
marketData: string;
|
|
102
|
+
metrics: string;
|
|
103
|
+
watchToggle: (name: string, active: boolean) => string;
|
|
104
|
+
favoriteToggle: (name: string, active: boolean) => string;
|
|
105
|
+
lastUpdated: string;
|
|
106
|
+
unitLabel: string;
|
|
107
|
+
totalCount: (count: number, unit: string) => string;
|
|
108
|
+
closePrice: string;
|
|
109
|
+
delayed: string;
|
|
110
|
+
noRealtimeQuote: string;
|
|
111
|
+
realtimeDelayed: string;
|
|
112
|
+
arbitrage: string;
|
|
113
|
+
deviationWarning: (threshold: number) => string;
|
|
114
|
+
statusQueued: string;
|
|
115
|
+
statusStarting: string;
|
|
116
|
+
statusRunning: string;
|
|
117
|
+
statusStopping: string;
|
|
118
|
+
statusStopped: string;
|
|
119
|
+
statusCompleted: string;
|
|
120
|
+
statusCompletedWithErrors: string;
|
|
121
|
+
statusFailed: string;
|
|
122
|
+
statusUnknown: string;
|
|
123
|
+
statusNoRuns: string;
|
|
124
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type KjunMessages, type KjunMessageScope } from "./messages/index.js";
|
|
3
|
+
export declare const KjunMessageContext: import("react").Context<KjunMessageScope>;
|
|
4
|
+
export declare function KjunMessagesProvider({ locale, messages, children }: {
|
|
5
|
+
locale?: string;
|
|
6
|
+
messages?: Partial<KjunMessages>;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const useKjunMessageScope: () => KjunMessageScope;
|
|
10
|
+
export declare const useKjunMessages: () => {
|
|
11
|
+
cancel: string;
|
|
12
|
+
confirm: string;
|
|
13
|
+
save: string;
|
|
14
|
+
close: string;
|
|
15
|
+
closeNotification: string;
|
|
16
|
+
confirmTitle: string;
|
|
17
|
+
promptTitle: string;
|
|
18
|
+
invalidInput: string;
|
|
19
|
+
dialog: string;
|
|
20
|
+
panel: string;
|
|
21
|
+
details: string;
|
|
22
|
+
menu: string;
|
|
23
|
+
remove: (label: string) => string;
|
|
24
|
+
user: string;
|
|
25
|
+
loading: string;
|
|
26
|
+
loadingEllipsis: string;
|
|
27
|
+
refreshing: string;
|
|
28
|
+
chartLoading: string;
|
|
29
|
+
noData: string;
|
|
30
|
+
noItems: string;
|
|
31
|
+
noResults: string;
|
|
32
|
+
errorTitle: string;
|
|
33
|
+
retry: string;
|
|
34
|
+
somethingWentWrong: string;
|
|
35
|
+
retryHint: string;
|
|
36
|
+
refreshError: (error: string) => string;
|
|
37
|
+
progress: string;
|
|
38
|
+
search: string;
|
|
39
|
+
searching: string;
|
|
40
|
+
searchOrSelect: string;
|
|
41
|
+
searchFailed: string;
|
|
42
|
+
minChars: (count: number) => string;
|
|
43
|
+
select: string;
|
|
44
|
+
optional: string;
|
|
45
|
+
clearSelection: string;
|
|
46
|
+
searchOptions: string;
|
|
47
|
+
selectedCount: (count: number) => string;
|
|
48
|
+
loadMore: string;
|
|
49
|
+
clearInput: string;
|
|
50
|
+
clearValue: (label: string) => string;
|
|
51
|
+
datePlaceholder: string;
|
|
52
|
+
clearDate: string;
|
|
53
|
+
calendarTitle: (year: number, month: number) => string;
|
|
54
|
+
weekdays: string;
|
|
55
|
+
previousMonth: string;
|
|
56
|
+
nextMonth: string;
|
|
57
|
+
time: string;
|
|
58
|
+
hour: string;
|
|
59
|
+
minute: string;
|
|
60
|
+
second: string;
|
|
61
|
+
value: string;
|
|
62
|
+
minimum: string;
|
|
63
|
+
maximum: string;
|
|
64
|
+
increase: string;
|
|
65
|
+
decrease: string;
|
|
66
|
+
increaseQuantity: string;
|
|
67
|
+
decreaseQuantity: string;
|
|
68
|
+
quantity: string;
|
|
69
|
+
relativeTimeFallback: (amount: number, unit: string) => string;
|
|
70
|
+
copy: string;
|
|
71
|
+
copied: string;
|
|
72
|
+
copyFailed: string;
|
|
73
|
+
refresh: string;
|
|
74
|
+
externalLink: string;
|
|
75
|
+
newWindow: string;
|
|
76
|
+
dataTable: string;
|
|
77
|
+
selectRow: (row: number) => string;
|
|
78
|
+
selectAll: string;
|
|
79
|
+
selectAllPartial: string;
|
|
80
|
+
deselectAll: string;
|
|
81
|
+
selectionActions: string;
|
|
82
|
+
selectedItems: (count: number) => string;
|
|
83
|
+
searchTable: string;
|
|
84
|
+
expandRow: string;
|
|
85
|
+
collapse: string;
|
|
86
|
+
showDetails: string;
|
|
87
|
+
ascending: string;
|
|
88
|
+
descending: string;
|
|
89
|
+
tabs: string;
|
|
90
|
+
breadcrumb: string;
|
|
91
|
+
mainNavigation: string;
|
|
92
|
+
pagination: string;
|
|
93
|
+
itemsPerPage: string;
|
|
94
|
+
perPage: (count: number) => string;
|
|
95
|
+
pageRange: (from: number, to: number, total: string) => string;
|
|
96
|
+
page: (page: number) => string;
|
|
97
|
+
firstPage: string;
|
|
98
|
+
previousPage: string;
|
|
99
|
+
nextPage: string;
|
|
100
|
+
lastPage: string;
|
|
101
|
+
marketData: string;
|
|
102
|
+
metrics: string;
|
|
103
|
+
watchToggle: (name: string, active: boolean) => string;
|
|
104
|
+
favoriteToggle: (name: string, active: boolean) => string;
|
|
105
|
+
lastUpdated: string;
|
|
106
|
+
unitLabel: string;
|
|
107
|
+
totalCount: (count: number, unit: string) => string;
|
|
108
|
+
closePrice: string;
|
|
109
|
+
delayed: string;
|
|
110
|
+
noRealtimeQuote: string;
|
|
111
|
+
realtimeDelayed: string;
|
|
112
|
+
arbitrage: string;
|
|
113
|
+
deviationWarning: (threshold: number) => string;
|
|
114
|
+
statusQueued: string;
|
|
115
|
+
statusStarting: string;
|
|
116
|
+
statusRunning: string;
|
|
117
|
+
statusStopping: string;
|
|
118
|
+
statusStopped: string;
|
|
119
|
+
statusCompleted: string;
|
|
120
|
+
statusCompletedWithErrors: string;
|
|
121
|
+
statusFailed: string;
|
|
122
|
+
statusUnknown: string;
|
|
123
|
+
statusNoRuns: string;
|
|
124
|
+
};
|
|
@@ -9,8 +9,8 @@ export declare function optionKey(option: SelectOption, key: string, index: numb
|
|
|
9
9
|
export declare function optionSelected(value: OptionValue | OptionValue[] | null, option: SelectOption, key: string): boolean;
|
|
10
10
|
export declare function nextOptionValue(value: OptionValue | OptionValue[] | null, option: SelectOption, key: string, multiple: boolean): OptionValue | OptionValue[];
|
|
11
11
|
/** 0 label starts with the query, 1 label contains it, 2 a searchKeys field contains it, -1 no match; an empty query matches as 0. */
|
|
12
|
-
export declare function optionMatchRank(option: SelectOption, query: string, labelKey: string, searchKeys?: readonly string[]):
|
|
13
|
-
export declare function selectOptions<T extends SelectOption>({ options, value, labelKey, valueKey, query, pageSize, limit, loading, multiple, filterFn, searchKeys, }: {
|
|
12
|
+
export declare function optionMatchRank(option: SelectOption, query: string, labelKey: string, searchKeys?: readonly string[]): 1 | -1 | 0 | 2;
|
|
13
|
+
export declare function selectOptions<T extends SelectOption>({ options, value, labelKey, valueKey, query, pageSize, limit, loading, multiple, filterFn, searchKeys, selectedCount, }: {
|
|
14
14
|
options: T[];
|
|
15
15
|
value: OptionValue | OptionValue[] | null;
|
|
16
16
|
labelKey: string;
|
|
@@ -22,6 +22,8 @@ export declare function selectOptions<T extends SelectOption>({ options, value,
|
|
|
22
22
|
multiple: boolean;
|
|
23
23
|
filterFn?: (option: T, query: string) => boolean;
|
|
24
24
|
searchKeys?: readonly string[];
|
|
25
|
+
/** Trigger label for several selected options; platforms pass KjunProvider's messages.selectedCount. */
|
|
26
|
+
selectedCount?: (count: number) => string;
|
|
25
27
|
}): {
|
|
26
28
|
selected: (option: T) => boolean;
|
|
27
29
|
matching: {
|
|
@@ -9,8 +9,8 @@ export declare function optionKey(option: SelectOption, key: string, index: numb
|
|
|
9
9
|
export declare function optionSelected(value: OptionValue | OptionValue[] | null, option: SelectOption, key: string): boolean;
|
|
10
10
|
export declare function nextOptionValue(value: OptionValue | OptionValue[] | null, option: SelectOption, key: string, multiple: boolean): OptionValue | OptionValue[];
|
|
11
11
|
/** 0 label starts with the query, 1 label contains it, 2 a searchKeys field contains it, -1 no match; an empty query matches as 0. */
|
|
12
|
-
export declare function optionMatchRank(option: SelectOption, query: string, labelKey: string, searchKeys?: readonly string[]):
|
|
13
|
-
export declare function selectOptions<T extends SelectOption>({ options, value, labelKey, valueKey, query, pageSize, limit, loading, multiple, filterFn, searchKeys, }: {
|
|
12
|
+
export declare function optionMatchRank(option: SelectOption, query: string, labelKey: string, searchKeys?: readonly string[]): 1 | -1 | 0 | 2;
|
|
13
|
+
export declare function selectOptions<T extends SelectOption>({ options, value, labelKey, valueKey, query, pageSize, limit, loading, multiple, filterFn, searchKeys, selectedCount, }: {
|
|
14
14
|
options: T[];
|
|
15
15
|
value: OptionValue | OptionValue[] | null;
|
|
16
16
|
labelKey: string;
|
|
@@ -22,6 +22,8 @@ export declare function selectOptions<T extends SelectOption>({ options, value,
|
|
|
22
22
|
multiple: boolean;
|
|
23
23
|
filterFn?: (option: T, query: string) => boolean;
|
|
24
24
|
searchKeys?: readonly string[];
|
|
25
|
+
/** Trigger label for several selected options; platforms pass KjunProvider's messages.selectedCount. */
|
|
26
|
+
selectedCount?: (count: number) => string;
|
|
25
27
|
}): {
|
|
26
28
|
selected: (option: T) => boolean;
|
|
27
29
|
matching: {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ProgressCircleSize = "sm" | "md" | "lg";
|
|
2
|
+
/** Circle progress geometry: the arc is a dashed stroke whose visible length is the percentage of the circumference. */
|
|
3
|
+
export declare function progressCircle(size: ProgressCircleSize, percentage: number): {
|
|
4
|
+
diameter: 24 | 48 | 64;
|
|
5
|
+
stroke: 4 | 6;
|
|
6
|
+
radius: number;
|
|
7
|
+
centre: number;
|
|
8
|
+
circumference: number;
|
|
9
|
+
offset: number;
|
|
10
|
+
showsPercentage: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ProgressCircleSize = "sm" | "md" | "lg";
|
|
2
|
+
/** Circle progress geometry: the arc is a dashed stroke whose visible length is the percentage of the circumference. */
|
|
3
|
+
export declare function progressCircle(size: ProgressCircleSize, percentage: number): {
|
|
4
|
+
diameter: 24 | 48 | 64;
|
|
5
|
+
stroke: 4 | 6;
|
|
6
|
+
radius: number;
|
|
7
|
+
centre: number;
|
|
8
|
+
circumference: number;
|
|
9
|
+
offset: number;
|
|
10
|
+
showsPercentage: boolean;
|
|
11
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { formatRelativeTime } from "./messages/index.cjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { formatRelativeTime } from "./messages/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjun-ui/native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://ui.kjun.dev",
|
|
6
6
|
"repository": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@kjun-ui/tokens": "0.
|
|
51
|
-
"@kjun-ui/icons": "0.
|
|
50
|
+
"@kjun-ui/tokens": "0.14.0",
|
|
51
|
+
"@kjun-ui/icons": "0.14.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "^19.2.3",
|