@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.web.js
CHANGED
|
@@ -644,7 +644,7 @@ var AccessiblePressable = forwardRef(
|
|
|
644
644
|
|
|
645
645
|
// packages/native/src/button.tsx
|
|
646
646
|
import { Fragment, jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
647
|
-
function
|
|
647
|
+
function KjunIcon({
|
|
648
648
|
name,
|
|
649
649
|
size = tokens3.iconSizes.default,
|
|
650
650
|
color,
|
|
@@ -749,7 +749,7 @@ function useMinimumLoading(loading) {
|
|
|
749
749
|
}, [loading]);
|
|
750
750
|
return loading || active;
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function KjunButton(input) {
|
|
753
753
|
var _a, _b;
|
|
754
754
|
const {
|
|
755
755
|
children,
|
|
@@ -859,7 +859,7 @@ function DsButton(input) {
|
|
|
859
859
|
const color = paint(pressed, hovered && Platform2.OS === "web").ink;
|
|
860
860
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
861
861
|
before && /* @__PURE__ */ jsx5(
|
|
862
|
-
|
|
862
|
+
KjunIcon,
|
|
863
863
|
{
|
|
864
864
|
name: before,
|
|
865
865
|
filled: !busy && prefixIconFilled,
|
|
@@ -876,7 +876,7 @@ function DsButton(input) {
|
|
|
876
876
|
...multiline || navigation ? { flexShrink: 1, minWidth: 0, textAlign: "center" } : {}
|
|
877
877
|
}, children }),
|
|
878
878
|
suffixIcon && /* @__PURE__ */ jsx5(View2, { style: { opacity: busy && prefixIcon ? 0 : 1 }, children: /* @__PURE__ */ jsx5(
|
|
879
|
-
|
|
879
|
+
KjunIcon,
|
|
880
880
|
{
|
|
881
881
|
name: busy && !prefixIcon ? "loader-2" : suffixIcon,
|
|
882
882
|
filled: !busy && suffixIconFilled,
|
|
@@ -893,7 +893,7 @@ function DsButton(input) {
|
|
|
893
893
|
right: 0,
|
|
894
894
|
alignItems: "center",
|
|
895
895
|
justifyContent: "center"
|
|
896
|
-
}, children: /* @__PURE__ */ jsx5(
|
|
896
|
+
}, children: /* @__PURE__ */ jsx5(KjunIcon, { name: "loader-2", spin: true, size: iconSize, color }) })
|
|
897
897
|
] });
|
|
898
898
|
}
|
|
899
899
|
}
|
|
@@ -933,7 +933,7 @@ function FieldClear({ size, disabled, label, onPress }) {
|
|
|
933
933
|
alignItems: "center",
|
|
934
934
|
justifyContent: "center",
|
|
935
935
|
backgroundColor: disabled ? "transparent" : pressed ? colors.active : hovered ? colors.hover : "transparent"
|
|
936
|
-
}, children: /* @__PURE__ */ jsx6(
|
|
936
|
+
}, children: /* @__PURE__ */ jsx6(KjunIcon, { name: "x", size: spec.iconSize, color: disabled ? colors.textDisabled : colors.textSecondary }) })
|
|
937
937
|
}
|
|
938
938
|
);
|
|
939
939
|
}
|
|
@@ -1119,7 +1119,7 @@ import {
|
|
|
1119
1119
|
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1120
1120
|
var FieldContext = createContext11(null);
|
|
1121
1121
|
var useKjunField = () => useContext6(FieldContext);
|
|
1122
|
-
function
|
|
1122
|
+
function KjunFormGroup({
|
|
1123
1123
|
label,
|
|
1124
1124
|
id,
|
|
1125
1125
|
required = false,
|
|
@@ -1163,7 +1163,7 @@ function DsFormGroup({
|
|
|
1163
1163
|
marginTop: tokens7.extensions.form.messageGap
|
|
1164
1164
|
},
|
|
1165
1165
|
children: [
|
|
1166
|
-
!!error && /* @__PURE__ */ jsx8(
|
|
1166
|
+
!!error && /* @__PURE__ */ jsx8(KjunIcon, { name: "alert-circle", size: tokens7.extensions.form.messageIconSize, color: c.danger }),
|
|
1167
1167
|
/* @__PURE__ */ jsx8(
|
|
1168
1168
|
Text3,
|
|
1169
1169
|
{
|
|
@@ -1185,7 +1185,7 @@ function DsFormGroup({
|
|
|
1185
1185
|
}
|
|
1186
1186
|
);
|
|
1187
1187
|
}
|
|
1188
|
-
var
|
|
1188
|
+
var KjunInput = forwardRef2(function KjunInput2({
|
|
1189
1189
|
value,
|
|
1190
1190
|
size = "md",
|
|
1191
1191
|
error = false,
|
|
@@ -1299,7 +1299,7 @@ var DsInput = forwardRef2(function DsInput2({
|
|
|
1299
1299
|
justifyContent: "center"
|
|
1300
1300
|
},
|
|
1301
1301
|
children: prefix || /* @__PURE__ */ jsx8(
|
|
1302
|
-
|
|
1302
|
+
KjunIcon,
|
|
1303
1303
|
{
|
|
1304
1304
|
name: prefixIcon,
|
|
1305
1305
|
size: spec.iconSize,
|
|
@@ -1330,7 +1330,7 @@ var DsInput = forwardRef2(function DsInput2({
|
|
|
1330
1330
|
(_a = input.current) == null ? void 0 : _a.focus();
|
|
1331
1331
|
} }),
|
|
1332
1332
|
suffix || suffixIcon && /* @__PURE__ */ jsx8(
|
|
1333
|
-
|
|
1333
|
+
KjunIcon,
|
|
1334
1334
|
{
|
|
1335
1335
|
name: suffixIcon,
|
|
1336
1336
|
size: spec.iconSize,
|
|
@@ -1357,13 +1357,13 @@ var DsInput = forwardRef2(function DsInput2({
|
|
|
1357
1357
|
)
|
|
1358
1358
|
] });
|
|
1359
1359
|
});
|
|
1360
|
-
function
|
|
1360
|
+
function KjunFormLayout({
|
|
1361
1361
|
children,
|
|
1362
1362
|
gap = tokens7.extensions.form.itemGap
|
|
1363
1363
|
}) {
|
|
1364
1364
|
return /* @__PURE__ */ jsx8(View4, { style: { gap }, children: Children.map(
|
|
1365
1365
|
children,
|
|
1366
|
-
(child) => isValidElement(child) && child.type ===
|
|
1366
|
+
(child) => isValidElement(child) && child.type === KjunFormGroup ? cloneElement(child, {
|
|
1367
1367
|
style: [{ marginBottom: 0 }, child.props.style]
|
|
1368
1368
|
}) : child
|
|
1369
1369
|
) });
|
|
@@ -1438,7 +1438,7 @@ function ScopedNativeModal({ children, visible, ...props }) {
|
|
|
1438
1438
|
const entry = scope ? layers.entries.get(scope) : void 0;
|
|
1439
1439
|
const generation = (_a = entry == null ? void 0 : entry.order) != null ? _a : 0;
|
|
1440
1440
|
const inactive = !!scope && !layers.isActive(scope);
|
|
1441
|
-
const host = useContext7(FeedbackOverlayContext), id = useId3(), register = host == null ? void 0 : host.register;
|
|
1441
|
+
const host = useContext7(FeedbackOverlayContext), id = "kjun-" + useId3(), register = host == null ? void 0 : host.register;
|
|
1442
1442
|
useEffect4(
|
|
1443
1443
|
() => visible && register ? register(id) : void 0,
|
|
1444
1444
|
[visible, register, id, generation]
|
|
@@ -1474,7 +1474,7 @@ function ScopedNativeModal({ children, visible, ...props }) {
|
|
|
1474
1474
|
|
|
1475
1475
|
// packages/native/src/modal.tsx
|
|
1476
1476
|
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1477
|
-
function
|
|
1477
|
+
function KjunFormActions({
|
|
1478
1478
|
size = "lg",
|
|
1479
1479
|
cancelText = "\uCDE8\uC18C",
|
|
1480
1480
|
confirmText = "\uC800\uC7A5",
|
|
@@ -1533,7 +1533,7 @@ function DsFormActions({
|
|
|
1533
1533
|
}
|
|
1534
1534
|
),
|
|
1535
1535
|
showCancel && /* @__PURE__ */ jsx12(
|
|
1536
|
-
|
|
1536
|
+
KjunButton,
|
|
1537
1537
|
{
|
|
1538
1538
|
size,
|
|
1539
1539
|
variant: cancelVariant,
|
|
@@ -1543,7 +1543,7 @@ function DsFormActions({
|
|
|
1543
1543
|
}
|
|
1544
1544
|
),
|
|
1545
1545
|
showConfirm && /* @__PURE__ */ jsx12(
|
|
1546
|
-
|
|
1546
|
+
KjunButton,
|
|
1547
1547
|
{
|
|
1548
1548
|
size,
|
|
1549
1549
|
variant,
|
|
@@ -1557,7 +1557,7 @@ function DsFormActions({
|
|
|
1557
1557
|
}
|
|
1558
1558
|
) });
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function KjunModal({
|
|
1561
1561
|
open,
|
|
1562
1562
|
onOpenChange,
|
|
1563
1563
|
onClose,
|
|
@@ -1698,14 +1698,14 @@ function DsModal({
|
|
|
1698
1698
|
}
|
|
1699
1699
|
) }),
|
|
1700
1700
|
closable && /* @__PURE__ */ jsx12(
|
|
1701
|
-
|
|
1701
|
+
KjunButton,
|
|
1702
1702
|
{
|
|
1703
1703
|
variant: "ghost",
|
|
1704
1704
|
size: "sm",
|
|
1705
1705
|
ariaLabel: "\uB2EB\uAE30",
|
|
1706
1706
|
onPress: close,
|
|
1707
1707
|
style: { borderRadius: tokens8.modal.closeRadius, width: tokens8.modal.closeSize, height: tokens8.modal.closeSize, paddingHorizontal: 0, paddingVertical: 0 },
|
|
1708
|
-
children: /* @__PURE__ */ jsx12(
|
|
1708
|
+
children: /* @__PURE__ */ jsx12(KjunIcon, { name: "x", size: tokens8.modal.closeIconSize })
|
|
1709
1709
|
}
|
|
1710
1710
|
)
|
|
1711
1711
|
]
|
|
@@ -1734,7 +1734,7 @@ function DsModal({
|
|
|
1734
1734
|
borderTopColor: c.border
|
|
1735
1735
|
},
|
|
1736
1736
|
children: footer || /* @__PURE__ */ jsx12(
|
|
1737
|
-
|
|
1737
|
+
KjunFormActions,
|
|
1738
1738
|
{
|
|
1739
1739
|
size: footerSize,
|
|
1740
1740
|
cancelVariant: "secondary",
|
|
@@ -1783,7 +1783,7 @@ function hasContent(node) {
|
|
|
1783
1783
|
|
|
1784
1784
|
// packages/native/src/card.tsx
|
|
1785
1785
|
import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1786
|
-
function
|
|
1786
|
+
function KjunCard({
|
|
1787
1787
|
title,
|
|
1788
1788
|
subtitle,
|
|
1789
1789
|
header,
|
|
@@ -1801,7 +1801,7 @@ function DsCard({
|
|
|
1801
1801
|
style
|
|
1802
1802
|
}) {
|
|
1803
1803
|
const { colors } = useKjunStyles();
|
|
1804
|
-
const id = useId4().replace(/[^a-z0-9]/gi, "");
|
|
1804
|
+
const id = "kjun-" + useId4().replace(/[^a-z0-9]/gi, "");
|
|
1805
1805
|
const inset = tokens9.card.padding[padding], bodyInset = tokens9.card.padding[bodyPadding];
|
|
1806
1806
|
const corner = tokens9.card.radii[radius];
|
|
1807
1807
|
const paint = tokens9.cardSurfaces[surface];
|
|
@@ -1874,7 +1874,7 @@ import {
|
|
|
1874
1874
|
} from "react-native";
|
|
1875
1875
|
import Svg3, { Circle as Circle2, Path as Path2 } from "react-native-svg";
|
|
1876
1876
|
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1877
|
-
function
|
|
1877
|
+
function KjunBadge(props) {
|
|
1878
1878
|
return /* @__PURE__ */ jsx14(BadgeView, { ...props });
|
|
1879
1879
|
}
|
|
1880
1880
|
function BadgeView({
|
|
@@ -1936,7 +1936,7 @@ function BadgeView({
|
|
|
1936
1936
|
}
|
|
1937
1937
|
);
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function KjunEmpty({
|
|
1940
1940
|
text = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
1941
1941
|
description,
|
|
1942
1942
|
icon,
|
|
@@ -1954,7 +1954,7 @@ function DsEmpty({
|
|
|
1954
1954
|
paddingVertical: stateContent === "empty" ? 0 : tokens10.dimension.value32
|
|
1955
1955
|
},
|
|
1956
1956
|
children: [
|
|
1957
|
-
icon && /* @__PURE__ */ jsx14(View10, { style: { marginBottom: spec.iconGap }, children: /* @__PURE__ */ jsx14(
|
|
1957
|
+
icon && /* @__PURE__ */ jsx14(View10, { style: { marginBottom: spec.iconGap }, children: /* @__PURE__ */ jsx14(KjunIcon, { name: icon, size: spec.iconSize, color: colors.textSecondary }) }),
|
|
1958
1958
|
/* @__PURE__ */ jsx14(KText, { style: { ...typeStyle("cardTitle"), color: colors.text, fontSize: spec.titleSize, lineHeight: spec.titleLineHeight, textAlign: "center", maxWidth: spec.textMaxWidth }, children: text }),
|
|
1959
1959
|
description && /* @__PURE__ */ jsx14(
|
|
1960
1960
|
KText,
|
|
@@ -1976,7 +1976,7 @@ function DsEmpty({
|
|
|
1976
1976
|
}
|
|
1977
1977
|
);
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function KjunSpinner({ size = "md", text }) {
|
|
1980
1980
|
const { colors } = useKjunStyles(), reduced = useReducedMotion(), rotation = useRef6(new Animated5.Value(0)).current;
|
|
1981
1981
|
useEffect5(() => {
|
|
1982
1982
|
if (reduced) return;
|
|
@@ -2054,7 +2054,7 @@ function DsSpinner({ size = "md", text }) {
|
|
|
2054
2054
|
}
|
|
2055
2055
|
);
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function KjunAlert({
|
|
2058
2058
|
type = "info",
|
|
2059
2059
|
variant,
|
|
2060
2060
|
size = "md",
|
|
@@ -2090,7 +2090,7 @@ function DsAlert({
|
|
|
2090
2090
|
},
|
|
2091
2091
|
children: [
|
|
2092
2092
|
/* @__PURE__ */ jsx14(View10, { style: { height: lineHeight, justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ jsx14(
|
|
2093
|
-
|
|
2093
|
+
KjunIcon,
|
|
2094
2094
|
{
|
|
2095
2095
|
name: {
|
|
2096
2096
|
info: "info-circle",
|
|
@@ -2134,7 +2134,7 @@ function DsAlert({
|
|
|
2134
2134
|
onClose == null ? void 0 : onClose();
|
|
2135
2135
|
},
|
|
2136
2136
|
children: ({ pressed, hovered }) => /* @__PURE__ */ jsx14(
|
|
2137
|
-
|
|
2137
|
+
KjunIcon,
|
|
2138
2138
|
{
|
|
2139
2139
|
name: "x",
|
|
2140
2140
|
size: geometry2.closeIconSize,
|
|
@@ -2147,7 +2147,7 @@ function DsAlert({
|
|
|
2147
2147
|
}
|
|
2148
2148
|
);
|
|
2149
2149
|
}
|
|
2150
|
-
function
|
|
2150
|
+
function KjunProgress({
|
|
2151
2151
|
value = 0,
|
|
2152
2152
|
max = 100,
|
|
2153
2153
|
size = "md",
|
|
@@ -2229,7 +2229,7 @@ import {
|
|
|
2229
2229
|
View as View11
|
|
2230
2230
|
} from "react-native";
|
|
2231
2231
|
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2232
|
-
function
|
|
2232
|
+
function KjunSkeleton({
|
|
2233
2233
|
type = "text",
|
|
2234
2234
|
rows = 3,
|
|
2235
2235
|
columns = 4,
|
|
@@ -2605,7 +2605,7 @@ function ToastView({
|
|
|
2605
2605
|
overflow: "hidden"
|
|
2606
2606
|
},
|
|
2607
2607
|
children: [
|
|
2608
|
-
/* @__PURE__ */ jsx16(
|
|
2608
|
+
/* @__PURE__ */ jsx16(KjunIcon, { name: icon, color: colors[`${tone}Accent`] }),
|
|
2609
2609
|
/* @__PURE__ */ jsxs9(View12, { style: { flex: 1, minWidth: 0 }, children: [
|
|
2610
2610
|
toast.title && /* @__PURE__ */ jsx16(KText, { style: { fontWeight: typeStyle("control").fontWeight, marginBottom: tokens13.extensions.toast.titleGap }, children: toast.title }),
|
|
2611
2611
|
/* @__PURE__ */ jsx16(KText, { style: { color: colors.textSecondary }, children: toast.message }),
|
|
@@ -2653,7 +2653,7 @@ function ToastView({
|
|
|
2653
2653
|
justifyContent: "center",
|
|
2654
2654
|
borderRadius: tokens13.extensions.toast.closeRadius
|
|
2655
2655
|
},
|
|
2656
|
-
children: /* @__PURE__ */ jsx16(
|
|
2656
|
+
children: /* @__PURE__ */ jsx16(KjunIcon, { name: "x", color: colors.textTertiary })
|
|
2657
2657
|
}
|
|
2658
2658
|
),
|
|
2659
2659
|
toast.showProgress !== false && !!toast.duration && /* @__PURE__ */ jsx16(
|
|
@@ -2844,7 +2844,7 @@ function FeedbackDialog({
|
|
|
2844
2844
|
}) {
|
|
2845
2845
|
const { options, value, error, busy, edit, cancel, submit } = useFeedbackDialog(controller, request);
|
|
2846
2846
|
return /* @__PURE__ */ jsxs10(
|
|
2847
|
-
|
|
2847
|
+
KjunModal,
|
|
2848
2848
|
{
|
|
2849
2849
|
open,
|
|
2850
2850
|
onOpenChange: (open2) => {
|
|
@@ -2863,7 +2863,7 @@ function FeedbackDialog({
|
|
|
2863
2863
|
children: [
|
|
2864
2864
|
options.message && /* @__PURE__ */ jsx18(KText, { style: { marginBottom: tokens16.dimension.value16 }, children: options.message }),
|
|
2865
2865
|
request.kind === "prompt" && /* @__PURE__ */ jsx18(
|
|
2866
|
-
|
|
2866
|
+
KjunInput,
|
|
2867
2867
|
{
|
|
2868
2868
|
autoFocus: true,
|
|
2869
2869
|
value,
|
|
@@ -2940,7 +2940,7 @@ import {
|
|
|
2940
2940
|
View as View15
|
|
2941
2941
|
} from "react-native";
|
|
2942
2942
|
import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2943
|
-
function
|
|
2943
|
+
function KjunCheckbox({
|
|
2944
2944
|
value,
|
|
2945
2945
|
val,
|
|
2946
2946
|
label,
|
|
@@ -2989,7 +2989,7 @@ function DsCheckbox({
|
|
|
2989
2989
|
backgroundColor: checked ? colors.brand : colors.surface
|
|
2990
2990
|
},
|
|
2991
2991
|
children: checked && /* @__PURE__ */ jsx19(
|
|
2992
|
-
|
|
2992
|
+
KjunIcon,
|
|
2993
2993
|
{
|
|
2994
2994
|
name: "check",
|
|
2995
2995
|
size: tokens17.extensions.checkbox.iconSizes[size],
|
|
@@ -3018,7 +3018,7 @@ function useControlFocus(disabled) {
|
|
|
3018
3018
|
ring: focused && !disabled ? { outlineStyle: "solid", outlineWidth: tokens17.states.focus.width, outlineOffset: tokens17.states.focus.choiceOffset, outlineColor: colors.focusRing } : {}
|
|
3019
3019
|
};
|
|
3020
3020
|
}
|
|
3021
|
-
function
|
|
3021
|
+
function KjunSwitch({
|
|
3022
3022
|
value,
|
|
3023
3023
|
label,
|
|
3024
3024
|
ariaLabel,
|
|
@@ -3118,7 +3118,7 @@ function DsSwitch({
|
|
|
3118
3118
|
);
|
|
3119
3119
|
}
|
|
3120
3120
|
var RadioContext = createContext14(null);
|
|
3121
|
-
function
|
|
3121
|
+
function KjunRadio({
|
|
3122
3122
|
value,
|
|
3123
3123
|
val,
|
|
3124
3124
|
label,
|
|
@@ -3194,7 +3194,7 @@ function DsRadio({
|
|
|
3194
3194
|
}
|
|
3195
3195
|
);
|
|
3196
3196
|
}
|
|
3197
|
-
function
|
|
3197
|
+
function KjunRadioGroup({
|
|
3198
3198
|
value,
|
|
3199
3199
|
options = [],
|
|
3200
3200
|
direction = "horizontal",
|
|
@@ -3227,7 +3227,7 @@ function DsRadioGroup({
|
|
|
3227
3227
|
gap: direction === "vertical" ? tokens17.dimension.value8 : tokens17.dimension.value16
|
|
3228
3228
|
},
|
|
3229
3229
|
children: children || options.map((option) => /* @__PURE__ */ jsx19(
|
|
3230
|
-
|
|
3230
|
+
KjunRadio,
|
|
3231
3231
|
{
|
|
3232
3232
|
val: option.value,
|
|
3233
3233
|
label: option.label,
|
|
@@ -3334,7 +3334,7 @@ function ButtonGroupLabel({ label, active, size, reduced }) {
|
|
|
3334
3334
|
|
|
3335
3335
|
// packages/native/src/selection-groups.tsx
|
|
3336
3336
|
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3337
|
-
function
|
|
3337
|
+
function KjunButtonGroup({
|
|
3338
3338
|
value,
|
|
3339
3339
|
options,
|
|
3340
3340
|
size = "md",
|
|
@@ -3435,7 +3435,7 @@ function DsButtonGroup({
|
|
|
3435
3435
|
}),
|
|
3436
3436
|
children: [
|
|
3437
3437
|
option.icon && /* @__PURE__ */ jsx21(
|
|
3438
|
-
|
|
3438
|
+
KjunIcon,
|
|
3439
3439
|
{
|
|
3440
3440
|
name: option.icon,
|
|
3441
3441
|
size: tokens19.extensions.selection.iconSize,
|
|
@@ -3462,7 +3462,7 @@ function DsButtonGroup({
|
|
|
3462
3462
|
}
|
|
3463
3463
|
);
|
|
3464
3464
|
}
|
|
3465
|
-
function
|
|
3465
|
+
function KjunFilterGroup({
|
|
3466
3466
|
value,
|
|
3467
3467
|
options,
|
|
3468
3468
|
size = "sm",
|
|
@@ -3532,7 +3532,7 @@ function DsFilterGroup({
|
|
|
3532
3532
|
}
|
|
3533
3533
|
),
|
|
3534
3534
|
option.icon && /* @__PURE__ */ jsx21(
|
|
3535
|
-
|
|
3535
|
+
KjunIcon,
|
|
3536
3536
|
{
|
|
3537
3537
|
name: option.icon,
|
|
3538
3538
|
size: tokens19.extensions.selection.iconSize,
|
|
@@ -3594,8 +3594,8 @@ import {
|
|
|
3594
3594
|
Platform as Platform13
|
|
3595
3595
|
} from "react-native";
|
|
3596
3596
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3597
|
-
var
|
|
3598
|
-
function
|
|
3597
|
+
var KjunTextarea = forwardRef3(
|
|
3598
|
+
function KjunTextarea2({
|
|
3599
3599
|
value,
|
|
3600
3600
|
size = "md",
|
|
3601
3601
|
error = false,
|
|
@@ -3673,7 +3673,7 @@ import {
|
|
|
3673
3673
|
useWindowDimensions as useWindowDimensions3
|
|
3674
3674
|
} from "react-native";
|
|
3675
3675
|
import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3676
|
-
function
|
|
3676
|
+
function KjunDrawer({
|
|
3677
3677
|
open,
|
|
3678
3678
|
onOpenChange,
|
|
3679
3679
|
title,
|
|
@@ -3781,14 +3781,14 @@ function DsDrawer({
|
|
|
3781
3781
|
}
|
|
3782
3782
|
) }),
|
|
3783
3783
|
closable && /* @__PURE__ */ jsx23(
|
|
3784
|
-
|
|
3784
|
+
KjunButton,
|
|
3785
3785
|
{
|
|
3786
3786
|
size: "sm",
|
|
3787
3787
|
variant: "ghost",
|
|
3788
3788
|
ariaLabel: "\uB2EB\uAE30",
|
|
3789
3789
|
onPress: close,
|
|
3790
3790
|
style: { borderRadius: tokens21.extensions.drawer.closeRadius, width: tokens21.extensions.drawer.closeSize, height: tokens21.extensions.drawer.closeSize, paddingHorizontal: 0, paddingVertical: 0 },
|
|
3791
|
-
children: /* @__PURE__ */ jsx23(
|
|
3791
|
+
children: /* @__PURE__ */ jsx23(KjunIcon, { name: "x", size: tokens21.extensions.drawer.closeIconSize })
|
|
3792
3792
|
}
|
|
3793
3793
|
)
|
|
3794
3794
|
]
|
|
@@ -4115,7 +4115,7 @@ import {
|
|
|
4115
4115
|
} from "react-native";
|
|
4116
4116
|
import { tokens as tokens23 } from "@kjun-ui/tokens";
|
|
4117
4117
|
import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4118
|
-
function
|
|
4118
|
+
function KjunPopover({
|
|
4119
4119
|
noPadding = false,
|
|
4120
4120
|
open: controlled,
|
|
4121
4121
|
onOpenChange,
|
|
@@ -4165,7 +4165,7 @@ function DsPopover({
|
|
|
4165
4165
|
)
|
|
4166
4166
|
] });
|
|
4167
4167
|
}
|
|
4168
|
-
function
|
|
4168
|
+
function KjunTooltip({
|
|
4169
4169
|
content: message = "",
|
|
4170
4170
|
placement = "top",
|
|
4171
4171
|
delay = 0,
|
|
@@ -4282,9 +4282,9 @@ import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
|
4282
4282
|
var DropdownContext = createContext15(null);
|
|
4283
4283
|
var MenuIconSlotContext = createContext15(false);
|
|
4284
4284
|
function hasLeadingIcon(node) {
|
|
4285
|
-
return Children2.toArray(node).some((child) => isValidElement5(child) && (child.type === Fragment7 ? hasLeadingIcon(child.props.children) : child.type ===
|
|
4285
|
+
return Children2.toArray(node).some((child) => isValidElement5(child) && (child.type === Fragment7 ? hasLeadingIcon(child.props.children) : child.type === KjunDropdownItem && !!child.props.icon));
|
|
4286
4286
|
}
|
|
4287
|
-
function
|
|
4287
|
+
function KjunDropdown({
|
|
4288
4288
|
disabled = false,
|
|
4289
4289
|
placement = "bottom-start",
|
|
4290
4290
|
trigger,
|
|
@@ -4294,7 +4294,7 @@ function DsDropdown({
|
|
|
4294
4294
|
}) {
|
|
4295
4295
|
const [open, setOpen] = useState19(false), currentOpen = useRef19(false), ref = useRef19(null);
|
|
4296
4296
|
let control = trigger;
|
|
4297
|
-
while (isValidElement5(control) && control.type ===
|
|
4297
|
+
while (isValidElement5(control) && control.type === KjunTooltip)
|
|
4298
4298
|
control = control.props.children;
|
|
4299
4299
|
const unavailable = disabled || isValidElement5(control) && !!(control.props.disabled || control.props.loading);
|
|
4300
4300
|
const change = (v) => {
|
|
@@ -4330,7 +4330,7 @@ function DsDropdown({
|
|
|
4330
4330
|
)
|
|
4331
4331
|
] });
|
|
4332
4332
|
}
|
|
4333
|
-
function
|
|
4333
|
+
function KjunDropdownItem({
|
|
4334
4334
|
variant = "default",
|
|
4335
4335
|
icon,
|
|
4336
4336
|
disabled = false,
|
|
@@ -4368,14 +4368,14 @@ function DsDropdownItem({
|
|
|
4368
4368
|
opacity: disabled ? tokens24.states.opacity.disabled : 1
|
|
4369
4369
|
}),
|
|
4370
4370
|
children: [
|
|
4371
|
-
icon ? /* @__PURE__ */ jsx26(
|
|
4371
|
+
icon ? /* @__PURE__ */ jsx26(KjunIcon, { name: icon, size: tokens24.extensions.menu.iconSize, color: iconColor }) : reserveIcon && /* @__PURE__ */ jsx26(View21, { style: { width: tokens24.extensions.menu.iconSize }, accessible: false }),
|
|
4372
4372
|
/* @__PURE__ */ jsx26(View21, { style: { flexGrow: 1, flexShrink: 1 }, children: content(children, { color, fontSize: tokens24.extensions.menu.optionFontSize, lineHeight: tokens24.extensions.menu.optionLineHeight }) }),
|
|
4373
|
-
selected !== null && /* @__PURE__ */ jsx26(View21, { style: { opacity: selected ? 1 : 0 }, accessible: false, children: /* @__PURE__ */ jsx26(
|
|
4373
|
+
selected !== null && /* @__PURE__ */ jsx26(View21, { style: { opacity: selected ? 1 : 0 }, accessible: false, children: /* @__PURE__ */ jsx26(KjunIcon, { name: "check", size: tokens24.extensions.menu.iconSize, color: colors.brand }) })
|
|
4374
4374
|
]
|
|
4375
4375
|
}
|
|
4376
4376
|
);
|
|
4377
4377
|
}
|
|
4378
|
-
function
|
|
4378
|
+
function KjunDropdownDivider() {
|
|
4379
4379
|
const { colors } = useKjunStyles();
|
|
4380
4380
|
return /* @__PURE__ */ jsx26(
|
|
4381
4381
|
View21,
|
|
@@ -4385,7 +4385,7 @@ function DsDropdownDivider() {
|
|
|
4385
4385
|
}
|
|
4386
4386
|
);
|
|
4387
4387
|
}
|
|
4388
|
-
function
|
|
4388
|
+
function KjunMenuButton({
|
|
4389
4389
|
label,
|
|
4390
4390
|
size = "md",
|
|
4391
4391
|
variant = "secondary",
|
|
@@ -4401,7 +4401,7 @@ function DsMenuButton({
|
|
|
4401
4401
|
}) {
|
|
4402
4402
|
const [open, setOpen] = useState19(false);
|
|
4403
4403
|
return /* @__PURE__ */ jsx26(
|
|
4404
|
-
|
|
4404
|
+
KjunDropdown,
|
|
4405
4405
|
{
|
|
4406
4406
|
...props,
|
|
4407
4407
|
onOpen: () => {
|
|
@@ -4413,13 +4413,13 @@ function DsMenuButton({
|
|
|
4413
4413
|
onClose == null ? void 0 : onClose();
|
|
4414
4414
|
},
|
|
4415
4415
|
trigger: /* @__PURE__ */ jsx26(
|
|
4416
|
-
|
|
4416
|
+
KjunTooltip,
|
|
4417
4417
|
{
|
|
4418
4418
|
content: open ? "" : tooltip,
|
|
4419
4419
|
placement: tooltipPlacement,
|
|
4420
4420
|
delay: tooltipDelay,
|
|
4421
4421
|
children: /* @__PURE__ */ jsx26(
|
|
4422
|
-
|
|
4422
|
+
KjunButton,
|
|
4423
4423
|
{
|
|
4424
4424
|
size,
|
|
4425
4425
|
variant,
|
|
@@ -4579,7 +4579,7 @@ function OptionRow({
|
|
|
4579
4579
|
}),
|
|
4580
4580
|
children: [
|
|
4581
4581
|
/* @__PURE__ */ jsx27(View22, { style: { flex: 1 }, children: content(children || label, { fontSize: tokens25.extensions.menu.optionFontSize, lineHeight: tokens25.extensions.menu.optionLineHeight }) }),
|
|
4582
|
-
selected && /* @__PURE__ */ jsx27(
|
|
4582
|
+
selected && /* @__PURE__ */ jsx27(KjunIcon, { name: "check", size: tokens25.extensions.menu.iconSize, color: colors.brand })
|
|
4583
4583
|
]
|
|
4584
4584
|
}
|
|
4585
4585
|
);
|
|
@@ -4587,7 +4587,7 @@ function OptionRow({
|
|
|
4587
4587
|
|
|
4588
4588
|
// packages/native/src/combobox.tsx
|
|
4589
4589
|
import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4590
|
-
function
|
|
4590
|
+
function KjunCombobox({
|
|
4591
4591
|
value,
|
|
4592
4592
|
options = [],
|
|
4593
4593
|
placeholder = "\uAC80\uC0C9 \uB610\uB294 \uC120\uD0DD",
|
|
@@ -4695,7 +4695,7 @@ function SearchField({
|
|
|
4695
4695
|
onSubmitEditing: onEnter
|
|
4696
4696
|
};
|
|
4697
4697
|
return /* @__PURE__ */ jsxs19(Fragment8, { children: [
|
|
4698
|
-
/* @__PURE__ */ jsx28(View23, { ref, collapsable: false, children: /* @__PURE__ */ jsx28(
|
|
4698
|
+
/* @__PURE__ */ jsx28(View23, { ref, collapsable: false, children: /* @__PURE__ */ jsx28(KjunInput, { ...inputProps, ...Platform17.OS === "web" ? { onClick: openFromPress } : { onPressIn: openFromPress }, "aria-expanded": open && !disabled, onBlur: focusGuard.clear, onFocus: () => {
|
|
4699
4699
|
if (!clearing.current && focusGuard.canOpen()) onOpenChange(true);
|
|
4700
4700
|
} }) }),
|
|
4701
4701
|
/* @__PURE__ */ jsx28(
|
|
@@ -4717,12 +4717,12 @@ function SearchField({
|
|
|
4717
4717
|
borderBottomWidth: tokens26.border.defaultWidth,
|
|
4718
4718
|
borderBottomColor: colors.border
|
|
4719
4719
|
},
|
|
4720
|
-
children: /* @__PURE__ */ jsx28(
|
|
4720
|
+
children: /* @__PURE__ */ jsx28(KjunInput, { ...inputProps, nativeID: searchId, autoFocus: true })
|
|
4721
4721
|
}
|
|
4722
4722
|
),
|
|
4723
4723
|
loading ? (
|
|
4724
4724
|
// Centered like the Select loading row on every platform.
|
|
4725
|
-
/* @__PURE__ */ jsx28(View23, { style: { padding: tokens26.dimension.value12, alignItems: "center" }, children: /* @__PURE__ */ jsx28(
|
|
4725
|
+
/* @__PURE__ */ jsx28(View23, { style: { padding: tokens26.dimension.value12, alignItems: "center" }, children: /* @__PURE__ */ jsx28(KjunSpinner, { size: "sm", text: "\uAC80\uC0C9 \uC911..." }) })
|
|
4726
4726
|
) : failed ? /* @__PURE__ */ jsx28(
|
|
4727
4727
|
KText,
|
|
4728
4728
|
{
|
|
@@ -4773,7 +4773,7 @@ function displayMonth(value) {
|
|
|
4773
4773
|
const date = /* @__PURE__ */ new Date(value + "T12:00:00");
|
|
4774
4774
|
return Number.isNaN(date.getTime()) ? /* @__PURE__ */ new Date() : date;
|
|
4775
4775
|
}
|
|
4776
|
-
function
|
|
4776
|
+
function KjunDatePicker({
|
|
4777
4777
|
value,
|
|
4778
4778
|
min,
|
|
4779
4779
|
max,
|
|
@@ -4838,7 +4838,7 @@ function DsDatePicker({
|
|
|
4838
4838
|
}
|
|
4839
4839
|
),
|
|
4840
4840
|
/* @__PURE__ */ jsx29(
|
|
4841
|
-
|
|
4841
|
+
KjunIcon,
|
|
4842
4842
|
{
|
|
4843
4843
|
name: "calendar",
|
|
4844
4844
|
size: spec.iconSize,
|
|
@@ -4869,7 +4869,7 @@ function DsDatePicker({
|
|
|
4869
4869
|
},
|
|
4870
4870
|
children: [
|
|
4871
4871
|
/* @__PURE__ */ jsx29(
|
|
4872
|
-
|
|
4872
|
+
KjunButton,
|
|
4873
4873
|
{
|
|
4874
4874
|
size: "sm",
|
|
4875
4875
|
variant: "ghost",
|
|
@@ -4885,7 +4885,7 @@ function DsDatePicker({
|
|
|
4885
4885
|
"\uC6D4"
|
|
4886
4886
|
] }),
|
|
4887
4887
|
/* @__PURE__ */ jsx29(
|
|
4888
|
-
|
|
4888
|
+
KjunButton,
|
|
4889
4889
|
{
|
|
4890
4890
|
size: "sm",
|
|
4891
4891
|
variant: "ghost",
|
|
@@ -5050,7 +5050,7 @@ function useSearchInputModel({
|
|
|
5050
5050
|
|
|
5051
5051
|
// packages/native/src/search-input.tsx
|
|
5052
5052
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
5053
|
-
function
|
|
5053
|
+
function KjunSearchInput({
|
|
5054
5054
|
value,
|
|
5055
5055
|
placeholder = "\uAC80\uC0C9...",
|
|
5056
5056
|
ariaLabel,
|
|
@@ -5085,7 +5085,7 @@ function DsSearchInput({
|
|
|
5085
5085
|
};
|
|
5086
5086
|
if (!loadOptions)
|
|
5087
5087
|
return /* @__PURE__ */ jsx30(
|
|
5088
|
-
|
|
5088
|
+
KjunInput,
|
|
5089
5089
|
{
|
|
5090
5090
|
error,
|
|
5091
5091
|
value: query,
|
|
@@ -5184,7 +5184,7 @@ function useSelectState(controlled, disabled, pageSize, onOpenChange) {
|
|
|
5184
5184
|
// packages/native/src/select-control.tsx
|
|
5185
5185
|
import { Platform as Platform19, View as View26 } from "react-native";
|
|
5186
5186
|
import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5187
|
-
function
|
|
5187
|
+
function KjunSelect({
|
|
5188
5188
|
value,
|
|
5189
5189
|
options = [],
|
|
5190
5190
|
placeholder = "\uC120\uD0DD",
|
|
@@ -5295,7 +5295,7 @@ function DsSelect({
|
|
|
5295
5295
|
}, children: label || placeholder })
|
|
5296
5296
|
] }),
|
|
5297
5297
|
/* @__PURE__ */ jsx32(View26, { style: { transform: [{ rotate: expanded ? "180deg" : "0deg" }] }, children: /* @__PURE__ */ jsx32(
|
|
5298
|
-
|
|
5298
|
+
KjunIcon,
|
|
5299
5299
|
{
|
|
5300
5300
|
name: "chevron-down",
|
|
5301
5301
|
size: compound ? tokens29.extensions.timePicker.iconSize : spec.iconSize,
|
|
@@ -5347,7 +5347,7 @@ function DsSelect({
|
|
|
5347
5347
|
borderBottomColor: colors.border
|
|
5348
5348
|
},
|
|
5349
5349
|
children: /* @__PURE__ */ jsx32(
|
|
5350
|
-
|
|
5350
|
+
KjunInput,
|
|
5351
5351
|
{
|
|
5352
5352
|
autoFocus: true,
|
|
5353
5353
|
value: query,
|
|
@@ -5363,7 +5363,7 @@ function DsSelect({
|
|
|
5363
5363
|
)
|
|
5364
5364
|
}
|
|
5365
5365
|
),
|
|
5366
|
-
loading ? /* @__PURE__ */ jsx32(View26, { style: { padding: tokens29.dimension.value12 }, children: /* @__PURE__ */ jsx32(
|
|
5366
|
+
loading ? /* @__PURE__ */ jsx32(View26, { style: { padding: tokens29.dimension.value12 }, children: /* @__PURE__ */ jsx32(KjunSpinner, { size: "sm", text: "\uAC80\uC0C9 \uC911..." }) }) : visible.map(({ option: o, key }, index) => /* @__PURE__ */ jsx32(
|
|
5367
5367
|
OptionRow,
|
|
5368
5368
|
{
|
|
5369
5369
|
selected: selected(o),
|
|
@@ -5393,7 +5393,7 @@ function DsSelect({
|
|
|
5393
5393
|
}
|
|
5394
5394
|
),
|
|
5395
5395
|
!loading && visible.length < matching.length && /* @__PURE__ */ jsx32(
|
|
5396
|
-
|
|
5396
|
+
KjunButton,
|
|
5397
5397
|
{
|
|
5398
5398
|
size: "sm",
|
|
5399
5399
|
variant: "ghost",
|
|
@@ -5619,7 +5619,7 @@ function usePanelFocus(root) {
|
|
|
5619
5619
|
// packages/native/src/tabs.tsx
|
|
5620
5620
|
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5621
5621
|
var TabContext = createContext17({ value: "", id: "", names: [] });
|
|
5622
|
-
function
|
|
5622
|
+
function KjunTabs({
|
|
5623
5623
|
value,
|
|
5624
5624
|
items = [],
|
|
5625
5625
|
density = "comfortable",
|
|
@@ -5635,15 +5635,15 @@ function DsTabs({
|
|
|
5635
5635
|
const { colors } = useKjunStyles(), panes = Children3.toArray(children).filter(
|
|
5636
5636
|
isValidElement6
|
|
5637
5637
|
);
|
|
5638
|
-
const tabs = items.length ? items : panes.filter((child) => child.type ===
|
|
5639
|
-
const id = useId6(), root = useRef28(null);
|
|
5638
|
+
const tabs = items.length ? items : panes.filter((child) => child.type === KjunTabPane).map((child) => child.props);
|
|
5639
|
+
const id = "kjun-" + useId6(), root = useRef28(null);
|
|
5640
5640
|
const menuState = useRef28({ tabs, onTabMenu });
|
|
5641
5641
|
menuState.current = { tabs, onTabMenu };
|
|
5642
5642
|
const pressedMenu = useRef28(null);
|
|
5643
5643
|
useLayoutEffect15(() => {
|
|
5644
5644
|
if (!onTabMenu || !tabs.some((tab) => tab.name === pressedMenu.current && !tab.disabled)) pressedMenu.current = null;
|
|
5645
5645
|
}, [tabs, onTabMenu]);
|
|
5646
|
-
const panelNames = panes.filter((child) => child.type ===
|
|
5646
|
+
const panelNames = panes.filter((child) => child.type === KjunTabPane).map((child) => child.props.name);
|
|
5647
5647
|
const geometry2 = tokens31.extensions.tabs;
|
|
5648
5648
|
const underline = variant === "underline";
|
|
5649
5649
|
const [hoveredTab, setHoveredTab] = useState27(null);
|
|
@@ -5774,7 +5774,7 @@ function DsTabs({
|
|
|
5774
5774
|
},
|
|
5775
5775
|
children: [
|
|
5776
5776
|
tab.icon && /* @__PURE__ */ jsx34(
|
|
5777
|
-
|
|
5777
|
+
KjunIcon,
|
|
5778
5778
|
{
|
|
5779
5779
|
name: tab.icon,
|
|
5780
5780
|
size: geometry2.iconSize,
|
|
@@ -5825,7 +5825,7 @@ function DsTabs({
|
|
|
5825
5825
|
children && /* @__PURE__ */ jsx34(View28, { style: { marginTop: geometry2.contentGap }, children })
|
|
5826
5826
|
] }) });
|
|
5827
5827
|
}
|
|
5828
|
-
function
|
|
5828
|
+
function KjunTabPane({ name, children }) {
|
|
5829
5829
|
const { value, id, names } = useContext13(TabContext);
|
|
5830
5830
|
const root = useRef28(null);
|
|
5831
5831
|
usePanelFocus(root);
|
|
@@ -5851,7 +5851,7 @@ function DsTabPane({ name, children }) {
|
|
|
5851
5851
|
// packages/native/src/navigation.tsx
|
|
5852
5852
|
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5853
5853
|
var AccordionContext = createContext18(null);
|
|
5854
|
-
function
|
|
5854
|
+
function KjunAccordion({
|
|
5855
5855
|
multiple = false,
|
|
5856
5856
|
tone = "card",
|
|
5857
5857
|
children
|
|
@@ -5875,14 +5875,14 @@ function DsAccordion({
|
|
|
5875
5875
|
}
|
|
5876
5876
|
);
|
|
5877
5877
|
}
|
|
5878
|
-
function
|
|
5878
|
+
function KjunAccordionItem({
|
|
5879
5879
|
title = "",
|
|
5880
5880
|
defaultOpen = false,
|
|
5881
5881
|
disabled = false,
|
|
5882
5882
|
header,
|
|
5883
5883
|
children
|
|
5884
5884
|
}) {
|
|
5885
|
-
const { colors } = useKjunStyles(), group = useContext14(AccordionContext), id = useId7(), [own, setOwn] = useState28(defaultOpen), open = group ? group.opened.has(id) : own;
|
|
5885
|
+
const { colors } = useKjunStyles(), group = useContext14(AccordionContext), id = "kjun-" + useId7(), [own, setOwn] = useState28(defaultOpen), open = group ? group.opened.has(id) : own;
|
|
5886
5886
|
const rotation = useMotionValue(open ? 1 : 0, tokens32.motion.collapse, void 0, void 0, true);
|
|
5887
5887
|
const geometry2 = tokens32.extensions.accordion;
|
|
5888
5888
|
const [hovered, setHovered] = useState28(false);
|
|
@@ -5917,7 +5917,7 @@ function DsAccordionItem({
|
|
|
5917
5917
|
}),
|
|
5918
5918
|
children: [
|
|
5919
5919
|
/* @__PURE__ */ jsx35(View29, { style: { flex: 1, minWidth: 0 }, children: content(header || title, { ...typeStyle("control"), ...wrapping }) }),
|
|
5920
|
-
/* @__PURE__ */ jsx35(Animated16.View, { style: { flexShrink: 0, transform: [{ rotate: rotation.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] }) }] }, children: /* @__PURE__ */ jsx35(
|
|
5920
|
+
/* @__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 }) })
|
|
5921
5921
|
]
|
|
5922
5922
|
}
|
|
5923
5923
|
),
|
|
@@ -5931,7 +5931,7 @@ function DsAccordionItem({
|
|
|
5931
5931
|
) })
|
|
5932
5932
|
] });
|
|
5933
5933
|
}
|
|
5934
|
-
function
|
|
5934
|
+
function KjunBreadcrumb({
|
|
5935
5935
|
items,
|
|
5936
5936
|
renderLink,
|
|
5937
5937
|
onNavigate,
|
|
@@ -5950,7 +5950,7 @@ function DsBreadcrumb({
|
|
|
5950
5950
|
},
|
|
5951
5951
|
children: items.map((item, i) => {
|
|
5952
5952
|
const label = /* @__PURE__ */ jsxs23(View29, { style: { flexDirection: "row", alignItems: "center", gap: tokens32.dimension.value4 }, children: [
|
|
5953
|
-
item.icon && /* @__PURE__ */ jsx35(
|
|
5953
|
+
item.icon && /* @__PURE__ */ jsx35(KjunIcon, { name: item.icon, size: tokens32.extensions.breadcrumb.iconSize, color: colors.textSecondary }),
|
|
5954
5954
|
/* @__PURE__ */ jsx35(
|
|
5955
5955
|
KText,
|
|
5956
5956
|
{
|
|
@@ -5964,7 +5964,7 @@ function DsBreadcrumb({
|
|
|
5964
5964
|
] });
|
|
5965
5965
|
return /* @__PURE__ */ jsxs23(Fragment11, { children: [
|
|
5966
5966
|
i > 0 && /* @__PURE__ */ jsx35(
|
|
5967
|
-
|
|
5967
|
+
KjunIcon,
|
|
5968
5968
|
{
|
|
5969
5969
|
name: "chevron-right",
|
|
5970
5970
|
size: tokens32.extensions.breadcrumb.separatorSize,
|
|
@@ -5986,7 +5986,7 @@ function DsBreadcrumb({
|
|
|
5986
5986
|
}
|
|
5987
5987
|
);
|
|
5988
5988
|
}
|
|
5989
|
-
function
|
|
5989
|
+
function KjunPagination({
|
|
5990
5990
|
currentPage,
|
|
5991
5991
|
page,
|
|
5992
5992
|
totalPages,
|
|
@@ -6028,7 +6028,7 @@ function DsPagination({
|
|
|
6028
6028
|
};
|
|
6029
6029
|
const arrowSize = (_b = Object.keys(tokens32.button.iconSizes).find((size) => tokens32.button.iconSizes[size] === tokens32.extensions.pagination.iconSize)) != null ? _b : "sm";
|
|
6030
6030
|
const button = (target, label, icon) => /* @__PURE__ */ jsx35(
|
|
6031
|
-
|
|
6031
|
+
KjunButton,
|
|
6032
6032
|
{
|
|
6033
6033
|
style: pageButtonStyle,
|
|
6034
6034
|
size: arrowSize,
|
|
@@ -6073,7 +6073,7 @@ function DsPagination({
|
|
|
6073
6073
|
},
|
|
6074
6074
|
children: [
|
|
6075
6075
|
showSizeSelector && /* @__PURE__ */ jsx35(View29, { style: { minWidth: tokens32.extensions.pagination.selectorMinimumWidth }, children: /* @__PURE__ */ jsx35(
|
|
6076
|
-
|
|
6076
|
+
KjunSelect,
|
|
6077
6077
|
{
|
|
6078
6078
|
size: "sm",
|
|
6079
6079
|
ariaLabel: "\uD398\uC774\uC9C0\uB2F9 \uD56D\uBAA9 \uC218",
|
|
@@ -6098,7 +6098,7 @@ function DsPagination({
|
|
|
6098
6098
|
totalPages
|
|
6099
6099
|
] }) : pages.map(
|
|
6100
6100
|
(n, i) => typeof n === "string" ? /* @__PURE__ */ jsx35(KText, { children: "..." }, "dots" + i) : /* @__PURE__ */ jsx35(
|
|
6101
|
-
|
|
6101
|
+
KjunButton,
|
|
6102
6102
|
{
|
|
6103
6103
|
style: pageButtonStyle,
|
|
6104
6104
|
size: "sm",
|
|
@@ -6126,7 +6126,7 @@ import { tokens as tokens33 } from "@kjun-ui/tokens";
|
|
|
6126
6126
|
import { useContext as useContext15, useEffect as useEffect20, useRef as useRef29, useState as useState29 } from "react";
|
|
6127
6127
|
import { Platform as Platform22, ScrollView as ScrollView7, View as View30 } from "react-native";
|
|
6128
6128
|
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6129
|
-
function
|
|
6129
|
+
function KjunIconToggle({
|
|
6130
6130
|
active = false,
|
|
6131
6131
|
activeIcon,
|
|
6132
6132
|
inactiveIcon,
|
|
@@ -6144,7 +6144,7 @@ function DsIconToggle({
|
|
|
6144
6144
|
const { colors } = useKjunStyles();
|
|
6145
6145
|
const navigation = useContext15(TopNavigationContext);
|
|
6146
6146
|
const box = navigation ? navigation.controlSize : size === "xs" ? tokens33.extensions.iconToggle.compactSize : tokens33.extensions.iconToggle.sizes[size];
|
|
6147
|
-
return /* @__PURE__ */ jsx36(
|
|
6147
|
+
return /* @__PURE__ */ jsx36(KjunTooltip, { content: disabled || loading ? "" : tooltip != null ? tooltip : ariaLabel, placement: tooltipPlacement, delay: tooltipDelay, children: /* @__PURE__ */ jsx36(
|
|
6148
6148
|
AccessiblePressable,
|
|
6149
6149
|
{
|
|
6150
6150
|
accessibilityRole: "button",
|
|
@@ -6181,8 +6181,8 @@ function DsIconToggle({
|
|
|
6181
6181
|
}),
|
|
6182
6182
|
children: ({ pressed, hovered }) => {
|
|
6183
6183
|
var _a;
|
|
6184
|
-
return /* @__PURE__ */ jsx36(View30, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", borderRadius: tokens33.extensions.iconToggle.radii[size], backgroundColor: !disabled && !loading && (pressed || hovered) ? colors.hover : "transparent" }, children: loading ? navigation ? /* @__PURE__ */ jsx36(
|
|
6185
|
-
|
|
6184
|
+
return /* @__PURE__ */ jsx36(View30, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", borderRadius: tokens33.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(
|
|
6185
|
+
KjunIcon,
|
|
6186
6186
|
{
|
|
6187
6187
|
name: active ? activeIcon : inactiveIcon || activeIcon,
|
|
6188
6188
|
filled: active,
|
|
@@ -6194,7 +6194,7 @@ function DsIconToggle({
|
|
|
6194
6194
|
}
|
|
6195
6195
|
) });
|
|
6196
6196
|
}
|
|
6197
|
-
function
|
|
6197
|
+
function KjunCopyButton({
|
|
6198
6198
|
value,
|
|
6199
6199
|
ariaLabel,
|
|
6200
6200
|
text,
|
|
@@ -6259,7 +6259,7 @@ function DsCopyButton({
|
|
|
6259
6259
|
}),
|
|
6260
6260
|
children: [
|
|
6261
6261
|
/* @__PURE__ */ jsx36(
|
|
6262
|
-
|
|
6262
|
+
KjunIcon,
|
|
6263
6263
|
{
|
|
6264
6264
|
name: copied ? "check" : "copy",
|
|
6265
6265
|
size: tokens33.button.iconSizes[size],
|
|
@@ -6280,7 +6280,7 @@ function DsCopyButton({
|
|
|
6280
6280
|
}
|
|
6281
6281
|
) });
|
|
6282
6282
|
}
|
|
6283
|
-
function
|
|
6283
|
+
function KjunRefreshButton({
|
|
6284
6284
|
targetName = "",
|
|
6285
6285
|
mode = "icon",
|
|
6286
6286
|
text = "\uC0C8\uB85C\uACE0\uCE68",
|
|
@@ -6297,8 +6297,8 @@ function DsRefreshButton({
|
|
|
6297
6297
|
const reduced = useReducedMotion();
|
|
6298
6298
|
const label = ariaLabel || [targetName, "\uC0C8\uB85C\uACE0\uCE68"].filter(Boolean).join(" ");
|
|
6299
6299
|
const hint = tooltip != null ? tooltip : mode === "icon" ? label : "";
|
|
6300
|
-
const button = /* @__PURE__ */ jsx36(
|
|
6301
|
-
|
|
6300
|
+
const button = /* @__PURE__ */ jsx36(KjunTooltip, { content: props.disabled || props.loading ? "" : hint, placement: tooltipPlacement, delay: tooltipDelay, children: /* @__PURE__ */ jsx36(
|
|
6301
|
+
KjunButton,
|
|
6302
6302
|
{
|
|
6303
6303
|
...props,
|
|
6304
6304
|
size,
|
|
@@ -6320,14 +6320,14 @@ function safeExternalUrl(href) {
|
|
|
6320
6320
|
return "";
|
|
6321
6321
|
}
|
|
6322
6322
|
}
|
|
6323
|
-
function
|
|
6323
|
+
function KjunExternalLink({
|
|
6324
6324
|
href = "",
|
|
6325
6325
|
mode = "text",
|
|
6326
6326
|
label,
|
|
6327
6327
|
children,
|
|
6328
6328
|
openUrl
|
|
6329
6329
|
}) {
|
|
6330
|
-
const { colors } = useKjunStyles(), url = safeExternalUrl(href), name = label || (mode === "icon" ? "\uC678\uBD80 \uB9C1\uD06C" : void 0), body = mode === "icon" ? /* @__PURE__ */ jsx36(
|
|
6330
|
+
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);
|
|
6331
6331
|
return url ? /* @__PURE__ */ jsx36(
|
|
6332
6332
|
AccessiblePressable,
|
|
6333
6333
|
{
|
|
@@ -6339,13 +6339,13 @@ function DsExternalLink({
|
|
|
6339
6339
|
// Like Web, text links show the new-window cue after the text.
|
|
6340
6340
|
/* @__PURE__ */ jsxs24(View30, { style: { flexDirection: "row", alignItems: "center", gap: tokens33.dimension.value4 }, children: [
|
|
6341
6341
|
body,
|
|
6342
|
-
/* @__PURE__ */ jsx36(
|
|
6342
|
+
/* @__PURE__ */ jsx36(KjunIcon, { name: "external-link", size: tokens33.iconSizes.small, color: colors.text })
|
|
6343
6343
|
] })
|
|
6344
6344
|
) : body
|
|
6345
6345
|
}
|
|
6346
6346
|
) : /* @__PURE__ */ jsx36(View30, { children: body });
|
|
6347
6347
|
}
|
|
6348
|
-
function
|
|
6348
|
+
function KjunScrollFade({ children }) {
|
|
6349
6349
|
return /* @__PURE__ */ jsx36(
|
|
6350
6350
|
ScrollView7,
|
|
6351
6351
|
{
|
|
@@ -6377,7 +6377,7 @@ function useQueryDisplay(props) {
|
|
|
6377
6377
|
}
|
|
6378
6378
|
return queryDisplayStatus(next, props);
|
|
6379
6379
|
}
|
|
6380
|
-
function
|
|
6380
|
+
function KjunDataState({
|
|
6381
6381
|
preserveContent = false,
|
|
6382
6382
|
refreshing = false,
|
|
6383
6383
|
refreshError,
|
|
@@ -6426,7 +6426,7 @@ function DsDataState({
|
|
|
6426
6426
|
backgroundColor: colors.surface
|
|
6427
6427
|
},
|
|
6428
6428
|
children: [
|
|
6429
|
-
/* @__PURE__ */ jsx37(
|
|
6429
|
+
/* @__PURE__ */ jsx37(KjunSpinner, { size: "xs" }),
|
|
6430
6430
|
/* @__PURE__ */ jsx37(KText, { style: { ...typeStyle("caption"), color: colors.textTertiary, flexShrink: 1, minWidth: 0 }, children: refreshingText })
|
|
6431
6431
|
]
|
|
6432
6432
|
}
|
|
@@ -6436,12 +6436,12 @@ function DsDataState({
|
|
|
6436
6436
|
{
|
|
6437
6437
|
accessibilityLabel: loadingText,
|
|
6438
6438
|
style: { paddingVertical: loadingPadding === "none" ? 0 : padding },
|
|
6439
|
-
children: loadingContent || (skeleton ? /* @__PURE__ */ jsx37(View31, { style: { gap: tokens34.dimension.value12 }, children: Array.from({ length: skeletonCount }, (_, i) => /* @__PURE__ */ jsx37(
|
|
6440
|
-
/* @__PURE__ */ jsx37(
|
|
6439
|
+
children: loadingContent || (skeleton ? /* @__PURE__ */ jsx37(View31, { style: { gap: tokens34.dimension.value12 }, children: Array.from({ length: skeletonCount }, (_, i) => /* @__PURE__ */ jsx37(KjunSkeleton, { type: skeletonType }, i)) }) : /* @__PURE__ */ jsxs25(View31, { style: { alignItems: "center", gap: tokens34.dimension.value12 }, children: [
|
|
6440
|
+
/* @__PURE__ */ jsx37(KjunSpinner, { size: "md" }),
|
|
6441
6441
|
/* @__PURE__ */ jsx37(KText, { style: { ...typeStyle("body"), color: colors.textSecondary, textAlign: "center", maxWidth: "100%" }, children: loadingText })
|
|
6442
6442
|
] }))
|
|
6443
6443
|
}
|
|
6444
|
-
) : blockingError ? /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ jsx37(View31, { style: { paddingVertical: padding }, children: errorContent || /* @__PURE__ */ jsx37(
|
|
6444
|
+
) : blockingError ? /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ jsx37(View31, { 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(View31, { style: { paddingVertical: padding }, children: emptyContent || /* @__PURE__ */ jsx37(KjunEmpty, { text: emptyText, icon: emptyIcon, children: emptyActionText && /* @__PURE__ */ jsx37(KjunButton, { onPress: onEmptyAction, children: emptyActionText }) }) }) }) : null,
|
|
6445
6445
|
(!concealed || preserveContent && state.hasQueryResult) && /* @__PURE__ */ jsx37(
|
|
6446
6446
|
View31,
|
|
6447
6447
|
{
|
|
@@ -6460,7 +6460,7 @@ function DsDataState({
|
|
|
6460
6460
|
},
|
|
6461
6461
|
"content"
|
|
6462
6462
|
),
|
|
6463
|
-
visibleRefreshError && !state.initialLoading && /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ jsx37(View31, { style: { marginTop: tokens34.dimension.value12 }, children: /* @__PURE__ */ jsx37(
|
|
6463
|
+
visibleRefreshError && !state.initialLoading && /* @__PURE__ */ jsx37(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ jsx37(View31, { style: { marginTop: tokens34.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.` }) }) })
|
|
6464
6464
|
]
|
|
6465
6465
|
}
|
|
6466
6466
|
);
|
|
@@ -6469,7 +6469,7 @@ function BoundaryDescription() {
|
|
|
6469
6469
|
const { colors } = useKjunStyles();
|
|
6470
6470
|
return /* @__PURE__ */ jsx37(KText, { style: { ...typeStyle({ ...tokens34.typography.caption, fontSizePx: tokens34.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." });
|
|
6471
6471
|
}
|
|
6472
|
-
var
|
|
6472
|
+
var KjunErrorBoundary = class extends Component {
|
|
6473
6473
|
constructor() {
|
|
6474
6474
|
super(...arguments);
|
|
6475
6475
|
this.state = { error: false };
|
|
@@ -6497,7 +6497,7 @@ var DsErrorBoundary = class extends Component {
|
|
|
6497
6497
|
/* @__PURE__ */ jsx37(BoundaryDescription, {})
|
|
6498
6498
|
] }),
|
|
6499
6499
|
/* @__PURE__ */ jsx37(
|
|
6500
|
-
|
|
6500
|
+
KjunButton,
|
|
6501
6501
|
{
|
|
6502
6502
|
style: { alignSelf: "center" },
|
|
6503
6503
|
onPress: () => {
|
|
@@ -6556,28 +6556,28 @@ var marketRowStyle = { minHeight: marketGeometry.rowHeight, flexDirection: "row"
|
|
|
6556
6556
|
|
|
6557
6557
|
// packages/native/src/market-skeleton.tsx
|
|
6558
6558
|
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6559
|
-
function
|
|
6559
|
+
function KjunMarketTableSkeleton({ columns = [], rows = 8, showActions = false }) {
|
|
6560
6560
|
const { colors } = useKjunStyles();
|
|
6561
6561
|
const cols = normalizeMarketColumns(columns), layout = useMarketLayout(cols, showActions);
|
|
6562
6562
|
const actions = { width: marketGeometry.actionsWidth, paddingVertical: tokens37.dimension.value12, paddingHorizontal: tokens37.dimension.value4, justifyContent: "center", alignItems: "center" };
|
|
6563
6563
|
return /* @__PURE__ */ jsx38(ScrollView8, { horizontal: true, onLayout: layout.onLayout, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: /* @__PURE__ */ jsxs26(View32, { style: { width: layout.width }, children: [
|
|
6564
6564
|
/* @__PURE__ */ jsxs26(View32, { style: { ...marketHeaderStyle, borderBottomColor: colors.border }, children: [
|
|
6565
|
-
showActions && /* @__PURE__ */ jsx38(View32, { style: actions, children: /* @__PURE__ */ jsx38(
|
|
6565
|
+
showActions && /* @__PURE__ */ jsx38(View32, { style: actions, children: /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: tokens37.extensions.marketTable.actionSkeletonWidth, height: tokens37.extensions.marketTable.headerSkeletonHeight }) }),
|
|
6566
6566
|
cols.map((col, i) => /* @__PURE__ */ jsx38(View32, { style: { width: layout.widths[i], padding: tokens37.dimension.value12, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(KText, { style: { ...typeStyle("meta"), color: colors.textTertiary, textAlign: col.align }, children: col.label }) }, col.key || i))
|
|
6567
6567
|
] }),
|
|
6568
6568
|
Array.from({ length: Math.max(0, rows) }, (_, row) => /* @__PURE__ */ jsxs26(View32, { style: { ...marketRowStyle, borderBottomColor: colors.border }, children: [
|
|
6569
|
-
showActions && /* @__PURE__ */ jsx38(View32, { style: actions, children: /* @__PURE__ */ jsx38(
|
|
6569
|
+
showActions && /* @__PURE__ */ jsx38(View32, { style: actions, children: /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: tokens37.extensions.marketTable.actionSkeletonWidth, height: tokens37.extensions.financial.priceSkeletonHeight }) }),
|
|
6570
6570
|
cols.map((col, i) => /* @__PURE__ */ jsx38(View32, { style: { width: layout.widths[i], paddingVertical: tokens37.dimension.value14, paddingHorizontal: tokens37.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__ */ jsxs26(View32, { style: { gap: tokens37.dimension.value2 }, children: [
|
|
6571
|
-
/* @__PURE__ */ jsx38(View32, { style: { height: tokens37.typography.body.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(
|
|
6572
|
-
/* @__PURE__ */ jsx38(View32, { style: { height: tokens37.typography.caption.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(
|
|
6573
|
-
] }) : /* @__PURE__ */ jsx38(
|
|
6571
|
+
/* @__PURE__ */ jsx38(View32, { style: { height: tokens37.typography.body.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: "80%", height: tokens37.extensions.skeleton.lineHeights.md }) }),
|
|
6572
|
+
/* @__PURE__ */ jsx38(View32, { style: { height: tokens37.typography.caption.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: "60%", height: tokens37.extensions.skeleton.lineHeights.sm }) })
|
|
6573
|
+
] }) : /* @__PURE__ */ jsx38(KjunSkeleton, { type: "block", width: tokens37.extensions.financial.priceSkeletonWidth, height: tokens37.extensions.financial.priceSkeletonHeight }) }, col.key || i))
|
|
6574
6574
|
] }, row))
|
|
6575
6575
|
] }) });
|
|
6576
6576
|
}
|
|
6577
6577
|
|
|
6578
6578
|
// packages/native/src/skeletons.tsx
|
|
6579
6579
|
import { jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6580
|
-
function
|
|
6580
|
+
function KjunListSkeleton({
|
|
6581
6581
|
rows = 8,
|
|
6582
6582
|
variant = "market",
|
|
6583
6583
|
avatar = true,
|
|
@@ -6607,21 +6607,21 @@ function DsListSkeleton({
|
|
|
6607
6607
|
borderBottomColor: colors.border
|
|
6608
6608
|
},
|
|
6609
6609
|
children: [
|
|
6610
|
-
avatar && /* @__PURE__ */ jsx39(
|
|
6610
|
+
avatar && /* @__PURE__ */ jsx39(KjunSkeleton, { type: "avatar", width: avatarSize, height: avatarSize }),
|
|
6611
6611
|
/* @__PURE__ */ jsxs27(View33, { style: { flex: 1, minWidth: 0, gap: market ? tokens38.dimension.value2 : tokens38.extensions.skeleton.detailGap }, children: [
|
|
6612
6612
|
slot(0, /* @__PURE__ */ jsx39(
|
|
6613
|
-
|
|
6613
|
+
KjunSkeleton,
|
|
6614
6614
|
{
|
|
6615
6615
|
type: "block",
|
|
6616
6616
|
height: tokens38.extensions.skeleton.lineHeights.md,
|
|
6617
6617
|
width: i % 2 ? "80%" : "65%"
|
|
6618
6618
|
}
|
|
6619
6619
|
)),
|
|
6620
|
-
slot(1, /* @__PURE__ */ jsx39(
|
|
6620
|
+
slot(1, /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", height: tokens38.extensions.skeleton.lineHeights.sm, width: "50%" }))
|
|
6621
6621
|
] }),
|
|
6622
6622
|
quote && /* @__PURE__ */ jsxs27(View33, { style: { alignItems: "flex-end", gap: market ? tokens38.dimension.value2 : tokens38.extensions.skeleton.detailGap }, children: [
|
|
6623
|
-
slot(0, /* @__PURE__ */ jsx39(
|
|
6624
|
-
slot(1, /* @__PURE__ */ jsx39(
|
|
6623
|
+
slot(0, /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", height: tokens38.extensions.skeleton.quoteHeight, width: tokens38.extensions.skeleton.quoteWidth })),
|
|
6624
|
+
slot(1, /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", height: tokens38.extensions.skeleton.lineHeights.sm, width: tokens38.extensions.skeleton.detailWidth }))
|
|
6625
6625
|
] })
|
|
6626
6626
|
]
|
|
6627
6627
|
},
|
|
@@ -6630,7 +6630,7 @@ function DsListSkeleton({
|
|
|
6630
6630
|
}
|
|
6631
6631
|
);
|
|
6632
6632
|
}
|
|
6633
|
-
function
|
|
6633
|
+
function KjunFormSkeleton({
|
|
6634
6634
|
fields = ["", "", "", ""],
|
|
6635
6635
|
columns = 1,
|
|
6636
6636
|
multiline = false,
|
|
@@ -6661,10 +6661,10 @@ function DsFormSkeleton({
|
|
|
6661
6661
|
children: [
|
|
6662
6662
|
field ? /* @__PURE__ */ jsx39(KText, { style: { color: colors.text, ...typeStyle("label") }, children: typeof field === "string" ? field : field.label }) : (
|
|
6663
6663
|
// The bar sits in a label-line slot so the field starts where the real input will.
|
|
6664
|
-
/* @__PURE__ */ jsx39(View33, { style: { height: typeStyle("label").lineHeight, justifyContent: "center" }, children: /* @__PURE__ */ jsx39(
|
|
6664
|
+
/* @__PURE__ */ jsx39(View33, { style: { height: typeStyle("label").lineHeight, justifyContent: "center" }, children: /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", height: tokens38.extensions.skeleton.formLabelHeight, width: tokens38.extensions.skeleton.formLabelWidth }) })
|
|
6665
6665
|
),
|
|
6666
6666
|
/* @__PURE__ */ jsx39(View33, { style: { borderRadius: tokens38.input[size].radius, overflow: "hidden" }, children: /* @__PURE__ */ jsx39(
|
|
6667
|
-
|
|
6667
|
+
KjunSkeleton,
|
|
6668
6668
|
{
|
|
6669
6669
|
type: "block",
|
|
6670
6670
|
height: typeof field === "object" && field.height != null ? field.height : multiline ? tokens38.input[size].lineHeight * 3 + tokens38.input[size].textareaPaddingY * 2 + 2 * tokens38.border.controlWidth : tokens38.input[size].height
|
|
@@ -6677,7 +6677,7 @@ function DsFormSkeleton({
|
|
|
6677
6677
|
}
|
|
6678
6678
|
);
|
|
6679
6679
|
}
|
|
6680
|
-
function
|
|
6680
|
+
function KjunChartSkeleton({
|
|
6681
6681
|
loadingText = "\uCC28\uD2B8\uB97C \uBD88\uB7EC\uC624\uB294 \uC911",
|
|
6682
6682
|
kind = "line",
|
|
6683
6683
|
height = tokens38.extensions.chartSkeleton.height
|
|
@@ -6731,7 +6731,7 @@ function DsChartSkeleton({
|
|
|
6731
6731
|
alignItems: "center",
|
|
6732
6732
|
justifyContent: "center"
|
|
6733
6733
|
},
|
|
6734
|
-
children: /* @__PURE__ */ jsx39(
|
|
6734
|
+
children: /* @__PURE__ */ jsx39(KjunSkeleton, { type: "block", width: tokens38.extensions.chartSkeleton.donutLabelWidth, height: tokens38.extensions.chartSkeleton.donutLabelHeight })
|
|
6735
6735
|
}
|
|
6736
6736
|
) : /* @__PURE__ */ jsxs27(
|
|
6737
6737
|
Svg5,
|
|
@@ -6913,7 +6913,7 @@ function useCountUp(value, animated, fromPrevious) {
|
|
|
6913
6913
|
return useNumberMotion(value, animated, fromPrevious, useReducedMotion());
|
|
6914
6914
|
}
|
|
6915
6915
|
var MarketQuoteTypeContext = createContext19(null);
|
|
6916
|
-
function
|
|
6916
|
+
function KjunAnimatedNumber({
|
|
6917
6917
|
value,
|
|
6918
6918
|
decimals = 0,
|
|
6919
6919
|
prefix = "",
|
|
@@ -6948,7 +6948,7 @@ function DsAnimatedNumber({
|
|
|
6948
6948
|
}
|
|
6949
6949
|
);
|
|
6950
6950
|
}
|
|
6951
|
-
function
|
|
6951
|
+
function KjunFreshness({
|
|
6952
6952
|
stale = false,
|
|
6953
6953
|
source,
|
|
6954
6954
|
fetchedAt,
|
|
@@ -6956,14 +6956,14 @@ function DsFreshness({
|
|
|
6956
6956
|
}) {
|
|
6957
6957
|
const label = source === "close" ? "\uC885\uAC00" : "\uC9C0\uC5F0";
|
|
6958
6958
|
return stale ? /* @__PURE__ */ jsx40(
|
|
6959
|
-
|
|
6959
|
+
KjunTooltip,
|
|
6960
6960
|
{
|
|
6961
6961
|
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)) : ""),
|
|
6962
|
-
children: /* @__PURE__ */ jsx40(AccessiblePressable, { accessibilityLabel: label, focusRingRadius: tokens40.extensions.badge.radius, children: /* @__PURE__ */ jsx40(
|
|
6962
|
+
children: /* @__PURE__ */ jsx40(AccessiblePressable, { accessibilityLabel: label, focusRingRadius: tokens40.extensions.badge.radius, children: /* @__PURE__ */ jsx40(KjunBadge, { variant: "warning", size: "xs", children: label }) })
|
|
6963
6963
|
}
|
|
6964
6964
|
) : null;
|
|
6965
6965
|
}
|
|
6966
|
-
function
|
|
6966
|
+
function KjunPriceCell({
|
|
6967
6967
|
value,
|
|
6968
6968
|
formatter,
|
|
6969
6969
|
stale = false,
|
|
@@ -6973,13 +6973,13 @@ function DsPriceCell({
|
|
|
6973
6973
|
fromPrevious = true
|
|
6974
6974
|
}) {
|
|
6975
6975
|
const { colors } = useKjunStyles(), quoteType = useContext16(MarketQuoteTypeContext);
|
|
6976
|
-
return value == null ? /* @__PURE__ */ jsx40(
|
|
6976
|
+
return value == null ? /* @__PURE__ */ jsx40(KjunSkeleton, { type: "block", height: tokens40.extensions.financial.priceSkeletonHeight, width: tokens40.extensions.financial.priceSkeletonWidth }) : /* @__PURE__ */ jsxs28(View34, { style: { flexDirection: "row", alignItems: "center", gap: tokens40.extensions.financial.affixGap }, children: [
|
|
6977
6977
|
/* @__PURE__ */ jsx40(
|
|
6978
6978
|
View34,
|
|
6979
6979
|
{
|
|
6980
6980
|
style: quoteType ? void 0 : { paddingVertical: tokens40.extensions.financial.pillPaddingY, paddingHorizontal: tokens40.extensions.financial.pillPaddingX, borderRadius: tokens40.radius.radius9999 },
|
|
6981
6981
|
children: /* @__PURE__ */ jsx40(
|
|
6982
|
-
|
|
6982
|
+
KjunAnimatedNumber,
|
|
6983
6983
|
{
|
|
6984
6984
|
value,
|
|
6985
6985
|
formatter,
|
|
@@ -6989,10 +6989,10 @@ function DsPriceCell({
|
|
|
6989
6989
|
)
|
|
6990
6990
|
}
|
|
6991
6991
|
),
|
|
6992
|
-
showFreshness && /* @__PURE__ */ jsx40(View34, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx40(
|
|
6992
|
+
showFreshness && /* @__PURE__ */ jsx40(View34, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx40(KjunFreshness, { stale, source, fetchedAt }) })
|
|
6993
6993
|
] });
|
|
6994
6994
|
}
|
|
6995
|
-
function
|
|
6995
|
+
function KjunSignedValue({
|
|
6996
6996
|
value,
|
|
6997
6997
|
format: kind = "number",
|
|
6998
6998
|
isRaw = false,
|
|
@@ -7023,7 +7023,7 @@ function DsSignedValue({
|
|
|
7023
7023
|
backgroundColor: tone === "pill" && !stale && !loading && n !== null ? domainColor(domainColors, role + "Bg") : void 0
|
|
7024
7024
|
},
|
|
7025
7025
|
children: [
|
|
7026
|
-
loading ? /* @__PURE__ */ jsx40(
|
|
7026
|
+
loading ? /* @__PURE__ */ jsx40(KjunSkeleton, { type: "block", width: tokens40.extensions.financial.signedSkeletonWidth, height: tokens40.extensions.financial.signedSkeletonHeight }) : /* @__PURE__ */ jsx40(
|
|
7027
7027
|
KText,
|
|
7028
7028
|
{
|
|
7029
7029
|
style: {
|
|
@@ -7037,7 +7037,7 @@ function DsSignedValue({
|
|
|
7037
7037
|
children: display
|
|
7038
7038
|
}
|
|
7039
7039
|
),
|
|
7040
|
-
!loading && showFreshness && stale && n !== null && /* @__PURE__ */ jsx40(View34, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx40(
|
|
7040
|
+
!loading && showFreshness && stale && n !== null && /* @__PURE__ */ jsx40(View34, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx40(KjunFreshness, { stale: true }) })
|
|
7041
7041
|
]
|
|
7042
7042
|
}
|
|
7043
7043
|
);
|
|
@@ -7045,7 +7045,7 @@ function DsSignedValue({
|
|
|
7045
7045
|
|
|
7046
7046
|
// packages/native/src/financial-display.tsx
|
|
7047
7047
|
import { Fragment as Fragment13, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7048
|
-
function
|
|
7048
|
+
function KjunDeviation({
|
|
7049
7049
|
value,
|
|
7050
7050
|
variant = "pill",
|
|
7051
7051
|
signalThreshold = 1,
|
|
@@ -7068,7 +7068,7 @@ function DsDeviation({
|
|
|
7068
7068
|
},
|
|
7069
7069
|
children: [
|
|
7070
7070
|
/* @__PURE__ */ jsx41(
|
|
7071
|
-
|
|
7071
|
+
KjunBadge,
|
|
7072
7072
|
{
|
|
7073
7073
|
variant: neutral ? "secondary" : n > 0 ? "price-up" : "price-down",
|
|
7074
7074
|
size: "sm",
|
|
@@ -7084,7 +7084,7 @@ function DsDeviation({
|
|
|
7084
7084
|
}
|
|
7085
7085
|
),
|
|
7086
7086
|
!signal && /* @__PURE__ */ jsx41(View35, { style: { width: tokens41.extensions.financial.warningIconSize, flexShrink: 0 } }),
|
|
7087
|
-
signal && /* @__PURE__ */ jsx41(Fragment13, { children: /* @__PURE__ */ jsx41(View35, { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx41(
|
|
7087
|
+
signal && /* @__PURE__ */ jsx41(Fragment13, { children: /* @__PURE__ */ jsx41(View35, { 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(
|
|
7088
7088
|
AccessiblePressable,
|
|
7089
7089
|
{
|
|
7090
7090
|
accessibilityRole: "image",
|
|
@@ -7098,7 +7098,7 @@ function DsDeviation({
|
|
|
7098
7098
|
alignItems: "center",
|
|
7099
7099
|
justifyContent: "center"
|
|
7100
7100
|
},
|
|
7101
|
-
children: /* @__PURE__ */ jsx41(
|
|
7101
|
+
children: /* @__PURE__ */ jsx41(KjunIcon, { name: "alert-triangle", size: tokens41.extensions.financial.warningIconSize, color: colors.warning })
|
|
7102
7102
|
}
|
|
7103
7103
|
) }) }) })
|
|
7104
7104
|
]
|
|
@@ -7146,7 +7146,7 @@ function DsDeviation({
|
|
|
7146
7146
|
}
|
|
7147
7147
|
);
|
|
7148
7148
|
}
|
|
7149
|
-
function
|
|
7149
|
+
function KjunHeatmapCell({
|
|
7150
7150
|
value = 0,
|
|
7151
7151
|
min = 0,
|
|
7152
7152
|
max = 1,
|
|
@@ -7190,7 +7190,7 @@ function DsHeatmapCell({
|
|
|
7190
7190
|
}
|
|
7191
7191
|
);
|
|
7192
7192
|
}
|
|
7193
|
-
function
|
|
7193
|
+
function KjunProgressCell({
|
|
7194
7194
|
value = 0,
|
|
7195
7195
|
max = 100,
|
|
7196
7196
|
showLabel = true,
|
|
@@ -7253,7 +7253,7 @@ function DsProgressCell({
|
|
|
7253
7253
|
}
|
|
7254
7254
|
);
|
|
7255
7255
|
}
|
|
7256
|
-
function
|
|
7256
|
+
function KjunCollectionMark({
|
|
7257
7257
|
kind,
|
|
7258
7258
|
active = false,
|
|
7259
7259
|
size = "md"
|
|
@@ -7261,7 +7261,7 @@ function DsCollectionMark({
|
|
|
7261
7261
|
const { colors, domainColors } = useKjunStyles();
|
|
7262
7262
|
const box = tokens41.extensions.financial.markSizes[size], glyph = kind === "interest" ? tokens41.extensions.financial.heartMarkSizes[size] : box;
|
|
7263
7263
|
return /* @__PURE__ */ jsx41(View35, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", overflow: "visible" }, children: /* @__PURE__ */ jsx41(
|
|
7264
|
-
|
|
7264
|
+
KjunIcon,
|
|
7265
7265
|
{
|
|
7266
7266
|
name: kind === "favorite" ? "star" : "heart",
|
|
7267
7267
|
filled: active,
|
|
@@ -7280,15 +7280,15 @@ var executionStates = {
|
|
|
7280
7280
|
completed_with_errors: ["warning", "\uC644\uB8CC (\uC624\uB958)"],
|
|
7281
7281
|
failed: ["danger", "\uC2E4\uD328"]
|
|
7282
7282
|
};
|
|
7283
|
-
function
|
|
7283
|
+
function KjunExecutionStatusBadge({
|
|
7284
7284
|
status,
|
|
7285
7285
|
label,
|
|
7286
7286
|
size = "md"
|
|
7287
7287
|
}) {
|
|
7288
7288
|
const state = status ? executionStates[status] : void 0;
|
|
7289
|
-
return /* @__PURE__ */ jsx41(
|
|
7289
|
+
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") });
|
|
7290
7290
|
}
|
|
7291
|
-
function
|
|
7291
|
+
function KjunSparkline({
|
|
7292
7292
|
data = [],
|
|
7293
7293
|
width = tokens41.extensions.financial.sparklineWidth,
|
|
7294
7294
|
height = tokens41.extensions.financial.sparklineHeight,
|
|
@@ -7299,7 +7299,7 @@ function DsSparkline({
|
|
|
7299
7299
|
stretch = false,
|
|
7300
7300
|
ariaLabel
|
|
7301
7301
|
}) {
|
|
7302
|
-
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(
|
|
7302
|
+
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(
|
|
7303
7303
|
(v, i) => `${2 + i / Math.max(1, values.length - 1) * (width - 4)},${2 + height - 4 - (v - min) / range * (height - 4)}`
|
|
7304
7304
|
).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"));
|
|
7305
7305
|
return /* @__PURE__ */ jsxs29(
|
|
@@ -7500,9 +7500,9 @@ function TableToolbar({
|
|
|
7500
7500
|
selected.length,
|
|
7501
7501
|
"\uAC1C \uC120\uD0DD"
|
|
7502
7502
|
] }),
|
|
7503
|
-
/* @__PURE__ */ jsx42(
|
|
7503
|
+
/* @__PURE__ */ jsx42(KjunButton, { size: "xs", variant: "ghost", onPress: toggleAll, children: "\uC804\uCCB4 \uC120\uD0DD" }),
|
|
7504
7504
|
/* @__PURE__ */ jsx42(
|
|
7505
|
-
|
|
7505
|
+
KjunButton,
|
|
7506
7506
|
{
|
|
7507
7507
|
size: "xs",
|
|
7508
7508
|
variant: "ghost",
|
|
@@ -7517,7 +7517,7 @@ function TableToolbar({
|
|
|
7517
7517
|
(searchable || toolbar) && // Like Web: the search toolbar sits on the surface so the filled search field stands out from it.
|
|
7518
7518
|
/* @__PURE__ */ jsxs30(View36, { style: { ...toolbarStyle, backgroundColor: colors.surface }, children: [
|
|
7519
7519
|
searchable && /* @__PURE__ */ jsx42(View36, { style: { width: tokens42.table.searchWidth, maxWidth: "100%" }, children: /* @__PURE__ */ jsx42(
|
|
7520
|
-
|
|
7520
|
+
KjunInput,
|
|
7521
7521
|
{
|
|
7522
7522
|
size: "sm",
|
|
7523
7523
|
value: search,
|
|
@@ -7579,7 +7579,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7579
7579
|
},
|
|
7580
7580
|
children: [
|
|
7581
7581
|
selectable && /* @__PURE__ */ jsx43(View37, { style: { width: geometry2.actionColumnWidth, alignItems: "center" }, children: /* @__PURE__ */ jsx43(
|
|
7582
|
-
|
|
7582
|
+
KjunCheckbox,
|
|
7583
7583
|
{
|
|
7584
7584
|
size: "sm",
|
|
7585
7585
|
value: state.all,
|
|
@@ -7618,7 +7618,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7618
7618
|
}
|
|
7619
7619
|
),
|
|
7620
7620
|
sortable !== false && state.sort.key === col.key && /* @__PURE__ */ jsx43(
|
|
7621
|
-
|
|
7621
|
+
KjunIcon,
|
|
7622
7622
|
{
|
|
7623
7623
|
name: state.sort.order === "asc" ? "sort-ascending" : "sort-descending",
|
|
7624
7624
|
size: tokens43.table.sortIconSize,
|
|
@@ -7644,7 +7644,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7644
7644
|
paddingHorizontal: cellPadding.x
|
|
7645
7645
|
},
|
|
7646
7646
|
children: /* @__PURE__ */ jsx43(
|
|
7647
|
-
|
|
7647
|
+
KjunSkeleton,
|
|
7648
7648
|
{
|
|
7649
7649
|
type: "block",
|
|
7650
7650
|
height: geometry2.skeletonHeight,
|
|
@@ -7765,7 +7765,7 @@ function TableCards({
|
|
|
7765
7765
|
const { colors } = useKjunStyles();
|
|
7766
7766
|
const { title, subtitle, badges, inline, sections, actions, columnsForSection } = layout;
|
|
7767
7767
|
return /* @__PURE__ */ jsxs32(View38, { style: { gap: tokens44.extensions.tableCard.gap, padding: tokens44.extensions.tableCard.listPadding }, children: [
|
|
7768
|
-
initialLoading ? Array.from({ length: skeletonRows }, (_, i) => /* @__PURE__ */ jsx44(
|
|
7768
|
+
initialLoading ? Array.from({ length: skeletonRows }, (_, i) => /* @__PURE__ */ jsx44(KjunSkeleton, { type: "card" }, i)) : state.rows.map((row, i) => /* @__PURE__ */ jsxs32(
|
|
7769
7769
|
AccessiblePressable,
|
|
7770
7770
|
{
|
|
7771
7771
|
accessible: false,
|
|
@@ -7911,7 +7911,7 @@ function TableCards({
|
|
|
7911
7911
|
|
|
7912
7912
|
// packages/native/src/table-view.tsx
|
|
7913
7913
|
import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7914
|
-
function
|
|
7914
|
+
function KjunTable(props) {
|
|
7915
7915
|
const {
|
|
7916
7916
|
skeletonRows = 8,
|
|
7917
7917
|
emptyText = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
@@ -7965,7 +7965,7 @@ function DsTable(props) {
|
|
|
7965
7965
|
});
|
|
7966
7966
|
};
|
|
7967
7967
|
const checkbox = (row, i) => /* @__PURE__ */ jsx45(
|
|
7968
|
-
|
|
7968
|
+
KjunCheckbox,
|
|
7969
7969
|
{
|
|
7970
7970
|
value: state.selectedRow(row),
|
|
7971
7971
|
ariaLabel: `\uD589 \uC120\uD0DD ${i + 1}`,
|
|
@@ -7974,7 +7974,7 @@ function DsTable(props) {
|
|
|
7974
7974
|
}
|
|
7975
7975
|
);
|
|
7976
7976
|
const expand = (row, i) => /* @__PURE__ */ jsx45(
|
|
7977
|
-
|
|
7977
|
+
KjunButton,
|
|
7978
7978
|
{
|
|
7979
7979
|
variant: "ghost",
|
|
7980
7980
|
size: "xs",
|
|
@@ -8004,7 +8004,7 @@ function DsTable(props) {
|
|
|
8004
8004
|
}
|
|
8005
8005
|
),
|
|
8006
8006
|
/* @__PURE__ */ jsxs33(
|
|
8007
|
-
|
|
8007
|
+
KjunDataState,
|
|
8008
8008
|
{
|
|
8009
8009
|
queryKey: props.queryKey,
|
|
8010
8010
|
resultKey: query.usesQueryState ? query.hasCurrentResult ? props.queryKey : null : void 0,
|
|
@@ -8016,7 +8016,7 @@ function DsTable(props) {
|
|
|
8016
8016
|
children: [
|
|
8017
8017
|
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 }),
|
|
8018
8018
|
pagination && /* @__PURE__ */ jsx45(
|
|
8019
|
-
|
|
8019
|
+
KjunPagination,
|
|
8020
8020
|
{
|
|
8021
8021
|
currentPage: pagination.page,
|
|
8022
8022
|
totalPages: Math.ceil(
|
|
@@ -8061,7 +8061,7 @@ var kpiFormat = (item, value = item.value) => {
|
|
|
8061
8061
|
maximumFractionDigits: (_b = item.decimals) != null ? _b : 0
|
|
8062
8062
|
}).format(item.semantic === "price" ? Math.abs(value) : value);
|
|
8063
8063
|
};
|
|
8064
|
-
function
|
|
8064
|
+
function KjunKpiHero(props) {
|
|
8065
8065
|
const {
|
|
8066
8066
|
loading = false,
|
|
8067
8067
|
label,
|
|
@@ -8140,7 +8140,7 @@ function DsKpiHero(props) {
|
|
|
8140
8140
|
),
|
|
8141
8141
|
loading ? (
|
|
8142
8142
|
// Placeholders fill each line's height, like Web's 1lh; the value width approximates Web's 7ch.
|
|
8143
|
-
/* @__PURE__ */ jsx47(
|
|
8143
|
+
/* @__PURE__ */ jsx47(KjunSkeleton, { type: "block", height: typeStyle(numberRole).lineHeight, width: font * 4.8 })
|
|
8144
8144
|
) : /* @__PURE__ */ jsx47(
|
|
8145
8145
|
KpiNumberLine,
|
|
8146
8146
|
{
|
|
@@ -8150,7 +8150,7 @@ function DsKpiHero(props) {
|
|
|
8150
8150
|
suffixGap: geometry2.suffixGap,
|
|
8151
8151
|
style: { ...numeric, ...typeStyle(numberRole) },
|
|
8152
8152
|
unitStyle,
|
|
8153
|
-
children: /* @__PURE__ */ jsx47(
|
|
8153
|
+
children: /* @__PURE__ */ jsx47(KjunAnimatedNumber, { value, decimals, animated, formatter, style: typeStyle(numberRole) })
|
|
8154
8154
|
}
|
|
8155
8155
|
),
|
|
8156
8156
|
showDelta && /* @__PURE__ */ jsx47(
|
|
@@ -8163,7 +8163,7 @@ function DsKpiHero(props) {
|
|
|
8163
8163
|
alignItems: "baseline",
|
|
8164
8164
|
gap: spec.deltaGap
|
|
8165
8165
|
},
|
|
8166
|
-
children: loading ? /* @__PURE__ */ jsx47(
|
|
8166
|
+
children: loading ? /* @__PURE__ */ jsx47(KjunSkeleton, { type: "block", height: typeStyle("numberMd").lineHeight, width: geometry2.deltaSkeletonWidth }) : /* @__PURE__ */ jsxs35(Fragment16, { children: [
|
|
8167
8167
|
deltaAbsolute !== null && delta(deltaAbsolute, "absolute", { ...numeric, color: direction(deltaAbsolute), ...typeStyle("numberMd") }),
|
|
8168
8168
|
deltaPercent !== null && delta(deltaPercent, "percent", { ...numeric, color: direction(deltaPercent), ...typeStyle("numberMd"), opacity: 0.9 }),
|
|
8169
8169
|
deltaDescription && /* @__PURE__ */ jsx47(
|
|
@@ -8220,7 +8220,7 @@ function DsKpiHero(props) {
|
|
|
8220
8220
|
}
|
|
8221
8221
|
),
|
|
8222
8222
|
loading ? /* @__PURE__ */ jsx47(
|
|
8223
|
-
|
|
8223
|
+
KjunSkeleton,
|
|
8224
8224
|
{
|
|
8225
8225
|
type: "block",
|
|
8226
8226
|
height: typeStyle("numberMd").lineHeight,
|
|
@@ -8239,7 +8239,7 @@ function DsKpiHero(props) {
|
|
|
8239
8239
|
}
|
|
8240
8240
|
),
|
|
8241
8241
|
item.desc && (loading ? /* @__PURE__ */ jsx47(
|
|
8242
|
-
|
|
8242
|
+
KjunSkeleton,
|
|
8243
8243
|
{
|
|
8244
8244
|
type: "block",
|
|
8245
8245
|
width: geometry2.descriptionSkeletonWidth,
|
|
@@ -8276,7 +8276,7 @@ import {
|
|
|
8276
8276
|
useWindowDimensions as useWindowDimensions9
|
|
8277
8277
|
} from "react-native";
|
|
8278
8278
|
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
8279
|
-
function
|
|
8279
|
+
function KjunKpiRow({
|
|
8280
8280
|
loading = false,
|
|
8281
8281
|
items,
|
|
8282
8282
|
size = "md",
|
|
@@ -8381,7 +8381,7 @@ function DsKpiRow({
|
|
|
8381
8381
|
marginBottom: sub ? 0 : spec.labelMargin
|
|
8382
8382
|
},
|
|
8383
8383
|
children: [
|
|
8384
|
-
busy && !item.label ? /* @__PURE__ */ jsx48(
|
|
8384
|
+
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 }),
|
|
8385
8385
|
!busy && item.badgePlacement !== "value" && badge(item)
|
|
8386
8386
|
]
|
|
8387
8387
|
}
|
|
@@ -8410,7 +8410,7 @@ function DsKpiRow({
|
|
|
8410
8410
|
}
|
|
8411
8411
|
),
|
|
8412
8412
|
busy && !seg.separator ? /* @__PURE__ */ jsx48(
|
|
8413
|
-
|
|
8413
|
+
KjunSkeleton,
|
|
8414
8414
|
{
|
|
8415
8415
|
type: "block",
|
|
8416
8416
|
height: valueStyle.lineHeight,
|
|
@@ -8432,7 +8432,7 @@ function DsKpiRow({
|
|
|
8432
8432
|
// Like Web's 1lh × 5ch: the placeholder fills the value line, and its width (set for the display
|
|
8433
8433
|
// number) scales with the value's font so a text value gets a text-sized bar.
|
|
8434
8434
|
/* @__PURE__ */ jsx48(
|
|
8435
|
-
|
|
8435
|
+
KjunSkeleton,
|
|
8436
8436
|
{
|
|
8437
8437
|
type: "block",
|
|
8438
8438
|
height: valueStyle.lineHeight,
|
|
@@ -8454,7 +8454,7 @@ function DsKpiRow({
|
|
|
8454
8454
|
}
|
|
8455
8455
|
),
|
|
8456
8456
|
item.animated && typeof item.value === "number" ? /* @__PURE__ */ jsx48(
|
|
8457
|
-
|
|
8457
|
+
KjunAnimatedNumber,
|
|
8458
8458
|
{
|
|
8459
8459
|
fromPrevious: true,
|
|
8460
8460
|
value: item.value,
|
|
@@ -8478,7 +8478,7 @@ function DsKpiRow({
|
|
|
8478
8478
|
]
|
|
8479
8479
|
}
|
|
8480
8480
|
),
|
|
8481
|
-
item.desc && (busy ? /* @__PURE__ */ jsx48(
|
|
8481
|
+
item.desc && (busy ? /* @__PURE__ */ jsx48(KjunSkeleton, { type: "block", height: typeStyle("caption").lineHeight, width: geometry2.descriptionSkeletonWidth }) : /* @__PURE__ */ jsx48(
|
|
8482
8482
|
KText,
|
|
8483
8483
|
{
|
|
8484
8484
|
style: {
|
|
@@ -8601,8 +8601,8 @@ function MarketIdentity({
|
|
|
8601
8601
|
children: label
|
|
8602
8602
|
}
|
|
8603
8603
|
),
|
|
8604
|
-
((_f = props.interestKeys) == null ? void 0 : _f.has(id)) && /* @__PURE__ */ jsx49(
|
|
8605
|
-
((_g = props.favoriteKeys) == null ? void 0 : _g.has(id)) && /* @__PURE__ */ jsx49(
|
|
8604
|
+
((_f = props.interestKeys) == null ? void 0 : _f.has(id)) && /* @__PURE__ */ jsx49(KjunCollectionMark, { kind: "interest", size: "sm", active: true }),
|
|
8605
|
+
((_g = props.favoriteKeys) == null ? void 0 : _g.has(id)) && /* @__PURE__ */ jsx49(KjunCollectionMark, { kind: "favorite", size: "sm", active: true }),
|
|
8606
8606
|
(_h = props.renderNameSuffix) == null ? void 0 : _h.call(props, row)
|
|
8607
8607
|
]
|
|
8608
8608
|
}
|
|
@@ -8649,7 +8649,7 @@ function MarketFooter({
|
|
|
8649
8649
|
} = props;
|
|
8650
8650
|
return /* @__PURE__ */ jsxs37(Fragment17, { children: [
|
|
8651
8651
|
pagination && /* @__PURE__ */ jsx49(
|
|
8652
|
-
|
|
8652
|
+
KjunPagination,
|
|
8653
8653
|
{
|
|
8654
8654
|
currentPage: pagination.page,
|
|
8655
8655
|
totalPages: Math.ceil(pagination.total / pagination.size),
|
|
@@ -8687,7 +8687,7 @@ function MarketFooter({
|
|
|
8687
8687
|
|
|
8688
8688
|
// packages/native/src/market-cards.tsx
|
|
8689
8689
|
import { Fragment as Fragment18, jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
8690
|
-
function
|
|
8690
|
+
function KjunMarketCards(props) {
|
|
8691
8691
|
const {
|
|
8692
8692
|
rows = [],
|
|
8693
8693
|
rowKey = "id",
|
|
@@ -8765,13 +8765,13 @@ function DsMarketCards(props) {
|
|
|
8765
8765
|
metricDisplay: display
|
|
8766
8766
|
}) : /* @__PURE__ */ jsxs38(Fragment18, { children: [
|
|
8767
8767
|
/* @__PURE__ */ jsx50(
|
|
8768
|
-
|
|
8768
|
+
KjunDataState,
|
|
8769
8769
|
{
|
|
8770
8770
|
...props,
|
|
8771
8771
|
loadingPadding: "none",
|
|
8772
8772
|
empty: !rows.length,
|
|
8773
|
-
loadingContent: /* @__PURE__ */ jsx50(
|
|
8774
|
-
emptyContent: /* @__PURE__ */ jsx50(
|
|
8773
|
+
loadingContent: /* @__PURE__ */ jsx50(KjunListSkeleton, { variant: "compact" }),
|
|
8774
|
+
emptyContent: /* @__PURE__ */ jsx50(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
8775
8775
|
children: /* @__PURE__ */ jsxs38(View44, { children: [
|
|
8776
8776
|
state.pill && /* @__PURE__ */ jsx50(KText, { style: { textAlign: "right", paddingHorizontal: tokens49.dimension.value16, paddingVertical: tokens49.dimension.value8, ...typeStyle("caption"), color: colors.textSecondary }, children: state.pill.label }),
|
|
8777
8777
|
rows.map((row, i) => {
|
|
@@ -8797,21 +8797,21 @@ function DsMarketCards(props) {
|
|
|
8797
8797
|
children: [
|
|
8798
8798
|
/* @__PURE__ */ jsx50(MarketIdentity, { row, props, compact: true }),
|
|
8799
8799
|
/* @__PURE__ */ jsx50(View44, { style: { marginLeft: tokens49.dimension.value12, alignItems: "flex-end" }, children: ((_b = state.pill) == null ? void 0 : _b.format) === "sparkline" ? /* @__PURE__ */ jsx50(
|
|
8800
|
-
|
|
8800
|
+
KjunSparkline,
|
|
8801
8801
|
{
|
|
8802
8802
|
data: getValue(row, state.key) || [],
|
|
8803
8803
|
width: tokens49.extensions.marketTable.sparklineWidth,
|
|
8804
8804
|
height: tokens49.extensions.marketTable.sparklineHeight
|
|
8805
8805
|
}
|
|
8806
|
-
) : state.pill ? /* @__PURE__ */ jsx50(Fragment18, { children: metricLoading(row, state.key) ? /* @__PURE__ */ jsx50(
|
|
8807
|
-
|
|
8806
|
+
) : state.pill ? /* @__PURE__ */ jsx50(Fragment18, { children: metricLoading(row, state.key) ? /* @__PURE__ */ jsx50(KjunSkeleton, { type: "block", height: tokens49.extensions.marketTable.valueSkeletonHeight, width: tokens49.extensions.marketTable.valueSkeletonWidth }) : isChange && getValue(row, state.key) != null ? /* @__PURE__ */ jsx50(
|
|
8807
|
+
KjunSignedValue,
|
|
8808
8808
|
{
|
|
8809
8809
|
value: finiteNumber(getValue(row, state.key)),
|
|
8810
8810
|
formatter: () => display(row),
|
|
8811
8811
|
stale: !!getValue(row, "stale"),
|
|
8812
8812
|
tone: "pill"
|
|
8813
8813
|
}
|
|
8814
|
-
) : isPrice && getValue(row, state.key) == null ? /* @__PURE__ */ jsx50(
|
|
8814
|
+
) : isPrice && getValue(row, state.key) == null ? /* @__PURE__ */ jsx50(KjunSkeleton, { type: "block", height: tokens49.extensions.financial.priceSkeletonHeight, width: tokens49.extensions.financial.priceSkeletonWidth }) : /* @__PURE__ */ jsxs38(
|
|
8815
8815
|
View44,
|
|
8816
8816
|
{
|
|
8817
8817
|
style: {
|
|
@@ -8861,7 +8861,7 @@ import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
|
8861
8861
|
var changeWeight = { fontWeight: typeStyle("label").fontWeight };
|
|
8862
8862
|
var quoteDesktop = { price: typeStyle("control"), change: { ...typeStyle("caption"), ...changeWeight } };
|
|
8863
8863
|
var quoteMobile = { price: typeStyle("input"), change: { ...typeStyle("body"), ...changeWeight } };
|
|
8864
|
-
function
|
|
8864
|
+
function KjunMarketSimpleList(props) {
|
|
8865
8865
|
const {
|
|
8866
8866
|
rows = [],
|
|
8867
8867
|
rowKey = "id",
|
|
@@ -8875,14 +8875,14 @@ function DsMarketSimpleList(props) {
|
|
|
8875
8875
|
} = props, { colors } = useKjunStyles(), mobile = useWindowDimensions11().width < tokens50.responsive.market;
|
|
8876
8876
|
return /* @__PURE__ */ jsxs39(View45, { children: [
|
|
8877
8877
|
/* @__PURE__ */ jsx51(
|
|
8878
|
-
|
|
8878
|
+
KjunDataState,
|
|
8879
8879
|
{
|
|
8880
8880
|
...props,
|
|
8881
8881
|
loadingPadding: "none",
|
|
8882
8882
|
empty: !rows.length,
|
|
8883
8883
|
emptyText: emptyMessage,
|
|
8884
|
-
loadingContent: /* @__PURE__ */ jsx51(
|
|
8885
|
-
emptyContent: /* @__PURE__ */ jsx51(
|
|
8884
|
+
loadingContent: /* @__PURE__ */ jsx51(KjunListSkeleton, {}),
|
|
8885
|
+
emptyContent: /* @__PURE__ */ jsx51(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
8886
8886
|
children: /* @__PURE__ */ jsx51(View45, { children: rows.map((row, i) => {
|
|
8887
8887
|
var _a, _b;
|
|
8888
8888
|
const price = priceValue(row), change = changeValue(row), stale = !!getValue(row, "stale"), source = String(getValue(row, "source") || ""), fetchedAt = String(getValue(row, "fetched_at") || "");
|
|
@@ -8919,7 +8919,7 @@ function DsMarketSimpleList(props) {
|
|
|
8919
8919
|
},
|
|
8920
8920
|
children: [
|
|
8921
8921
|
/* @__PURE__ */ jsx51(
|
|
8922
|
-
|
|
8922
|
+
KjunPriceCell,
|
|
8923
8923
|
{
|
|
8924
8924
|
value: price,
|
|
8925
8925
|
formatter: priceFormatter,
|
|
@@ -8940,16 +8940,16 @@ function DsMarketSimpleList(props) {
|
|
|
8940
8940
|
},
|
|
8941
8941
|
children: [
|
|
8942
8942
|
price !== null && ((_b = props.renderPricePrefix) == null ? void 0 : _b.call(props, row)),
|
|
8943
|
-
(finiteNumber(price) !== null || !changeLoading(row) && finiteNumber(change) !== null) && (closingPrice && !stale ? /* @__PURE__ */ jsx51(
|
|
8944
|
-
|
|
8943
|
+
(finiteNumber(price) !== null || !changeLoading(row) && finiteNumber(change) !== null) && (closingPrice && !stale ? /* @__PURE__ */ jsx51(KjunBadge, { variant: "secondary", size: "xs", children: "\uC885\uAC00" }) : /* @__PURE__ */ jsx51(
|
|
8944
|
+
KjunFreshness,
|
|
8945
8945
|
{
|
|
8946
8946
|
stale,
|
|
8947
8947
|
source: closingPrice ? "close" : source,
|
|
8948
8948
|
fetchedAt
|
|
8949
8949
|
}
|
|
8950
8950
|
)),
|
|
8951
|
-
changeLoading(row) ? /* @__PURE__ */ jsx51(
|
|
8952
|
-
|
|
8951
|
+
changeLoading(row) ? /* @__PURE__ */ jsx51(KjunSkeleton, { type: "block", height: tokens50.extensions.marketList.changeSkeletonHeight, width: tokens50.extensions.marketList.changeSkeletonWidth }) : change !== null ? /* @__PURE__ */ jsx51(
|
|
8952
|
+
KjunSignedValue,
|
|
8953
8953
|
{
|
|
8954
8954
|
value: change,
|
|
8955
8955
|
stale,
|
|
@@ -8985,12 +8985,12 @@ function DsMarketSimpleList(props) {
|
|
|
8985
8985
|
import { tokens as tokens51 } from "@kjun-ui/tokens";
|
|
8986
8986
|
import { View as View46 } from "react-native";
|
|
8987
8987
|
import { jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8988
|
-
function
|
|
8988
|
+
function KjunMarketListPanel({
|
|
8989
8989
|
controls,
|
|
8990
8990
|
children
|
|
8991
8991
|
}) {
|
|
8992
8992
|
const { colors } = useKjunStyles();
|
|
8993
|
-
return /* @__PURE__ */ jsxs40(
|
|
8993
|
+
return /* @__PURE__ */ jsxs40(KjunCard, { children: [
|
|
8994
8994
|
/* @__PURE__ */ jsx52(View46, { children: controls }),
|
|
8995
8995
|
/* @__PURE__ */ jsx52(
|
|
8996
8996
|
View46,
|
|
@@ -9012,7 +9012,7 @@ import { useId as useId10, useState as useState38 } from "react";
|
|
|
9012
9012
|
import { ScrollView as ScrollView11, View as View47 } from "react-native";
|
|
9013
9013
|
import Svg8, { Defs as Defs4, LinearGradient as LinearGradient4, Rect as Rect5, Stop as Stop4 } from "react-native-svg";
|
|
9014
9014
|
import { jsx as jsx53, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9015
|
-
function
|
|
9015
|
+
function KjunMarketTable(props) {
|
|
9016
9016
|
const {
|
|
9017
9017
|
rows = [],
|
|
9018
9018
|
columns,
|
|
@@ -9034,13 +9034,13 @@ function DsMarketTable(props) {
|
|
|
9034
9034
|
const render = (row, col) => {
|
|
9035
9035
|
const value = getValue(row, col.key), stale = !!getValue(row, "stale");
|
|
9036
9036
|
if (cellLoading(row, col))
|
|
9037
|
-
return /* @__PURE__ */ jsx53(
|
|
9037
|
+
return /* @__PURE__ */ jsx53(KjunSkeleton, { type: "block", height: tokens52.extensions.marketTable.valueSkeletonHeight, width: tokens52.extensions.marketTable.valueSkeletonWidth });
|
|
9038
9038
|
if (renderCell) return content(renderCell(row, col));
|
|
9039
9039
|
if (["stock_name", "name", "symbol"].includes(col.key))
|
|
9040
9040
|
return /* @__PURE__ */ jsx53(MarketIdentity, { row, props, table: true });
|
|
9041
9041
|
if (col.type === "sparkline")
|
|
9042
9042
|
return /* @__PURE__ */ jsx53(
|
|
9043
|
-
|
|
9043
|
+
KjunSparkline,
|
|
9044
9044
|
{
|
|
9045
9045
|
data: Array.isArray(value) ? value : [],
|
|
9046
9046
|
width: tokens52.extensions.marketTable.sparklineWidth,
|
|
@@ -9049,7 +9049,7 @@ function DsMarketTable(props) {
|
|
|
9049
9049
|
);
|
|
9050
9050
|
if (col.type === "price")
|
|
9051
9051
|
return /* @__PURE__ */ jsx53(
|
|
9052
|
-
|
|
9052
|
+
KjunPriceCell,
|
|
9053
9053
|
{
|
|
9054
9054
|
value: finiteNumber(value),
|
|
9055
9055
|
formatter: priceFormatter,
|
|
@@ -9059,7 +9059,7 @@ function DsMarketTable(props) {
|
|
|
9059
9059
|
);
|
|
9060
9060
|
if (col.type === "percent")
|
|
9061
9061
|
return value == null ? /* @__PURE__ */ jsx53(KText, { children: "-" }) : /* @__PURE__ */ jsx53(
|
|
9062
|
-
|
|
9062
|
+
KjunSignedValue,
|
|
9063
9063
|
{
|
|
9064
9064
|
value: finiteNumber(value),
|
|
9065
9065
|
format: "percent",
|
|
@@ -9075,7 +9075,7 @@ function DsMarketTable(props) {
|
|
|
9075
9075
|
);
|
|
9076
9076
|
const text = formatMetric ? formatMetric(value, col.type || "text", { currency, row, column: col }) : value == null ? "-" : String(value);
|
|
9077
9077
|
return ["investor", "net_amount", "net_volume"].includes(col.type || "") ? /* @__PURE__ */ jsx53(
|
|
9078
|
-
|
|
9078
|
+
KjunSignedValue,
|
|
9079
9079
|
{
|
|
9080
9080
|
value: finiteNumber(value),
|
|
9081
9081
|
formatter: () => text,
|
|
@@ -9106,14 +9106,14 @@ function DsMarketTable(props) {
|
|
|
9106
9106
|
},
|
|
9107
9107
|
children: [
|
|
9108
9108
|
/* @__PURE__ */ jsx53(
|
|
9109
|
-
|
|
9109
|
+
KjunDataState,
|
|
9110
9110
|
{
|
|
9111
9111
|
...props,
|
|
9112
9112
|
loadingPadding: "none",
|
|
9113
9113
|
empty: !rows.length,
|
|
9114
9114
|
emptyText: emptyMessage,
|
|
9115
|
-
loadingContent: /* @__PURE__ */ jsx53(
|
|
9116
|
-
emptyContent: /* @__PURE__ */ jsx53(
|
|
9115
|
+
loadingContent: /* @__PURE__ */ jsx53(KjunMarketTableSkeleton, { columns, showActions }),
|
|
9116
|
+
emptyContent: /* @__PURE__ */ jsx53(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
9117
9117
|
children: /* @__PURE__ */ jsx53(MarketQuoteTypeContext.Provider, { value: tableQuote, children: /* @__PURE__ */ jsxs41(View47, { style: { position: "relative", minWidth: 0 }, children: [
|
|
9118
9118
|
/* @__PURE__ */ jsx53(
|
|
9119
9119
|
ScrollView11,
|
|
@@ -9148,7 +9148,7 @@ function DsMarketTable(props) {
|
|
|
9148
9148
|
alignItems: "center",
|
|
9149
9149
|
justifyContent: "center"
|
|
9150
9150
|
},
|
|
9151
|
-
children: ["interest", "favorite"].map((kind) => /* @__PURE__ */ jsx53(View47, { style: { width: Math.max(tokens52.native.minimumTouchTarget, tokens52.extensions.iconToggle.sizes.xs), alignItems: "center" }, children: /* @__PURE__ */ jsx53(
|
|
9151
|
+
children: ["interest", "favorite"].map((kind) => /* @__PURE__ */ jsx53(View47, { style: { width: Math.max(tokens52.native.minimumTouchTarget, tokens52.extensions.iconToggle.sizes.xs), alignItems: "center" }, children: /* @__PURE__ */ jsx53(KjunCollectionMark, { kind, size: "md" }) }, kind))
|
|
9152
9152
|
}
|
|
9153
9153
|
),
|
|
9154
9154
|
columns.map((col, columnIndex) => /* @__PURE__ */ jsxs41(
|
|
@@ -9181,7 +9181,7 @@ function DsMarketTable(props) {
|
|
|
9181
9181
|
}
|
|
9182
9182
|
),
|
|
9183
9183
|
col.sortable && /* @__PURE__ */ jsx53(
|
|
9184
|
-
|
|
9184
|
+
KjunIcon,
|
|
9185
9185
|
{
|
|
9186
9186
|
name: sortKey === col.key ? sortOrder === "asc" ? "sort-ascending" : "sort-descending" : "arrows-sort",
|
|
9187
9187
|
size: tokens52.extensions.marketTable.sortIconSize,
|
|
@@ -9227,7 +9227,7 @@ function DsMarketTable(props) {
|
|
|
9227
9227
|
},
|
|
9228
9228
|
children: [
|
|
9229
9229
|
/* @__PURE__ */ jsx53(
|
|
9230
|
-
|
|
9230
|
+
KjunIconToggle,
|
|
9231
9231
|
{
|
|
9232
9232
|
size: "xs",
|
|
9233
9233
|
active: (_a = props.interestKeys) == null ? void 0 : _a.has(id),
|
|
@@ -9246,7 +9246,7 @@ function DsMarketTable(props) {
|
|
|
9246
9246
|
}
|
|
9247
9247
|
),
|
|
9248
9248
|
/* @__PURE__ */ jsx53(
|
|
9249
|
-
|
|
9249
|
+
KjunIconToggle,
|
|
9250
9250
|
{
|
|
9251
9251
|
size: "xs",
|
|
9252
9252
|
active: (_d = props.favoriteKeys) == null ? void 0 : _d.has(id),
|
|
@@ -9280,7 +9280,7 @@ function DsMarketTable(props) {
|
|
|
9280
9280
|
children: [
|
|
9281
9281
|
/* @__PURE__ */ jsx53(View47, { style: { alignSelf: col.align === "right" ? "flex-end" : col.align === "center" ? "center" : void 0 }, children: render(row, col) }),
|
|
9282
9282
|
col.key === (priceCol == null ? void 0 : priceCol.key) && /* @__PURE__ */ jsx53(
|
|
9283
|
-
|
|
9283
|
+
KjunFreshness,
|
|
9284
9284
|
{
|
|
9285
9285
|
stale: !!getValue(row, "stale"),
|
|
9286
9286
|
source: String(getValue(row, "source") || ""),
|
|
@@ -9321,7 +9321,7 @@ import { Children as Children4, createContext as createContext20, useContext as
|
|
|
9321
9321
|
import { View as View48, Platform as Platform24 } from "react-native";
|
|
9322
9322
|
import { Fragment as Fragment19, jsx as jsx54, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
9323
9323
|
var LastListRow = createContext20(false);
|
|
9324
|
-
function
|
|
9324
|
+
function KjunListRow({ title, description, leading, trailing, actions, href, disabled = false, onPress }) {
|
|
9325
9325
|
const { colors } = useKjunStyles(), last = useContext17(LastListRow);
|
|
9326
9326
|
const parts = /* @__PURE__ */ jsxs42(Fragment19, { children: [
|
|
9327
9327
|
leading && /* @__PURE__ */ jsx54(View48, { children: content(leading) }),
|
|
@@ -9337,7 +9337,7 @@ function DsListRow({ title, description, leading, trailing, actions, href, disab
|
|
|
9337
9337
|
actions && /* @__PURE__ */ jsx54(View48, { pointerEvents: disabled ? "none" : "auto", ...disabled && Platform24.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: tokens53.extensions.list.actionsGap, paddingRight: tokens53.extensions.list.actionsPadding, opacity: disabled ? tokens53.states.opacity.disabled : 1 }, children: content(actions) })
|
|
9338
9338
|
] });
|
|
9339
9339
|
}
|
|
9340
|
-
function
|
|
9340
|
+
function KjunListSection({ title, description, actions, children, ariaLabel }) {
|
|
9341
9341
|
const { colors } = useKjunStyles();
|
|
9342
9342
|
return /* @__PURE__ */ jsxs42(View48, { style: { minWidth: 0, backgroundColor: colors.surface }, children: [
|
|
9343
9343
|
(title || description || actions) && /* @__PURE__ */ jsxs42(View48, { style: { flexDirection: "row", alignItems: "center", gap: tokens53.extensions.list.gap, padding: tokens53.extensions.list.padding }, children: [
|
|
@@ -9356,7 +9356,7 @@ import { tokens as tokens54 } from "@kjun-ui/tokens";
|
|
|
9356
9356
|
import { Children as Children5, Fragment as Fragment20, isValidElement as isValidElement7, useState as useState39 } from "react";
|
|
9357
9357
|
import { View as View49, Platform as Platform25 } from "react-native";
|
|
9358
9358
|
import { jsx as jsx55, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9359
|
-
function
|
|
9359
|
+
function KjunTopNavigation({ title, description, leading, actions, safeAreaTop = 0 }) {
|
|
9360
9360
|
const { colors } = useKjunStyles();
|
|
9361
9361
|
const geometry2 = tokens54.extensions.topNavigation;
|
|
9362
9362
|
const titleInset = Math.max(0, (geometry2.controlSize - tokens54.typography.sectionTitle.lineHeightPx) / 2);
|
|
@@ -9379,7 +9379,7 @@ function DsTopNavigation({ title, description, leading, actions, safeAreaTop = 0
|
|
|
9379
9379
|
actions && /* @__PURE__ */ jsx55(TopNavigationContext.Provider, { value: { ...geometry2, slot: "actions" }, children: /* @__PURE__ */ jsx55(View49, { 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(View49, { onLayout: square("trailing"), style: { flexShrink: 1, minWidth: 0, maxWidth: "100%", marginRight: iconEdges.trailing ? -edgeInset : 0 }, children: content(action) }, "trailing")) }) })
|
|
9380
9380
|
] }) }) });
|
|
9381
9381
|
}
|
|
9382
|
-
function
|
|
9382
|
+
function KjunBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0C9", safeAreaBottom = 0, keyboardVisible = false, hideOnKeyboard = true, onNavigate }) {
|
|
9383
9383
|
const { colors } = useKjunStyles();
|
|
9384
9384
|
const geometry2 = tokens54.extensions.bottomNavigation;
|
|
9385
9385
|
const hasIcons = items.some((item) => item.icon);
|
|
@@ -9426,7 +9426,7 @@ function DsBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0
|
|
|
9426
9426
|
},
|
|
9427
9427
|
children: [
|
|
9428
9428
|
hasIcons && /* @__PURE__ */ jsxs43(View49, { style: { width: geometry2.iconSize, height: geometry2.iconSize, flexShrink: 0 }, children: [
|
|
9429
|
-
item.icon && /* @__PURE__ */ jsx55(
|
|
9429
|
+
item.icon && /* @__PURE__ */ jsx55(KjunIcon, { name: item.icon, size: geometry2.iconSize, color: ink }),
|
|
9430
9430
|
badge
|
|
9431
9431
|
] }),
|
|
9432
9432
|
/* @__PURE__ */ jsxs43(View49, { style: { maxWidth: "100%" }, children: [
|
|
@@ -9440,7 +9440,7 @@ function DsBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0
|
|
|
9440
9440
|
);
|
|
9441
9441
|
}) });
|
|
9442
9442
|
}
|
|
9443
|
-
function
|
|
9443
|
+
function KjunBottomActionBar({ description, children, safeAreaBottom = 0, keyboardVisible = false, hideOnKeyboard = false }) {
|
|
9444
9444
|
const { colors } = useKjunStyles();
|
|
9445
9445
|
const [width, setWidth] = useState39(0);
|
|
9446
9446
|
const geometry2 = tokens54.extensions.navigation;
|
|
@@ -9468,7 +9468,7 @@ import { useRef as useRef35, useState as useState40 } from "react";
|
|
|
9468
9468
|
import { Image, View as View50 } from "react-native";
|
|
9469
9469
|
import { tokens as tokens55 } from "@kjun-ui/tokens";
|
|
9470
9470
|
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
9471
|
-
function
|
|
9471
|
+
function KjunImage({ src, source, alt, decorative = false, aspectRatio = 1, fit = "cover", fallback: fallback2, onLoad, onError }) {
|
|
9472
9472
|
const { colors } = useKjunStyles();
|
|
9473
9473
|
const request = JSON.stringify(source != null ? source : src), current = useRef35({ request, version: 0 });
|
|
9474
9474
|
if (current.current.request !== request) current.current = { request, version: current.current.version + 1 };
|
|
@@ -9482,23 +9482,23 @@ function DsImage({ src, source, alt, decorative = false, aspectRatio = 1, fit =
|
|
|
9482
9482
|
setFailed(version);
|
|
9483
9483
|
onError == null ? void 0 : onError();
|
|
9484
9484
|
}
|
|
9485
|
-
} }, version) : /* @__PURE__ */ jsx56(View50, { 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(
|
|
9485
|
+
} }, version) : /* @__PURE__ */ jsx56(View50, { 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: tokens55.extensions.image.fallbackIconSize, color: colors.textSecondary }), { color: colors.textSecondary, fontWeight: typeStyle("control").fontWeight, textAlign: "center" }) }) });
|
|
9486
9486
|
}
|
|
9487
|
-
function
|
|
9487
|
+
function KjunAvatar({ src, source, name = "", alt, decorative = false, size = "md", shape = "circle", fallback: fallback2, onLoad, onError }) {
|
|
9488
9488
|
const { colors } = useKjunStyles(), initial = Array.from(name.trim())[0];
|
|
9489
|
-
return /* @__PURE__ */ jsx56(View50, { style: { width: tokens55.extensions.avatar[size], height: tokens55.extensions.avatar[size], borderRadius: shape === "circle" ? tokens55.radius.radius9999 : tokens55.radius.radius8, overflow: "hidden", flexShrink: 0 }, children: /* @__PURE__ */ jsx56(
|
|
9489
|
+
return /* @__PURE__ */ jsx56(View50, { style: { width: tokens55.extensions.avatar[size], height: tokens55.extensions.avatar[size], borderRadius: shape === "circle" ? tokens55.radius.radius9999 : tokens55.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: tokens55.extensions.avatar.fallbackIconSizes[size] }), onLoad, onError }) });
|
|
9490
9490
|
}
|
|
9491
9491
|
|
|
9492
9492
|
// packages/native/src/chip.tsx
|
|
9493
9493
|
import { View as View51 } from "react-native";
|
|
9494
9494
|
import { tokens as tokens56 } from "@kjun-ui/tokens";
|
|
9495
9495
|
import { jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
9496
|
-
function
|
|
9496
|
+
function KjunChip({ label, icon, removable = false, disabled = false, size = "md", removeLabel, onRemove }) {
|
|
9497
9497
|
const { colors } = useKjunStyles();
|
|
9498
9498
|
return /* @__PURE__ */ jsxs44(View51, { style: { alignSelf: "flex-start", maxWidth: "100%", minWidth: 0, flexShrink: 1, flexDirection: "row", alignItems: "center", gap: tokens56.extensions.chip.gap, minHeight: removable ? tokens56.extensions.chip.nativeRemoveSize : tokens56.extensions.chip[size], paddingVertical: removable ? 0 : tokens56.extensions.chip.paddingY, paddingLeft: tokens56.extensions.chip.paddingX, paddingRight: removable ? 0 : tokens56.extensions.chip.paddingX, borderRadius: tokens56.extensions.chip.radius, backgroundColor: colors.secondary, opacity: disabled ? tokens56.states.opacity.disabled : 1 }, children: [
|
|
9499
|
-
icon && /* @__PURE__ */ jsx57(
|
|
9499
|
+
icon && /* @__PURE__ */ jsx57(KjunIcon, { name: icon, size: tokens56.extensions.chip.iconSizes[size] }),
|
|
9500
9500
|
/* @__PURE__ */ jsx57(KText, { style: { ...typeStyle(tokens56.extensions.chip.typography[size]), flexShrink: 1, minWidth: 0 }, children: label }),
|
|
9501
|
-
removable && /* @__PURE__ */ jsx57(AccessiblePressable, { accessibilityRole: "button", accessibilityLabel: removeLabel || label + " \uC0AD\uC81C", disabled, accessibilityState: { disabled }, onPress: onRemove, style: { width: tokens56.extensions.chip.nativeRemoveSize, height: tokens56.extensions.chip.nativeRemoveSize, borderRadius: tokens56.extensions.chip.radius, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx57(
|
|
9501
|
+
removable && /* @__PURE__ */ jsx57(AccessiblePressable, { accessibilityRole: "button", accessibilityLabel: removeLabel || label + " \uC0AD\uC81C", disabled, accessibilityState: { disabled }, onPress: onRemove, style: { width: tokens56.extensions.chip.nativeRemoveSize, height: tokens56.extensions.chip.nativeRemoveSize, borderRadius: tokens56.extensions.chip.radius, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx57(KjunIcon, { name: "x", size: tokens56.extensions.chip.removeIconSizes[size] }) })
|
|
9502
9502
|
] });
|
|
9503
9503
|
}
|
|
9504
9504
|
|
|
@@ -9795,10 +9795,10 @@ function RangeInput({
|
|
|
9795
9795
|
}
|
|
9796
9796
|
);
|
|
9797
9797
|
}
|
|
9798
|
-
function
|
|
9798
|
+
function KjunSlider(props) {
|
|
9799
9799
|
return /* @__PURE__ */ jsx58(RangeInput, { ...props });
|
|
9800
9800
|
}
|
|
9801
|
-
function
|
|
9801
|
+
function KjunRangeSlider(props) {
|
|
9802
9802
|
return /* @__PURE__ */ jsx58(RangeInput, { ...props });
|
|
9803
9803
|
}
|
|
9804
9804
|
|
|
@@ -9813,7 +9813,7 @@ var componentIcons = { minus };
|
|
|
9813
9813
|
|
|
9814
9814
|
// packages/native/src/quantity-stepper.tsx
|
|
9815
9815
|
import { jsx as jsx59, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9816
|
-
function
|
|
9816
|
+
function KjunQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disabled = false, error = false, size = "md", block = false, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }) {
|
|
9817
9817
|
const { colors, fontFamily } = useKjunStyles();
|
|
9818
9818
|
const field = useKjunField();
|
|
9819
9819
|
const invalid = error || !!(field == null ? void 0 : field.error);
|
|
@@ -9911,7 +9911,7 @@ function DsQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disab
|
|
|
9911
9911
|
const surfaceBox = { position: "absolute", left: 0, right: 0, top: "50%", height: tokens58.input[size].height, marginTop: -tokens58.input[size].height / 2, borderRadius: surface.spec.radius };
|
|
9912
9912
|
return /* @__PURE__ */ jsx59(IconFallbacks, { icons: componentIcons, children: /* @__PURE__ */ jsxs46(View53, { style: { flexDirection: "row", alignItems: "center", alignSelf: block ? "stretch" : "flex-start", maxWidth: "100%" }, children: [
|
|
9913
9913
|
/* @__PURE__ */ jsx59(View53, { pointerEvents: "none", "aria-hidden": true, style: { ...surfaceBox, backgroundColor: colors.inputBg } }),
|
|
9914
|
-
/* @__PURE__ */ jsx59(CompoundTarget, { square: true, children: /* @__PURE__ */ jsx59(
|
|
9914
|
+
/* @__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" }) }),
|
|
9915
9915
|
/* @__PURE__ */ jsx59(View53, { style: { flex: block ? 1 : void 0, width: block ? void 0 : geometry2.valueWidth, minWidth: 0, minHeight: finePointer() ? void 0 : tokens58.native.minimumTouchTarget, justifyContent: "center" }, ...fieldTarget(() => {
|
|
9916
9916
|
var _a;
|
|
9917
9917
|
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -9944,7 +9944,7 @@ function DsQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disab
|
|
|
9944
9944
|
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 - tokens58.border.controlWidth, paddingVertical: 0 }
|
|
9945
9945
|
}
|
|
9946
9946
|
) }),
|
|
9947
|
-
/* @__PURE__ */ jsx59(CompoundTarget, { square: true, children: /* @__PURE__ */ jsx59(
|
|
9947
|
+
/* @__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" }) }),
|
|
9948
9948
|
(invalid || surface.active) && /* @__PURE__ */ jsx59(View53, { pointerEvents: "none", "aria-hidden": true, style: { ...surfaceBox, borderWidth: invalid ? tokens58.border.controlWidth : tokens58.states.focus.width, borderColor: invalid ? colors.danger : colors.focusRing } })
|
|
9949
9949
|
] }) });
|
|
9950
9950
|
}
|
|
@@ -9954,7 +9954,7 @@ import { Fragment as Fragment21, useEffect as useEffect27, useId as useId11, use
|
|
|
9954
9954
|
import { View as View54 } from "react-native";
|
|
9955
9955
|
import { createTimeDomain, tokens as tokens59 } from "@kjun-ui/tokens";
|
|
9956
9956
|
import { jsx as jsx60, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9957
|
-
function
|
|
9957
|
+
function KjunTimePicker({ value, precision = "minute", min, max, minuteStep = 1, secondStep = 1, disabled = false, error = false, clearable = true, size = "md", ariaLabel = "\uC2DC\uAC04", onValueChange, onChangeCommit }) {
|
|
9958
9958
|
const geometry2 = tokens59.extensions.timePicker, spec = tokens59.input[size];
|
|
9959
9959
|
const { colors } = useKjunStyles();
|
|
9960
9960
|
const first = useRef38(null);
|
|
@@ -9975,7 +9975,7 @@ function DsTimePicker({ value, precision = "minute", min, max, minuteStep = 1, s
|
|
|
9975
9975
|
return /* @__PURE__ */ jsxs47(View54, { accessibilityLabel: ariaLabel, style: { flexDirection: "row", alignItems: "center", maxWidth: "100%", minWidth: 0, backgroundColor: colors.inputBg, borderRadius: spec.radius }, children: [
|
|
9976
9976
|
/* @__PURE__ */ jsx60(View54, { style: { flex: 1, flexDirection: "row", alignItems: "center", minWidth: 0 }, children: ["\uC2DC", "\uBD84", "\uCD08"].slice(0, precision === "second" ? 3 : 2).map((label, index) => /* @__PURE__ */ jsxs47(Fragment21, { children: [
|
|
9977
9977
|
index > 0 && /* @__PURE__ */ jsx60(KText, { "aria-hidden": true, style: { ...inputTypeStyle(size), width: geometry2.separatorWidth, textAlign: "center", color: disabled || !valid ? colors.textDisabled : colors.textSecondary }, children: ":" }),
|
|
9978
|
-
/* @__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(View54, { style: { flexShrink: 0, minWidth: geometry2.segmentMinimumWidth }, children: /* @__PURE__ */ jsx60(
|
|
9978
|
+
/* @__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(View54, { 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) => {
|
|
9979
9979
|
if (typeof next === "number") change(domain.select(value, index, next));
|
|
9980
9980
|
}, 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 }) }) }) })
|
|
9981
9981
|
] }, label)) }),
|
|
@@ -9988,86 +9988,86 @@ function DsTimePicker({ value, precision = "minute", min, max, minuteStep = 1, s
|
|
|
9988
9988
|
] });
|
|
9989
9989
|
}
|
|
9990
9990
|
export {
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
DsFilterGroup,
|
|
10021
|
-
DsFormActions,
|
|
10022
|
-
DsFormGroup,
|
|
10023
|
-
DsFormLayout,
|
|
10024
|
-
DsFormSkeleton,
|
|
10025
|
-
DsFreshness,
|
|
10026
|
-
DsHeatmapCell,
|
|
10027
|
-
DsIcon,
|
|
10028
|
-
DsIconToggle,
|
|
10029
|
-
DsImage,
|
|
10030
|
-
DsInput,
|
|
10031
|
-
DsKpiHero,
|
|
10032
|
-
DsKpiRow,
|
|
10033
|
-
DsListRow,
|
|
10034
|
-
DsListSection,
|
|
10035
|
-
DsListSkeleton,
|
|
10036
|
-
DsMarketCards,
|
|
10037
|
-
DsMarketListPanel,
|
|
10038
|
-
DsMarketSimpleList,
|
|
10039
|
-
DsMarketTable,
|
|
10040
|
-
DsMarketTableSkeleton,
|
|
10041
|
-
DsMenuButton,
|
|
10042
|
-
DsModal,
|
|
10043
|
-
DsPagination,
|
|
10044
|
-
DsPopover,
|
|
10045
|
-
DsPriceCell,
|
|
10046
|
-
DsProgress,
|
|
10047
|
-
DsProgressCell,
|
|
10048
|
-
DsQuantityStepper,
|
|
10049
|
-
DsRadio,
|
|
10050
|
-
DsRadioGroup,
|
|
10051
|
-
DsRangeSlider,
|
|
10052
|
-
DsRefreshButton,
|
|
10053
|
-
DsScrollFade,
|
|
10054
|
-
DsSearchInput,
|
|
10055
|
-
DsSelect,
|
|
10056
|
-
DsSignedValue,
|
|
10057
|
-
DsSkeleton,
|
|
10058
|
-
DsSlider,
|
|
10059
|
-
DsSparkline,
|
|
10060
|
-
DsSpinner,
|
|
10061
|
-
DsSwitch,
|
|
10062
|
-
DsTabPane,
|
|
10063
|
-
DsTable,
|
|
10064
|
-
DsTabs,
|
|
10065
|
-
DsTextarea,
|
|
10066
|
-
DsTimePicker,
|
|
10067
|
-
DsTooltip,
|
|
10068
|
-
DsTopNavigation,
|
|
9991
|
+
KjunAccordion,
|
|
9992
|
+
KjunAccordionItem,
|
|
9993
|
+
KjunAlert,
|
|
9994
|
+
KjunAnimatedNumber,
|
|
9995
|
+
KjunAvatar,
|
|
9996
|
+
KjunBadge,
|
|
9997
|
+
KjunBottomActionBar,
|
|
9998
|
+
KjunBottomNavigation,
|
|
9999
|
+
KjunBreadcrumb,
|
|
10000
|
+
KjunButton,
|
|
10001
|
+
KjunButtonGroup,
|
|
10002
|
+
KjunCard,
|
|
10003
|
+
KjunChartSkeleton,
|
|
10004
|
+
KjunCheckbox,
|
|
10005
|
+
KjunChip,
|
|
10006
|
+
KjunCollectionMark,
|
|
10007
|
+
KjunCombobox,
|
|
10008
|
+
KjunCopyButton,
|
|
10009
|
+
KjunDataState,
|
|
10010
|
+
KjunDatePicker,
|
|
10011
|
+
KjunDeviation,
|
|
10012
|
+
KjunDrawer,
|
|
10013
|
+
KjunDropdown,
|
|
10014
|
+
KjunDropdownDivider,
|
|
10015
|
+
KjunDropdownItem,
|
|
10016
|
+
KjunEmpty,
|
|
10017
|
+
KjunErrorBoundary,
|
|
10018
|
+
KjunExecutionStatusBadge,
|
|
10019
|
+
KjunExternalLink,
|
|
10069
10020
|
KjunFeedbackProvider,
|
|
10021
|
+
KjunFilterGroup,
|
|
10022
|
+
KjunFormActions,
|
|
10023
|
+
KjunFormGroup,
|
|
10024
|
+
KjunFormLayout,
|
|
10025
|
+
KjunFormSkeleton,
|
|
10026
|
+
KjunFreshness,
|
|
10027
|
+
KjunHeatmapCell,
|
|
10028
|
+
KjunIcon,
|
|
10029
|
+
KjunIconToggle,
|
|
10030
|
+
KjunImage,
|
|
10031
|
+
KjunInput,
|
|
10032
|
+
KjunKpiHero,
|
|
10033
|
+
KjunKpiRow,
|
|
10034
|
+
KjunListRow,
|
|
10035
|
+
KjunListSection,
|
|
10036
|
+
KjunListSkeleton,
|
|
10037
|
+
KjunMarketCards,
|
|
10038
|
+
KjunMarketListPanel,
|
|
10039
|
+
KjunMarketSimpleList,
|
|
10040
|
+
KjunMarketTable,
|
|
10041
|
+
KjunMarketTableSkeleton,
|
|
10042
|
+
KjunMenuButton,
|
|
10043
|
+
KjunModal,
|
|
10044
|
+
KjunPagination,
|
|
10045
|
+
KjunPopover,
|
|
10046
|
+
KjunPriceCell,
|
|
10047
|
+
KjunProgress,
|
|
10048
|
+
KjunProgressCell,
|
|
10070
10049
|
KjunProvider,
|
|
10050
|
+
KjunQuantityStepper,
|
|
10051
|
+
KjunRadio,
|
|
10052
|
+
KjunRadioGroup,
|
|
10053
|
+
KjunRangeSlider,
|
|
10054
|
+
KjunRefreshButton,
|
|
10055
|
+
KjunScrollFade,
|
|
10056
|
+
KjunSearchInput,
|
|
10057
|
+
KjunSelect,
|
|
10058
|
+
KjunSignedValue,
|
|
10059
|
+
KjunSkeleton,
|
|
10060
|
+
KjunSlider,
|
|
10061
|
+
KjunSparkline,
|
|
10062
|
+
KjunSpinner,
|
|
10063
|
+
KjunSwitch,
|
|
10064
|
+
KjunTabPane,
|
|
10065
|
+
KjunTable,
|
|
10066
|
+
KjunTabs,
|
|
10067
|
+
KjunTextarea,
|
|
10068
|
+
KjunTimePicker,
|
|
10069
|
+
KjunTooltip,
|
|
10070
|
+
KjunTopNavigation,
|
|
10071
10071
|
useKjunFeedback,
|
|
10072
10072
|
useKjunStyles
|
|
10073
10073
|
};
|