@kjun-ui/native 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.cjs +316 -316
- package/dist/index.js +316 -316
- package/dist/index.web.cjs +316 -316
- package/dist/index.web.js +316 -316
- package/dist/styles.css +2057 -2133
- package/dist/types/packages/native/src/actions.d.cts +13 -13
- package/dist/types/packages/native/src/actions.d.ts +13 -13
- package/dist/types/packages/native/src/app-navigation.d.cts +6 -6
- package/dist/types/packages/native/src/app-navigation.d.ts +6 -6
- package/dist/types/packages/native/src/button.d.cts +3 -3
- package/dist/types/packages/native/src/button.d.ts +3 -3
- package/dist/types/packages/native/src/card.d.cts +2 -2
- package/dist/types/packages/native/src/card.d.ts +2 -2
- package/dist/types/packages/native/src/chip.d.cts +2 -2
- package/dist/types/packages/native/src/chip.d.ts +2 -2
- package/dist/types/packages/native/src/choice-controls.d.cts +8 -8
- package/dist/types/packages/native/src/choice-controls.d.ts +8 -8
- package/dist/types/packages/native/src/combobox.d.cts +2 -2
- package/dist/types/packages/native/src/combobox.d.ts +2 -2
- package/dist/types/packages/native/src/controls.d.cts +6 -6
- package/dist/types/packages/native/src/controls.d.ts +6 -6
- package/dist/types/packages/native/src/data-state.d.cts +6 -6
- package/dist/types/packages/native/src/data-state.d.ts +6 -6
- package/dist/types/packages/native/src/date-picker.d.cts +2 -2
- package/dist/types/packages/native/src/date-picker.d.ts +2 -2
- package/dist/types/packages/native/src/display-primitives.d.cts +12 -12
- package/dist/types/packages/native/src/display-primitives.d.ts +12 -12
- package/dist/types/packages/native/src/display.d.cts +6 -6
- package/dist/types/packages/native/src/display.d.ts +6 -6
- package/dist/types/packages/native/src/drawer.d.cts +2 -2
- package/dist/types/packages/native/src/drawer.d.ts +2 -2
- package/dist/types/packages/native/src/dropdown.d.cts +12 -12
- package/dist/types/packages/native/src/dropdown.d.ts +12 -12
- package/dist/types/packages/native/src/financial-display.d.cts +12 -12
- package/dist/types/packages/native/src/financial-display.d.ts +12 -12
- package/dist/types/packages/native/src/financial.d.cts +4 -4
- package/dist/types/packages/native/src/financial.d.ts +4 -4
- package/dist/types/packages/native/src/index.d.cts +22 -22
- package/dist/types/packages/native/src/index.d.ts +22 -22
- package/dist/types/packages/native/src/input.d.cts +5 -5
- package/dist/types/packages/native/src/input.d.ts +5 -5
- package/dist/types/packages/native/src/kpi-hero.d.cts +2 -2
- package/dist/types/packages/native/src/kpi-hero.d.ts +2 -2
- package/dist/types/packages/native/src/kpi-row.d.cts +2 -2
- package/dist/types/packages/native/src/kpi-row.d.ts +2 -2
- package/dist/types/packages/native/src/kpi.d.cts +4 -4
- package/dist/types/packages/native/src/kpi.d.ts +4 -4
- package/dist/types/packages/native/src/layers.d.cts +6 -6
- package/dist/types/packages/native/src/layers.d.ts +6 -6
- package/dist/types/packages/native/src/list.d.cts +4 -4
- package/dist/types/packages/native/src/list.d.ts +4 -4
- package/dist/types/packages/native/src/market-cards.d.cts +2 -2
- package/dist/types/packages/native/src/market-cards.d.ts +2 -2
- package/dist/types/packages/native/src/market-list.d.cts +2 -2
- package/dist/types/packages/native/src/market-list.d.ts +2 -2
- package/dist/types/packages/native/src/market-model.d.cts +4 -4
- package/dist/types/packages/native/src/market-model.d.ts +4 -4
- package/dist/types/packages/native/src/market-panel.d.cts +1 -1
- package/dist/types/packages/native/src/market-panel.d.ts +1 -1
- package/dist/types/packages/native/src/market-skeleton.d.cts +2 -2
- package/dist/types/packages/native/src/market-skeleton.d.ts +2 -2
- package/dist/types/packages/native/src/market-table.d.cts +2 -2
- package/dist/types/packages/native/src/market-table.d.ts +2 -2
- package/dist/types/packages/native/src/market.d.cts +5 -5
- package/dist/types/packages/native/src/market.d.ts +5 -5
- package/dist/types/packages/native/src/media.d.cts +4 -4
- package/dist/types/packages/native/src/media.d.ts +4 -4
- package/dist/types/packages/native/src/modal.d.cts +4 -4
- package/dist/types/packages/native/src/modal.d.ts +4 -4
- package/dist/types/packages/native/src/navigation.d.cts +9 -9
- package/dist/types/packages/native/src/navigation.d.ts +9 -9
- package/dist/types/packages/native/src/number-display.d.cts +8 -8
- package/dist/types/packages/native/src/number-display.d.ts +8 -8
- package/dist/types/packages/native/src/popover.d.cts +4 -4
- package/dist/types/packages/native/src/popover.d.ts +4 -4
- package/dist/types/packages/native/src/quantity-stepper.d.cts +2 -2
- package/dist/types/packages/native/src/quantity-stepper.d.ts +2 -2
- package/dist/types/packages/native/src/range-input.d.cts +4 -4
- package/dist/types/packages/native/src/range-input.d.ts +4 -4
- package/dist/types/packages/native/src/search-input.d.cts +2 -2
- package/dist/types/packages/native/src/search-input.d.ts +2 -2
- package/dist/types/packages/native/src/select-control.d.cts +2 -2
- package/dist/types/packages/native/src/select-control.d.ts +2 -2
- package/dist/types/packages/native/src/select.d.cts +8 -8
- package/dist/types/packages/native/src/select.d.ts +8 -8
- package/dist/types/packages/native/src/selection-groups.d.cts +4 -4
- package/dist/types/packages/native/src/selection-groups.d.ts +4 -4
- package/dist/types/packages/native/src/skeleton-base.d.cts +2 -2
- package/dist/types/packages/native/src/skeleton-base.d.ts +2 -2
- package/dist/types/packages/native/src/skeletons.d.cts +8 -8
- package/dist/types/packages/native/src/skeletons.d.ts +8 -8
- package/dist/types/packages/native/src/table-model.d.cts +2 -2
- package/dist/types/packages/native/src/table-model.d.ts +2 -2
- package/dist/types/packages/native/src/table-view.d.cts +2 -2
- package/dist/types/packages/native/src/table-view.d.ts +2 -2
- package/dist/types/packages/native/src/table.d.cts +2 -2
- package/dist/types/packages/native/src/table.d.ts +2 -2
- package/dist/types/packages/native/src/tabs.d.cts +4 -4
- package/dist/types/packages/native/src/tabs.d.ts +4 -4
- package/dist/types/packages/native/src/textarea.d.cts +2 -2
- package/dist/types/packages/native/src/textarea.d.ts +2 -2
- package/dist/types/packages/native/src/time-picker.d.cts +2 -2
- package/dist/types/packages/native/src/time-picker.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -564,7 +564,7 @@ var AccessiblePressable = forwardRef(
|
|
|
564
564
|
|
|
565
565
|
// packages/native/src/button.tsx
|
|
566
566
|
import { Fragment, jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
567
|
-
function
|
|
567
|
+
function KjunIcon({
|
|
568
568
|
name,
|
|
569
569
|
size = tokens3.iconSizes.default,
|
|
570
570
|
color,
|
|
@@ -669,7 +669,7 @@ function useMinimumLoading(loading) {
|
|
|
669
669
|
}, [loading]);
|
|
670
670
|
return loading || active;
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function KjunButton(input) {
|
|
673
673
|
var _a, _b;
|
|
674
674
|
const {
|
|
675
675
|
children,
|
|
@@ -779,7 +779,7 @@ function DsButton(input) {
|
|
|
779
779
|
const color = paint(pressed, hovered && Platform2.OS === "web").ink;
|
|
780
780
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
781
781
|
before && /* @__PURE__ */ jsx5(
|
|
782
|
-
|
|
782
|
+
KjunIcon,
|
|
783
783
|
{
|
|
784
784
|
name: before,
|
|
785
785
|
filled: !busy && prefixIconFilled,
|
|
@@ -796,7 +796,7 @@ function DsButton(input) {
|
|
|
796
796
|
...multiline || navigation ? { flexShrink: 1, minWidth: 0, textAlign: "center" } : {}
|
|
797
797
|
}, children }),
|
|
798
798
|
suffixIcon && /* @__PURE__ */ jsx5(View2, { style: { opacity: busy && prefixIcon ? 0 : 1 }, children: /* @__PURE__ */ jsx5(
|
|
799
|
-
|
|
799
|
+
KjunIcon,
|
|
800
800
|
{
|
|
801
801
|
name: busy && !prefixIcon ? "loader-2" : suffixIcon,
|
|
802
802
|
filled: !busy && suffixIconFilled,
|
|
@@ -813,7 +813,7 @@ function DsButton(input) {
|
|
|
813
813
|
right: 0,
|
|
814
814
|
alignItems: "center",
|
|
815
815
|
justifyContent: "center"
|
|
816
|
-
}, children: /* @__PURE__ */ jsx5(
|
|
816
|
+
}, children: /* @__PURE__ */ jsx5(KjunIcon, { name: "loader-2", spin: true, size: iconSize, color }) })
|
|
817
817
|
] });
|
|
818
818
|
}
|
|
819
819
|
}
|
|
@@ -853,7 +853,7 @@ function FieldClear({ size, disabled, label, onPress }) {
|
|
|
853
853
|
alignItems: "center",
|
|
854
854
|
justifyContent: "center",
|
|
855
855
|
backgroundColor: disabled ? "transparent" : pressed ? colors.active : hovered ? colors.hover : "transparent"
|
|
856
|
-
}, children: /* @__PURE__ */ jsx6(
|
|
856
|
+
}, children: /* @__PURE__ */ jsx6(KjunIcon, { name: "x", size: spec.iconSize, color: disabled ? colors.textDisabled : colors.textSecondary }) })
|
|
857
857
|
}
|
|
858
858
|
);
|
|
859
859
|
}
|
|
@@ -1039,7 +1039,7 @@ import {
|
|
|
1039
1039
|
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1040
1040
|
var FieldContext = createContext11(null);
|
|
1041
1041
|
var useKjunField = () => useContext6(FieldContext);
|
|
1042
|
-
function
|
|
1042
|
+
function KjunFormGroup({
|
|
1043
1043
|
label,
|
|
1044
1044
|
id,
|
|
1045
1045
|
required = false,
|
|
@@ -1083,7 +1083,7 @@ function DsFormGroup({
|
|
|
1083
1083
|
marginTop: tokens7.extensions.form.messageGap
|
|
1084
1084
|
},
|
|
1085
1085
|
children: [
|
|
1086
|
-
!!error && /* @__PURE__ */ jsx8(
|
|
1086
|
+
!!error && /* @__PURE__ */ jsx8(KjunIcon, { name: "alert-circle", size: tokens7.extensions.form.messageIconSize, color: c.danger }),
|
|
1087
1087
|
/* @__PURE__ */ jsx8(
|
|
1088
1088
|
Text3,
|
|
1089
1089
|
{
|
|
@@ -1105,7 +1105,7 @@ function DsFormGroup({
|
|
|
1105
1105
|
}
|
|
1106
1106
|
);
|
|
1107
1107
|
}
|
|
1108
|
-
var
|
|
1108
|
+
var KjunInput = forwardRef2(function KjunInput2({
|
|
1109
1109
|
value,
|
|
1110
1110
|
size = "md",
|
|
1111
1111
|
error = false,
|
|
@@ -1219,7 +1219,7 @@ var DsInput = forwardRef2(function DsInput2({
|
|
|
1219
1219
|
justifyContent: "center"
|
|
1220
1220
|
},
|
|
1221
1221
|
children: prefix || /* @__PURE__ */ jsx8(
|
|
1222
|
-
|
|
1222
|
+
KjunIcon,
|
|
1223
1223
|
{
|
|
1224
1224
|
name: prefixIcon,
|
|
1225
1225
|
size: spec.iconSize,
|
|
@@ -1250,7 +1250,7 @@ var DsInput = forwardRef2(function DsInput2({
|
|
|
1250
1250
|
(_a = input.current) == null ? void 0 : _a.focus();
|
|
1251
1251
|
} }),
|
|
1252
1252
|
suffix || suffixIcon && /* @__PURE__ */ jsx8(
|
|
1253
|
-
|
|
1253
|
+
KjunIcon,
|
|
1254
1254
|
{
|
|
1255
1255
|
name: suffixIcon,
|
|
1256
1256
|
size: spec.iconSize,
|
|
@@ -1277,13 +1277,13 @@ var DsInput = forwardRef2(function DsInput2({
|
|
|
1277
1277
|
)
|
|
1278
1278
|
] });
|
|
1279
1279
|
});
|
|
1280
|
-
function
|
|
1280
|
+
function KjunFormLayout({
|
|
1281
1281
|
children,
|
|
1282
1282
|
gap = tokens7.extensions.form.itemGap
|
|
1283
1283
|
}) {
|
|
1284
1284
|
return /* @__PURE__ */ jsx8(View4, { style: { gap }, children: Children.map(
|
|
1285
1285
|
children,
|
|
1286
|
-
(child) => isValidElement(child) && child.type ===
|
|
1286
|
+
(child) => isValidElement(child) && child.type === KjunFormGroup ? cloneElement(child, {
|
|
1287
1287
|
style: [{ marginBottom: 0 }, child.props.style]
|
|
1288
1288
|
}) : child
|
|
1289
1289
|
) });
|
|
@@ -1343,7 +1343,7 @@ function ScopedNativeModal({ children, visible, ...props }) {
|
|
|
1343
1343
|
const entry = scope ? layers.entries.get(scope) : void 0;
|
|
1344
1344
|
const generation = (_a = entry == null ? void 0 : entry.order) != null ? _a : 0;
|
|
1345
1345
|
const inactive = !!scope && !layers.isActive(scope);
|
|
1346
|
-
const host = useContext7(FeedbackOverlayContext), id = useId3(), register = host == null ? void 0 : host.register;
|
|
1346
|
+
const host = useContext7(FeedbackOverlayContext), id = "kjun-" + useId3(), register = host == null ? void 0 : host.register;
|
|
1347
1347
|
useEffect4(
|
|
1348
1348
|
() => visible && register ? register(id) : void 0,
|
|
1349
1349
|
[visible, register, id, generation]
|
|
@@ -1379,7 +1379,7 @@ function ScopedNativeModal({ children, visible, ...props }) {
|
|
|
1379
1379
|
|
|
1380
1380
|
// packages/native/src/modal.tsx
|
|
1381
1381
|
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1382
|
-
function
|
|
1382
|
+
function KjunFormActions({
|
|
1383
1383
|
size = "lg",
|
|
1384
1384
|
cancelText = "\uCDE8\uC18C",
|
|
1385
1385
|
confirmText = "\uC800\uC7A5",
|
|
@@ -1438,7 +1438,7 @@ function DsFormActions({
|
|
|
1438
1438
|
}
|
|
1439
1439
|
),
|
|
1440
1440
|
showCancel && /* @__PURE__ */ jsx12(
|
|
1441
|
-
|
|
1441
|
+
KjunButton,
|
|
1442
1442
|
{
|
|
1443
1443
|
size,
|
|
1444
1444
|
variant: cancelVariant,
|
|
@@ -1448,7 +1448,7 @@ function DsFormActions({
|
|
|
1448
1448
|
}
|
|
1449
1449
|
),
|
|
1450
1450
|
showConfirm && /* @__PURE__ */ jsx12(
|
|
1451
|
-
|
|
1451
|
+
KjunButton,
|
|
1452
1452
|
{
|
|
1453
1453
|
size,
|
|
1454
1454
|
variant,
|
|
@@ -1462,7 +1462,7 @@ function DsFormActions({
|
|
|
1462
1462
|
}
|
|
1463
1463
|
) });
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function KjunModal({
|
|
1466
1466
|
open,
|
|
1467
1467
|
onOpenChange,
|
|
1468
1468
|
onClose,
|
|
@@ -1603,14 +1603,14 @@ function DsModal({
|
|
|
1603
1603
|
}
|
|
1604
1604
|
) }),
|
|
1605
1605
|
closable && /* @__PURE__ */ jsx12(
|
|
1606
|
-
|
|
1606
|
+
KjunButton,
|
|
1607
1607
|
{
|
|
1608
1608
|
variant: "ghost",
|
|
1609
1609
|
size: "sm",
|
|
1610
1610
|
ariaLabel: "\uB2EB\uAE30",
|
|
1611
1611
|
onPress: close,
|
|
1612
1612
|
style: { borderRadius: tokens8.modal.closeRadius, width: tokens8.modal.closeSize, height: tokens8.modal.closeSize, paddingHorizontal: 0, paddingVertical: 0 },
|
|
1613
|
-
children: /* @__PURE__ */ jsx12(
|
|
1613
|
+
children: /* @__PURE__ */ jsx12(KjunIcon, { name: "x", size: tokens8.modal.closeIconSize })
|
|
1614
1614
|
}
|
|
1615
1615
|
)
|
|
1616
1616
|
]
|
|
@@ -1639,7 +1639,7 @@ function DsModal({
|
|
|
1639
1639
|
borderTopColor: c.border
|
|
1640
1640
|
},
|
|
1641
1641
|
children: footer || /* @__PURE__ */ jsx12(
|
|
1642
|
-
|
|
1642
|
+
KjunFormActions,
|
|
1643
1643
|
{
|
|
1644
1644
|
size: footerSize,
|
|
1645
1645
|
cancelVariant: "secondary",
|
|
@@ -1688,7 +1688,7 @@ function hasContent(node) {
|
|
|
1688
1688
|
|
|
1689
1689
|
// packages/native/src/card.tsx
|
|
1690
1690
|
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1691
|
-
function
|
|
1691
|
+
function KjunCard({
|
|
1692
1692
|
title,
|
|
1693
1693
|
subtitle,
|
|
1694
1694
|
header,
|
|
@@ -1706,7 +1706,7 @@ function DsCard({
|
|
|
1706
1706
|
style
|
|
1707
1707
|
}) {
|
|
1708
1708
|
const { colors } = useKjunStyles();
|
|
1709
|
-
const id = useId4().replace(/[^a-z0-9]/gi, "");
|
|
1709
|
+
const id = "kjun-" + useId4().replace(/[^a-z0-9]/gi, "");
|
|
1710
1710
|
const inset = tokens9.card.padding[padding], bodyInset = tokens9.card.padding[bodyPadding];
|
|
1711
1711
|
const corner = tokens9.card.radii[radius];
|
|
1712
1712
|
const paint = tokens9.cardSurfaces[surface];
|
|
@@ -1779,7 +1779,7 @@ import {
|
|
|
1779
1779
|
} from "react-native";
|
|
1780
1780
|
import Svg3, { Circle as Circle2, Path as Path2 } from "react-native-svg";
|
|
1781
1781
|
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1782
|
-
function
|
|
1782
|
+
function KjunBadge(props) {
|
|
1783
1783
|
return /* @__PURE__ */ jsx14(BadgeView, { ...props });
|
|
1784
1784
|
}
|
|
1785
1785
|
function BadgeView({
|
|
@@ -1841,7 +1841,7 @@ function BadgeView({
|
|
|
1841
1841
|
}
|
|
1842
1842
|
);
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function KjunEmpty({
|
|
1845
1845
|
text = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
1846
1846
|
description,
|
|
1847
1847
|
icon,
|
|
@@ -1859,7 +1859,7 @@ function DsEmpty({
|
|
|
1859
1859
|
paddingVertical: stateContent === "empty" ? 0 : tokens10.dimension.value32
|
|
1860
1860
|
},
|
|
1861
1861
|
children: [
|
|
1862
|
-
icon && /* @__PURE__ */ jsx14(View9, { style: { marginBottom: spec.iconGap }, children: /* @__PURE__ */ jsx14(
|
|
1862
|
+
icon && /* @__PURE__ */ jsx14(View9, { style: { marginBottom: spec.iconGap }, children: /* @__PURE__ */ jsx14(KjunIcon, { name: icon, size: spec.iconSize, color: colors.textSecondary }) }),
|
|
1863
1863
|
/* @__PURE__ */ jsx14(KText, { style: { ...typeStyle("cardTitle"), color: colors.text, fontSize: spec.titleSize, lineHeight: spec.titleLineHeight, textAlign: "center", maxWidth: spec.textMaxWidth }, children: text }),
|
|
1864
1864
|
description && /* @__PURE__ */ jsx14(
|
|
1865
1865
|
KText,
|
|
@@ -1881,7 +1881,7 @@ function DsEmpty({
|
|
|
1881
1881
|
}
|
|
1882
1882
|
);
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1884
|
+
function KjunSpinner({ size = "md", text }) {
|
|
1885
1885
|
const { colors } = useKjunStyles(), reduced = useReducedMotion(), rotation = useRef6(new Animated5.Value(0)).current;
|
|
1886
1886
|
useEffect5(() => {
|
|
1887
1887
|
if (reduced) return;
|
|
@@ -1959,7 +1959,7 @@ function DsSpinner({ size = "md", text }) {
|
|
|
1959
1959
|
}
|
|
1960
1960
|
);
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1962
|
+
function KjunAlert({
|
|
1963
1963
|
type = "info",
|
|
1964
1964
|
variant,
|
|
1965
1965
|
size = "md",
|
|
@@ -1995,7 +1995,7 @@ function DsAlert({
|
|
|
1995
1995
|
},
|
|
1996
1996
|
children: [
|
|
1997
1997
|
/* @__PURE__ */ jsx14(View9, { style: { height: lineHeight, justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ jsx14(
|
|
1998
|
-
|
|
1998
|
+
KjunIcon,
|
|
1999
1999
|
{
|
|
2000
2000
|
name: {
|
|
2001
2001
|
info: "info-circle",
|
|
@@ -2039,7 +2039,7 @@ function DsAlert({
|
|
|
2039
2039
|
onClose == null ? void 0 : onClose();
|
|
2040
2040
|
},
|
|
2041
2041
|
children: ({ pressed, hovered }) => /* @__PURE__ */ jsx14(
|
|
2042
|
-
|
|
2042
|
+
KjunIcon,
|
|
2043
2043
|
{
|
|
2044
2044
|
name: "x",
|
|
2045
2045
|
size: geometry2.closeIconSize,
|
|
@@ -2052,7 +2052,7 @@ function DsAlert({
|
|
|
2052
2052
|
}
|
|
2053
2053
|
);
|
|
2054
2054
|
}
|
|
2055
|
-
function
|
|
2055
|
+
function KjunProgress({
|
|
2056
2056
|
value = 0,
|
|
2057
2057
|
max = 100,
|
|
2058
2058
|
size = "md",
|
|
@@ -2134,7 +2134,7 @@ import {
|
|
|
2134
2134
|
View as View10
|
|
2135
2135
|
} from "react-native";
|
|
2136
2136
|
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2137
|
-
function
|
|
2137
|
+
function KjunSkeleton({
|
|
2138
2138
|
type = "text",
|
|
2139
2139
|
rows = 3,
|
|
2140
2140
|
columns = 4,
|
|
@@ -2510,7 +2510,7 @@ function ToastView({
|
|
|
2510
2510
|
overflow: "hidden"
|
|
2511
2511
|
},
|
|
2512
2512
|
children: [
|
|
2513
|
-
/* @__PURE__ */ jsx16(
|
|
2513
|
+
/* @__PURE__ */ jsx16(KjunIcon, { name: icon, color: colors[`${tone}Accent`] }),
|
|
2514
2514
|
/* @__PURE__ */ jsxs8(View11, { style: { flex: 1, minWidth: 0 }, children: [
|
|
2515
2515
|
toast.title && /* @__PURE__ */ jsx16(KText, { style: { fontWeight: typeStyle("control").fontWeight, marginBottom: tokens13.extensions.toast.titleGap }, children: toast.title }),
|
|
2516
2516
|
/* @__PURE__ */ jsx16(KText, { style: { color: colors.textSecondary }, children: toast.message }),
|
|
@@ -2558,7 +2558,7 @@ function ToastView({
|
|
|
2558
2558
|
justifyContent: "center",
|
|
2559
2559
|
borderRadius: tokens13.extensions.toast.closeRadius
|
|
2560
2560
|
},
|
|
2561
|
-
children: /* @__PURE__ */ jsx16(
|
|
2561
|
+
children: /* @__PURE__ */ jsx16(KjunIcon, { name: "x", color: colors.textTertiary })
|
|
2562
2562
|
}
|
|
2563
2563
|
),
|
|
2564
2564
|
toast.showProgress !== false && !!toast.duration && /* @__PURE__ */ jsx16(
|
|
@@ -2682,7 +2682,7 @@ function FeedbackDialog({
|
|
|
2682
2682
|
}) {
|
|
2683
2683
|
const { options, value, error, busy, edit, cancel, submit } = useFeedbackDialog(controller, request);
|
|
2684
2684
|
return /* @__PURE__ */ jsxs9(
|
|
2685
|
-
|
|
2685
|
+
KjunModal,
|
|
2686
2686
|
{
|
|
2687
2687
|
open,
|
|
2688
2688
|
onOpenChange: (open2) => {
|
|
@@ -2701,7 +2701,7 @@ function FeedbackDialog({
|
|
|
2701
2701
|
children: [
|
|
2702
2702
|
options.message && /* @__PURE__ */ jsx18(KText, { style: { marginBottom: tokens15.dimension.value16 }, children: options.message }),
|
|
2703
2703
|
request.kind === "prompt" && /* @__PURE__ */ jsx18(
|
|
2704
|
-
|
|
2704
|
+
KjunInput,
|
|
2705
2705
|
{
|
|
2706
2706
|
autoFocus: true,
|
|
2707
2707
|
value,
|
|
@@ -2778,7 +2778,7 @@ import {
|
|
|
2778
2778
|
View as View14
|
|
2779
2779
|
} from "react-native";
|
|
2780
2780
|
import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2781
|
-
function
|
|
2781
|
+
function KjunCheckbox({
|
|
2782
2782
|
value,
|
|
2783
2783
|
val,
|
|
2784
2784
|
label,
|
|
@@ -2827,7 +2827,7 @@ function DsCheckbox({
|
|
|
2827
2827
|
backgroundColor: checked ? colors.brand : colors.surface
|
|
2828
2828
|
},
|
|
2829
2829
|
children: checked && /* @__PURE__ */ jsx19(
|
|
2830
|
-
|
|
2830
|
+
KjunIcon,
|
|
2831
2831
|
{
|
|
2832
2832
|
name: "check",
|
|
2833
2833
|
size: tokens16.extensions.checkbox.iconSizes[size],
|
|
@@ -2856,7 +2856,7 @@ function useControlFocus(disabled) {
|
|
|
2856
2856
|
ring: focused && !disabled ? { outlineStyle: "solid", outlineWidth: tokens16.states.focus.width, outlineOffset: tokens16.states.focus.choiceOffset, outlineColor: colors.focusRing } : {}
|
|
2857
2857
|
};
|
|
2858
2858
|
}
|
|
2859
|
-
function
|
|
2859
|
+
function KjunSwitch({
|
|
2860
2860
|
value,
|
|
2861
2861
|
label,
|
|
2862
2862
|
ariaLabel,
|
|
@@ -2956,7 +2956,7 @@ function DsSwitch({
|
|
|
2956
2956
|
);
|
|
2957
2957
|
}
|
|
2958
2958
|
var RadioContext = createContext14(null);
|
|
2959
|
-
function
|
|
2959
|
+
function KjunRadio({
|
|
2960
2960
|
value,
|
|
2961
2961
|
val,
|
|
2962
2962
|
label,
|
|
@@ -3032,7 +3032,7 @@ function DsRadio({
|
|
|
3032
3032
|
}
|
|
3033
3033
|
);
|
|
3034
3034
|
}
|
|
3035
|
-
function
|
|
3035
|
+
function KjunRadioGroup({
|
|
3036
3036
|
value,
|
|
3037
3037
|
options = [],
|
|
3038
3038
|
direction = "horizontal",
|
|
@@ -3065,7 +3065,7 @@ function DsRadioGroup({
|
|
|
3065
3065
|
gap: direction === "vertical" ? tokens16.dimension.value8 : tokens16.dimension.value16
|
|
3066
3066
|
},
|
|
3067
3067
|
children: children || options.map((option) => /* @__PURE__ */ jsx19(
|
|
3068
|
-
|
|
3068
|
+
KjunRadio,
|
|
3069
3069
|
{
|
|
3070
3070
|
val: option.value,
|
|
3071
3071
|
label: option.label,
|
|
@@ -3172,7 +3172,7 @@ function ButtonGroupLabel({ label, active, size, reduced }) {
|
|
|
3172
3172
|
|
|
3173
3173
|
// packages/native/src/selection-groups.tsx
|
|
3174
3174
|
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3175
|
-
function
|
|
3175
|
+
function KjunButtonGroup({
|
|
3176
3176
|
value,
|
|
3177
3177
|
options,
|
|
3178
3178
|
size = "md",
|
|
@@ -3273,7 +3273,7 @@ function DsButtonGroup({
|
|
|
3273
3273
|
}),
|
|
3274
3274
|
children: [
|
|
3275
3275
|
option.icon && /* @__PURE__ */ jsx21(
|
|
3276
|
-
|
|
3276
|
+
KjunIcon,
|
|
3277
3277
|
{
|
|
3278
3278
|
name: option.icon,
|
|
3279
3279
|
size: tokens18.extensions.selection.iconSize,
|
|
@@ -3300,7 +3300,7 @@ function DsButtonGroup({
|
|
|
3300
3300
|
}
|
|
3301
3301
|
);
|
|
3302
3302
|
}
|
|
3303
|
-
function
|
|
3303
|
+
function KjunFilterGroup({
|
|
3304
3304
|
value,
|
|
3305
3305
|
options,
|
|
3306
3306
|
size = "sm",
|
|
@@ -3370,7 +3370,7 @@ function DsFilterGroup({
|
|
|
3370
3370
|
}
|
|
3371
3371
|
),
|
|
3372
3372
|
option.icon && /* @__PURE__ */ jsx21(
|
|
3373
|
-
|
|
3373
|
+
KjunIcon,
|
|
3374
3374
|
{
|
|
3375
3375
|
name: option.icon,
|
|
3376
3376
|
size: tokens18.extensions.selection.iconSize,
|
|
@@ -3432,8 +3432,8 @@ import {
|
|
|
3432
3432
|
Platform as Platform13
|
|
3433
3433
|
} from "react-native";
|
|
3434
3434
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3435
|
-
var
|
|
3436
|
-
function
|
|
3435
|
+
var KjunTextarea = forwardRef3(
|
|
3436
|
+
function KjunTextarea2({
|
|
3437
3437
|
value,
|
|
3438
3438
|
size = "md",
|
|
3439
3439
|
error = false,
|
|
@@ -3511,7 +3511,7 @@ import {
|
|
|
3511
3511
|
useWindowDimensions as useWindowDimensions3
|
|
3512
3512
|
} from "react-native";
|
|
3513
3513
|
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3514
|
-
function
|
|
3514
|
+
function KjunDrawer({
|
|
3515
3515
|
open,
|
|
3516
3516
|
onOpenChange,
|
|
3517
3517
|
title,
|
|
@@ -3619,14 +3619,14 @@ function DsDrawer({
|
|
|
3619
3619
|
}
|
|
3620
3620
|
) }),
|
|
3621
3621
|
closable && /* @__PURE__ */ jsx23(
|
|
3622
|
-
|
|
3622
|
+
KjunButton,
|
|
3623
3623
|
{
|
|
3624
3624
|
size: "sm",
|
|
3625
3625
|
variant: "ghost",
|
|
3626
3626
|
ariaLabel: "\uB2EB\uAE30",
|
|
3627
3627
|
onPress: close,
|
|
3628
3628
|
style: { borderRadius: tokens20.extensions.drawer.closeRadius, width: tokens20.extensions.drawer.closeSize, height: tokens20.extensions.drawer.closeSize, paddingHorizontal: 0, paddingVertical: 0 },
|
|
3629
|
-
children: /* @__PURE__ */ jsx23(
|
|
3629
|
+
children: /* @__PURE__ */ jsx23(KjunIcon, { name: "x", size: tokens20.extensions.drawer.closeIconSize })
|
|
3630
3630
|
}
|
|
3631
3631
|
)
|
|
3632
3632
|
]
|
|
@@ -3953,7 +3953,7 @@ import {
|
|
|
3953
3953
|
} from "react-native";
|
|
3954
3954
|
import { tokens as tokens22 } from "@kjun-ui/tokens";
|
|
3955
3955
|
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3956
|
-
function
|
|
3956
|
+
function KjunPopover({
|
|
3957
3957
|
noPadding = false,
|
|
3958
3958
|
open: controlled,
|
|
3959
3959
|
onOpenChange,
|
|
@@ -4003,7 +4003,7 @@ function DsPopover({
|
|
|
4003
4003
|
)
|
|
4004
4004
|
] });
|
|
4005
4005
|
}
|
|
4006
|
-
function
|
|
4006
|
+
function KjunTooltip({
|
|
4007
4007
|
content: message = "",
|
|
4008
4008
|
placement = "top",
|
|
4009
4009
|
delay = 0,
|
|
@@ -4120,9 +4120,9 @@ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
|
4120
4120
|
var DropdownContext = createContext15(null);
|
|
4121
4121
|
var MenuIconSlotContext = createContext15(false);
|
|
4122
4122
|
function hasLeadingIcon(node) {
|
|
4123
|
-
return Children2.toArray(node).some((child) => isValidElement5(child) && (child.type === Fragment6 ? hasLeadingIcon(child.props.children) : child.type ===
|
|
4123
|
+
return Children2.toArray(node).some((child) => isValidElement5(child) && (child.type === Fragment6 ? hasLeadingIcon(child.props.children) : child.type === KjunDropdownItem && !!child.props.icon));
|
|
4124
4124
|
}
|
|
4125
|
-
function
|
|
4125
|
+
function KjunDropdown({
|
|
4126
4126
|
disabled = false,
|
|
4127
4127
|
placement = "bottom-start",
|
|
4128
4128
|
trigger,
|
|
@@ -4132,7 +4132,7 @@ function DsDropdown({
|
|
|
4132
4132
|
}) {
|
|
4133
4133
|
const [open, setOpen] = useState18(false), currentOpen = useRef18(false), ref = useRef18(null);
|
|
4134
4134
|
let control = trigger;
|
|
4135
|
-
while (isValidElement5(control) && control.type ===
|
|
4135
|
+
while (isValidElement5(control) && control.type === KjunTooltip)
|
|
4136
4136
|
control = control.props.children;
|
|
4137
4137
|
const unavailable = disabled || isValidElement5(control) && !!(control.props.disabled || control.props.loading);
|
|
4138
4138
|
const change = (v) => {
|
|
@@ -4168,7 +4168,7 @@ function DsDropdown({
|
|
|
4168
4168
|
)
|
|
4169
4169
|
] });
|
|
4170
4170
|
}
|
|
4171
|
-
function
|
|
4171
|
+
function KjunDropdownItem({
|
|
4172
4172
|
variant = "default",
|
|
4173
4173
|
icon,
|
|
4174
4174
|
disabled = false,
|
|
@@ -4206,14 +4206,14 @@ function DsDropdownItem({
|
|
|
4206
4206
|
opacity: disabled ? tokens23.states.opacity.disabled : 1
|
|
4207
4207
|
}),
|
|
4208
4208
|
children: [
|
|
4209
|
-
icon ? /* @__PURE__ */ jsx26(
|
|
4209
|
+
icon ? /* @__PURE__ */ jsx26(KjunIcon, { name: icon, size: tokens23.extensions.menu.iconSize, color: iconColor }) : reserveIcon && /* @__PURE__ */ jsx26(View20, { style: { width: tokens23.extensions.menu.iconSize }, accessible: false }),
|
|
4210
4210
|
/* @__PURE__ */ jsx26(View20, { style: { flexGrow: 1, flexShrink: 1 }, children: content(children, { color, fontSize: tokens23.extensions.menu.optionFontSize, lineHeight: tokens23.extensions.menu.optionLineHeight }) }),
|
|
4211
|
-
selected !== null && /* @__PURE__ */ jsx26(View20, { style: { opacity: selected ? 1 : 0 }, accessible: false, children: /* @__PURE__ */ jsx26(
|
|
4211
|
+
selected !== null && /* @__PURE__ */ jsx26(View20, { style: { opacity: selected ? 1 : 0 }, accessible: false, children: /* @__PURE__ */ jsx26(KjunIcon, { name: "check", size: tokens23.extensions.menu.iconSize, color: colors.brand }) })
|
|
4212
4212
|
]
|
|
4213
4213
|
}
|
|
4214
4214
|
);
|
|
4215
4215
|
}
|
|
4216
|
-
function
|
|
4216
|
+
function KjunDropdownDivider() {
|
|
4217
4217
|
const { colors } = useKjunStyles();
|
|
4218
4218
|
return /* @__PURE__ */ jsx26(
|
|
4219
4219
|
View20,
|
|
@@ -4223,7 +4223,7 @@ function DsDropdownDivider() {
|
|
|
4223
4223
|
}
|
|
4224
4224
|
);
|
|
4225
4225
|
}
|
|
4226
|
-
function
|
|
4226
|
+
function KjunMenuButton({
|
|
4227
4227
|
label,
|
|
4228
4228
|
size = "md",
|
|
4229
4229
|
variant = "secondary",
|
|
@@ -4239,7 +4239,7 @@ function DsMenuButton({
|
|
|
4239
4239
|
}) {
|
|
4240
4240
|
const [open, setOpen] = useState18(false);
|
|
4241
4241
|
return /* @__PURE__ */ jsx26(
|
|
4242
|
-
|
|
4242
|
+
KjunDropdown,
|
|
4243
4243
|
{
|
|
4244
4244
|
...props,
|
|
4245
4245
|
onOpen: () => {
|
|
@@ -4251,13 +4251,13 @@ function DsMenuButton({
|
|
|
4251
4251
|
onClose == null ? void 0 : onClose();
|
|
4252
4252
|
},
|
|
4253
4253
|
trigger: /* @__PURE__ */ jsx26(
|
|
4254
|
-
|
|
4254
|
+
KjunTooltip,
|
|
4255
4255
|
{
|
|
4256
4256
|
content: open ? "" : tooltip,
|
|
4257
4257
|
placement: tooltipPlacement,
|
|
4258
4258
|
delay: tooltipDelay,
|
|
4259
4259
|
children: /* @__PURE__ */ jsx26(
|
|
4260
|
-
|
|
4260
|
+
KjunButton,
|
|
4261
4261
|
{
|
|
4262
4262
|
size,
|
|
4263
4263
|
variant,
|
|
@@ -4417,7 +4417,7 @@ function OptionRow({
|
|
|
4417
4417
|
}),
|
|
4418
4418
|
children: [
|
|
4419
4419
|
/* @__PURE__ */ jsx27(View21, { style: { flex: 1 }, children: content(children || label, { fontSize: tokens24.extensions.menu.optionFontSize, lineHeight: tokens24.extensions.menu.optionLineHeight }) }),
|
|
4420
|
-
selected && /* @__PURE__ */ jsx27(
|
|
4420
|
+
selected && /* @__PURE__ */ jsx27(KjunIcon, { name: "check", size: tokens24.extensions.menu.iconSize, color: colors.brand })
|
|
4421
4421
|
]
|
|
4422
4422
|
}
|
|
4423
4423
|
);
|
|
@@ -4425,7 +4425,7 @@ function OptionRow({
|
|
|
4425
4425
|
|
|
4426
4426
|
// packages/native/src/combobox.tsx
|
|
4427
4427
|
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4428
|
-
function
|
|
4428
|
+
function KjunCombobox({
|
|
4429
4429
|
value,
|
|
4430
4430
|
options = [],
|
|
4431
4431
|
placeholder = "\uAC80\uC0C9 \uB610\uB294 \uC120\uD0DD",
|
|
@@ -4533,7 +4533,7 @@ function SearchField({
|
|
|
4533
4533
|
onSubmitEditing: onEnter
|
|
4534
4534
|
};
|
|
4535
4535
|
return /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
4536
|
-
/* @__PURE__ */ jsx28(View22, { ref, collapsable: false, children: /* @__PURE__ */ jsx28(
|
|
4536
|
+
/* @__PURE__ */ jsx28(View22, { ref, collapsable: false, children: /* @__PURE__ */ jsx28(KjunInput, { ...inputProps, ...Platform17.OS === "web" ? { onClick: openFromPress } : { onPressIn: openFromPress }, "aria-expanded": open && !disabled, onBlur: focusGuard.clear, onFocus: () => {
|
|
4537
4537
|
if (!clearing.current && focusGuard.canOpen()) onOpenChange(true);
|
|
4538
4538
|
} }) }),
|
|
4539
4539
|
/* @__PURE__ */ jsx28(
|
|
@@ -4555,12 +4555,12 @@ function SearchField({
|
|
|
4555
4555
|
borderBottomWidth: tokens25.border.defaultWidth,
|
|
4556
4556
|
borderBottomColor: colors.border
|
|
4557
4557
|
},
|
|
4558
|
-
children: /* @__PURE__ */ jsx28(
|
|
4558
|
+
children: /* @__PURE__ */ jsx28(KjunInput, { ...inputProps, nativeID: searchId, autoFocus: true })
|
|
4559
4559
|
}
|
|
4560
4560
|
),
|
|
4561
4561
|
loading ? (
|
|
4562
4562
|
// Centered like the Select loading row on every platform.
|
|
4563
|
-
/* @__PURE__ */ jsx28(View22, { style: { padding: tokens25.dimension.value12, alignItems: "center" }, children: /* @__PURE__ */ jsx28(
|
|
4563
|
+
/* @__PURE__ */ jsx28(View22, { style: { padding: tokens25.dimension.value12, alignItems: "center" }, children: /* @__PURE__ */ jsx28(KjunSpinner, { size: "sm", text: "\uAC80\uC0C9 \uC911..." }) })
|
|
4564
4564
|
) : failed ? /* @__PURE__ */ jsx28(
|
|
4565
4565
|
KText,
|
|
4566
4566
|
{
|
|
@@ -4611,7 +4611,7 @@ function displayMonth(value) {
|
|
|
4611
4611
|
const date = /* @__PURE__ */ new Date(value + "T12:00:00");
|
|
4612
4612
|
return Number.isNaN(date.getTime()) ? /* @__PURE__ */ new Date() : date;
|
|
4613
4613
|
}
|
|
4614
|
-
function
|
|
4614
|
+
function KjunDatePicker({
|
|
4615
4615
|
value,
|
|
4616
4616
|
min,
|
|
4617
4617
|
max,
|
|
@@ -4676,7 +4676,7 @@ function DsDatePicker({
|
|
|
4676
4676
|
}
|
|
4677
4677
|
),
|
|
4678
4678
|
/* @__PURE__ */ jsx29(
|
|
4679
|
-
|
|
4679
|
+
KjunIcon,
|
|
4680
4680
|
{
|
|
4681
4681
|
name: "calendar",
|
|
4682
4682
|
size: spec.iconSize,
|
|
@@ -4707,7 +4707,7 @@ function DsDatePicker({
|
|
|
4707
4707
|
},
|
|
4708
4708
|
children: [
|
|
4709
4709
|
/* @__PURE__ */ jsx29(
|
|
4710
|
-
|
|
4710
|
+
KjunButton,
|
|
4711
4711
|
{
|
|
4712
4712
|
size: "sm",
|
|
4713
4713
|
variant: "ghost",
|
|
@@ -4723,7 +4723,7 @@ function DsDatePicker({
|
|
|
4723
4723
|
"\uC6D4"
|
|
4724
4724
|
] }),
|
|
4725
4725
|
/* @__PURE__ */ jsx29(
|
|
4726
|
-
|
|
4726
|
+
KjunButton,
|
|
4727
4727
|
{
|
|
4728
4728
|
size: "sm",
|
|
4729
4729
|
variant: "ghost",
|
|
@@ -4888,7 +4888,7 @@ function useSearchInputModel({
|
|
|
4888
4888
|
|
|
4889
4889
|
// packages/native/src/search-input.tsx
|
|
4890
4890
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4891
|
-
function
|
|
4891
|
+
function KjunSearchInput({
|
|
4892
4892
|
value,
|
|
4893
4893
|
placeholder = "\uAC80\uC0C9...",
|
|
4894
4894
|
ariaLabel,
|
|
@@ -4923,7 +4923,7 @@ function DsSearchInput({
|
|
|
4923
4923
|
};
|
|
4924
4924
|
if (!loadOptions)
|
|
4925
4925
|
return /* @__PURE__ */ jsx30(
|
|
4926
|
-
|
|
4926
|
+
KjunInput,
|
|
4927
4927
|
{
|
|
4928
4928
|
error,
|
|
4929
4929
|
value: query,
|
|
@@ -5022,7 +5022,7 @@ function useSelectState(controlled, disabled, pageSize, onOpenChange) {
|
|
|
5022
5022
|
// packages/native/src/select-control.tsx
|
|
5023
5023
|
import { Platform as Platform19, View as View25 } from "react-native";
|
|
5024
5024
|
import { Fragment as Fragment9, jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5025
|
-
function
|
|
5025
|
+
function KjunSelect({
|
|
5026
5026
|
value,
|
|
5027
5027
|
options = [],
|
|
5028
5028
|
placeholder = "\uC120\uD0DD",
|
|
@@ -5133,7 +5133,7 @@ function DsSelect({
|
|
|
5133
5133
|
}, children: label || placeholder })
|
|
5134
5134
|
] }),
|
|
5135
5135
|
/* @__PURE__ */ jsx32(View25, { style: { transform: [{ rotate: expanded ? "180deg" : "0deg" }] }, children: /* @__PURE__ */ jsx32(
|
|
5136
|
-
|
|
5136
|
+
KjunIcon,
|
|
5137
5137
|
{
|
|
5138
5138
|
name: "chevron-down",
|
|
5139
5139
|
size: compound ? tokens28.extensions.timePicker.iconSize : spec.iconSize,
|
|
@@ -5185,7 +5185,7 @@ function DsSelect({
|
|
|
5185
5185
|
borderBottomColor: colors.border
|
|
5186
5186
|
},
|
|
5187
5187
|
children: /* @__PURE__ */ jsx32(
|
|
5188
|
-
|
|
5188
|
+
KjunInput,
|
|
5189
5189
|
{
|
|
5190
5190
|
autoFocus: true,
|
|
5191
5191
|
value: query,
|
|
@@ -5201,7 +5201,7 @@ function DsSelect({
|
|
|
5201
5201
|
)
|
|
5202
5202
|
}
|
|
5203
5203
|
),
|
|
5204
|
-
loading ? /* @__PURE__ */ jsx32(View25, { style: { padding: tokens28.dimension.value12 }, children: /* @__PURE__ */ jsx32(
|
|
5204
|
+
loading ? /* @__PURE__ */ jsx32(View25, { style: { padding: tokens28.dimension.value12 }, children: /* @__PURE__ */ jsx32(KjunSpinner, { size: "sm", text: "\uAC80\uC0C9 \uC911..." }) }) : visible.map(({ option: o, key }, index) => /* @__PURE__ */ jsx32(
|
|
5205
5205
|
OptionRow,
|
|
5206
5206
|
{
|
|
5207
5207
|
selected: selected(o),
|
|
@@ -5231,7 +5231,7 @@ function DsSelect({
|
|
|
5231
5231
|
}
|
|
5232
5232
|
),
|
|
5233
5233
|
!loading && visible.length < matching.length && /* @__PURE__ */ jsx32(
|
|
5234
|
-
|
|
5234
|
+
KjunButton,
|
|
5235
5235
|
{
|
|
5236
5236
|
size: "sm",
|
|
5237
5237
|
variant: "ghost",
|
|
@@ -5364,7 +5364,7 @@ function usePanelFocus(_root) {
|
|
|
5364
5364
|
// packages/native/src/tabs.tsx
|
|
5365
5365
|
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5366
5366
|
var TabContext = createContext17({ value: "", id: "", names: [] });
|
|
5367
|
-
function
|
|
5367
|
+
function KjunTabs({
|
|
5368
5368
|
value,
|
|
5369
5369
|
items = [],
|
|
5370
5370
|
density = "comfortable",
|
|
@@ -5380,15 +5380,15 @@ function DsTabs({
|
|
|
5380
5380
|
const { colors } = useKjunStyles(), panes = Children3.toArray(children).filter(
|
|
5381
5381
|
isValidElement6
|
|
5382
5382
|
);
|
|
5383
|
-
const tabs = items.length ? items : panes.filter((child) => child.type ===
|
|
5384
|
-
const id = useId6(), root = useRef26(null);
|
|
5383
|
+
const tabs = items.length ? items : panes.filter((child) => child.type === KjunTabPane).map((child) => child.props);
|
|
5384
|
+
const id = "kjun-" + useId6(), root = useRef26(null);
|
|
5385
5385
|
const menuState = useRef26({ tabs, onTabMenu });
|
|
5386
5386
|
menuState.current = { tabs, onTabMenu };
|
|
5387
5387
|
const pressedMenu = useRef26(null);
|
|
5388
5388
|
useLayoutEffect11(() => {
|
|
5389
5389
|
if (!onTabMenu || !tabs.some((tab) => tab.name === pressedMenu.current && !tab.disabled)) pressedMenu.current = null;
|
|
5390
5390
|
}, [tabs, onTabMenu]);
|
|
5391
|
-
const panelNames = panes.filter((child) => child.type ===
|
|
5391
|
+
const panelNames = panes.filter((child) => child.type === KjunTabPane).map((child) => child.props.name);
|
|
5392
5392
|
const geometry2 = tokens30.extensions.tabs;
|
|
5393
5393
|
const underline = variant === "underline";
|
|
5394
5394
|
const [hoveredTab, setHoveredTab] = useState26(null);
|
|
@@ -5519,7 +5519,7 @@ function DsTabs({
|
|
|
5519
5519
|
},
|
|
5520
5520
|
children: [
|
|
5521
5521
|
tab.icon && /* @__PURE__ */ jsx34(
|
|
5522
|
-
|
|
5522
|
+
KjunIcon,
|
|
5523
5523
|
{
|
|
5524
5524
|
name: tab.icon,
|
|
5525
5525
|
size: geometry2.iconSize,
|
|
@@ -5570,7 +5570,7 @@ function DsTabs({
|
|
|
5570
5570
|
children && /* @__PURE__ */ jsx34(View27, { style: { marginTop: geometry2.contentGap }, children })
|
|
5571
5571
|
] }) });
|
|
5572
5572
|
}
|
|
5573
|
-
function
|
|
5573
|
+
function KjunTabPane({ name, children }) {
|
|
5574
5574
|
const { value, id, names } = useContext13(TabContext);
|
|
5575
5575
|
const root = useRef26(null);
|
|
5576
5576
|
usePanelFocus(root);
|
|
@@ -5596,7 +5596,7 @@ function DsTabPane({ name, children }) {
|
|
|
5596
5596
|
// packages/native/src/navigation.tsx
|
|
5597
5597
|
import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5598
5598
|
var AccordionContext = createContext18(null);
|
|
5599
|
-
function
|
|
5599
|
+
function KjunAccordion({
|
|
5600
5600
|
multiple = false,
|
|
5601
5601
|
tone = "card",
|
|
5602
5602
|
children
|
|
@@ -5620,14 +5620,14 @@ function DsAccordion({
|
|
|
5620
5620
|
}
|
|
5621
5621
|
);
|
|
5622
5622
|
}
|
|
5623
|
-
function
|
|
5623
|
+
function KjunAccordionItem({
|
|
5624
5624
|
title = "",
|
|
5625
5625
|
defaultOpen = false,
|
|
5626
5626
|
disabled = false,
|
|
5627
5627
|
header,
|
|
5628
5628
|
children
|
|
5629
5629
|
}) {
|
|
5630
|
-
const { colors } = useKjunStyles(), group = useContext14(AccordionContext), id = useId7(), [own, setOwn] = useState27(defaultOpen), open = group ? group.opened.has(id) : own;
|
|
5630
|
+
const { colors } = useKjunStyles(), group = useContext14(AccordionContext), id = "kjun-" + useId7(), [own, setOwn] = useState27(defaultOpen), open = group ? group.opened.has(id) : own;
|
|
5631
5631
|
const rotation = useMotionValue(open ? 1 : 0, tokens31.motion.collapse, void 0, void 0, true);
|
|
5632
5632
|
const geometry2 = tokens31.extensions.accordion;
|
|
5633
5633
|
const [hovered, setHovered] = useState27(false);
|
|
@@ -5662,7 +5662,7 @@ function DsAccordionItem({
|
|
|
5662
5662
|
}),
|
|
5663
5663
|
children: [
|
|
5664
5664
|
/* @__PURE__ */ jsx35(View28, { style: { flex: 1, minWidth: 0 }, children: content(header || title, { ...typeStyle("control"), ...wrapping }) }),
|
|
5665
|
-
/* @__PURE__ */ jsx35(Animated16.View, { style: { flexShrink: 0, transform: [{ rotate: rotation.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] }) }] }, children: /* @__PURE__ */ jsx35(
|
|
5665
|
+
/* @__PURE__ */ jsx35(Animated16.View, { style: { flexShrink: 0, transform: [{ rotate: rotation.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] }) }] }, children: /* @__PURE__ */ jsx35(KjunIcon, { name: "chevron-down", size: geometry2.iconSize, color: colors.textSecondary }) })
|
|
5666
5666
|
]
|
|
5667
5667
|
}
|
|
5668
5668
|
),
|
|
@@ -5676,7 +5676,7 @@ function DsAccordionItem({
|
|
|
5676
5676
|
) })
|
|
5677
5677
|
] });
|
|
5678
5678
|
}
|
|
5679
|
-
function
|
|
5679
|
+
function KjunBreadcrumb({
|
|
5680
5680
|
items,
|
|
5681
5681
|
renderLink,
|
|
5682
5682
|
onNavigate,
|
|
@@ -5695,7 +5695,7 @@ function DsBreadcrumb({
|
|
|
5695
5695
|
},
|
|
5696
5696
|
children: items.map((item, i) => {
|
|
5697
5697
|
const label = /* @__PURE__ */ jsxs22(View28, { style: { flexDirection: "row", alignItems: "center", gap: tokens31.dimension.value4 }, children: [
|
|
5698
|
-
item.icon && /* @__PURE__ */ jsx35(
|
|
5698
|
+
item.icon && /* @__PURE__ */ jsx35(KjunIcon, { name: item.icon, size: tokens31.extensions.breadcrumb.iconSize, color: colors.textSecondary }),
|
|
5699
5699
|
/* @__PURE__ */ jsx35(
|
|
5700
5700
|
KText,
|
|
5701
5701
|
{
|
|
@@ -5709,7 +5709,7 @@ function DsBreadcrumb({
|
|
|
5709
5709
|
] });
|
|
5710
5710
|
return /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
5711
5711
|
i > 0 && /* @__PURE__ */ jsx35(
|
|
5712
|
-
|
|
5712
|
+
KjunIcon,
|
|
5713
5713
|
{
|
|
5714
5714
|
name: "chevron-right",
|
|
5715
5715
|
size: tokens31.extensions.breadcrumb.separatorSize,
|
|
@@ -5731,7 +5731,7 @@ function DsBreadcrumb({
|
|
|
5731
5731
|
}
|
|
5732
5732
|
);
|
|
5733
5733
|
}
|
|
5734
|
-
function
|
|
5734
|
+
function KjunPagination({
|
|
5735
5735
|
currentPage,
|
|
5736
5736
|
page,
|
|
5737
5737
|
totalPages,
|
|
@@ -5773,7 +5773,7 @@ function DsPagination({
|
|
|
5773
5773
|
};
|
|
5774
5774
|
const arrowSize = (_b = Object.keys(tokens31.button.iconSizes).find((size) => tokens31.button.iconSizes[size] === tokens31.extensions.pagination.iconSize)) != null ? _b : "sm";
|
|
5775
5775
|
const button = (target, label, icon) => /* @__PURE__ */ jsx35(
|
|
5776
|
-
|
|
5776
|
+
KjunButton,
|
|
5777
5777
|
{
|
|
5778
5778
|
style: pageButtonStyle,
|
|
5779
5779
|
size: arrowSize,
|
|
@@ -5818,7 +5818,7 @@ function DsPagination({
|
|
|
5818
5818
|
},
|
|
5819
5819
|
children: [
|
|
5820
5820
|
showSizeSelector && /* @__PURE__ */ jsx35(View28, { style: { minWidth: tokens31.extensions.pagination.selectorMinimumWidth }, children: /* @__PURE__ */ jsx35(
|
|
5821
|
-
|
|
5821
|
+
KjunSelect,
|
|
5822
5822
|
{
|
|
5823
5823
|
size: "sm",
|
|
5824
5824
|
ariaLabel: "\uD398\uC774\uC9C0\uB2F9 \uD56D\uBAA9 \uC218",
|
|
@@ -5843,7 +5843,7 @@ function DsPagination({
|
|
|
5843
5843
|
totalPages
|
|
5844
5844
|
] }) : pages.map(
|
|
5845
5845
|
(n, i) => typeof n === "string" ? /* @__PURE__ */ jsx35(KText, { children: "..." }, "dots" + i) : /* @__PURE__ */ jsx35(
|
|
5846
|
-
|
|
5846
|
+
KjunButton,
|
|
5847
5847
|
{
|
|
5848
5848
|
style: pageButtonStyle,
|
|
5849
5849
|
size: "sm",
|
|
@@ -5871,7 +5871,7 @@ import { tokens as tokens32 } from "@kjun-ui/tokens";
|
|
|
5871
5871
|
import { useContext as useContext15, useEffect as useEffect20, useRef as useRef27, useState as useState28 } from "react";
|
|
5872
5872
|
import { Platform as Platform22, ScrollView as ScrollView7, View as View29 } from "react-native";
|
|
5873
5873
|
import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5874
|
-
function
|
|
5874
|
+
function KjunIconToggle({
|
|
5875
5875
|
active = false,
|
|
5876
5876
|
activeIcon,
|
|
5877
5877
|
inactiveIcon,
|
|
@@ -5889,7 +5889,7 @@ function DsIconToggle({
|
|
|
5889
5889
|
const { colors } = useKjunStyles();
|
|
5890
5890
|
const navigation = useContext15(TopNavigationContext);
|
|
5891
5891
|
const box = navigation ? navigation.controlSize : size === "xs" ? tokens32.extensions.iconToggle.compactSize : tokens32.extensions.iconToggle.sizes[size];
|
|
5892
|
-
return /* @__PURE__ */ jsx36(
|
|
5892
|
+
return /* @__PURE__ */ jsx36(KjunTooltip, { content: disabled || loading ? "" : tooltip != null ? tooltip : ariaLabel, placement: tooltipPlacement, delay: tooltipDelay, children: /* @__PURE__ */ jsx36(
|
|
5893
5893
|
AccessiblePressable,
|
|
5894
5894
|
{
|
|
5895
5895
|
accessibilityRole: "button",
|
|
@@ -5926,8 +5926,8 @@ function DsIconToggle({
|
|
|
5926
5926
|
}),
|
|
5927
5927
|
children: ({ pressed, hovered }) => {
|
|
5928
5928
|
var _a;
|
|
5929
|
-
return /* @__PURE__ */ jsx36(View29, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", borderRadius: tokens32.extensions.iconToggle.radii[size], backgroundColor: !disabled && !loading && (pressed || hovered) ? colors.hover : "transparent" }, children: loading ? navigation ? /* @__PURE__ */ jsx36(
|
|
5930
|
-
|
|
5929
|
+
return /* @__PURE__ */ jsx36(View29, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", borderRadius: tokens32.extensions.iconToggle.radii[size], backgroundColor: !disabled && !loading && (pressed || hovered) ? colors.hover : "transparent" }, children: loading ? navigation ? /* @__PURE__ */ jsx36(KjunIcon, { name: "loader-2", spin: true, size: navigation.iconSize }) : /* @__PURE__ */ jsx36(KjunSpinner, { size: "sm" }) : /* @__PURE__ */ jsx36(
|
|
5930
|
+
KjunIcon,
|
|
5931
5931
|
{
|
|
5932
5932
|
name: active ? activeIcon : inactiveIcon || activeIcon,
|
|
5933
5933
|
filled: active,
|
|
@@ -5939,7 +5939,7 @@ function DsIconToggle({
|
|
|
5939
5939
|
}
|
|
5940
5940
|
) });
|
|
5941
5941
|
}
|
|
5942
|
-
function
|
|
5942
|
+
function KjunCopyButton({
|
|
5943
5943
|
value,
|
|
5944
5944
|
ariaLabel,
|
|
5945
5945
|
text,
|
|
@@ -6004,7 +6004,7 @@ function DsCopyButton({
|
|
|
6004
6004
|
}),
|
|
6005
6005
|
children: [
|
|
6006
6006
|
/* @__PURE__ */ jsx36(
|
|
6007
|
-
|
|
6007
|
+
KjunIcon,
|
|
6008
6008
|
{
|
|
6009
6009
|
name: copied ? "check" : "copy",
|
|
6010
6010
|
size: tokens32.button.iconSizes[size],
|
|
@@ -6025,7 +6025,7 @@ function DsCopyButton({
|
|
|
6025
6025
|
}
|
|
6026
6026
|
) });
|
|
6027
6027
|
}
|
|
6028
|
-
function
|
|
6028
|
+
function KjunRefreshButton({
|
|
6029
6029
|
targetName = "",
|
|
6030
6030
|
mode = "icon",
|
|
6031
6031
|
text = "\uC0C8\uB85C\uACE0\uCE68",
|
|
@@ -6042,8 +6042,8 @@ function DsRefreshButton({
|
|
|
6042
6042
|
const reduced = useReducedMotion();
|
|
6043
6043
|
const label = ariaLabel || [targetName, "\uC0C8\uB85C\uACE0\uCE68"].filter(Boolean).join(" ");
|
|
6044
6044
|
const hint = tooltip != null ? tooltip : mode === "icon" ? label : "";
|
|
6045
|
-
const button = /* @__PURE__ */ jsx36(
|
|
6046
|
-
|
|
6045
|
+
const button = /* @__PURE__ */ jsx36(KjunTooltip, { content: props.disabled || props.loading ? "" : hint, placement: tooltipPlacement, delay: tooltipDelay, children: /* @__PURE__ */ jsx36(
|
|
6046
|
+
KjunButton,
|
|
6047
6047
|
{
|
|
6048
6048
|
...props,
|
|
6049
6049
|
size,
|
|
@@ -6065,14 +6065,14 @@ function safeExternalUrl(href) {
|
|
|
6065
6065
|
return "";
|
|
6066
6066
|
}
|
|
6067
6067
|
}
|
|
6068
|
-
function
|
|
6068
|
+
function KjunExternalLink({
|
|
6069
6069
|
href = "",
|
|
6070
6070
|
mode = "text",
|
|
6071
6071
|
label,
|
|
6072
6072
|
children,
|
|
6073
6073
|
openUrl
|
|
6074
6074
|
}) {
|
|
6075
|
-
const { colors } = useKjunStyles(), url = safeExternalUrl(href), name = label || (mode === "icon" ? "\uC678\uBD80 \uB9C1\uD06C" : void 0), body = mode === "icon" ? /* @__PURE__ */ jsx36(
|
|
6075
|
+
const { colors } = useKjunStyles(), url = safeExternalUrl(href), name = label || (mode === "icon" ? "\uC678\uBD80 \uB9C1\uD06C" : void 0), body = mode === "icon" ? /* @__PURE__ */ jsx36(KjunIcon, { name: "external-link", color: colors.text }) : content(children);
|
|
6076
6076
|
return url ? /* @__PURE__ */ jsx36(
|
|
6077
6077
|
AccessiblePressable,
|
|
6078
6078
|
{
|
|
@@ -6084,13 +6084,13 @@ function DsExternalLink({
|
|
|
6084
6084
|
// Like Web, text links show the new-window cue after the text.
|
|
6085
6085
|
/* @__PURE__ */ jsxs23(View29, { style: { flexDirection: "row", alignItems: "center", gap: tokens32.dimension.value4 }, children: [
|
|
6086
6086
|
body,
|
|
6087
|
-
/* @__PURE__ */ jsx36(
|
|
6087
|
+
/* @__PURE__ */ jsx36(KjunIcon, { name: "external-link", size: tokens32.iconSizes.small, color: colors.text })
|
|
6088
6088
|
] })
|
|
6089
6089
|
) : body
|
|
6090
6090
|
}
|
|
6091
6091
|
) : /* @__PURE__ */ jsx36(View29, { children: body });
|
|
6092
6092
|
}
|
|
6093
|
-
function
|
|
6093
|
+
function KjunScrollFade({ children }) {
|
|
6094
6094
|
return /* @__PURE__ */ jsx36(
|
|
6095
6095
|
ScrollView7,
|
|
6096
6096
|
{
|
|
@@ -6122,7 +6122,7 @@ function useQueryDisplay(props) {
|
|
|
6122
6122
|
}
|
|
6123
6123
|
return queryDisplayStatus(next, props);
|
|
6124
6124
|
}
|
|
6125
|
-
function
|
|
6125
|
+
function KjunDataState({
|
|
6126
6126
|
preserveContent = false,
|
|
6127
6127
|
refreshing = false,
|
|
6128
6128
|
refreshError,
|
|
@@ -6171,7 +6171,7 @@ function DsDataState({
|
|
|
6171
6171
|
backgroundColor: colors.surface
|
|
6172
6172
|
},
|
|
6173
6173
|
children: [
|
|
6174
|
-
/* @__PURE__ */ jsx37(
|
|
6174
|
+
/* @__PURE__ */ jsx37(KjunSpinner, { size: "xs" }),
|
|
6175
6175
|
/* @__PURE__ */ jsx37(KText, { style: { ...typeStyle("caption"), color: colors.textTertiary, flexShrink: 1, minWidth: 0 }, children: refreshingText })
|
|
6176
6176
|
]
|
|
6177
6177
|
}
|
|
@@ -6181,12 +6181,12 @@ function DsDataState({
|
|
|
6181
6181
|
{
|
|
6182
6182
|
accessibilityLabel: loadingText,
|
|
6183
6183
|
style: { paddingVertical: loadingPadding === "none" ? 0 : padding },
|
|
6184
|
-
children: loadingContent || (skeleton ? /* @__PURE__ */ jsx37(View30, { style: { gap: tokens33.dimension.value12 }, children: Array.from({ length: skeletonCount }, (_, i) => /* @__PURE__ */ jsx37(
|
|
6185
|
-
/* @__PURE__ */ jsx37(
|
|
6184
|
+
children: loadingContent || (skeleton ? /* @__PURE__ */ jsx37(View30, { style: { gap: tokens33.dimension.value12 }, children: Array.from({ length: skeletonCount }, (_, i) => /* @__PURE__ */ jsx37(KjunSkeleton, { type: skeletonType }, i)) }) : /* @__PURE__ */ jsxs24(View30, { style: { alignItems: "center", gap: tokens33.dimension.value12 }, children: [
|
|
6185
|
+
/* @__PURE__ */ jsx37(KjunSpinner, { size: "md" }),
|
|
6186
6186
|
/* @__PURE__ */ jsx37(KText, { style: { ...typeStyle("body"), color: colors.textSecondary, textAlign: "center", maxWidth: "100%" }, children: loadingText })
|
|
6187
6187
|
] }))
|
|
6188
6188
|
}
|
|
6189
|
-
) : blockingError ? /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ jsx37(View30, { style: { paddingVertical: padding }, children: errorContent || /* @__PURE__ */ jsx37(
|
|
6189
|
+
) : blockingError ? /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ jsx37(View30, { style: { paddingVertical: padding }, children: errorContent || /* @__PURE__ */ jsx37(KjunAlert, { type: "danger", title: "\uC624\uB958 \uBC1C\uC0DD", actions: onRetry && /* @__PURE__ */ jsx37(KjunButton, { variant: "secondary", onPress: onRetry, children: retryText }), children: query.error }) }) }) : empty ? /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "empty", children: /* @__PURE__ */ jsx37(View30, { style: { paddingVertical: padding }, children: emptyContent || /* @__PURE__ */ jsx37(KjunEmpty, { text: emptyText, icon: emptyIcon, children: emptyActionText && /* @__PURE__ */ jsx37(KjunButton, { onPress: onEmptyAction, children: emptyActionText }) }) }) }) : null,
|
|
6190
6190
|
(!concealed || preserveContent && state.hasQueryResult) && /* @__PURE__ */ jsx37(
|
|
6191
6191
|
View30,
|
|
6192
6192
|
{
|
|
@@ -6205,7 +6205,7 @@ function DsDataState({
|
|
|
6205
6205
|
},
|
|
6206
6206
|
"content"
|
|
6207
6207
|
),
|
|
6208
|
-
visibleRefreshError && !state.initialLoading && /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ jsx37(View30, { style: { marginTop: tokens33.dimension.value12 }, children: /* @__PURE__ */ jsx37(
|
|
6208
|
+
visibleRefreshError && !state.initialLoading && /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ jsx37(View30, { style: { marginTop: tokens33.dimension.value12 }, children: /* @__PURE__ */ jsx37(KjunAlert, { type: "warning", size: "sm", actions: onRetry && /* @__PURE__ */ jsx37(KjunButton, { variant: "secondary", onPress: onRetry, children: retryText }), children: `${visibleRefreshError} \xB7 \uC774\uC804 \uC870\uD68C \uACB0\uACFC\uB97C \uD45C\uC2DC\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4.` }) }) })
|
|
6209
6209
|
]
|
|
6210
6210
|
}
|
|
6211
6211
|
);
|
|
@@ -6214,7 +6214,7 @@ function BoundaryDescription() {
|
|
|
6214
6214
|
const { colors } = useKjunStyles();
|
|
6215
6215
|
return /* @__PURE__ */ jsx37(KText, { style: { ...typeStyle({ ...tokens33.typography.caption, fontSizePx: tokens33.extensions.state.descriptionSize }), color: colors.textSecondary, textAlign: "center" }, children: "\uB2E4\uC2DC \uC2DC\uB3C4\uD558\uBA74 \uBB38\uC81C\uAC00 \uD574\uACB0\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4." });
|
|
6216
6216
|
}
|
|
6217
|
-
var
|
|
6217
|
+
var KjunErrorBoundary = class extends Component {
|
|
6218
6218
|
constructor() {
|
|
6219
6219
|
super(...arguments);
|
|
6220
6220
|
this.state = { error: false };
|
|
@@ -6242,7 +6242,7 @@ var DsErrorBoundary = class extends Component {
|
|
|
6242
6242
|
/* @__PURE__ */ jsx37(BoundaryDescription, {})
|
|
6243
6243
|
] }),
|
|
6244
6244
|
/* @__PURE__ */ jsx37(
|
|
6245
|
-
|
|
6245
|
+
KjunButton,
|
|
6246
6246
|
{
|
|
6247
6247
|
style: { alignSelf: "center" },
|
|
6248
6248
|
onPress: () => {
|
|
@@ -6301,28 +6301,28 @@ var marketRowStyle = { minHeight: marketGeometry.rowHeight, flexDirection: "row"
|
|
|
6301
6301
|
|
|
6302
6302
|
// packages/native/src/market-skeleton.tsx
|
|
6303
6303
|
import { jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6304
|
-
function
|
|
6304
|
+
function KjunMarketTableSkeleton({ columns = [], rows = 8, showActions = false }) {
|
|
6305
6305
|
const { colors } = useKjunStyles();
|
|
6306
6306
|
const cols = normalizeMarketColumns(columns), layout = useMarketLayout(cols, showActions);
|
|
6307
6307
|
const actions = { width: marketGeometry.actionsWidth, paddingVertical: tokens36.dimension.value12, paddingHorizontal: tokens36.dimension.value4, justifyContent: "center", alignItems: "center" };
|
|
6308
6308
|
return /* @__PURE__ */ jsx38(ScrollView8, { horizontal: true, onLayout: layout.onLayout, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: /* @__PURE__ */ jsxs25(View31, { style: { width: layout.width }, children: [
|
|
6309
6309
|
/* @__PURE__ */ jsxs25(View31, { style: { ...marketHeaderStyle, borderBottomColor: colors.border }, children: [
|
|
6310
|
-
showActions && /* @__PURE__ */ jsx38(View31, { style: actions, children: /* @__PURE__ */ jsx38(
|
|
6310
|
+
showActions && /* @__PURE__ */ jsx38(View31, { style: actions, children: /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: tokens36.extensions.marketTable.actionSkeletonWidth, height: tokens36.extensions.marketTable.headerSkeletonHeight }) }),
|
|
6311
6311
|
cols.map((col, i) => /* @__PURE__ */ jsx38(View31, { style: { width: layout.widths[i], padding: tokens36.dimension.value12, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(KText, { style: { ...typeStyle("meta"), color: colors.textTertiary, textAlign: col.align }, children: col.label }) }, col.key || i))
|
|
6312
6312
|
] }),
|
|
6313
6313
|
Array.from({ length: Math.max(0, rows) }, (_, row) => /* @__PURE__ */ jsxs25(View31, { style: { ...marketRowStyle, borderBottomColor: colors.border }, children: [
|
|
6314
|
-
showActions && /* @__PURE__ */ jsx38(View31, { style: actions, children: /* @__PURE__ */ jsx38(
|
|
6314
|
+
showActions && /* @__PURE__ */ jsx38(View31, { style: actions, children: /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: tokens36.extensions.marketTable.actionSkeletonWidth, height: tokens36.extensions.financial.priceSkeletonHeight }) }),
|
|
6315
6315
|
cols.map((col, i) => /* @__PURE__ */ jsx38(View31, { style: { width: layout.widths[i], paddingVertical: tokens36.dimension.value14, paddingHorizontal: tokens36.dimension.value12, justifyContent: "center", alignItems: isMarketIdentity(col.key) ? void 0 : col.align === "right" ? "flex-end" : col.align === "center" ? "center" : "flex-start" }, children: isMarketIdentity(col.key) ? /* @__PURE__ */ jsxs25(View31, { style: { gap: tokens36.dimension.value2 }, children: [
|
|
6316
|
-
/* @__PURE__ */ jsx38(View31, { style: { height: tokens36.typography.body.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(
|
|
6317
|
-
/* @__PURE__ */ jsx38(View31, { style: { height: tokens36.typography.caption.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(
|
|
6318
|
-
] }) : /* @__PURE__ */ jsx38(
|
|
6316
|
+
/* @__PURE__ */ jsx38(View31, { style: { height: tokens36.typography.body.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: "80%", height: tokens36.extensions.skeleton.lineHeights.md }) }),
|
|
6317
|
+
/* @__PURE__ */ jsx38(View31, { style: { height: tokens36.typography.caption.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: "60%", height: tokens36.extensions.skeleton.lineHeights.sm }) })
|
|
6318
|
+
] }) : /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: tokens36.extensions.financial.priceSkeletonWidth, height: tokens36.extensions.financial.priceSkeletonHeight }) }, col.key || i))
|
|
6319
6319
|
] }, row))
|
|
6320
6320
|
] }) });
|
|
6321
6321
|
}
|
|
6322
6322
|
|
|
6323
6323
|
// packages/native/src/skeletons.tsx
|
|
6324
6324
|
import { jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6325
|
-
function
|
|
6325
|
+
function KjunListSkeleton({
|
|
6326
6326
|
rows = 8,
|
|
6327
6327
|
variant = "market",
|
|
6328
6328
|
avatar = true,
|
|
@@ -6352,21 +6352,21 @@ function DsListSkeleton({
|
|
|
6352
6352
|
borderBottomColor: colors.border
|
|
6353
6353
|
},
|
|
6354
6354
|
children: [
|
|
6355
|
-
avatar && /* @__PURE__ */ jsx39(
|
|
6355
|
+
avatar && /* @__PURE__ */ jsx39(KjunSkeleton, { type: "avatar", width: avatarSize, height: avatarSize }),
|
|
6356
6356
|
/* @__PURE__ */ jsxs26(View32, { style: { flex: 1, minWidth: 0, gap: market ? tokens37.dimension.value2 : tokens37.extensions.skeleton.detailGap }, children: [
|
|
6357
6357
|
slot(0, /* @__PURE__ */ jsx39(
|
|
6358
|
-
|
|
6358
|
+
KjunSkeleton,
|
|
6359
6359
|
{
|
|
6360
6360
|
type: "block",
|
|
6361
6361
|
height: tokens37.extensions.skeleton.lineHeights.md,
|
|
6362
6362
|
width: i % 2 ? "80%" : "65%"
|
|
6363
6363
|
}
|
|
6364
6364
|
)),
|
|
6365
|
-
slot(1, /* @__PURE__ */ jsx39(
|
|
6365
|
+
slot(1, /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", height: tokens37.extensions.skeleton.lineHeights.sm, width: "50%" }))
|
|
6366
6366
|
] }),
|
|
6367
6367
|
quote && /* @__PURE__ */ jsxs26(View32, { style: { alignItems: "flex-end", gap: market ? tokens37.dimension.value2 : tokens37.extensions.skeleton.detailGap }, children: [
|
|
6368
|
-
slot(0, /* @__PURE__ */ jsx39(
|
|
6369
|
-
slot(1, /* @__PURE__ */ jsx39(
|
|
6368
|
+
slot(0, /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", height: tokens37.extensions.skeleton.quoteHeight, width: tokens37.extensions.skeleton.quoteWidth })),
|
|
6369
|
+
slot(1, /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", height: tokens37.extensions.skeleton.lineHeights.sm, width: tokens37.extensions.skeleton.detailWidth }))
|
|
6370
6370
|
] })
|
|
6371
6371
|
]
|
|
6372
6372
|
},
|
|
@@ -6375,7 +6375,7 @@ function DsListSkeleton({
|
|
|
6375
6375
|
}
|
|
6376
6376
|
);
|
|
6377
6377
|
}
|
|
6378
|
-
function
|
|
6378
|
+
function KjunFormSkeleton({
|
|
6379
6379
|
fields = ["", "", "", ""],
|
|
6380
6380
|
columns = 1,
|
|
6381
6381
|
multiline = false,
|
|
@@ -6406,10 +6406,10 @@ function DsFormSkeleton({
|
|
|
6406
6406
|
children: [
|
|
6407
6407
|
field ? /* @__PURE__ */ jsx39(KText, { style: { color: colors.text, ...typeStyle("label") }, children: typeof field === "string" ? field : field.label }) : (
|
|
6408
6408
|
// The bar sits in a label-line slot so the field starts where the real input will.
|
|
6409
|
-
/* @__PURE__ */ jsx39(View32, { style: { height: typeStyle("label").lineHeight, justifyContent: "center" }, children: /* @__PURE__ */ jsx39(
|
|
6409
|
+
/* @__PURE__ */ jsx39(View32, { style: { height: typeStyle("label").lineHeight, justifyContent: "center" }, children: /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", height: tokens37.extensions.skeleton.formLabelHeight, width: tokens37.extensions.skeleton.formLabelWidth }) })
|
|
6410
6410
|
),
|
|
6411
6411
|
/* @__PURE__ */ jsx39(View32, { style: { borderRadius: tokens37.input[size].radius, overflow: "hidden" }, children: /* @__PURE__ */ jsx39(
|
|
6412
|
-
|
|
6412
|
+
KjunSkeleton,
|
|
6413
6413
|
{
|
|
6414
6414
|
type: "block",
|
|
6415
6415
|
height: typeof field === "object" && field.height != null ? field.height : multiline ? tokens37.input[size].lineHeight * 3 + tokens37.input[size].textareaPaddingY * 2 + 2 * tokens37.border.controlWidth : tokens37.input[size].height
|
|
@@ -6422,7 +6422,7 @@ function DsFormSkeleton({
|
|
|
6422
6422
|
}
|
|
6423
6423
|
);
|
|
6424
6424
|
}
|
|
6425
|
-
function
|
|
6425
|
+
function KjunChartSkeleton({
|
|
6426
6426
|
loadingText = "\uCC28\uD2B8\uB97C \uBD88\uB7EC\uC624\uB294 \uC911",
|
|
6427
6427
|
kind = "line",
|
|
6428
6428
|
height = tokens37.extensions.chartSkeleton.height
|
|
@@ -6476,7 +6476,7 @@ function DsChartSkeleton({
|
|
|
6476
6476
|
alignItems: "center",
|
|
6477
6477
|
justifyContent: "center"
|
|
6478
6478
|
},
|
|
6479
|
-
children: /* @__PURE__ */ jsx39(
|
|
6479
|
+
children: /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", width: tokens37.extensions.chartSkeleton.donutLabelWidth, height: tokens37.extensions.chartSkeleton.donutLabelHeight })
|
|
6480
6480
|
}
|
|
6481
6481
|
) : /* @__PURE__ */ jsxs26(
|
|
6482
6482
|
Svg5,
|
|
@@ -6658,7 +6658,7 @@ function useCountUp(value, animated, fromPrevious) {
|
|
|
6658
6658
|
return useNumberMotion(value, animated, fromPrevious, useReducedMotion());
|
|
6659
6659
|
}
|
|
6660
6660
|
var MarketQuoteTypeContext = createContext19(null);
|
|
6661
|
-
function
|
|
6661
|
+
function KjunAnimatedNumber({
|
|
6662
6662
|
value,
|
|
6663
6663
|
decimals = 0,
|
|
6664
6664
|
prefix = "",
|
|
@@ -6693,7 +6693,7 @@ function DsAnimatedNumber({
|
|
|
6693
6693
|
}
|
|
6694
6694
|
);
|
|
6695
6695
|
}
|
|
6696
|
-
function
|
|
6696
|
+
function KjunFreshness({
|
|
6697
6697
|
stale = false,
|
|
6698
6698
|
source,
|
|
6699
6699
|
fetchedAt,
|
|
@@ -6701,14 +6701,14 @@ function DsFreshness({
|
|
|
6701
6701
|
}) {
|
|
6702
6702
|
const label = source === "close" ? "\uC885\uAC00" : "\uC9C0\uC5F0";
|
|
6703
6703
|
return stale ? /* @__PURE__ */ jsx40(
|
|
6704
|
-
|
|
6704
|
+
KjunTooltip,
|
|
6705
6705
|
{
|
|
6706
6706
|
content: (source === "close" ? "\uC2E4\uC2DC\uAC04 \uC2DC\uC138 \uC5C6\uC74C \xB7 \uCD5C\uADFC \uC885\uAC00 \uD45C\uC2DC" : "\uC2E4\uC2DC\uAC04 \uC2DC\uC138 \uC9C0\uC5F0") + (fetchedAt ? " \xB7 " + ((formatter == null ? void 0 : formatter(fetchedAt)) || formatRelativeTime(fetchedAt)) : ""),
|
|
6707
|
-
children: /* @__PURE__ */ jsx40(AccessiblePressable, { accessibilityLabel: label, focusRingRadius: tokens39.extensions.badge.radius, children: /* @__PURE__ */ jsx40(
|
|
6707
|
+
children: /* @__PURE__ */ jsx40(AccessiblePressable, { accessibilityLabel: label, focusRingRadius: tokens39.extensions.badge.radius, children: /* @__PURE__ */ jsx40(KjunBadge, { variant: "warning", size: "xs", children: label }) })
|
|
6708
6708
|
}
|
|
6709
6709
|
) : null;
|
|
6710
6710
|
}
|
|
6711
|
-
function
|
|
6711
|
+
function KjunPriceCell({
|
|
6712
6712
|
value,
|
|
6713
6713
|
formatter,
|
|
6714
6714
|
stale = false,
|
|
@@ -6718,13 +6718,13 @@ function DsPriceCell({
|
|
|
6718
6718
|
fromPrevious = true
|
|
6719
6719
|
}) {
|
|
6720
6720
|
const { colors } = useKjunStyles(), quoteType = useContext16(MarketQuoteTypeContext);
|
|
6721
|
-
return value == null ? /* @__PURE__ */ jsx40(
|
|
6721
|
+
return value == null ? /* @__PURE__ */ jsx40(KjunSkeleton, { type: "block", height: tokens39.extensions.financial.priceSkeletonHeight, width: tokens39.extensions.financial.priceSkeletonWidth }) : /* @__PURE__ */ jsxs27(View33, { style: { flexDirection: "row", alignItems: "center", gap: tokens39.extensions.financial.affixGap }, children: [
|
|
6722
6722
|
/* @__PURE__ */ jsx40(
|
|
6723
6723
|
View33,
|
|
6724
6724
|
{
|
|
6725
6725
|
style: quoteType ? void 0 : { paddingVertical: tokens39.extensions.financial.pillPaddingY, paddingHorizontal: tokens39.extensions.financial.pillPaddingX, borderRadius: tokens39.radius.radius9999 },
|
|
6726
6726
|
children: /* @__PURE__ */ jsx40(
|
|
6727
|
-
|
|
6727
|
+
KjunAnimatedNumber,
|
|
6728
6728
|
{
|
|
6729
6729
|
value,
|
|
6730
6730
|
formatter,
|
|
@@ -6734,10 +6734,10 @@ function DsPriceCell({
|
|
|
6734
6734
|
)
|
|
6735
6735
|
}
|
|
6736
6736
|
),
|
|
6737
|
-
showFreshness && /* @__PURE__ */ jsx40(View33, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx40(
|
|
6737
|
+
showFreshness && /* @__PURE__ */ jsx40(View33, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx40(KjunFreshness, { stale, source, fetchedAt }) })
|
|
6738
6738
|
] });
|
|
6739
6739
|
}
|
|
6740
|
-
function
|
|
6740
|
+
function KjunSignedValue({
|
|
6741
6741
|
value,
|
|
6742
6742
|
format: kind = "number",
|
|
6743
6743
|
isRaw = false,
|
|
@@ -6768,7 +6768,7 @@ function DsSignedValue({
|
|
|
6768
6768
|
backgroundColor: tone === "pill" && !stale && !loading && n !== null ? domainColor(domainColors, role + "Bg") : void 0
|
|
6769
6769
|
},
|
|
6770
6770
|
children: [
|
|
6771
|
-
loading ? /* @__PURE__ */ jsx40(
|
|
6771
|
+
loading ? /* @__PURE__ */ jsx40(KjunSkeleton, { type: "block", width: tokens39.extensions.financial.signedSkeletonWidth, height: tokens39.extensions.financial.signedSkeletonHeight }) : /* @__PURE__ */ jsx40(
|
|
6772
6772
|
KText,
|
|
6773
6773
|
{
|
|
6774
6774
|
style: {
|
|
@@ -6782,7 +6782,7 @@ function DsSignedValue({
|
|
|
6782
6782
|
children: display
|
|
6783
6783
|
}
|
|
6784
6784
|
),
|
|
6785
|
-
!loading && showFreshness && stale && n !== null && /* @__PURE__ */ jsx40(View33, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx40(
|
|
6785
|
+
!loading && showFreshness && stale && n !== null && /* @__PURE__ */ jsx40(View33, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx40(KjunFreshness, { stale: true }) })
|
|
6786
6786
|
]
|
|
6787
6787
|
}
|
|
6788
6788
|
);
|
|
@@ -6790,7 +6790,7 @@ function DsSignedValue({
|
|
|
6790
6790
|
|
|
6791
6791
|
// packages/native/src/financial-display.tsx
|
|
6792
6792
|
import { Fragment as Fragment12, jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6793
|
-
function
|
|
6793
|
+
function KjunDeviation({
|
|
6794
6794
|
value,
|
|
6795
6795
|
variant = "pill",
|
|
6796
6796
|
signalThreshold = 1,
|
|
@@ -6813,7 +6813,7 @@ function DsDeviation({
|
|
|
6813
6813
|
},
|
|
6814
6814
|
children: [
|
|
6815
6815
|
/* @__PURE__ */ jsx41(
|
|
6816
|
-
|
|
6816
|
+
KjunBadge,
|
|
6817
6817
|
{
|
|
6818
6818
|
variant: neutral ? "secondary" : n > 0 ? "price-up" : "price-down",
|
|
6819
6819
|
size: "sm",
|
|
@@ -6829,7 +6829,7 @@ function DsDeviation({
|
|
|
6829
6829
|
}
|
|
6830
6830
|
),
|
|
6831
6831
|
!signal && /* @__PURE__ */ jsx41(View34, { style: { width: tokens40.extensions.financial.warningIconSize, flexShrink: 0 } }),
|
|
6832
|
-
signal && /* @__PURE__ */ jsx41(Fragment12, { children: /* @__PURE__ */ jsx41(View34, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx41(
|
|
6832
|
+
signal && /* @__PURE__ */ jsx41(Fragment12, { children: /* @__PURE__ */ jsx41(View34, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx41(KjunTooltip, { content: `\uAD34\uB9AC\uC728 ${signalThreshold}% \uCD08\uACFC \u2014 \uCC28\uC775\uAC70\uB798 \uAE30\uD68C \uAC00\uB2A5`, children: /* @__PURE__ */ jsx41(
|
|
6833
6833
|
AccessiblePressable,
|
|
6834
6834
|
{
|
|
6835
6835
|
accessibilityRole: "image",
|
|
@@ -6843,7 +6843,7 @@ function DsDeviation({
|
|
|
6843
6843
|
alignItems: "center",
|
|
6844
6844
|
justifyContent: "center"
|
|
6845
6845
|
},
|
|
6846
|
-
children: /* @__PURE__ */ jsx41(
|
|
6846
|
+
children: /* @__PURE__ */ jsx41(KjunIcon, { name: "alert-triangle", size: tokens40.extensions.financial.warningIconSize, color: colors.warning })
|
|
6847
6847
|
}
|
|
6848
6848
|
) }) }) })
|
|
6849
6849
|
]
|
|
@@ -6891,7 +6891,7 @@ function DsDeviation({
|
|
|
6891
6891
|
}
|
|
6892
6892
|
);
|
|
6893
6893
|
}
|
|
6894
|
-
function
|
|
6894
|
+
function KjunHeatmapCell({
|
|
6895
6895
|
value = 0,
|
|
6896
6896
|
min = 0,
|
|
6897
6897
|
max = 1,
|
|
@@ -6935,7 +6935,7 @@ function DsHeatmapCell({
|
|
|
6935
6935
|
}
|
|
6936
6936
|
);
|
|
6937
6937
|
}
|
|
6938
|
-
function
|
|
6938
|
+
function KjunProgressCell({
|
|
6939
6939
|
value = 0,
|
|
6940
6940
|
max = 100,
|
|
6941
6941
|
showLabel = true,
|
|
@@ -6998,7 +6998,7 @@ function DsProgressCell({
|
|
|
6998
6998
|
}
|
|
6999
6999
|
);
|
|
7000
7000
|
}
|
|
7001
|
-
function
|
|
7001
|
+
function KjunCollectionMark({
|
|
7002
7002
|
kind,
|
|
7003
7003
|
active = false,
|
|
7004
7004
|
size = "md"
|
|
@@ -7006,7 +7006,7 @@ function DsCollectionMark({
|
|
|
7006
7006
|
const { colors, domainColors } = useKjunStyles();
|
|
7007
7007
|
const box = tokens40.extensions.financial.markSizes[size], glyph = kind === "interest" ? tokens40.extensions.financial.heartMarkSizes[size] : box;
|
|
7008
7008
|
return /* @__PURE__ */ jsx41(View34, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", overflow: "visible" }, children: /* @__PURE__ */ jsx41(
|
|
7009
|
-
|
|
7009
|
+
KjunIcon,
|
|
7010
7010
|
{
|
|
7011
7011
|
name: kind === "favorite" ? "star" : "heart",
|
|
7012
7012
|
filled: active,
|
|
@@ -7025,15 +7025,15 @@ var executionStates = {
|
|
|
7025
7025
|
completed_with_errors: ["warning", "\uC644\uB8CC (\uC624\uB958)"],
|
|
7026
7026
|
failed: ["danger", "\uC2E4\uD328"]
|
|
7027
7027
|
};
|
|
7028
|
-
function
|
|
7028
|
+
function KjunExecutionStatusBadge({
|
|
7029
7029
|
status,
|
|
7030
7030
|
label,
|
|
7031
7031
|
size = "md"
|
|
7032
7032
|
}) {
|
|
7033
7033
|
const state = status ? executionStates[status] : void 0;
|
|
7034
|
-
return /* @__PURE__ */ jsx41(
|
|
7034
|
+
return /* @__PURE__ */ jsx41(KjunBadge, { variant: (state == null ? void 0 : state[0]) || "secondary", size, dot: status === "running", children: label || (state == null ? void 0 : state[1]) || (status ? "\uC54C \uC218 \uC5C6\uC74C" : "\uC2E4\uD589 \uC774\uB825 \uC5C6\uC74C") });
|
|
7035
7035
|
}
|
|
7036
|
-
function
|
|
7036
|
+
function KjunSparkline({
|
|
7037
7037
|
data = [],
|
|
7038
7038
|
width = tokens40.extensions.financial.sparklineWidth,
|
|
7039
7039
|
height = tokens40.extensions.financial.sparklineHeight,
|
|
@@ -7044,7 +7044,7 @@ function DsSparkline({
|
|
|
7044
7044
|
stretch = false,
|
|
7045
7045
|
ariaLabel
|
|
7046
7046
|
}) {
|
|
7047
|
-
const { colors, domainColors } = useKjunStyles(), id = useId8().replace(/:/g, ""), values = data.filter(Number.isFinite), min = Math.min(...values), max = Math.max(...values), range = max - min || 1, points = values.map(
|
|
7047
|
+
const { colors, domainColors } = useKjunStyles(), id = "kjun-" + useId8().replace(/:/g, ""), values = data.filter(Number.isFinite), min = Math.min(...values), max = Math.max(...values), range = max - min || 1, points = values.map(
|
|
7048
7048
|
(v, i) => `${2 + i / Math.max(1, values.length - 1) * (width - 4)},${2 + height - 4 - (v - min) / range * (height - 4)}`
|
|
7049
7049
|
).join(" "), change = values.length > 1 ? values[values.length - 1] - values[0] : 0, line = color || (change === 0 ? colors.textTertiary : semantic === "status" ? change > 0 ? colors.success : colors.danger : domainColor(domainColors, change > 0 ? "priceUp" : "priceDown"));
|
|
7050
7050
|
return /* @__PURE__ */ jsxs28(
|
|
@@ -7245,9 +7245,9 @@ function TableToolbar({
|
|
|
7245
7245
|
selected.length,
|
|
7246
7246
|
"\uAC1C \uC120\uD0DD"
|
|
7247
7247
|
] }),
|
|
7248
|
-
/* @__PURE__ */ jsx42(
|
|
7248
|
+
/* @__PURE__ */ jsx42(KjunButton, { size: "xs", variant: "ghost", onPress: toggleAll, children: "\uC804\uCCB4 \uC120\uD0DD" }),
|
|
7249
7249
|
/* @__PURE__ */ jsx42(
|
|
7250
|
-
|
|
7250
|
+
KjunButton,
|
|
7251
7251
|
{
|
|
7252
7252
|
size: "xs",
|
|
7253
7253
|
variant: "ghost",
|
|
@@ -7262,7 +7262,7 @@ function TableToolbar({
|
|
|
7262
7262
|
(searchable || toolbar) && // Like Web: the search toolbar sits on the surface so the filled search field stands out from it.
|
|
7263
7263
|
/* @__PURE__ */ jsxs29(View35, { style: { ...toolbarStyle, backgroundColor: colors.surface }, children: [
|
|
7264
7264
|
searchable && /* @__PURE__ */ jsx42(View35, { style: { width: tokens41.table.searchWidth, maxWidth: "100%" }, children: /* @__PURE__ */ jsx42(
|
|
7265
|
-
|
|
7265
|
+
KjunInput,
|
|
7266
7266
|
{
|
|
7267
7267
|
size: "sm",
|
|
7268
7268
|
value: search,
|
|
@@ -7324,7 +7324,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7324
7324
|
},
|
|
7325
7325
|
children: [
|
|
7326
7326
|
selectable && /* @__PURE__ */ jsx43(View36, { style: { width: geometry2.actionColumnWidth, alignItems: "center" }, children: /* @__PURE__ */ jsx43(
|
|
7327
|
-
|
|
7327
|
+
KjunCheckbox,
|
|
7328
7328
|
{
|
|
7329
7329
|
size: "sm",
|
|
7330
7330
|
value: state.all,
|
|
@@ -7363,7 +7363,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7363
7363
|
}
|
|
7364
7364
|
),
|
|
7365
7365
|
sortable !== false && state.sort.key === col.key && /* @__PURE__ */ jsx43(
|
|
7366
|
-
|
|
7366
|
+
KjunIcon,
|
|
7367
7367
|
{
|
|
7368
7368
|
name: state.sort.order === "asc" ? "sort-ascending" : "sort-descending",
|
|
7369
7369
|
size: tokens42.table.sortIconSize,
|
|
@@ -7389,7 +7389,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7389
7389
|
paddingHorizontal: cellPadding.x
|
|
7390
7390
|
},
|
|
7391
7391
|
children: /* @__PURE__ */ jsx43(
|
|
7392
|
-
|
|
7392
|
+
KjunSkeleton,
|
|
7393
7393
|
{
|
|
7394
7394
|
type: "block",
|
|
7395
7395
|
height: geometry2.skeletonHeight,
|
|
@@ -7510,7 +7510,7 @@ function TableCards({
|
|
|
7510
7510
|
const { colors } = useKjunStyles();
|
|
7511
7511
|
const { title, subtitle, badges, inline, sections, actions, columnsForSection } = layout;
|
|
7512
7512
|
return /* @__PURE__ */ jsxs31(View37, { style: { gap: tokens43.extensions.tableCard.gap, padding: tokens43.extensions.tableCard.listPadding }, children: [
|
|
7513
|
-
initialLoading ? Array.from({ length: skeletonRows }, (_, i) => /* @__PURE__ */ jsx44(
|
|
7513
|
+
initialLoading ? Array.from({ length: skeletonRows }, (_, i) => /* @__PURE__ */ jsx44(KjunSkeleton, { type: "card" }, i)) : state.rows.map((row, i) => /* @__PURE__ */ jsxs31(
|
|
7514
7514
|
AccessiblePressable,
|
|
7515
7515
|
{
|
|
7516
7516
|
accessible: false,
|
|
@@ -7656,7 +7656,7 @@ function TableCards({
|
|
|
7656
7656
|
|
|
7657
7657
|
// packages/native/src/table-view.tsx
|
|
7658
7658
|
import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7659
|
-
function
|
|
7659
|
+
function KjunTable(props) {
|
|
7660
7660
|
const {
|
|
7661
7661
|
skeletonRows = 8,
|
|
7662
7662
|
emptyText = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
@@ -7710,7 +7710,7 @@ function DsTable(props) {
|
|
|
7710
7710
|
});
|
|
7711
7711
|
};
|
|
7712
7712
|
const checkbox = (row, i) => /* @__PURE__ */ jsx45(
|
|
7713
|
-
|
|
7713
|
+
KjunCheckbox,
|
|
7714
7714
|
{
|
|
7715
7715
|
value: state.selectedRow(row),
|
|
7716
7716
|
ariaLabel: `\uD589 \uC120\uD0DD ${i + 1}`,
|
|
@@ -7719,7 +7719,7 @@ function DsTable(props) {
|
|
|
7719
7719
|
}
|
|
7720
7720
|
);
|
|
7721
7721
|
const expand = (row, i) => /* @__PURE__ */ jsx45(
|
|
7722
|
-
|
|
7722
|
+
KjunButton,
|
|
7723
7723
|
{
|
|
7724
7724
|
variant: "ghost",
|
|
7725
7725
|
size: "xs",
|
|
@@ -7749,7 +7749,7 @@ function DsTable(props) {
|
|
|
7749
7749
|
}
|
|
7750
7750
|
),
|
|
7751
7751
|
/* @__PURE__ */ jsxs32(
|
|
7752
|
-
|
|
7752
|
+
KjunDataState,
|
|
7753
7753
|
{
|
|
7754
7754
|
queryKey: props.queryKey,
|
|
7755
7755
|
resultKey: query.usesQueryState ? query.hasCurrentResult ? props.queryKey : null : void 0,
|
|
@@ -7761,7 +7761,7 @@ function DsTable(props) {
|
|
|
7761
7761
|
children: [
|
|
7762
7762
|
card ? /* @__PURE__ */ jsx45(TableCards, { ...{ initialLoading: query.initialLoading, skeletonRows, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, layout } }) : /* @__PURE__ */ jsx45(TableGrid, { ...{ initialLoading: query.initialLoading, skeletonRows, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, compact, striped, hoverable }, sortable: props.sortable }),
|
|
7763
7763
|
pagination && /* @__PURE__ */ jsx45(
|
|
7764
|
-
|
|
7764
|
+
KjunPagination,
|
|
7765
7765
|
{
|
|
7766
7766
|
currentPage: pagination.page,
|
|
7767
7767
|
totalPages: Math.ceil(
|
|
@@ -7806,7 +7806,7 @@ var kpiFormat = (item, value = item.value) => {
|
|
|
7806
7806
|
maximumFractionDigits: (_b = item.decimals) != null ? _b : 0
|
|
7807
7807
|
}).format(item.semantic === "price" ? Math.abs(value) : value);
|
|
7808
7808
|
};
|
|
7809
|
-
function
|
|
7809
|
+
function KjunKpiHero(props) {
|
|
7810
7810
|
const {
|
|
7811
7811
|
loading = false,
|
|
7812
7812
|
label,
|
|
@@ -7885,7 +7885,7 @@ function DsKpiHero(props) {
|
|
|
7885
7885
|
),
|
|
7886
7886
|
loading ? (
|
|
7887
7887
|
// Placeholders fill each line's height, like Web's 1lh; the value width approximates Web's 7ch.
|
|
7888
|
-
/* @__PURE__ */ jsx47(
|
|
7888
|
+
/* @__PURE__ */ jsx47(KjunSkeleton, { type: "block", height: typeStyle(numberRole).lineHeight, width: font * 4.8 })
|
|
7889
7889
|
) : /* @__PURE__ */ jsx47(
|
|
7890
7890
|
KpiNumberLine,
|
|
7891
7891
|
{
|
|
@@ -7895,7 +7895,7 @@ function DsKpiHero(props) {
|
|
|
7895
7895
|
suffixGap: geometry2.suffixGap,
|
|
7896
7896
|
style: { ...numeric, ...typeStyle(numberRole) },
|
|
7897
7897
|
unitStyle,
|
|
7898
|
-
children: /* @__PURE__ */ jsx47(
|
|
7898
|
+
children: /* @__PURE__ */ jsx47(KjunAnimatedNumber, { value, decimals, animated, formatter, style: typeStyle(numberRole) })
|
|
7899
7899
|
}
|
|
7900
7900
|
),
|
|
7901
7901
|
showDelta && /* @__PURE__ */ jsx47(
|
|
@@ -7908,7 +7908,7 @@ function DsKpiHero(props) {
|
|
|
7908
7908
|
alignItems: "baseline",
|
|
7909
7909
|
gap: spec.deltaGap
|
|
7910
7910
|
},
|
|
7911
|
-
children: loading ? /* @__PURE__ */ jsx47(
|
|
7911
|
+
children: loading ? /* @__PURE__ */ jsx47(KjunSkeleton, { type: "block", height: typeStyle("numberMd").lineHeight, width: geometry2.deltaSkeletonWidth }) : /* @__PURE__ */ jsxs34(Fragment15, { children: [
|
|
7912
7912
|
deltaAbsolute !== null && delta(deltaAbsolute, "absolute", { ...numeric, color: direction(deltaAbsolute), ...typeStyle("numberMd") }),
|
|
7913
7913
|
deltaPercent !== null && delta(deltaPercent, "percent", { ...numeric, color: direction(deltaPercent), ...typeStyle("numberMd"), opacity: 0.9 }),
|
|
7914
7914
|
deltaDescription && /* @__PURE__ */ jsx47(
|
|
@@ -7965,7 +7965,7 @@ function DsKpiHero(props) {
|
|
|
7965
7965
|
}
|
|
7966
7966
|
),
|
|
7967
7967
|
loading ? /* @__PURE__ */ jsx47(
|
|
7968
|
-
|
|
7968
|
+
KjunSkeleton,
|
|
7969
7969
|
{
|
|
7970
7970
|
type: "block",
|
|
7971
7971
|
height: typeStyle("numberMd").lineHeight,
|
|
@@ -7984,7 +7984,7 @@ function DsKpiHero(props) {
|
|
|
7984
7984
|
}
|
|
7985
7985
|
),
|
|
7986
7986
|
item.desc && (loading ? /* @__PURE__ */ jsx47(
|
|
7987
|
-
|
|
7987
|
+
KjunSkeleton,
|
|
7988
7988
|
{
|
|
7989
7989
|
type: "block",
|
|
7990
7990
|
width: geometry2.descriptionSkeletonWidth,
|
|
@@ -8021,7 +8021,7 @@ import {
|
|
|
8021
8021
|
useWindowDimensions as useWindowDimensions9
|
|
8022
8022
|
} from "react-native";
|
|
8023
8023
|
import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
8024
|
-
function
|
|
8024
|
+
function KjunKpiRow({
|
|
8025
8025
|
loading = false,
|
|
8026
8026
|
items,
|
|
8027
8027
|
size = "md",
|
|
@@ -8126,7 +8126,7 @@ function DsKpiRow({
|
|
|
8126
8126
|
marginBottom: sub ? 0 : spec.labelMargin
|
|
8127
8127
|
},
|
|
8128
8128
|
children: [
|
|
8129
|
-
busy && !item.label ? /* @__PURE__ */ jsx48(
|
|
8129
|
+
busy && !item.label ? /* @__PURE__ */ jsx48(KjunSkeleton, { type: "block", width: geometry2.labelSkeletonWidth, height: geometry2.labelSkeletonHeight }) : /* @__PURE__ */ jsx48(KText, { style: { minWidth: 0, flexShrink: 1, color: colors.textSecondary, ...typeStyle("caption") }, children: item.label }),
|
|
8130
8130
|
!busy && item.badgePlacement !== "value" && badge(item)
|
|
8131
8131
|
]
|
|
8132
8132
|
}
|
|
@@ -8155,7 +8155,7 @@ function DsKpiRow({
|
|
|
8155
8155
|
}
|
|
8156
8156
|
),
|
|
8157
8157
|
busy && !seg.separator ? /* @__PURE__ */ jsx48(
|
|
8158
|
-
|
|
8158
|
+
KjunSkeleton,
|
|
8159
8159
|
{
|
|
8160
8160
|
type: "block",
|
|
8161
8161
|
height: valueStyle.lineHeight,
|
|
@@ -8177,7 +8177,7 @@ function DsKpiRow({
|
|
|
8177
8177
|
// Like Web's 1lh × 5ch: the placeholder fills the value line, and its width (set for the display
|
|
8178
8178
|
// number) scales with the value's font so a text value gets a text-sized bar.
|
|
8179
8179
|
/* @__PURE__ */ jsx48(
|
|
8180
|
-
|
|
8180
|
+
KjunSkeleton,
|
|
8181
8181
|
{
|
|
8182
8182
|
type: "block",
|
|
8183
8183
|
height: valueStyle.lineHeight,
|
|
@@ -8199,7 +8199,7 @@ function DsKpiRow({
|
|
|
8199
8199
|
}
|
|
8200
8200
|
),
|
|
8201
8201
|
item.animated && typeof item.value === "number" ? /* @__PURE__ */ jsx48(
|
|
8202
|
-
|
|
8202
|
+
KjunAnimatedNumber,
|
|
8203
8203
|
{
|
|
8204
8204
|
fromPrevious: true,
|
|
8205
8205
|
value: item.value,
|
|
@@ -8223,7 +8223,7 @@ function DsKpiRow({
|
|
|
8223
8223
|
]
|
|
8224
8224
|
}
|
|
8225
8225
|
),
|
|
8226
|
-
item.desc && (busy ? /* @__PURE__ */ jsx48(
|
|
8226
|
+
item.desc && (busy ? /* @__PURE__ */ jsx48(KjunSkeleton, { type: "block", height: typeStyle("caption").lineHeight, width: geometry2.descriptionSkeletonWidth }) : /* @__PURE__ */ jsx48(
|
|
8227
8227
|
KText,
|
|
8228
8228
|
{
|
|
8229
8229
|
style: {
|
|
@@ -8346,8 +8346,8 @@ function MarketIdentity({
|
|
|
8346
8346
|
children: label
|
|
8347
8347
|
}
|
|
8348
8348
|
),
|
|
8349
|
-
((_f = props.interestKeys) == null ? void 0 : _f.has(id)) && /* @__PURE__ */ jsx49(
|
|
8350
|
-
((_g = props.favoriteKeys) == null ? void 0 : _g.has(id)) && /* @__PURE__ */ jsx49(
|
|
8349
|
+
((_f = props.interestKeys) == null ? void 0 : _f.has(id)) && /* @__PURE__ */ jsx49(KjunCollectionMark, { kind: "interest", size: "sm", active: true }),
|
|
8350
|
+
((_g = props.favoriteKeys) == null ? void 0 : _g.has(id)) && /* @__PURE__ */ jsx49(KjunCollectionMark, { kind: "favorite", size: "sm", active: true }),
|
|
8351
8351
|
(_h = props.renderNameSuffix) == null ? void 0 : _h.call(props, row)
|
|
8352
8352
|
]
|
|
8353
8353
|
}
|
|
@@ -8394,7 +8394,7 @@ function MarketFooter({
|
|
|
8394
8394
|
} = props;
|
|
8395
8395
|
return /* @__PURE__ */ jsxs36(Fragment16, { children: [
|
|
8396
8396
|
pagination && /* @__PURE__ */ jsx49(
|
|
8397
|
-
|
|
8397
|
+
KjunPagination,
|
|
8398
8398
|
{
|
|
8399
8399
|
currentPage: pagination.page,
|
|
8400
8400
|
totalPages: Math.ceil(pagination.total / pagination.size),
|
|
@@ -8432,7 +8432,7 @@ function MarketFooter({
|
|
|
8432
8432
|
|
|
8433
8433
|
// packages/native/src/market-cards.tsx
|
|
8434
8434
|
import { Fragment as Fragment17, jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
8435
|
-
function
|
|
8435
|
+
function KjunMarketCards(props) {
|
|
8436
8436
|
const {
|
|
8437
8437
|
rows = [],
|
|
8438
8438
|
rowKey = "id",
|
|
@@ -8510,13 +8510,13 @@ function DsMarketCards(props) {
|
|
|
8510
8510
|
metricDisplay: display
|
|
8511
8511
|
}) : /* @__PURE__ */ jsxs37(Fragment17, { children: [
|
|
8512
8512
|
/* @__PURE__ */ jsx50(
|
|
8513
|
-
|
|
8513
|
+
KjunDataState,
|
|
8514
8514
|
{
|
|
8515
8515
|
...props,
|
|
8516
8516
|
loadingPadding: "none",
|
|
8517
8517
|
empty: !rows.length,
|
|
8518
|
-
loadingContent: /* @__PURE__ */ jsx50(
|
|
8519
|
-
emptyContent: /* @__PURE__ */ jsx50(
|
|
8518
|
+
loadingContent: /* @__PURE__ */ jsx50(KjunListSkeleton, { variant: "compact" }),
|
|
8519
|
+
emptyContent: /* @__PURE__ */ jsx50(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
8520
8520
|
children: /* @__PURE__ */ jsxs37(View43, { children: [
|
|
8521
8521
|
state.pill && /* @__PURE__ */ jsx50(KText, { style: { textAlign: "right", paddingHorizontal: tokens48.dimension.value16, paddingVertical: tokens48.dimension.value8, ...typeStyle("caption"), color: colors.textSecondary }, children: state.pill.label }),
|
|
8522
8522
|
rows.map((row, i) => {
|
|
@@ -8542,21 +8542,21 @@ function DsMarketCards(props) {
|
|
|
8542
8542
|
children: [
|
|
8543
8543
|
/* @__PURE__ */ jsx50(MarketIdentity, { row, props, compact: true }),
|
|
8544
8544
|
/* @__PURE__ */ jsx50(View43, { style: { marginLeft: tokens48.dimension.value12, alignItems: "flex-end" }, children: ((_b = state.pill) == null ? void 0 : _b.format) === "sparkline" ? /* @__PURE__ */ jsx50(
|
|
8545
|
-
|
|
8545
|
+
KjunSparkline,
|
|
8546
8546
|
{
|
|
8547
8547
|
data: getValue(row, state.key) || [],
|
|
8548
8548
|
width: tokens48.extensions.marketTable.sparklineWidth,
|
|
8549
8549
|
height: tokens48.extensions.marketTable.sparklineHeight
|
|
8550
8550
|
}
|
|
8551
|
-
) : state.pill ? /* @__PURE__ */ jsx50(Fragment17, { children: metricLoading(row, state.key) ? /* @__PURE__ */ jsx50(
|
|
8552
|
-
|
|
8551
|
+
) : state.pill ? /* @__PURE__ */ jsx50(Fragment17, { children: metricLoading(row, state.key) ? /* @__PURE__ */ jsx50(KjunSkeleton, { type: "block", height: tokens48.extensions.marketTable.valueSkeletonHeight, width: tokens48.extensions.marketTable.valueSkeletonWidth }) : isChange && getValue(row, state.key) != null ? /* @__PURE__ */ jsx50(
|
|
8552
|
+
KjunSignedValue,
|
|
8553
8553
|
{
|
|
8554
8554
|
value: finiteNumber(getValue(row, state.key)),
|
|
8555
8555
|
formatter: () => display(row),
|
|
8556
8556
|
stale: !!getValue(row, "stale"),
|
|
8557
8557
|
tone: "pill"
|
|
8558
8558
|
}
|
|
8559
|
-
) : isPrice && getValue(row, state.key) == null ? /* @__PURE__ */ jsx50(
|
|
8559
|
+
) : isPrice && getValue(row, state.key) == null ? /* @__PURE__ */ jsx50(KjunSkeleton, { type: "block", height: tokens48.extensions.financial.priceSkeletonHeight, width: tokens48.extensions.financial.priceSkeletonWidth }) : /* @__PURE__ */ jsxs37(
|
|
8560
8560
|
View43,
|
|
8561
8561
|
{
|
|
8562
8562
|
style: {
|
|
@@ -8606,7 +8606,7 @@ import { jsx as jsx51, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
|
8606
8606
|
var changeWeight = { fontWeight: typeStyle("label").fontWeight };
|
|
8607
8607
|
var quoteDesktop = { price: typeStyle("control"), change: { ...typeStyle("caption"), ...changeWeight } };
|
|
8608
8608
|
var quoteMobile = { price: typeStyle("input"), change: { ...typeStyle("body"), ...changeWeight } };
|
|
8609
|
-
function
|
|
8609
|
+
function KjunMarketSimpleList(props) {
|
|
8610
8610
|
const {
|
|
8611
8611
|
rows = [],
|
|
8612
8612
|
rowKey = "id",
|
|
@@ -8620,14 +8620,14 @@ function DsMarketSimpleList(props) {
|
|
|
8620
8620
|
} = props, { colors } = useKjunStyles(), mobile = useWindowDimensions11().width < tokens49.responsive.market;
|
|
8621
8621
|
return /* @__PURE__ */ jsxs38(View44, { children: [
|
|
8622
8622
|
/* @__PURE__ */ jsx51(
|
|
8623
|
-
|
|
8623
|
+
KjunDataState,
|
|
8624
8624
|
{
|
|
8625
8625
|
...props,
|
|
8626
8626
|
loadingPadding: "none",
|
|
8627
8627
|
empty: !rows.length,
|
|
8628
8628
|
emptyText: emptyMessage,
|
|
8629
|
-
loadingContent: /* @__PURE__ */ jsx51(
|
|
8630
|
-
emptyContent: /* @__PURE__ */ jsx51(
|
|
8629
|
+
loadingContent: /* @__PURE__ */ jsx51(KjunListSkeleton, {}),
|
|
8630
|
+
emptyContent: /* @__PURE__ */ jsx51(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
8631
8631
|
children: /* @__PURE__ */ jsx51(View44, { children: rows.map((row, i) => {
|
|
8632
8632
|
var _a, _b;
|
|
8633
8633
|
const price = priceValue(row), change = changeValue(row), stale = !!getValue(row, "stale"), source = String(getValue(row, "source") || ""), fetchedAt = String(getValue(row, "fetched_at") || "");
|
|
@@ -8664,7 +8664,7 @@ function DsMarketSimpleList(props) {
|
|
|
8664
8664
|
},
|
|
8665
8665
|
children: [
|
|
8666
8666
|
/* @__PURE__ */ jsx51(
|
|
8667
|
-
|
|
8667
|
+
KjunPriceCell,
|
|
8668
8668
|
{
|
|
8669
8669
|
value: price,
|
|
8670
8670
|
formatter: priceFormatter,
|
|
@@ -8685,16 +8685,16 @@ function DsMarketSimpleList(props) {
|
|
|
8685
8685
|
},
|
|
8686
8686
|
children: [
|
|
8687
8687
|
price !== null && ((_b = props.renderPricePrefix) == null ? void 0 : _b.call(props, row)),
|
|
8688
|
-
(finiteNumber(price) !== null || !changeLoading(row) && finiteNumber(change) !== null) && (closingPrice && !stale ? /* @__PURE__ */ jsx51(
|
|
8689
|
-
|
|
8688
|
+
(finiteNumber(price) !== null || !changeLoading(row) && finiteNumber(change) !== null) && (closingPrice && !stale ? /* @__PURE__ */ jsx51(KjunBadge, { variant: "secondary", size: "xs", children: "\uC885\uAC00" }) : /* @__PURE__ */ jsx51(
|
|
8689
|
+
KjunFreshness,
|
|
8690
8690
|
{
|
|
8691
8691
|
stale,
|
|
8692
8692
|
source: closingPrice ? "close" : source,
|
|
8693
8693
|
fetchedAt
|
|
8694
8694
|
}
|
|
8695
8695
|
)),
|
|
8696
|
-
changeLoading(row) ? /* @__PURE__ */ jsx51(
|
|
8697
|
-
|
|
8696
|
+
changeLoading(row) ? /* @__PURE__ */ jsx51(KjunSkeleton, { type: "block", height: tokens49.extensions.marketList.changeSkeletonHeight, width: tokens49.extensions.marketList.changeSkeletonWidth }) : change !== null ? /* @__PURE__ */ jsx51(
|
|
8697
|
+
KjunSignedValue,
|
|
8698
8698
|
{
|
|
8699
8699
|
value: change,
|
|
8700
8700
|
stale,
|
|
@@ -8730,12 +8730,12 @@ function DsMarketSimpleList(props) {
|
|
|
8730
8730
|
import { tokens as tokens50 } from "@kjun-ui/tokens";
|
|
8731
8731
|
import { View as View45 } from "react-native";
|
|
8732
8732
|
import { jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8733
|
-
function
|
|
8733
|
+
function KjunMarketListPanel({
|
|
8734
8734
|
controls,
|
|
8735
8735
|
children
|
|
8736
8736
|
}) {
|
|
8737
8737
|
const { colors } = useKjunStyles();
|
|
8738
|
-
return /* @__PURE__ */ jsxs39(
|
|
8738
|
+
return /* @__PURE__ */ jsxs39(KjunCard, { children: [
|
|
8739
8739
|
/* @__PURE__ */ jsx52(View45, { children: controls }),
|
|
8740
8740
|
/* @__PURE__ */ jsx52(
|
|
8741
8741
|
View45,
|
|
@@ -8757,7 +8757,7 @@ import { useId as useId10, useState as useState37 } from "react";
|
|
|
8757
8757
|
import { ScrollView as ScrollView11, View as View46 } from "react-native";
|
|
8758
8758
|
import Svg8, { Defs as Defs4, LinearGradient as LinearGradient4, Rect as Rect5, Stop as Stop4 } from "react-native-svg";
|
|
8759
8759
|
import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8760
|
-
function
|
|
8760
|
+
function KjunMarketTable(props) {
|
|
8761
8761
|
const {
|
|
8762
8762
|
rows = [],
|
|
8763
8763
|
columns,
|
|
@@ -8779,13 +8779,13 @@ function DsMarketTable(props) {
|
|
|
8779
8779
|
const render = (row, col) => {
|
|
8780
8780
|
const value = getValue(row, col.key), stale = !!getValue(row, "stale");
|
|
8781
8781
|
if (cellLoading(row, col))
|
|
8782
|
-
return /* @__PURE__ */ jsx53(
|
|
8782
|
+
return /* @__PURE__ */ jsx53(KjunSkeleton, { type: "block", height: tokens51.extensions.marketTable.valueSkeletonHeight, width: tokens51.extensions.marketTable.valueSkeletonWidth });
|
|
8783
8783
|
if (renderCell) return content(renderCell(row, col));
|
|
8784
8784
|
if (["stock_name", "name", "symbol"].includes(col.key))
|
|
8785
8785
|
return /* @__PURE__ */ jsx53(MarketIdentity, { row, props, table: true });
|
|
8786
8786
|
if (col.type === "sparkline")
|
|
8787
8787
|
return /* @__PURE__ */ jsx53(
|
|
8788
|
-
|
|
8788
|
+
KjunSparkline,
|
|
8789
8789
|
{
|
|
8790
8790
|
data: Array.isArray(value) ? value : [],
|
|
8791
8791
|
width: tokens51.extensions.marketTable.sparklineWidth,
|
|
@@ -8794,7 +8794,7 @@ function DsMarketTable(props) {
|
|
|
8794
8794
|
);
|
|
8795
8795
|
if (col.type === "price")
|
|
8796
8796
|
return /* @__PURE__ */ jsx53(
|
|
8797
|
-
|
|
8797
|
+
KjunPriceCell,
|
|
8798
8798
|
{
|
|
8799
8799
|
value: finiteNumber(value),
|
|
8800
8800
|
formatter: priceFormatter,
|
|
@@ -8804,7 +8804,7 @@ function DsMarketTable(props) {
|
|
|
8804
8804
|
);
|
|
8805
8805
|
if (col.type === "percent")
|
|
8806
8806
|
return value == null ? /* @__PURE__ */ jsx53(KText, { children: "-" }) : /* @__PURE__ */ jsx53(
|
|
8807
|
-
|
|
8807
|
+
KjunSignedValue,
|
|
8808
8808
|
{
|
|
8809
8809
|
value: finiteNumber(value),
|
|
8810
8810
|
format: "percent",
|
|
@@ -8820,7 +8820,7 @@ function DsMarketTable(props) {
|
|
|
8820
8820
|
);
|
|
8821
8821
|
const text = formatMetric ? formatMetric(value, col.type || "text", { currency, row, column: col }) : value == null ? "-" : String(value);
|
|
8822
8822
|
return ["investor", "net_amount", "net_volume"].includes(col.type || "") ? /* @__PURE__ */ jsx53(
|
|
8823
|
-
|
|
8823
|
+
KjunSignedValue,
|
|
8824
8824
|
{
|
|
8825
8825
|
value: finiteNumber(value),
|
|
8826
8826
|
formatter: () => text,
|
|
@@ -8851,14 +8851,14 @@ function DsMarketTable(props) {
|
|
|
8851
8851
|
},
|
|
8852
8852
|
children: [
|
|
8853
8853
|
/* @__PURE__ */ jsx53(
|
|
8854
|
-
|
|
8854
|
+
KjunDataState,
|
|
8855
8855
|
{
|
|
8856
8856
|
...props,
|
|
8857
8857
|
loadingPadding: "none",
|
|
8858
8858
|
empty: !rows.length,
|
|
8859
8859
|
emptyText: emptyMessage,
|
|
8860
|
-
loadingContent: /* @__PURE__ */ jsx53(
|
|
8861
|
-
emptyContent: /* @__PURE__ */ jsx53(
|
|
8860
|
+
loadingContent: /* @__PURE__ */ jsx53(KjunMarketTableSkeleton, { columns, showActions }),
|
|
8861
|
+
emptyContent: /* @__PURE__ */ jsx53(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
8862
8862
|
children: /* @__PURE__ */ jsx53(MarketQuoteTypeContext.Provider, { value: tableQuote, children: /* @__PURE__ */ jsxs40(View46, { style: { position: "relative", minWidth: 0 }, children: [
|
|
8863
8863
|
/* @__PURE__ */ jsx53(
|
|
8864
8864
|
ScrollView11,
|
|
@@ -8893,7 +8893,7 @@ function DsMarketTable(props) {
|
|
|
8893
8893
|
alignItems: "center",
|
|
8894
8894
|
justifyContent: "center"
|
|
8895
8895
|
},
|
|
8896
|
-
children: ["interest", "favorite"].map((kind) => /* @__PURE__ */ jsx53(View46, { style: { width: Math.max(tokens51.native.minimumTouchTarget, tokens51.extensions.iconToggle.sizes.xs), alignItems: "center" }, children: /* @__PURE__ */ jsx53(
|
|
8896
|
+
children: ["interest", "favorite"].map((kind) => /* @__PURE__ */ jsx53(View46, { style: { width: Math.max(tokens51.native.minimumTouchTarget, tokens51.extensions.iconToggle.sizes.xs), alignItems: "center" }, children: /* @__PURE__ */ jsx53(KjunCollectionMark, { kind, size: "md" }) }, kind))
|
|
8897
8897
|
}
|
|
8898
8898
|
),
|
|
8899
8899
|
columns.map((col, columnIndex) => /* @__PURE__ */ jsxs40(
|
|
@@ -8926,7 +8926,7 @@ function DsMarketTable(props) {
|
|
|
8926
8926
|
}
|
|
8927
8927
|
),
|
|
8928
8928
|
col.sortable && /* @__PURE__ */ jsx53(
|
|
8929
|
-
|
|
8929
|
+
KjunIcon,
|
|
8930
8930
|
{
|
|
8931
8931
|
name: sortKey === col.key ? sortOrder === "asc" ? "sort-ascending" : "sort-descending" : "arrows-sort",
|
|
8932
8932
|
size: tokens51.extensions.marketTable.sortIconSize,
|
|
@@ -8972,7 +8972,7 @@ function DsMarketTable(props) {
|
|
|
8972
8972
|
},
|
|
8973
8973
|
children: [
|
|
8974
8974
|
/* @__PURE__ */ jsx53(
|
|
8975
|
-
|
|
8975
|
+
KjunIconToggle,
|
|
8976
8976
|
{
|
|
8977
8977
|
size: "xs",
|
|
8978
8978
|
active: (_a = props.interestKeys) == null ? void 0 : _a.has(id),
|
|
@@ -8991,7 +8991,7 @@ function DsMarketTable(props) {
|
|
|
8991
8991
|
}
|
|
8992
8992
|
),
|
|
8993
8993
|
/* @__PURE__ */ jsx53(
|
|
8994
|
-
|
|
8994
|
+
KjunIconToggle,
|
|
8995
8995
|
{
|
|
8996
8996
|
size: "xs",
|
|
8997
8997
|
active: (_d = props.favoriteKeys) == null ? void 0 : _d.has(id),
|
|
@@ -9025,7 +9025,7 @@ function DsMarketTable(props) {
|
|
|
9025
9025
|
children: [
|
|
9026
9026
|
/* @__PURE__ */ jsx53(View46, { style: { alignSelf: col.align === "right" ? "flex-end" : col.align === "center" ? "center" : void 0 }, children: render(row, col) }),
|
|
9027
9027
|
col.key === (priceCol == null ? void 0 : priceCol.key) && /* @__PURE__ */ jsx53(
|
|
9028
|
-
|
|
9028
|
+
KjunFreshness,
|
|
9029
9029
|
{
|
|
9030
9030
|
stale: !!getValue(row, "stale"),
|
|
9031
9031
|
source: String(getValue(row, "source") || ""),
|
|
@@ -9066,7 +9066,7 @@ import { Children as Children4, createContext as createContext20, useContext as
|
|
|
9066
9066
|
import { View as View47, Platform as Platform24 } from "react-native";
|
|
9067
9067
|
import { Fragment as Fragment18, jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9068
9068
|
var LastListRow = createContext20(false);
|
|
9069
|
-
function
|
|
9069
|
+
function KjunListRow({ title, description, leading, trailing, actions, href, disabled = false, onPress }) {
|
|
9070
9070
|
const { colors } = useKjunStyles(), last = useContext17(LastListRow);
|
|
9071
9071
|
const parts = /* @__PURE__ */ jsxs41(Fragment18, { children: [
|
|
9072
9072
|
leading && /* @__PURE__ */ jsx54(View47, { children: content(leading) }),
|
|
@@ -9082,7 +9082,7 @@ function DsListRow({ title, description, leading, trailing, actions, href, disab
|
|
|
9082
9082
|
actions && /* @__PURE__ */ jsx54(View47, { pointerEvents: disabled ? "none" : "auto", ...disabled && Platform24.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: tokens52.extensions.list.actionsGap, paddingRight: tokens52.extensions.list.actionsPadding, opacity: disabled ? tokens52.states.opacity.disabled : 1 }, children: content(actions) })
|
|
9083
9083
|
] });
|
|
9084
9084
|
}
|
|
9085
|
-
function
|
|
9085
|
+
function KjunListSection({ title, description, actions, children, ariaLabel }) {
|
|
9086
9086
|
const { colors } = useKjunStyles();
|
|
9087
9087
|
return /* @__PURE__ */ jsxs41(View47, { style: { minWidth: 0, backgroundColor: colors.surface }, children: [
|
|
9088
9088
|
(title || description || actions) && /* @__PURE__ */ jsxs41(View47, { style: { flexDirection: "row", alignItems: "center", gap: tokens52.extensions.list.gap, padding: tokens52.extensions.list.padding }, children: [
|
|
@@ -9101,7 +9101,7 @@ import { tokens as tokens53 } from "@kjun-ui/tokens";
|
|
|
9101
9101
|
import { Children as Children5, Fragment as Fragment19, isValidElement as isValidElement7, useState as useState38 } from "react";
|
|
9102
9102
|
import { View as View48, Platform as Platform25 } from "react-native";
|
|
9103
9103
|
import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
9104
|
-
function
|
|
9104
|
+
function KjunTopNavigation({ title, description, leading, actions, safeAreaTop = 0 }) {
|
|
9105
9105
|
const { colors } = useKjunStyles();
|
|
9106
9106
|
const geometry2 = tokens53.extensions.topNavigation;
|
|
9107
9107
|
const titleInset = Math.max(0, (geometry2.controlSize - tokens53.typography.sectionTitle.lineHeightPx) / 2);
|
|
@@ -9124,7 +9124,7 @@ function DsTopNavigation({ title, description, leading, actions, safeAreaTop = 0
|
|
|
9124
9124
|
actions && /* @__PURE__ */ jsx55(TopNavigationContext.Provider, { value: { ...geometry2, slot: "actions" }, children: /* @__PURE__ */ jsx55(View48, { style: { minHeight: geometry2.controlSize, minWidth: 0, maxWidth: "100%", marginLeft: "auto", flexShrink: 1, flexDirection: "row", flexWrap: "wrap", alignItems: "center", justifyContent: "flex-end", gap: geometry2.actionsGap }, children: actionList.map((action, index) => index < actionList.length - 1 ? content(action) : /* @__PURE__ */ jsx55(View48, { onLayout: square("trailing"), style: { flexShrink: 1, minWidth: 0, maxWidth: "100%", marginRight: iconEdges.trailing ? -edgeInset : 0 }, children: content(action) }, "trailing")) }) })
|
|
9125
9125
|
] }) }) });
|
|
9126
9126
|
}
|
|
9127
|
-
function
|
|
9127
|
+
function KjunBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0C9", safeAreaBottom = 0, keyboardVisible = false, hideOnKeyboard = true, onNavigate }) {
|
|
9128
9128
|
const { colors } = useKjunStyles();
|
|
9129
9129
|
const geometry2 = tokens53.extensions.bottomNavigation;
|
|
9130
9130
|
const hasIcons = items.some((item) => item.icon);
|
|
@@ -9171,7 +9171,7 @@ function DsBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0
|
|
|
9171
9171
|
},
|
|
9172
9172
|
children: [
|
|
9173
9173
|
hasIcons && /* @__PURE__ */ jsxs42(View48, { style: { width: geometry2.iconSize, height: geometry2.iconSize, flexShrink: 0 }, children: [
|
|
9174
|
-
item.icon && /* @__PURE__ */ jsx55(
|
|
9174
|
+
item.icon && /* @__PURE__ */ jsx55(KjunIcon, { name: item.icon, size: geometry2.iconSize, color: ink }),
|
|
9175
9175
|
badge
|
|
9176
9176
|
] }),
|
|
9177
9177
|
/* @__PURE__ */ jsxs42(View48, { style: { maxWidth: "100%" }, children: [
|
|
@@ -9185,7 +9185,7 @@ function DsBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0
|
|
|
9185
9185
|
);
|
|
9186
9186
|
}) });
|
|
9187
9187
|
}
|
|
9188
|
-
function
|
|
9188
|
+
function KjunBottomActionBar({ description, children, safeAreaBottom = 0, keyboardVisible = false, hideOnKeyboard = false }) {
|
|
9189
9189
|
const { colors } = useKjunStyles();
|
|
9190
9190
|
const [width, setWidth] = useState38(0);
|
|
9191
9191
|
const geometry2 = tokens53.extensions.navigation;
|
|
@@ -9213,7 +9213,7 @@ import { useRef as useRef33, useState as useState39 } from "react";
|
|
|
9213
9213
|
import { Image, View as View49 } from "react-native";
|
|
9214
9214
|
import { tokens as tokens54 } from "@kjun-ui/tokens";
|
|
9215
9215
|
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
9216
|
-
function
|
|
9216
|
+
function KjunImage({ src, source, alt, decorative = false, aspectRatio = 1, fit = "cover", fallback: fallback2, onLoad, onError }) {
|
|
9217
9217
|
const { colors } = useKjunStyles();
|
|
9218
9218
|
const request = JSON.stringify(source != null ? source : src), current = useRef33({ request, version: 0 });
|
|
9219
9219
|
if (current.current.request !== request) current.current = { request, version: current.current.version + 1 };
|
|
@@ -9227,23 +9227,23 @@ function DsImage({ src, source, alt, decorative = false, aspectRatio = 1, fit =
|
|
|
9227
9227
|
setFailed(version);
|
|
9228
9228
|
onError == null ? void 0 : onError();
|
|
9229
9229
|
}
|
|
9230
|
-
} }, version) : /* @__PURE__ */ jsx56(View49, { accessible: !decorative, accessibilityRole: "image", accessibilityLabel: decorative ? void 0 : alt, "aria-hidden": decorative || void 0, style: { flex: 1, alignItems: "center", justifyContent: "center" }, children: content(fallback2 != null ? fallback2 : /* @__PURE__ */ jsx56(
|
|
9230
|
+
} }, version) : /* @__PURE__ */ jsx56(View49, { accessible: !decorative, accessibilityRole: "image", accessibilityLabel: decorative ? void 0 : alt, "aria-hidden": decorative || void 0, style: { flex: 1, alignItems: "center", justifyContent: "center" }, children: content(fallback2 != null ? fallback2 : /* @__PURE__ */ jsx56(KjunIcon, { name: "image", size: tokens54.extensions.image.fallbackIconSize, color: colors.textSecondary }), { color: colors.textSecondary, fontWeight: typeStyle("control").fontWeight, textAlign: "center" }) }) });
|
|
9231
9231
|
}
|
|
9232
|
-
function
|
|
9232
|
+
function KjunAvatar({ src, source, name = "", alt, decorative = false, size = "md", shape = "circle", fallback: fallback2, onLoad, onError }) {
|
|
9233
9233
|
const { colors } = useKjunStyles(), initial = Array.from(name.trim())[0];
|
|
9234
|
-
return /* @__PURE__ */ jsx56(View49, { style: { width: tokens54.extensions.avatar[size], height: tokens54.extensions.avatar[size], borderRadius: shape === "circle" ? tokens54.radius.radius9999 : tokens54.radius.radius8, overflow: "hidden", flexShrink: 0 }, children: /* @__PURE__ */ jsx56(
|
|
9234
|
+
return /* @__PURE__ */ jsx56(View49, { style: { width: tokens54.extensions.avatar[size], height: tokens54.extensions.avatar[size], borderRadius: shape === "circle" ? tokens54.radius.radius9999 : tokens54.radius.radius8, overflow: "hidden", flexShrink: 0 }, children: /* @__PURE__ */ jsx56(KjunImage, { src, source, alt: alt || name || "\uC0AC\uC6A9\uC790", decorative, fallback: fallback2 != null ? fallback2 : initial ? /* @__PURE__ */ jsx56(KText, { style: { ...typeStyle(size === "sm" ? "control" : size === "lg" ? "sectionTitle" : "input"), fontWeight: typeStyle("control").fontWeight, color: colors.textSecondary }, children: initial.toLocaleUpperCase() }) : /* @__PURE__ */ jsx56(KjunIcon, { name: "user", size: tokens54.extensions.avatar.fallbackIconSizes[size] }), onLoad, onError }) });
|
|
9235
9235
|
}
|
|
9236
9236
|
|
|
9237
9237
|
// packages/native/src/chip.tsx
|
|
9238
9238
|
import { View as View50 } from "react-native";
|
|
9239
9239
|
import { tokens as tokens55 } from "@kjun-ui/tokens";
|
|
9240
9240
|
import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9241
|
-
function
|
|
9241
|
+
function KjunChip({ label, icon, removable = false, disabled = false, size = "md", removeLabel, onRemove }) {
|
|
9242
9242
|
const { colors } = useKjunStyles();
|
|
9243
9243
|
return /* @__PURE__ */ jsxs43(View50, { style: { alignSelf: "flex-start", maxWidth: "100%", minWidth: 0, flexShrink: 1, flexDirection: "row", alignItems: "center", gap: tokens55.extensions.chip.gap, minHeight: removable ? tokens55.extensions.chip.nativeRemoveSize : tokens55.extensions.chip[size], paddingVertical: removable ? 0 : tokens55.extensions.chip.paddingY, paddingLeft: tokens55.extensions.chip.paddingX, paddingRight: removable ? 0 : tokens55.extensions.chip.paddingX, borderRadius: tokens55.extensions.chip.radius, backgroundColor: colors.secondary, opacity: disabled ? tokens55.states.opacity.disabled : 1 }, children: [
|
|
9244
|
-
icon && /* @__PURE__ */ jsx57(
|
|
9244
|
+
icon && /* @__PURE__ */ jsx57(KjunIcon, { name: icon, size: tokens55.extensions.chip.iconSizes[size] }),
|
|
9245
9245
|
/* @__PURE__ */ jsx57(KText, { style: { ...typeStyle(tokens55.extensions.chip.typography[size]), flexShrink: 1, minWidth: 0 }, children: label }),
|
|
9246
|
-
removable && /* @__PURE__ */ jsx57(AccessiblePressable, { accessibilityRole: "button", accessibilityLabel: removeLabel || label + " \uC0AD\uC81C", disabled, accessibilityState: { disabled }, onPress: onRemove, style: { width: tokens55.extensions.chip.nativeRemoveSize, height: tokens55.extensions.chip.nativeRemoveSize, borderRadius: tokens55.extensions.chip.radius, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx57(
|
|
9246
|
+
removable && /* @__PURE__ */ jsx57(AccessiblePressable, { accessibilityRole: "button", accessibilityLabel: removeLabel || label + " \uC0AD\uC81C", disabled, accessibilityState: { disabled }, onPress: onRemove, style: { width: tokens55.extensions.chip.nativeRemoveSize, height: tokens55.extensions.chip.nativeRemoveSize, borderRadius: tokens55.extensions.chip.radius, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx57(KjunIcon, { name: "x", size: tokens55.extensions.chip.removeIconSizes[size] }) })
|
|
9247
9247
|
] });
|
|
9248
9248
|
}
|
|
9249
9249
|
|
|
@@ -9540,10 +9540,10 @@ function RangeInput({
|
|
|
9540
9540
|
}
|
|
9541
9541
|
);
|
|
9542
9542
|
}
|
|
9543
|
-
function
|
|
9543
|
+
function KjunSlider(props) {
|
|
9544
9544
|
return /* @__PURE__ */ jsx58(RangeInput, { ...props });
|
|
9545
9545
|
}
|
|
9546
|
-
function
|
|
9546
|
+
function KjunRangeSlider(props) {
|
|
9547
9547
|
return /* @__PURE__ */ jsx58(RangeInput, { ...props });
|
|
9548
9548
|
}
|
|
9549
9549
|
|
|
@@ -9558,7 +9558,7 @@ var componentIcons = { minus };
|
|
|
9558
9558
|
|
|
9559
9559
|
// packages/native/src/quantity-stepper.tsx
|
|
9560
9560
|
import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9561
|
-
function
|
|
9561
|
+
function KjunQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disabled = false, error = false, size = "md", block = false, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }) {
|
|
9562
9562
|
const { colors, fontFamily } = useKjunStyles();
|
|
9563
9563
|
const field = useKjunField();
|
|
9564
9564
|
const invalid = error || !!(field == null ? void 0 : field.error);
|
|
@@ -9656,7 +9656,7 @@ function DsQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disab
|
|
|
9656
9656
|
const surfaceBox = { position: "absolute", left: 0, right: 0, top: "50%", height: tokens57.input[size].height, marginTop: -tokens57.input[size].height / 2, borderRadius: surface.spec.radius };
|
|
9657
9657
|
return /* @__PURE__ */ jsx59(IconFallbacks, { icons: componentIcons, children: /* @__PURE__ */ jsxs45(View52, { style: { flexDirection: "row", alignItems: "center", alignSelf: block ? "stretch" : "flex-start", maxWidth: "100%" }, children: [
|
|
9658
9658
|
/* @__PURE__ */ jsx59(View52, { pointerEvents: "none", "aria-hidden": true, style: { ...surfaceBox, backgroundColor: colors.inputBg } }),
|
|
9659
|
-
/* @__PURE__ */ jsx59(CompoundTarget, { square: true, children: /* @__PURE__ */ jsx59(
|
|
9659
|
+
/* @__PURE__ */ jsx59(CompoundTarget, { square: true, children: /* @__PURE__ */ jsx59(KjunButton, { size, style: decreaseStyle, variant: "ghost", ariaLabel: "\uC218\uB7C9 \uC904\uC774\uAE30", disabled: blocked || value <= min, onPress: () => move(-1), prefixIcon: "minus" }) }),
|
|
9660
9660
|
/* @__PURE__ */ jsx59(View52, { style: { flex: block ? 1 : void 0, width: block ? void 0 : geometry2.valueWidth, minWidth: 0, minHeight: finePointer() ? void 0 : tokens57.native.minimumTouchTarget, justifyContent: "center" }, ...fieldTarget(() => {
|
|
9661
9661
|
var _a;
|
|
9662
9662
|
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -9689,7 +9689,7 @@ function DsQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disab
|
|
|
9689
9689
|
style: { width: "100%", minWidth: 0, ...surface.style, borderRadius: 0, borderTopColor: "transparent", borderBottomColor: "transparent", borderLeftColor: "transparent", borderRightColor: "transparent", backgroundColor: !blocked && (surface.active || surface.hovered) ? colors.hover : "transparent", outlineWidth: 0, color: surface.ink, fontFamily, ...inputTypeStyle(size), textAlign: "center", paddingHorizontal: surface.spec.padding - tokens57.border.controlWidth, paddingVertical: 0 }
|
|
9690
9690
|
}
|
|
9691
9691
|
) }),
|
|
9692
|
-
/* @__PURE__ */ jsx59(CompoundTarget, { square: true, children: /* @__PURE__ */ jsx59(
|
|
9692
|
+
/* @__PURE__ */ jsx59(CompoundTarget, { square: true, children: /* @__PURE__ */ jsx59(KjunButton, { size, style: increaseStyle, variant: "ghost", ariaLabel: "\uC218\uB7C9 \uB298\uB9AC\uAE30", disabled: blocked || max !== void 0 && value >= max, onPress: () => move(1), prefixIcon: "plus" }) }),
|
|
9693
9693
|
(invalid || surface.active) && /* @__PURE__ */ jsx59(View52, { pointerEvents: "none", "aria-hidden": true, style: { ...surfaceBox, borderWidth: invalid ? tokens57.border.controlWidth : tokens57.states.focus.width, borderColor: invalid ? colors.danger : colors.focusRing } })
|
|
9694
9694
|
] }) });
|
|
9695
9695
|
}
|
|
@@ -9699,7 +9699,7 @@ import { Fragment as Fragment20, useEffect as useEffect27, useId as useId11, use
|
|
|
9699
9699
|
import { View as View53 } from "react-native";
|
|
9700
9700
|
import { createTimeDomain, tokens as tokens58 } from "@kjun-ui/tokens";
|
|
9701
9701
|
import { jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9702
|
-
function
|
|
9702
|
+
function KjunTimePicker({ value, precision = "minute", min, max, minuteStep = 1, secondStep = 1, disabled = false, error = false, clearable = true, size = "md", ariaLabel = "\uC2DC\uAC04", onValueChange, onChangeCommit }) {
|
|
9703
9703
|
const geometry2 = tokens58.extensions.timePicker, spec = tokens58.input[size];
|
|
9704
9704
|
const { colors } = useKjunStyles();
|
|
9705
9705
|
const first = useRef36(null);
|
|
@@ -9720,7 +9720,7 @@ function DsTimePicker({ value, precision = "minute", min, max, minuteStep = 1, s
|
|
|
9720
9720
|
return /* @__PURE__ */ jsxs46(View53, { accessibilityLabel: ariaLabel, style: { flexDirection: "row", alignItems: "center", maxWidth: "100%", minWidth: 0, backgroundColor: colors.inputBg, borderRadius: spec.radius }, children: [
|
|
9721
9721
|
/* @__PURE__ */ jsx60(View53, { style: { flex: 1, flexDirection: "row", alignItems: "center", minWidth: 0 }, children: ["\uC2DC", "\uBD84", "\uCD08"].slice(0, precision === "second" ? 3 : 2).map((label, index) => /* @__PURE__ */ jsxs46(Fragment20, { children: [
|
|
9722
9722
|
index > 0 && /* @__PURE__ */ jsx60(KText, { "aria-hidden": true, style: { ...inputTypeStyle(size), width: geometry2.separatorWidth, textAlign: "center", color: disabled || !valid ? colors.textDisabled : colors.textSecondary }, children: ":" }),
|
|
9723
|
-
/* @__PURE__ */ jsx60(FieldContext.Provider, { value: { ...field, id: index === 0 ? fieldId : `${fieldId}-${index}` }, children: /* @__PURE__ */ jsx60(CompoundControlContext.Provider, { value: { size, focusRef: index === 0 ? first : void 0, onFocusChange: setFocused, leading: index === 0 }, children: /* @__PURE__ */ jsx60(View53, { style: { flexShrink: 0, minWidth: geometry2.segmentMinimumWidth }, children: /* @__PURE__ */ jsx60(
|
|
9723
|
+
/* @__PURE__ */ jsx60(FieldContext.Provider, { value: { ...field, id: index === 0 ? fieldId : `${fieldId}-${index}` }, children: /* @__PURE__ */ jsx60(CompoundControlContext.Provider, { value: { size, focusRef: index === 0 ? first : void 0, onFocusChange: setFocused, leading: index === 0 }, children: /* @__PURE__ */ jsx60(View53, { style: { flexShrink: 0, minWidth: geometry2.segmentMinimumWidth }, children: /* @__PURE__ */ jsx60(KjunSelect, { value: time === null ? null : domain.part(time, index), options: domain.options(value, index).map((n) => ({ value: n, label: String(n).padStart(2, "0") })), onValueChange: (next) => {
|
|
9724
9724
|
if (typeof next === "number") change(domain.select(value, index, next));
|
|
9725
9725
|
}, onOpenChange: (open) => setOpened(open ? index : null), ariaLabel: ((field == null ? void 0 : field.label) || ariaLabel) + " " + label, placeholder: label, disabled: disabled || !valid, error, size, clearable: false, searchable: false }) }) }) })
|
|
9726
9726
|
] }, label)) }),
|
|
@@ -9733,86 +9733,86 @@ function DsTimePicker({ value, precision = "minute", min, max, minuteStep = 1, s
|
|
|
9733
9733
|
] });
|
|
9734
9734
|
}
|
|
9735
9735
|
export {
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
DsFilterGroup,
|
|
9766
|
-
DsFormActions,
|
|
9767
|
-
DsFormGroup,
|
|
9768
|
-
DsFormLayout,
|
|
9769
|
-
DsFormSkeleton,
|
|
9770
|
-
DsFreshness,
|
|
9771
|
-
DsHeatmapCell,
|
|
9772
|
-
DsIcon,
|
|
9773
|
-
DsIconToggle,
|
|
9774
|
-
DsImage,
|
|
9775
|
-
DsInput,
|
|
9776
|
-
DsKpiHero,
|
|
9777
|
-
DsKpiRow,
|
|
9778
|
-
DsListRow,
|
|
9779
|
-
DsListSection,
|
|
9780
|
-
DsListSkeleton,
|
|
9781
|
-
DsMarketCards,
|
|
9782
|
-
DsMarketListPanel,
|
|
9783
|
-
DsMarketSimpleList,
|
|
9784
|
-
DsMarketTable,
|
|
9785
|
-
DsMarketTableSkeleton,
|
|
9786
|
-
DsMenuButton,
|
|
9787
|
-
DsModal,
|
|
9788
|
-
DsPagination,
|
|
9789
|
-
DsPopover,
|
|
9790
|
-
DsPriceCell,
|
|
9791
|
-
DsProgress,
|
|
9792
|
-
DsProgressCell,
|
|
9793
|
-
DsQuantityStepper,
|
|
9794
|
-
DsRadio,
|
|
9795
|
-
DsRadioGroup,
|
|
9796
|
-
DsRangeSlider,
|
|
9797
|
-
DsRefreshButton,
|
|
9798
|
-
DsScrollFade,
|
|
9799
|
-
DsSearchInput,
|
|
9800
|
-
DsSelect,
|
|
9801
|
-
DsSignedValue,
|
|
9802
|
-
DsSkeleton,
|
|
9803
|
-
DsSlider,
|
|
9804
|
-
DsSparkline,
|
|
9805
|
-
DsSpinner,
|
|
9806
|
-
DsSwitch,
|
|
9807
|
-
DsTabPane,
|
|
9808
|
-
DsTable,
|
|
9809
|
-
DsTabs,
|
|
9810
|
-
DsTextarea,
|
|
9811
|
-
DsTimePicker,
|
|
9812
|
-
DsTooltip,
|
|
9813
|
-
DsTopNavigation,
|
|
9736
|
+
KjunAccordion,
|
|
9737
|
+
KjunAccordionItem,
|
|
9738
|
+
KjunAlert,
|
|
9739
|
+
KjunAnimatedNumber,
|
|
9740
|
+
KjunAvatar,
|
|
9741
|
+
KjunBadge,
|
|
9742
|
+
KjunBottomActionBar,
|
|
9743
|
+
KjunBottomNavigation,
|
|
9744
|
+
KjunBreadcrumb,
|
|
9745
|
+
KjunButton,
|
|
9746
|
+
KjunButtonGroup,
|
|
9747
|
+
KjunCard,
|
|
9748
|
+
KjunChartSkeleton,
|
|
9749
|
+
KjunCheckbox,
|
|
9750
|
+
KjunChip,
|
|
9751
|
+
KjunCollectionMark,
|
|
9752
|
+
KjunCombobox,
|
|
9753
|
+
KjunCopyButton,
|
|
9754
|
+
KjunDataState,
|
|
9755
|
+
KjunDatePicker,
|
|
9756
|
+
KjunDeviation,
|
|
9757
|
+
KjunDrawer,
|
|
9758
|
+
KjunDropdown,
|
|
9759
|
+
KjunDropdownDivider,
|
|
9760
|
+
KjunDropdownItem,
|
|
9761
|
+
KjunEmpty,
|
|
9762
|
+
KjunErrorBoundary,
|
|
9763
|
+
KjunExecutionStatusBadge,
|
|
9764
|
+
KjunExternalLink,
|
|
9814
9765
|
KjunFeedbackProvider,
|
|
9766
|
+
KjunFilterGroup,
|
|
9767
|
+
KjunFormActions,
|
|
9768
|
+
KjunFormGroup,
|
|
9769
|
+
KjunFormLayout,
|
|
9770
|
+
KjunFormSkeleton,
|
|
9771
|
+
KjunFreshness,
|
|
9772
|
+
KjunHeatmapCell,
|
|
9773
|
+
KjunIcon,
|
|
9774
|
+
KjunIconToggle,
|
|
9775
|
+
KjunImage,
|
|
9776
|
+
KjunInput,
|
|
9777
|
+
KjunKpiHero,
|
|
9778
|
+
KjunKpiRow,
|
|
9779
|
+
KjunListRow,
|
|
9780
|
+
KjunListSection,
|
|
9781
|
+
KjunListSkeleton,
|
|
9782
|
+
KjunMarketCards,
|
|
9783
|
+
KjunMarketListPanel,
|
|
9784
|
+
KjunMarketSimpleList,
|
|
9785
|
+
KjunMarketTable,
|
|
9786
|
+
KjunMarketTableSkeleton,
|
|
9787
|
+
KjunMenuButton,
|
|
9788
|
+
KjunModal,
|
|
9789
|
+
KjunPagination,
|
|
9790
|
+
KjunPopover,
|
|
9791
|
+
KjunPriceCell,
|
|
9792
|
+
KjunProgress,
|
|
9793
|
+
KjunProgressCell,
|
|
9815
9794
|
KjunProvider,
|
|
9795
|
+
KjunQuantityStepper,
|
|
9796
|
+
KjunRadio,
|
|
9797
|
+
KjunRadioGroup,
|
|
9798
|
+
KjunRangeSlider,
|
|
9799
|
+
KjunRefreshButton,
|
|
9800
|
+
KjunScrollFade,
|
|
9801
|
+
KjunSearchInput,
|
|
9802
|
+
KjunSelect,
|
|
9803
|
+
KjunSignedValue,
|
|
9804
|
+
KjunSkeleton,
|
|
9805
|
+
KjunSlider,
|
|
9806
|
+
KjunSparkline,
|
|
9807
|
+
KjunSpinner,
|
|
9808
|
+
KjunSwitch,
|
|
9809
|
+
KjunTabPane,
|
|
9810
|
+
KjunTable,
|
|
9811
|
+
KjunTabs,
|
|
9812
|
+
KjunTextarea,
|
|
9813
|
+
KjunTimePicker,
|
|
9814
|
+
KjunTooltip,
|
|
9815
|
+
KjunTopNavigation,
|
|
9816
9816
|
useKjunFeedback,
|
|
9817
9817
|
useKjunStyles
|
|
9818
9818
|
};
|