@kjun-ui/native 0.12.2 → 0.13.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 +2691 -2201
- package/dist/index.js +2099 -1612
- package/dist/index.web.cjs +2708 -2218
- package/dist/index.web.js +2101 -1614
- package/dist/styles.css +30 -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/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/fab.d.cts +14 -0
- package/dist/types/packages/native/src/fab.d.ts +14 -0
- 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 +5 -1
- package/dist/types/packages/native/src/list.d.ts +5 -1
- 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/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/relative-time.d.cts +1 -1
- package/dist/types/shared/package-runtime/relative-time.d.ts +1 -1
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
--_kjun-color-brand-light: var(--kjun-brand-light, var(--kjun-border));
|
|
79
79
|
--_kjun-color-selected-bg: var(--kjun-selected-bg, var(--kjun-active));
|
|
80
80
|
--_kjun-color-on-brand: var(--kjun-on-brand, var(--kjun-inverse));
|
|
81
|
+
--_kjun-color-switch-thumb-on: var(--kjun-switch-thumb-on, var(--kjun-on-brand, var(--kjun-inverse)));
|
|
81
82
|
--_kjun-color-on-danger: var(--kjun-on-danger, var(--kjun-inverse));
|
|
82
83
|
--_kjun-color-on-success: var(--kjun-on-success, var(--kjun-inverse));
|
|
83
84
|
--_kjun-color-on-warning: var(--kjun-on-warning, var(--kjun-inverse));
|
|
@@ -180,6 +181,7 @@
|
|
|
180
181
|
--_kjun-brand-light: var(--_kjun-color-brand-light);
|
|
181
182
|
--_kjun-selected-bg: var(--_kjun-color-selected-bg);
|
|
182
183
|
--_kjun-on-brand: var(--_kjun-color-on-brand);
|
|
184
|
+
--_kjun-switch-thumb-on: var(--_kjun-color-switch-thumb-on);
|
|
183
185
|
--_kjun-on-danger: var(--_kjun-color-on-danger);
|
|
184
186
|
--_kjun-on-success: var(--_kjun-color-on-success);
|
|
185
187
|
--_kjun-on-warning: var(--_kjun-color-on-warning);
|
|
@@ -256,9 +258,14 @@
|
|
|
256
258
|
--_kjun-extension-state-padding-sm: 24px;
|
|
257
259
|
--_kjun-extension-state-padding-md: 48px;
|
|
258
260
|
--_kjun-extension-state-padding-lg: 80px;
|
|
261
|
+
--_kjun-extension-fab-size: 56px;
|
|
262
|
+
--_kjun-extension-fab-inset: 16px;
|
|
263
|
+
--_kjun-extension-fab-icon-size: 24px;
|
|
259
264
|
--_kjun-extension-list-padding: 16px;
|
|
260
265
|
--_kjun-extension-list-gap: 12px;
|
|
261
266
|
--_kjun-extension-list-minimum-height: 56px;
|
|
267
|
+
--_kjun-extension-list-compact-minimum-height: 44px;
|
|
268
|
+
--_kjun-extension-list-compact-padding-y: 12px;
|
|
262
269
|
--_kjun-extension-list-description-gap: 4px;
|
|
263
270
|
--_kjun-extension-list-actions-gap: 8px;
|
|
264
271
|
--_kjun-extension-list-actions-padding: 16px;
|
|
@@ -1255,6 +1262,11 @@
|
|
|
1255
1262
|
.kjun-scope .kjun-choice:not(.kjun-choice--disabled):active .kjun-radio,
|
|
1256
1263
|
.kjun-scope .kjun-choice:not(.kjun-choice--disabled) input:active + .kjun-radio { border-color: var(--_kjun-brand-active); }
|
|
1257
1264
|
.kjun-scope .kjun-switch + .kjun-choice-label { margin-left: var(--_kjun-extension-switch-label-gap); }
|
|
1265
|
+
/* A switch description sits under its label and starts where the label starts. */
|
|
1266
|
+
.kjun-scope .kjun-choice-text { display: flex; flex-direction: column; min-width: 0; }
|
|
1267
|
+
.kjun-scope .kjun-switch + .kjun-choice-text { margin-left: var(--_kjun-extension-switch-label-gap); }
|
|
1268
|
+
.kjun-scope .kjun-choice-text > .kjun-choice-label { margin-left: 0; }
|
|
1269
|
+
.kjun-scope .kjun-choice-description { margin-top: var(--_kjun-geometry-dimension-value4); font-size: var(--_kjun-type-caption-size); line-height: var(--_kjun-type-caption-line); font-weight: var(--_kjun-type-caption-weight); letter-spacing: var(--_kjun-type-caption-tracking); color: var(--_kjun-color-text-secondary); }
|
|
1258
1270
|
.kjun-scope .kjun-switch {
|
|
1259
1271
|
position: relative;
|
|
1260
1272
|
flex-shrink: 0;
|
|
@@ -1289,7 +1301,7 @@
|
|
|
1289
1301
|
.kjun-scope .kjun-switch--on .kjun-switch-thumb {
|
|
1290
1302
|
--_kjun-switch-thumb-inset: var(--_kjun-extension-switch-padding);
|
|
1291
1303
|
margin: 0;
|
|
1292
|
-
background: var(--_kjun-on
|
|
1304
|
+
background: var(--_kjun-switch-thumb-on);
|
|
1293
1305
|
transform: translateX(calc(var(--_kjun-switch-width) - var(--_kjun-switch-height)));
|
|
1294
1306
|
}
|
|
1295
1307
|
|
|
@@ -1506,6 +1518,10 @@
|
|
|
1506
1518
|
.kjun-button[data-variant="secondary"]:active:not(:disabled) {
|
|
1507
1519
|
background: var(--_kjun-color-button-secondary-active);
|
|
1508
1520
|
}
|
|
1521
|
+
/* A link button hugs its text: no fill, no inset, the brand ink, underlined on hover and keyboard focus. */
|
|
1522
|
+
.kjun-button[data-variant="link"] { background: transparent; color: var(--_kjun-color-brand); }
|
|
1523
|
+
.kjun-button[data-variant="link"]:is(:hover, [data-focus-visible], :focus-visible):not(:disabled) { text-decoration: underline; }
|
|
1524
|
+
.kjun-button[data-variant="link"]:active:not(:disabled) { color: var(--_kjun-color-brand-active); }
|
|
1509
1525
|
.kjun-button[data-variant="ghost"],
|
|
1510
1526
|
.kjun-button[data-variant="danger-ghost"] {
|
|
1511
1527
|
background: transparent;
|
|
@@ -1592,6 +1608,7 @@
|
|
|
1592
1608
|
.kjun-form-group:last-child {
|
|
1593
1609
|
margin-bottom: 0;
|
|
1594
1610
|
}
|
|
1611
|
+
.kjun-form-optional { color: var(--_kjun-color-text-tertiary); font-weight: var(--_kjun-type-caption-weight); }
|
|
1595
1612
|
.kjun-form-label {
|
|
1596
1613
|
display: block;
|
|
1597
1614
|
font-size: var(--_kjun-type-label-size);
|
|
@@ -2273,18 +2290,22 @@
|
|
|
2273
2290
|
cursor: pointer;
|
|
2274
2291
|
transition: color var(--_kjun-motion-indicator) var(--_kjun-ease-out);
|
|
2275
2292
|
}
|
|
2293
|
+
/* The selected segment carries an inset edge so it reads apart from the track even when surface and
|
|
2294
|
+
secondary are close (light palettes). Inset keeps the segment's size. */
|
|
2276
2295
|
.kjun-button-group button[aria-pressed="true"] {
|
|
2277
2296
|
background: var(--_kjun-color-surface);
|
|
2297
|
+
box-shadow: inset 0 0 0 var(--_kjun-border-default-width) var(--_kjun-color-border);
|
|
2278
2298
|
color: var(--_kjun-color-text);
|
|
2279
2299
|
font-weight: var(--_kjun-type-control-weight);
|
|
2280
2300
|
}
|
|
2281
|
-
.kjun-button-group[data-indicator] button[aria-pressed="true"] { background: transparent; }
|
|
2301
|
+
.kjun-button-group[data-indicator] button[aria-pressed="true"] { background: transparent; box-shadow: none; }
|
|
2282
2302
|
.kjun-button-group-indicator {
|
|
2283
2303
|
position: absolute;
|
|
2284
2304
|
left: 0;
|
|
2285
2305
|
pointer-events: none;
|
|
2286
2306
|
border-radius: var(--_kjun-geometry-button-group-item-radii-md);
|
|
2287
2307
|
background: var(--_kjun-color-surface);
|
|
2308
|
+
box-shadow: inset 0 0 0 var(--_kjun-border-default-width) var(--_kjun-color-border);
|
|
2288
2309
|
}
|
|
2289
2310
|
.kjun-button-group-indicator[data-animate="true"] {
|
|
2290
2311
|
transition: transform var(--_kjun-motion-indicator) var(--_kjun-ease-out), width var(--_kjun-motion-indicator) var(--_kjun-ease-out);
|
|
@@ -4724,7 +4745,7 @@
|
|
|
4724
4745
|
|
|
4725
4746
|
.kjun-list-section,.kjun-top-navigation,.kjun-bottom-navigation,.kjun-bottom-action-bar{min-width:0;max-width:100%;color:var(--_kjun-color-text);background:var(--_kjun-color-surface)}
|
|
4726
4747
|
.kjun-list-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--_kjun-extension-list-gap);padding:var(--_kjun-extension-list-padding)}.kjun-list-heading h3{font-size:var(--_kjun-type-card-title-size);margin:0;line-height:var(--_kjun-type-card-title-line);font-weight:var(--_kjun-type-card-title-weight);letter-spacing:var(--_kjun-type-card-title-tracking)}.kjun-list-heading p{margin:var(--_kjun-geometry-dimension-value4) 0 0;font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);overflow-wrap:anywhere;line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}
|
|
4727
|
-
.kjun-list{list-style:none;padding:0;margin:0}.kjun-list-row{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}.kjun-list-row:last-child{border-bottom:0}.kjun-list-main{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);flex:1;min-width:0;min-height:var(--_kjun-extension-list-minimum-height);padding:var(--_kjun-extension-list-padding);text-align:start;color:inherit;text-decoration:none;background:transparent;border:0;font:inherit}.kjun-list-main:is(button,a):hover{background:var(--_kjun-color-hover)}.kjun-list-body{flex:1;min-width:0}.kjun-list-title,.kjun-list-description{display:block;overflow-wrap:anywhere;line-height:1.5}.kjun-list-title{font-size:var(--_kjun-type-label-size);line-height:var(--_kjun-type-label-line);font-weight:var(--_kjun-type-label-weight);letter-spacing:var(--_kjun-type-label-tracking)}.kjun-list-description{font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}.kjun-list-leading{flex-shrink:0}.kjun-list-trailing{overflow-wrap:anywhere;max-width:35%}.kjun-list-actions{display:flex;flex-wrap:wrap;gap:var(--_kjun-extension-list-actions-gap);padding-inline-end:var(--_kjun-extension-list-actions-padding);max-width:45%}
|
|
4748
|
+
.kjun-list{list-style:none;padding:0;margin:0}.kjun-list-row{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}.kjun-list-row:last-child{border-bottom:0}.kjun-list[data-divider=false]>.kjun-list-row{border-bottom:0}.kjun-list[data-density=compact] .kjun-list-main{min-height:var(--_kjun-extension-list-compact-minimum-height);padding-block:var(--_kjun-extension-list-compact-padding-y)}.kjun-list-main{display:flex;align-items:center;gap:var(--_kjun-extension-list-gap);flex:1;min-width:0;min-height:var(--_kjun-extension-list-minimum-height);padding:var(--_kjun-extension-list-padding);text-align:start;color:inherit;text-decoration:none;background:transparent;border:0;font:inherit}.kjun-list-main:is(button,a):hover{background:var(--_kjun-color-hover)}.kjun-list-body{flex:1;min-width:0}.kjun-list-title,.kjun-list-description{display:block;overflow-wrap:anywhere;line-height:1.5}.kjun-list-title{font-size:var(--_kjun-type-label-size);line-height:var(--_kjun-type-label-line);font-weight:var(--_kjun-type-label-weight);letter-spacing:var(--_kjun-type-label-tracking)}.kjun-list-description{font-size:var(--_kjun-type-caption-size);color:var(--_kjun-color-text-secondary);line-height:var(--_kjun-type-caption-line);font-weight:var(--_kjun-type-caption-weight);letter-spacing:var(--_kjun-type-caption-tracking)}.kjun-list-leading{flex-shrink:0}.kjun-list-trailing{overflow-wrap:anywhere;max-width:35%}.kjun-list-actions{display:flex;flex-wrap:wrap;gap:var(--_kjun-extension-list-actions-gap);padding-inline-end:var(--_kjun-extension-list-actions-padding);max-width:45%}
|
|
4728
4749
|
/* A disabled row disables its actions too, so the row never reads as partly available. */
|
|
4729
4750
|
.kjun-list-actions[data-disabled]{opacity:var(--_kjun-state-opacity-disabled)}
|
|
4730
4751
|
.kjun-navigation-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--_kjun-extension-navigation-actions-gap);min-width:0}
|
|
@@ -4937,6 +4958,12 @@
|
|
|
4937
4958
|
|
|
4938
4959
|
.kjun-list-heading > div { flex:1; min-width:0; overflow-wrap:anywhere; }
|
|
4939
4960
|
|
|
4961
|
+
/* KjunFab: a round action pinned to the viewport's bottom end, above page content and clear of the safe area. */
|
|
4962
|
+
.kjun-fab{position:fixed;right:var(--_kjun-extension-fab-inset);z-index:var(--_kjun-layer-page-navigation);display:inline-flex;align-items:center;justify-content:center;width:var(--_kjun-extension-fab-size);height:var(--_kjun-extension-fab-size);padding:0;border:0;border-radius:50%;background:var(--_kjun-color-brand);color:var(--_kjun-color-on-brand);box-shadow:var(--_kjun-elevation-floating);cursor:pointer}
|
|
4963
|
+
.kjun-fab:hover:not(:disabled){background:var(--_kjun-color-brand-hover)}.kjun-fab:active:not(:disabled){background:var(--_kjun-color-brand-active)}
|
|
4964
|
+
.kjun-fab:focus-visible{outline:var(--_kjun-state-focus-width) solid var(--_kjun-color-focus-ring);outline-offset:var(--_kjun-state-focus-offset)}
|
|
4965
|
+
.kjun-fab:disabled{opacity:var(--_kjun-state-opacity-disabled);cursor:not-allowed}
|
|
4966
|
+
|
|
4940
4967
|
/* Compound fields share input geometry; buttons retain their own size contract. */
|
|
4941
4968
|
.kjun-quantity,.kjun-time-picker {
|
|
4942
4969
|
--_kjun-compound-height: var(--_kjun-geometry-input-md-height);
|
|
@@ -12,6 +12,8 @@ export interface KjunButtonProps extends Omit<PressableProps, "children" | "styl
|
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
variant?: ButtonVariant;
|
|
14
14
|
size?: ButtonSize;
|
|
15
|
+
/** "circle" makes an icon-only button round: as wide as its height with a full radius. */
|
|
16
|
+
shape?: "default" | "circle";
|
|
15
17
|
loading?: boolean;
|
|
16
18
|
block?: boolean;
|
|
17
19
|
/** Long labels wrap: the size's height becomes a minimum and the button grows instead of overflowing. */
|
|
@@ -12,6 +12,8 @@ export interface KjunButtonProps extends Omit<PressableProps, "children" | "styl
|
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
variant?: ButtonVariant;
|
|
14
14
|
size?: ButtonSize;
|
|
15
|
+
/** "circle" makes an icon-only button round: as wide as its height with a full radius. */
|
|
16
|
+
shape?: "default" | "circle";
|
|
15
17
|
loading?: boolean;
|
|
16
18
|
block?: boolean;
|
|
17
19
|
/** Long labels wrap: the size's height becomes a minimum and the button grows instead of overflowing. */
|
|
@@ -27,11 +27,13 @@ export interface KjunSwitchProps {
|
|
|
27
27
|
ariaLabel?: string;
|
|
28
28
|
disabled?: boolean;
|
|
29
29
|
size?: InputSize;
|
|
30
|
+
/** Supporting text under the label; screen readers hear it as the hint. */
|
|
31
|
+
description?: string;
|
|
30
32
|
children?: ReactNode;
|
|
31
33
|
onValueChange?: (value: boolean) => void;
|
|
32
34
|
onChange?: (value: boolean) => void;
|
|
33
35
|
}
|
|
34
|
-
export declare function KjunSwitch({ value, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: KjunSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function KjunSwitch({ value, label, ariaLabel, disabled, size, description, children, onValueChange, onChange, }: KjunSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
35
37
|
export declare const RadioContext: import("react").Context<{
|
|
36
38
|
value: ChoiceValue;
|
|
37
39
|
change: (v: ChoiceValue) => void;
|
|
@@ -27,11 +27,13 @@ export interface KjunSwitchProps {
|
|
|
27
27
|
ariaLabel?: string;
|
|
28
28
|
disabled?: boolean;
|
|
29
29
|
size?: InputSize;
|
|
30
|
+
/** Supporting text under the label; screen readers hear it as the hint. */
|
|
31
|
+
description?: string;
|
|
30
32
|
children?: ReactNode;
|
|
31
33
|
onValueChange?: (value: boolean) => void;
|
|
32
34
|
onChange?: (value: boolean) => void;
|
|
33
35
|
}
|
|
34
|
-
export declare function KjunSwitch({ value, label, ariaLabel, disabled, size, children, onValueChange, onChange, }: KjunSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function KjunSwitch({ value, label, ariaLabel, disabled, size, description, children, onValueChange, onChange, }: KjunSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
35
37
|
export declare const RadioContext: import("react").Context<{
|
|
36
38
|
value: ChoiceValue;
|
|
37
39
|
change: (v: ChoiceValue) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { KjunMessageScope } from "../../../shared/package-runtime/messages/index.cjs";
|
|
1
2
|
import { type QueryDisplayProps } from "@kjun-ui/tokens";
|
|
2
3
|
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
3
4
|
import { type KjunSkeletonProps } from "./display.cjs";
|
|
@@ -44,6 +45,8 @@ export interface KjunErrorBoundaryProps {
|
|
|
44
45
|
export declare class KjunErrorBoundary extends Component<KjunErrorBoundaryProps, {
|
|
45
46
|
error: boolean;
|
|
46
47
|
}> {
|
|
48
|
+
static contextType: import("react").Context<KjunMessageScope>;
|
|
49
|
+
context: KjunMessageScope;
|
|
47
50
|
state: {
|
|
48
51
|
error: boolean;
|
|
49
52
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { KjunMessageScope } from "../../../shared/package-runtime/messages/index.js";
|
|
1
2
|
import { type QueryDisplayProps } from "@kjun-ui/tokens";
|
|
2
3
|
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
3
4
|
import { type KjunSkeletonProps } from "./display.js";
|
|
@@ -44,6 +45,8 @@ export interface KjunErrorBoundaryProps {
|
|
|
44
45
|
export declare class KjunErrorBoundary extends Component<KjunErrorBoundaryProps, {
|
|
45
46
|
error: boolean;
|
|
46
47
|
}> {
|
|
48
|
+
static contextType: import("react").Context<KjunMessageScope>;
|
|
49
|
+
context: KjunMessageScope;
|
|
47
50
|
state: {
|
|
48
51
|
error: boolean;
|
|
49
52
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
export interface KjunDatePickerProps {
|
|
3
3
|
value: string;
|
|
4
|
+
/** Shows a clear button while there is a value; it reports an empty string. */
|
|
5
|
+
clearable?: boolean;
|
|
4
6
|
min?: string;
|
|
5
7
|
max?: string;
|
|
6
8
|
placeholder?: string;
|
|
@@ -11,4 +13,4 @@ export interface KjunDatePickerProps {
|
|
|
11
13
|
onValueChange?: (v: string) => void;
|
|
12
14
|
onChange?: (v: string) => void;
|
|
13
15
|
}
|
|
14
|
-
export declare function KjunDatePicker({ value, min, max, placeholder, size, disabled, ariaLabel, error, onValueChange, onChange, }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function KjunDatePicker({ value, min, max, clearable, placeholder, size, disabled, ariaLabel, error, onValueChange, onChange, }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
2
2
|
export interface KjunDatePickerProps {
|
|
3
3
|
value: string;
|
|
4
|
+
/** Shows a clear button while there is a value; it reports an empty string. */
|
|
5
|
+
clearable?: boolean;
|
|
4
6
|
min?: string;
|
|
5
7
|
max?: string;
|
|
6
8
|
placeholder?: string;
|
|
@@ -11,4 +13,4 @@ export interface KjunDatePickerProps {
|
|
|
11
13
|
onValueChange?: (v: string) => void;
|
|
12
14
|
onChange?: (v: string) => void;
|
|
13
15
|
}
|
|
14
|
-
export declare function KjunDatePicker({ value, min, max, placeholder, size, disabled, ariaLabel, error, onValueChange, onChange, }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function KjunDatePicker({ value, min, max, clearable, placeholder, size, disabled, ariaLabel, error, onValueChange, onChange, }: KjunDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { GestureResponderEvent } from "react-native";
|
|
2
|
+
export interface KjunFabProps {
|
|
3
|
+
icon: string;
|
|
4
|
+
/** The FAB has no visible text, so it needs a name. */
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Bottom safe area (pt) the FAB stays above. */
|
|
8
|
+
safeAreaBottom?: number;
|
|
9
|
+
/** Extra space below, e.g. a bottom navigation's height. */
|
|
10
|
+
offsetBottom?: number;
|
|
11
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
12
|
+
}
|
|
13
|
+
/** A round primary action at the bottom end of its parent (place it in the screen's root view). */
|
|
14
|
+
export declare function KjunFab({ icon, ariaLabel, disabled, safeAreaBottom, offsetBottom, onPress }: KjunFabProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { GestureResponderEvent } from "react-native";
|
|
2
|
+
export interface KjunFabProps {
|
|
3
|
+
icon: string;
|
|
4
|
+
/** The FAB has no visible text, so it needs a name. */
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Bottom safe area (pt) the FAB stays above. */
|
|
8
|
+
safeAreaBottom?: number;
|
|
9
|
+
/** Extra space below, e.g. a bottom navigation's height. */
|
|
10
|
+
offsetBottom?: number;
|
|
11
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
12
|
+
}
|
|
13
|
+
/** A round primary action at the bottom end of its parent (place it in the screen's root view). */
|
|
14
|
+
export declare function KjunFab({ icon, ariaLabel, disabled, safeAreaBottom, offsetBottom, onPress }: KjunFabProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Animated, TextInput, type ViewStyle } from "react-native";
|
|
2
2
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
3
|
+
/** Field text input whose font family follows the Provider's weight maps, like KText. */
|
|
3
4
|
export declare const FieldTextInput: typeof TextInput;
|
|
4
5
|
export declare const FieldPressable: import("react").ForwardRefExoticComponent<import("react-native").PressableProps & {
|
|
5
6
|
focusRingInset?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Animated, TextInput, type ViewStyle } from "react-native";
|
|
2
2
|
import { type InputSize } from "@kjun-ui/tokens";
|
|
3
|
+
/** Field text input whose font family follows the Provider's weight maps, like KText. */
|
|
3
4
|
export declare const FieldTextInput: typeof TextInput;
|
|
4
5
|
export declare const FieldPressable: import("react").ForwardRefExoticComponent<import("react-native").PressableProps & {
|
|
5
6
|
focusRingInset?: boolean;
|
|
@@ -36,35 +36,35 @@ export declare function KjunCollectionMark({ kind, active, size, }: KjunCollecti
|
|
|
36
36
|
export declare const executionStates: {
|
|
37
37
|
readonly queued: readonly [
|
|
38
38
|
"secondary",
|
|
39
|
-
"
|
|
39
|
+
"statusQueued"
|
|
40
40
|
];
|
|
41
41
|
readonly starting: readonly [
|
|
42
42
|
"primary",
|
|
43
|
-
"
|
|
43
|
+
"statusStarting"
|
|
44
44
|
];
|
|
45
45
|
readonly running: readonly [
|
|
46
46
|
"primary",
|
|
47
|
-
"
|
|
47
|
+
"statusRunning"
|
|
48
48
|
];
|
|
49
49
|
readonly stopping: readonly [
|
|
50
50
|
"warning",
|
|
51
|
-
"
|
|
51
|
+
"statusStopping"
|
|
52
52
|
];
|
|
53
53
|
readonly stopped: readonly [
|
|
54
54
|
"secondary",
|
|
55
|
-
"
|
|
55
|
+
"statusStopped"
|
|
56
56
|
];
|
|
57
57
|
readonly completed: readonly [
|
|
58
58
|
"success",
|
|
59
|
-
"
|
|
59
|
+
"statusCompleted"
|
|
60
60
|
];
|
|
61
61
|
readonly completed_with_errors: readonly [
|
|
62
62
|
"warning",
|
|
63
|
-
"
|
|
63
|
+
"statusCompletedWithErrors"
|
|
64
64
|
];
|
|
65
65
|
readonly failed: readonly [
|
|
66
66
|
"danger",
|
|
67
|
-
"
|
|
67
|
+
"statusFailed"
|
|
68
68
|
];
|
|
69
69
|
};
|
|
70
70
|
export interface KjunExecutionStatusBadgeProps {
|
|
@@ -36,35 +36,35 @@ export declare function KjunCollectionMark({ kind, active, size, }: KjunCollecti
|
|
|
36
36
|
export declare const executionStates: {
|
|
37
37
|
readonly queued: readonly [
|
|
38
38
|
"secondary",
|
|
39
|
-
"
|
|
39
|
+
"statusQueued"
|
|
40
40
|
];
|
|
41
41
|
readonly starting: readonly [
|
|
42
42
|
"primary",
|
|
43
|
-
"
|
|
43
|
+
"statusStarting"
|
|
44
44
|
];
|
|
45
45
|
readonly running: readonly [
|
|
46
46
|
"primary",
|
|
47
|
-
"
|
|
47
|
+
"statusRunning"
|
|
48
48
|
];
|
|
49
49
|
readonly stopping: readonly [
|
|
50
50
|
"warning",
|
|
51
|
-
"
|
|
51
|
+
"statusStopping"
|
|
52
52
|
];
|
|
53
53
|
readonly stopped: readonly [
|
|
54
54
|
"secondary",
|
|
55
|
-
"
|
|
55
|
+
"statusStopped"
|
|
56
56
|
];
|
|
57
57
|
readonly completed: readonly [
|
|
58
58
|
"success",
|
|
59
|
-
"
|
|
59
|
+
"statusCompleted"
|
|
60
60
|
];
|
|
61
61
|
readonly completed_with_errors: readonly [
|
|
62
62
|
"warning",
|
|
63
|
-
"
|
|
63
|
+
"statusCompletedWithErrors"
|
|
64
64
|
];
|
|
65
65
|
readonly failed: readonly [
|
|
66
66
|
"danger",
|
|
67
|
-
"
|
|
67
|
+
"statusFailed"
|
|
68
68
|
];
|
|
69
69
|
};
|
|
70
70
|
export interface KjunExecutionStatusBadgeProps {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
2
|
+
export type KjunFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
3
|
+
/** Font names by weight, for platforms (Android, Expo) that load every weight as its own family. */
|
|
4
|
+
export type KjunFontWeights = Partial<Record<KjunFontWeight, string>>;
|
|
5
|
+
export type KjunFontFamily = string | KjunFontWeights;
|
|
6
|
+
/** Every face name of a weight map points back to its map, so a style naming any face can be re-resolved. */
|
|
7
|
+
export type KjunFontFaces = Record<string, KjunFontWeights>;
|
|
8
|
+
/** The face closest to `weight`; a tie takes the heavier face. */
|
|
9
|
+
export declare function nearestFace(faces: KjunFontWeights, weight: number): string | undefined;
|
|
10
|
+
/** The family name components use as their base: the string itself, or the face closest to 400. */
|
|
11
|
+
export declare const baseFontFamily: (family?: KjunFontFamily) => string | undefined;
|
|
12
|
+
export declare function fontFacesOf(family?: KjunFontFamily): KjunFontFaces;
|
|
13
|
+
/** Swaps the family for the face matching the final fontWeight. Native then draws that face at its own weight. */
|
|
14
|
+
export declare function resolveFontStyle<S extends StyleProp<TextStyle>>(style: S, faces: KjunFontFaces, base?: string): S | StyleProp<TextStyle>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
2
|
+
export type KjunFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
3
|
+
/** Font names by weight, for platforms (Android, Expo) that load every weight as its own family. */
|
|
4
|
+
export type KjunFontWeights = Partial<Record<KjunFontWeight, string>>;
|
|
5
|
+
export type KjunFontFamily = string | KjunFontWeights;
|
|
6
|
+
/** Every face name of a weight map points back to its map, so a style naming any face can be re-resolved. */
|
|
7
|
+
export type KjunFontFaces = Record<string, KjunFontWeights>;
|
|
8
|
+
/** The face closest to `weight`; a tie takes the heavier face. */
|
|
9
|
+
export declare function nearestFace(faces: KjunFontWeights, weight: number): string | undefined;
|
|
10
|
+
/** The family name components use as their base: the string itself, or the face closest to 400. */
|
|
11
|
+
export declare const baseFontFamily: (family?: KjunFontFamily) => string | undefined;
|
|
12
|
+
export declare function fontFacesOf(family?: KjunFontFamily): KjunFontFaces;
|
|
13
|
+
/** Swaps the family for the face matching the final fontWeight. Native then draws that face at its own weight. */
|
|
14
|
+
export declare function resolveFontStyle<S extends StyleProp<TextStyle>>(style: S, faces: KjunFontFaces, base?: string): S | StyleProp<TextStyle>;
|
|
@@ -34,7 +34,9 @@ export * from "./list.cjs";
|
|
|
34
34
|
export * from "./app-navigation.cjs";
|
|
35
35
|
export * from "./media.cjs";
|
|
36
36
|
export * from "./chip.cjs";
|
|
37
|
+
export * from "./fab.cjs";
|
|
37
38
|
export * from "./range-input.cjs";
|
|
38
39
|
export * from "./quantity-stepper.cjs";
|
|
39
40
|
export * from "./time-picker.cjs";
|
|
40
41
|
export type { ShadowLayer, ElevationRole, CardElevation } from "@kjun-ui/tokens";
|
|
42
|
+
export { kjunMessagesKo, kjunMessagesEn, type KjunMessages } from "../../../shared/package-runtime/messages/index.cjs";
|
|
@@ -34,7 +34,9 @@ export * from "./list.js";
|
|
|
34
34
|
export * from "./app-navigation.js";
|
|
35
35
|
export * from "./media.js";
|
|
36
36
|
export * from "./chip.js";
|
|
37
|
+
export * from "./fab.js";
|
|
37
38
|
export * from "./range-input.js";
|
|
38
39
|
export * from "./quantity-stepper.js";
|
|
39
40
|
export * from "./time-picker.js";
|
|
40
41
|
export type { ShadowLayer, ElevationRole, CardElevation } from "@kjun-ui/tokens";
|
|
42
|
+
export { kjunMessagesKo, kjunMessagesEn, type KjunMessages } from "../../../shared/package-runtime/messages/index.js";
|
|
@@ -16,6 +16,8 @@ export interface KjunFormGroupProps {
|
|
|
16
16
|
label?: string;
|
|
17
17
|
id?: string;
|
|
18
18
|
required?: boolean;
|
|
19
|
+
/** Marks the field as optional with the "(선택)" / "(optional)" message; required wins when both are set. */
|
|
20
|
+
optional?: boolean;
|
|
19
21
|
error?: string;
|
|
20
22
|
hint?: string;
|
|
21
23
|
/** Hides the label visually while it still names the field. */
|
|
@@ -23,7 +25,7 @@ export interface KjunFormGroupProps {
|
|
|
23
25
|
children: ReactNode;
|
|
24
26
|
style?: StyleProp<ViewStyle>;
|
|
25
27
|
}
|
|
26
|
-
export declare function KjunFormGroup({ label, id, required, error, hint, labelHidden, children, style, }: KjunFormGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function KjunFormGroup({ label, id, required, optional, error, hint, labelHidden, children, style, }: KjunFormGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
export interface KjunInputProps extends Omit<TextInputProps, "value" | "onChange"> {
|
|
28
30
|
value: string | number;
|
|
29
31
|
size?: InputSize;
|
|
@@ -16,6 +16,8 @@ export interface KjunFormGroupProps {
|
|
|
16
16
|
label?: string;
|
|
17
17
|
id?: string;
|
|
18
18
|
required?: boolean;
|
|
19
|
+
/** Marks the field as optional with the "(선택)" / "(optional)" message; required wins when both are set. */
|
|
20
|
+
optional?: boolean;
|
|
19
21
|
error?: string;
|
|
20
22
|
hint?: string;
|
|
21
23
|
/** Hides the label visually while it still names the field. */
|
|
@@ -23,7 +25,7 @@ export interface KjunFormGroupProps {
|
|
|
23
25
|
children: ReactNode;
|
|
24
26
|
style?: StyleProp<ViewStyle>;
|
|
25
27
|
}
|
|
26
|
-
export declare function KjunFormGroup({ label, id, required, error, hint, labelHidden, children, style, }: KjunFormGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function KjunFormGroup({ label, id, required, optional, error, hint, labelHidden, children, style, }: KjunFormGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
export interface KjunInputProps extends Omit<TextInputProps, "value" | "onChange"> {
|
|
28
30
|
value: string | number;
|
|
29
31
|
size?: InputSize;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type ColorValue, type TextProps } from "react-native";
|
|
3
|
+
/** Resolves a text style's family to the face for its weight when the Provider has weight maps. */
|
|
4
|
+
export declare function useResolveFont(): <S extends TextProps["style"]>(style: S) => import("react-native").StyleProp<import("react-native").TextStyle> | S;
|
|
3
5
|
export declare function KText({ style, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
/** A Text without KJUN's default type, for spans that inherit their parent's; it still resolves weight faces. */
|
|
7
|
+
export declare function FontText(props: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
4
8
|
export declare function content(value: ReactNode, style?: TextProps["style"]): bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
5
9
|
export declare const finePointer: () => boolean;
|
|
6
10
|
export declare function useReducedMotion(): boolean;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type ColorValue, type TextProps } from "react-native";
|
|
3
|
+
/** Resolves a text style's family to the face for its weight when the Provider has weight maps. */
|
|
4
|
+
export declare function useResolveFont(): <S extends TextProps["style"]>(style: S) => import("react-native").StyleProp<import("react-native").TextStyle> | S;
|
|
3
5
|
export declare function KText({ style, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
/** A Text without KJUN's default type, for spans that inherit their parent's; it still resolves weight faces. */
|
|
7
|
+
export declare function FontText(props: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
4
8
|
export declare function content(value: ReactNode, style?: TextProps["style"]): bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
5
9
|
export declare const finePointer: () => boolean;
|
|
6
10
|
export declare function useReducedMotion(): boolean;
|
|
@@ -17,5 +17,9 @@ export interface KjunListSectionProps {
|
|
|
17
17
|
actions?: ReactNode;
|
|
18
18
|
children: ReactNode;
|
|
19
19
|
ariaLabel?: string;
|
|
20
|
+
/** Draws dividers between rows (default true). */
|
|
21
|
+
divider?: boolean;
|
|
22
|
+
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
23
|
+
density?: "default" | "compact";
|
|
20
24
|
}
|
|
21
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,5 +17,9 @@ export interface KjunListSectionProps {
|
|
|
17
17
|
actions?: ReactNode;
|
|
18
18
|
children: ReactNode;
|
|
19
19
|
ariaLabel?: string;
|
|
20
|
+
/** Draws dividers between rows (default true). */
|
|
21
|
+
divider?: boolean;
|
|
22
|
+
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
23
|
+
density?: "default" | "compact";
|
|
20
24
|
}
|
|
21
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type KjunFontFaces, type KjunFontFamily } from "./fonts.cjs";
|
|
2
|
+
import type { KjunMessages } from "../../../shared/package-runtime/messages/index.cjs";
|
|
1
3
|
import type { KjunIconRegistry } from "@kjun-ui/icons";
|
|
2
4
|
import { type KjunColors, type ResolvedKjunColors, type KjunDomainColors } from "@kjun-ui/tokens";
|
|
3
5
|
import { type ReactNode } from "react";
|
|
@@ -6,15 +8,25 @@ interface KjunStyles {
|
|
|
6
8
|
colors: ResolvedKjunColors<ColorValue>;
|
|
7
9
|
fontFamily?: string;
|
|
8
10
|
numericFontFamily?: string;
|
|
11
|
+
/** Weight maps by face name, from fontFamily / numericFontFamily maps. */
|
|
12
|
+
fontFaces?: KjunFontFaces;
|
|
9
13
|
domainColors?: KjunDomainColors<ColorValue>;
|
|
10
14
|
}
|
|
11
15
|
export declare function useKjunStyles(): KjunStyles;
|
|
12
|
-
export interface KjunProviderProps extends Omit<KjunStyles, "colors"> {
|
|
16
|
+
export interface KjunProviderProps extends Omit<KjunStyles, "colors" | "fontFamily" | "numericFontFamily" | "fontFaces"> {
|
|
17
|
+
/** A family name, or names by weight ({ 400: "Pretendard-Regular", 700: "Pretendard-Bold" }) for Android and Expo. */
|
|
18
|
+
fontFamily?: KjunFontFamily;
|
|
19
|
+
/** Same as fontFamily, for numbers. */
|
|
20
|
+
numericFontFamily?: KjunFontFamily;
|
|
13
21
|
icons?: KjunIconRegistry;
|
|
22
|
+
/** BCP 47 tag (e.g. "en-US") for KJUN copy and Intl formats; without it KJUN stays Korean. */
|
|
23
|
+
locale?: string;
|
|
24
|
+
/** Replaces part of KJUN's copy, e.g. with the app's own translations. */
|
|
25
|
+
messages?: Partial<KjunMessages>;
|
|
14
26
|
colors: KjunColors<ColorValue>;
|
|
15
27
|
children: ReactNode;
|
|
16
28
|
style?: StyleProp<ViewStyle>;
|
|
17
29
|
}
|
|
18
|
-
export declare function KjunProvider({ icons, colors, fontFamily, numericFontFamily, domainColors, children, style, }: KjunProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function KjunProvider({ icons, locale, messages, colors, fontFamily, numericFontFamily, domainColors, children, style, }: KjunProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
31
|
export declare function useKjunDomainColors(): Readonly<Record<"priceUp" | "priceUpLight" | "priceUpBg" | "priceUpBgStrong" | "priceDown" | "priceDownLight" | "priceDownBg" | "priceDownBgStrong" | "priceNeutral" | "priceNeutralBg" | "favorite" | "favoriteHover" | "interest", ColorValue>>;
|
|
20
32
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type KjunFontFaces, type KjunFontFamily } from "./fonts.js";
|
|
2
|
+
import type { KjunMessages } from "../../../shared/package-runtime/messages/index.js";
|
|
1
3
|
import type { KjunIconRegistry } from "@kjun-ui/icons";
|
|
2
4
|
import { type KjunColors, type ResolvedKjunColors, type KjunDomainColors } from "@kjun-ui/tokens";
|
|
3
5
|
import { type ReactNode } from "react";
|
|
@@ -6,15 +8,25 @@ interface KjunStyles {
|
|
|
6
8
|
colors: ResolvedKjunColors<ColorValue>;
|
|
7
9
|
fontFamily?: string;
|
|
8
10
|
numericFontFamily?: string;
|
|
11
|
+
/** Weight maps by face name, from fontFamily / numericFontFamily maps. */
|
|
12
|
+
fontFaces?: KjunFontFaces;
|
|
9
13
|
domainColors?: KjunDomainColors<ColorValue>;
|
|
10
14
|
}
|
|
11
15
|
export declare function useKjunStyles(): KjunStyles;
|
|
12
|
-
export interface KjunProviderProps extends Omit<KjunStyles, "colors"> {
|
|
16
|
+
export interface KjunProviderProps extends Omit<KjunStyles, "colors" | "fontFamily" | "numericFontFamily" | "fontFaces"> {
|
|
17
|
+
/** A family name, or names by weight ({ 400: "Pretendard-Regular", 700: "Pretendard-Bold" }) for Android and Expo. */
|
|
18
|
+
fontFamily?: KjunFontFamily;
|
|
19
|
+
/** Same as fontFamily, for numbers. */
|
|
20
|
+
numericFontFamily?: KjunFontFamily;
|
|
13
21
|
icons?: KjunIconRegistry;
|
|
22
|
+
/** BCP 47 tag (e.g. "en-US") for KJUN copy and Intl formats; without it KJUN stays Korean. */
|
|
23
|
+
locale?: string;
|
|
24
|
+
/** Replaces part of KJUN's copy, e.g. with the app's own translations. */
|
|
25
|
+
messages?: Partial<KjunMessages>;
|
|
14
26
|
colors: KjunColors<ColorValue>;
|
|
15
27
|
children: ReactNode;
|
|
16
28
|
style?: StyleProp<ViewStyle>;
|
|
17
29
|
}
|
|
18
|
-
export declare function KjunProvider({ icons, colors, fontFamily, numericFontFamily, domainColors, children, style, }: KjunProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function KjunProvider({ icons, locale, messages, colors, fontFamily, numericFontFamily, domainColors, children, style, }: KjunProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
31
|
export declare function useKjunDomainColors(): Readonly<Record<"priceUp" | "priceUpLight" | "priceUpBg" | "priceUpBgStrong" | "priceDown" | "priceDownLight" | "priceDownBg" | "priceDownBgStrong" | "priceNeutral" | "priceNeutralBg" | "favorite" | "favoriteHover" | "interest", ColorValue>>;
|
|
20
32
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { type KjunMessages } from "./messages/index.cjs";
|
|
1
2
|
import type { createFeedbackController, ConfirmOptions, FeedbackRequest, PromptOptions } from "@kjun-ui/tokens";
|
|
2
|
-
export declare function useFeedbackDialog(controller: ReturnType<typeof createFeedbackController>, request: FeedbackRequest): {
|
|
3
|
+
export declare function useFeedbackDialog(controller: ReturnType<typeof createFeedbackController>, request: FeedbackRequest, messages?: KjunMessages): {
|
|
3
4
|
options: PromptOptions & ConfirmOptions;
|
|
4
5
|
value: string;
|
|
5
6
|
error: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { type KjunMessages } from "./messages/index.js";
|
|
1
2
|
import type { createFeedbackController, ConfirmOptions, FeedbackRequest, PromptOptions } from "@kjun-ui/tokens";
|
|
2
|
-
export declare function useFeedbackDialog(controller: ReturnType<typeof createFeedbackController>, request: FeedbackRequest): {
|
|
3
|
+
export declare function useFeedbackDialog(controller: ReturnType<typeof createFeedbackController>, request: FeedbackRequest, messages?: KjunMessages): {
|
|
3
4
|
options: PromptOptions & ConfirmOptions;
|
|
4
5
|
value: string;
|
|
5
6
|
error: string;
|