@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.cjs
CHANGED
|
@@ -30,86 +30,86 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// packages/native/src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
DsFilterGroup: () => DsFilterGroup,
|
|
63
|
-
DsFormActions: () => DsFormActions,
|
|
64
|
-
DsFormGroup: () => DsFormGroup,
|
|
65
|
-
DsFormLayout: () => DsFormLayout,
|
|
66
|
-
DsFormSkeleton: () => DsFormSkeleton,
|
|
67
|
-
DsFreshness: () => DsFreshness,
|
|
68
|
-
DsHeatmapCell: () => DsHeatmapCell,
|
|
69
|
-
DsIcon: () => DsIcon,
|
|
70
|
-
DsIconToggle: () => DsIconToggle,
|
|
71
|
-
DsImage: () => DsImage,
|
|
72
|
-
DsInput: () => DsInput,
|
|
73
|
-
DsKpiHero: () => DsKpiHero,
|
|
74
|
-
DsKpiRow: () => DsKpiRow,
|
|
75
|
-
DsListRow: () => DsListRow,
|
|
76
|
-
DsListSection: () => DsListSection,
|
|
77
|
-
DsListSkeleton: () => DsListSkeleton,
|
|
78
|
-
DsMarketCards: () => DsMarketCards,
|
|
79
|
-
DsMarketListPanel: () => DsMarketListPanel,
|
|
80
|
-
DsMarketSimpleList: () => DsMarketSimpleList,
|
|
81
|
-
DsMarketTable: () => DsMarketTable,
|
|
82
|
-
DsMarketTableSkeleton: () => DsMarketTableSkeleton,
|
|
83
|
-
DsMenuButton: () => DsMenuButton,
|
|
84
|
-
DsModal: () => DsModal,
|
|
85
|
-
DsPagination: () => DsPagination,
|
|
86
|
-
DsPopover: () => DsPopover,
|
|
87
|
-
DsPriceCell: () => DsPriceCell,
|
|
88
|
-
DsProgress: () => DsProgress,
|
|
89
|
-
DsProgressCell: () => DsProgressCell,
|
|
90
|
-
DsQuantityStepper: () => DsQuantityStepper,
|
|
91
|
-
DsRadio: () => DsRadio,
|
|
92
|
-
DsRadioGroup: () => DsRadioGroup,
|
|
93
|
-
DsRangeSlider: () => DsRangeSlider,
|
|
94
|
-
DsRefreshButton: () => DsRefreshButton,
|
|
95
|
-
DsScrollFade: () => DsScrollFade,
|
|
96
|
-
DsSearchInput: () => DsSearchInput,
|
|
97
|
-
DsSelect: () => DsSelect,
|
|
98
|
-
DsSignedValue: () => DsSignedValue,
|
|
99
|
-
DsSkeleton: () => DsSkeleton,
|
|
100
|
-
DsSlider: () => DsSlider,
|
|
101
|
-
DsSparkline: () => DsSparkline,
|
|
102
|
-
DsSpinner: () => DsSpinner,
|
|
103
|
-
DsSwitch: () => DsSwitch,
|
|
104
|
-
DsTabPane: () => DsTabPane,
|
|
105
|
-
DsTable: () => DsTable,
|
|
106
|
-
DsTabs: () => DsTabs,
|
|
107
|
-
DsTextarea: () => DsTextarea,
|
|
108
|
-
DsTimePicker: () => DsTimePicker,
|
|
109
|
-
DsTooltip: () => DsTooltip,
|
|
110
|
-
DsTopNavigation: () => DsTopNavigation,
|
|
33
|
+
KjunAccordion: () => KjunAccordion,
|
|
34
|
+
KjunAccordionItem: () => KjunAccordionItem,
|
|
35
|
+
KjunAlert: () => KjunAlert,
|
|
36
|
+
KjunAnimatedNumber: () => KjunAnimatedNumber,
|
|
37
|
+
KjunAvatar: () => KjunAvatar,
|
|
38
|
+
KjunBadge: () => KjunBadge,
|
|
39
|
+
KjunBottomActionBar: () => KjunBottomActionBar,
|
|
40
|
+
KjunBottomNavigation: () => KjunBottomNavigation,
|
|
41
|
+
KjunBreadcrumb: () => KjunBreadcrumb,
|
|
42
|
+
KjunButton: () => KjunButton,
|
|
43
|
+
KjunButtonGroup: () => KjunButtonGroup,
|
|
44
|
+
KjunCard: () => KjunCard,
|
|
45
|
+
KjunChartSkeleton: () => KjunChartSkeleton,
|
|
46
|
+
KjunCheckbox: () => KjunCheckbox,
|
|
47
|
+
KjunChip: () => KjunChip,
|
|
48
|
+
KjunCollectionMark: () => KjunCollectionMark,
|
|
49
|
+
KjunCombobox: () => KjunCombobox,
|
|
50
|
+
KjunCopyButton: () => KjunCopyButton,
|
|
51
|
+
KjunDataState: () => KjunDataState,
|
|
52
|
+
KjunDatePicker: () => KjunDatePicker,
|
|
53
|
+
KjunDeviation: () => KjunDeviation,
|
|
54
|
+
KjunDrawer: () => KjunDrawer,
|
|
55
|
+
KjunDropdown: () => KjunDropdown,
|
|
56
|
+
KjunDropdownDivider: () => KjunDropdownDivider,
|
|
57
|
+
KjunDropdownItem: () => KjunDropdownItem,
|
|
58
|
+
KjunEmpty: () => KjunEmpty,
|
|
59
|
+
KjunErrorBoundary: () => KjunErrorBoundary,
|
|
60
|
+
KjunExecutionStatusBadge: () => KjunExecutionStatusBadge,
|
|
61
|
+
KjunExternalLink: () => KjunExternalLink,
|
|
111
62
|
KjunFeedbackProvider: () => KjunFeedbackProvider,
|
|
63
|
+
KjunFilterGroup: () => KjunFilterGroup,
|
|
64
|
+
KjunFormActions: () => KjunFormActions,
|
|
65
|
+
KjunFormGroup: () => KjunFormGroup,
|
|
66
|
+
KjunFormLayout: () => KjunFormLayout,
|
|
67
|
+
KjunFormSkeleton: () => KjunFormSkeleton,
|
|
68
|
+
KjunFreshness: () => KjunFreshness,
|
|
69
|
+
KjunHeatmapCell: () => KjunHeatmapCell,
|
|
70
|
+
KjunIcon: () => KjunIcon,
|
|
71
|
+
KjunIconToggle: () => KjunIconToggle,
|
|
72
|
+
KjunImage: () => KjunImage,
|
|
73
|
+
KjunInput: () => KjunInput,
|
|
74
|
+
KjunKpiHero: () => KjunKpiHero,
|
|
75
|
+
KjunKpiRow: () => KjunKpiRow,
|
|
76
|
+
KjunListRow: () => KjunListRow,
|
|
77
|
+
KjunListSection: () => KjunListSection,
|
|
78
|
+
KjunListSkeleton: () => KjunListSkeleton,
|
|
79
|
+
KjunMarketCards: () => KjunMarketCards,
|
|
80
|
+
KjunMarketListPanel: () => KjunMarketListPanel,
|
|
81
|
+
KjunMarketSimpleList: () => KjunMarketSimpleList,
|
|
82
|
+
KjunMarketTable: () => KjunMarketTable,
|
|
83
|
+
KjunMarketTableSkeleton: () => KjunMarketTableSkeleton,
|
|
84
|
+
KjunMenuButton: () => KjunMenuButton,
|
|
85
|
+
KjunModal: () => KjunModal,
|
|
86
|
+
KjunPagination: () => KjunPagination,
|
|
87
|
+
KjunPopover: () => KjunPopover,
|
|
88
|
+
KjunPriceCell: () => KjunPriceCell,
|
|
89
|
+
KjunProgress: () => KjunProgress,
|
|
90
|
+
KjunProgressCell: () => KjunProgressCell,
|
|
112
91
|
KjunProvider: () => KjunProvider,
|
|
92
|
+
KjunQuantityStepper: () => KjunQuantityStepper,
|
|
93
|
+
KjunRadio: () => KjunRadio,
|
|
94
|
+
KjunRadioGroup: () => KjunRadioGroup,
|
|
95
|
+
KjunRangeSlider: () => KjunRangeSlider,
|
|
96
|
+
KjunRefreshButton: () => KjunRefreshButton,
|
|
97
|
+
KjunScrollFade: () => KjunScrollFade,
|
|
98
|
+
KjunSearchInput: () => KjunSearchInput,
|
|
99
|
+
KjunSelect: () => KjunSelect,
|
|
100
|
+
KjunSignedValue: () => KjunSignedValue,
|
|
101
|
+
KjunSkeleton: () => KjunSkeleton,
|
|
102
|
+
KjunSlider: () => KjunSlider,
|
|
103
|
+
KjunSparkline: () => KjunSparkline,
|
|
104
|
+
KjunSpinner: () => KjunSpinner,
|
|
105
|
+
KjunSwitch: () => KjunSwitch,
|
|
106
|
+
KjunTabPane: () => KjunTabPane,
|
|
107
|
+
KjunTable: () => KjunTable,
|
|
108
|
+
KjunTabs: () => KjunTabs,
|
|
109
|
+
KjunTextarea: () => KjunTextarea,
|
|
110
|
+
KjunTimePicker: () => KjunTimePicker,
|
|
111
|
+
KjunTooltip: () => KjunTooltip,
|
|
112
|
+
KjunTopNavigation: () => KjunTopNavigation,
|
|
113
113
|
useKjunFeedback: () => useKjunFeedback,
|
|
114
114
|
useKjunStyles: () => useKjunStyles
|
|
115
115
|
});
|
|
@@ -734,7 +734,7 @@ var AccessiblePressable = (0, import_react12.forwardRef)(
|
|
|
734
734
|
|
|
735
735
|
// packages/native/src/button.tsx
|
|
736
736
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
737
|
-
function
|
|
737
|
+
function KjunIcon({
|
|
738
738
|
name,
|
|
739
739
|
size = import_tokens5.tokens.iconSizes.default,
|
|
740
740
|
color,
|
|
@@ -839,7 +839,7 @@ function useMinimumLoading(loading) {
|
|
|
839
839
|
}, [loading]);
|
|
840
840
|
return loading || active;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function KjunButton(input) {
|
|
843
843
|
var _a, _b;
|
|
844
844
|
const {
|
|
845
845
|
children,
|
|
@@ -949,7 +949,7 @@ function DsButton(input) {
|
|
|
949
949
|
const color = paint(pressed, hovered && import_react_native3.Platform.OS === "web").ink;
|
|
950
950
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
951
951
|
before && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
952
|
-
|
|
952
|
+
KjunIcon,
|
|
953
953
|
{
|
|
954
954
|
name: before,
|
|
955
955
|
filled: !busy && prefixIconFilled,
|
|
@@ -966,7 +966,7 @@ function DsButton(input) {
|
|
|
966
966
|
...multiline || navigation ? { flexShrink: 1, minWidth: 0, textAlign: "center" } : {}
|
|
967
967
|
}, children }),
|
|
968
968
|
suffixIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native3.View, { style: { opacity: busy && prefixIcon ? 0 : 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
969
|
-
|
|
969
|
+
KjunIcon,
|
|
970
970
|
{
|
|
971
971
|
name: busy && !prefixIcon ? "loader-2" : suffixIcon,
|
|
972
972
|
filled: !busy && suffixIconFilled,
|
|
@@ -983,7 +983,7 @@ function DsButton(input) {
|
|
|
983
983
|
right: 0,
|
|
984
984
|
alignItems: "center",
|
|
985
985
|
justifyContent: "center"
|
|
986
|
-
}, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
986
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(KjunIcon, { name: "loader-2", spin: true, size: iconSize, color }) })
|
|
987
987
|
] });
|
|
988
988
|
}
|
|
989
989
|
}
|
|
@@ -1023,7 +1023,7 @@ function FieldClear({ size, disabled, label, onPress }) {
|
|
|
1023
1023
|
alignItems: "center",
|
|
1024
1024
|
justifyContent: "center",
|
|
1025
1025
|
backgroundColor: disabled ? "transparent" : pressed ? colors.active : hovered ? colors.hover : "transparent"
|
|
1026
|
-
}, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1026
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(KjunIcon, { name: "x", size: spec.iconSize, color: disabled ? colors.textDisabled : colors.textSecondary }) })
|
|
1027
1027
|
}
|
|
1028
1028
|
);
|
|
1029
1029
|
}
|
|
@@ -1190,7 +1190,7 @@ var import_react_native8 = require("react-native");
|
|
|
1190
1190
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1191
1191
|
var FieldContext = (0, import_react17.createContext)(null);
|
|
1192
1192
|
var useKjunField = () => (0, import_react17.useContext)(FieldContext);
|
|
1193
|
-
function
|
|
1193
|
+
function KjunFormGroup({
|
|
1194
1194
|
label,
|
|
1195
1195
|
id,
|
|
1196
1196
|
required = false,
|
|
@@ -1234,7 +1234,7 @@ function DsFormGroup({
|
|
|
1234
1234
|
marginTop: import_tokens9.tokens.extensions.form.messageGap
|
|
1235
1235
|
},
|
|
1236
1236
|
children: [
|
|
1237
|
-
!!error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1237
|
+
!!error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(KjunIcon, { name: "alert-circle", size: import_tokens9.tokens.extensions.form.messageIconSize, color: c.danger }),
|
|
1238
1238
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1239
1239
|
import_react_native8.Text,
|
|
1240
1240
|
{
|
|
@@ -1256,7 +1256,7 @@ function DsFormGroup({
|
|
|
1256
1256
|
}
|
|
1257
1257
|
);
|
|
1258
1258
|
}
|
|
1259
|
-
var
|
|
1259
|
+
var KjunInput = (0, import_react17.forwardRef)(function KjunInput2({
|
|
1260
1260
|
value,
|
|
1261
1261
|
size = "md",
|
|
1262
1262
|
error = false,
|
|
@@ -1370,7 +1370,7 @@ var DsInput = (0, import_react17.forwardRef)(function DsInput2({
|
|
|
1370
1370
|
justifyContent: "center"
|
|
1371
1371
|
},
|
|
1372
1372
|
children: prefix || /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1373
|
-
|
|
1373
|
+
KjunIcon,
|
|
1374
1374
|
{
|
|
1375
1375
|
name: prefixIcon,
|
|
1376
1376
|
size: spec.iconSize,
|
|
@@ -1401,7 +1401,7 @@ var DsInput = (0, import_react17.forwardRef)(function DsInput2({
|
|
|
1401
1401
|
(_a = input.current) == null ? void 0 : _a.focus();
|
|
1402
1402
|
} }),
|
|
1403
1403
|
suffix || suffixIcon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1404
|
-
|
|
1404
|
+
KjunIcon,
|
|
1405
1405
|
{
|
|
1406
1406
|
name: suffixIcon,
|
|
1407
1407
|
size: spec.iconSize,
|
|
@@ -1428,13 +1428,13 @@ var DsInput = (0, import_react17.forwardRef)(function DsInput2({
|
|
|
1428
1428
|
)
|
|
1429
1429
|
] });
|
|
1430
1430
|
});
|
|
1431
|
-
function
|
|
1431
|
+
function KjunFormLayout({
|
|
1432
1432
|
children,
|
|
1433
1433
|
gap = import_tokens9.tokens.extensions.form.itemGap
|
|
1434
1434
|
}) {
|
|
1435
1435
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.View, { style: { gap }, children: import_react17.Children.map(
|
|
1436
1436
|
children,
|
|
1437
|
-
(child) => (0, import_react17.isValidElement)(child) && child.type ===
|
|
1437
|
+
(child) => (0, import_react17.isValidElement)(child) && child.type === KjunFormGroup ? (0, import_react17.cloneElement)(child, {
|
|
1438
1438
|
style: [{ marginBottom: 0 }, child.props.style]
|
|
1439
1439
|
}) : child
|
|
1440
1440
|
) });
|
|
@@ -1501,7 +1501,7 @@ function ScopedNativeModal({ children, visible, ...props }) {
|
|
|
1501
1501
|
const entry = scope ? layers.entries.get(scope) : void 0;
|
|
1502
1502
|
const generation = (_a = entry == null ? void 0 : entry.order) != null ? _a : 0;
|
|
1503
1503
|
const inactive = !!scope && !layers.isActive(scope);
|
|
1504
|
-
const host = (0, import_react19.useContext)(FeedbackOverlayContext), id = (0, import_react19.useId)(), register = host == null ? void 0 : host.register;
|
|
1504
|
+
const host = (0, import_react19.useContext)(FeedbackOverlayContext), id = "kjun-" + (0, import_react19.useId)(), register = host == null ? void 0 : host.register;
|
|
1505
1505
|
(0, import_react19.useEffect)(
|
|
1506
1506
|
() => visible && register ? register(id) : void 0,
|
|
1507
1507
|
[visible, register, id, generation]
|
|
@@ -1533,7 +1533,7 @@ function ScopedNativeModal({ children, visible, ...props }) {
|
|
|
1533
1533
|
|
|
1534
1534
|
// packages/native/src/modal.tsx
|
|
1535
1535
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1536
|
-
function
|
|
1536
|
+
function KjunFormActions({
|
|
1537
1537
|
size = "lg",
|
|
1538
1538
|
cancelText = "\uCDE8\uC18C",
|
|
1539
1539
|
confirmText = "\uC800\uC7A5",
|
|
@@ -1592,7 +1592,7 @@ function DsFormActions({
|
|
|
1592
1592
|
}
|
|
1593
1593
|
),
|
|
1594
1594
|
showCancel && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1595
|
-
|
|
1595
|
+
KjunButton,
|
|
1596
1596
|
{
|
|
1597
1597
|
size,
|
|
1598
1598
|
variant: cancelVariant,
|
|
@@ -1602,7 +1602,7 @@ function DsFormActions({
|
|
|
1602
1602
|
}
|
|
1603
1603
|
),
|
|
1604
1604
|
showConfirm && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1605
|
-
|
|
1605
|
+
KjunButton,
|
|
1606
1606
|
{
|
|
1607
1607
|
size,
|
|
1608
1608
|
variant,
|
|
@@ -1616,7 +1616,7 @@ function DsFormActions({
|
|
|
1616
1616
|
}
|
|
1617
1617
|
) });
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1619
|
+
function KjunModal({
|
|
1620
1620
|
open,
|
|
1621
1621
|
onOpenChange,
|
|
1622
1622
|
onClose,
|
|
@@ -1757,14 +1757,14 @@ function DsModal({
|
|
|
1757
1757
|
}
|
|
1758
1758
|
) }),
|
|
1759
1759
|
closable && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1760
|
-
|
|
1760
|
+
KjunButton,
|
|
1761
1761
|
{
|
|
1762
1762
|
variant: "ghost",
|
|
1763
1763
|
size: "sm",
|
|
1764
1764
|
ariaLabel: "\uB2EB\uAE30",
|
|
1765
1765
|
onPress: close,
|
|
1766
1766
|
style: { borderRadius: import_tokens10.tokens.modal.closeRadius, width: import_tokens10.tokens.modal.closeSize, height: import_tokens10.tokens.modal.closeSize, paddingHorizontal: 0, paddingVertical: 0 },
|
|
1767
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1767
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(KjunIcon, { name: "x", size: import_tokens10.tokens.modal.closeIconSize })
|
|
1768
1768
|
}
|
|
1769
1769
|
)
|
|
1770
1770
|
]
|
|
@@ -1793,7 +1793,7 @@ function DsModal({
|
|
|
1793
1793
|
borderTopColor: c.border
|
|
1794
1794
|
},
|
|
1795
1795
|
children: footer || /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1796
|
-
|
|
1796
|
+
KjunFormActions,
|
|
1797
1797
|
{
|
|
1798
1798
|
size: footerSize,
|
|
1799
1799
|
cancelVariant: "secondary",
|
|
@@ -1842,7 +1842,7 @@ function hasContent(node) {
|
|
|
1842
1842
|
|
|
1843
1843
|
// packages/native/src/card.tsx
|
|
1844
1844
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1845
|
-
function
|
|
1845
|
+
function KjunCard({
|
|
1846
1846
|
title,
|
|
1847
1847
|
subtitle,
|
|
1848
1848
|
header,
|
|
@@ -1860,7 +1860,7 @@ function DsCard({
|
|
|
1860
1860
|
style
|
|
1861
1861
|
}) {
|
|
1862
1862
|
const { colors } = useKjunStyles();
|
|
1863
|
-
const id = (0, import_react22.useId)().replace(/[^a-z0-9]/gi, "");
|
|
1863
|
+
const id = "kjun-" + (0, import_react22.useId)().replace(/[^a-z0-9]/gi, "");
|
|
1864
1864
|
const inset = import_tokens11.tokens.card.padding[padding], bodyInset = import_tokens11.tokens.card.padding[bodyPadding];
|
|
1865
1865
|
const corner = import_tokens11.tokens.card.radii[radius];
|
|
1866
1866
|
const paint = import_tokens11.tokens.cardSurfaces[surface];
|
|
@@ -1928,7 +1928,7 @@ var import_react23 = require("react");
|
|
|
1928
1928
|
var import_react_native15 = require("react-native");
|
|
1929
1929
|
var import_react_native_svg3 = __toESM(require("react-native-svg"), 1);
|
|
1930
1930
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1931
|
-
function
|
|
1931
|
+
function KjunBadge(props) {
|
|
1932
1932
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BadgeView, { ...props });
|
|
1933
1933
|
}
|
|
1934
1934
|
function BadgeView({
|
|
@@ -1990,7 +1990,7 @@ function BadgeView({
|
|
|
1990
1990
|
}
|
|
1991
1991
|
);
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1993
|
+
function KjunEmpty({
|
|
1994
1994
|
text = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
1995
1995
|
description,
|
|
1996
1996
|
icon,
|
|
@@ -2008,7 +2008,7 @@ function DsEmpty({
|
|
|
2008
2008
|
paddingVertical: stateContent === "empty" ? 0 : import_tokens12.tokens.dimension.value32
|
|
2009
2009
|
},
|
|
2010
2010
|
children: [
|
|
2011
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native15.View, { style: { marginBottom: spec.iconGap }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2011
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native15.View, { style: { marginBottom: spec.iconGap }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(KjunIcon, { name: icon, size: spec.iconSize, color: colors.textSecondary }) }),
|
|
2012
2012
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(KText, { style: { ...typeStyle("cardTitle"), color: colors.text, fontSize: spec.titleSize, lineHeight: spec.titleLineHeight, textAlign: "center", maxWidth: spec.textMaxWidth }, children: text }),
|
|
2013
2013
|
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2014
2014
|
KText,
|
|
@@ -2030,7 +2030,7 @@ function DsEmpty({
|
|
|
2030
2030
|
}
|
|
2031
2031
|
);
|
|
2032
2032
|
}
|
|
2033
|
-
function
|
|
2033
|
+
function KjunSpinner({ size = "md", text }) {
|
|
2034
2034
|
const { colors } = useKjunStyles(), reduced = useReducedMotion(), rotation = (0, import_react23.useRef)(new import_react_native15.Animated.Value(0)).current;
|
|
2035
2035
|
(0, import_react23.useEffect)(() => {
|
|
2036
2036
|
if (reduced) return;
|
|
@@ -2108,7 +2108,7 @@ function DsSpinner({ size = "md", text }) {
|
|
|
2108
2108
|
}
|
|
2109
2109
|
);
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function KjunAlert({
|
|
2112
2112
|
type = "info",
|
|
2113
2113
|
variant,
|
|
2114
2114
|
size = "md",
|
|
@@ -2144,7 +2144,7 @@ function DsAlert({
|
|
|
2144
2144
|
},
|
|
2145
2145
|
children: [
|
|
2146
2146
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native15.View, { style: { height: lineHeight, justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2147
|
-
|
|
2147
|
+
KjunIcon,
|
|
2148
2148
|
{
|
|
2149
2149
|
name: {
|
|
2150
2150
|
info: "info-circle",
|
|
@@ -2188,7 +2188,7 @@ function DsAlert({
|
|
|
2188
2188
|
onClose == null ? void 0 : onClose();
|
|
2189
2189
|
},
|
|
2190
2190
|
children: ({ pressed, hovered }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2191
|
-
|
|
2191
|
+
KjunIcon,
|
|
2192
2192
|
{
|
|
2193
2193
|
name: "x",
|
|
2194
2194
|
size: geometry2.closeIconSize,
|
|
@@ -2201,7 +2201,7 @@ function DsAlert({
|
|
|
2201
2201
|
}
|
|
2202
2202
|
);
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2204
|
+
function KjunProgress({
|
|
2205
2205
|
value = 0,
|
|
2206
2206
|
max = 100,
|
|
2207
2207
|
size = "md",
|
|
@@ -2280,7 +2280,7 @@ var import_tokens13 = require("@kjun-ui/tokens");
|
|
|
2280
2280
|
var import_react24 = require("react");
|
|
2281
2281
|
var import_react_native16 = require("react-native");
|
|
2282
2282
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2283
|
-
function
|
|
2283
|
+
function KjunSkeleton({
|
|
2284
2284
|
type = "text",
|
|
2285
2285
|
rows = 3,
|
|
2286
2286
|
columns = 4,
|
|
@@ -2656,7 +2656,7 @@ function ToastView({
|
|
|
2656
2656
|
overflow: "hidden"
|
|
2657
2657
|
},
|
|
2658
2658
|
children: [
|
|
2659
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2659
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(KjunIcon, { name: icon, color: colors[`${tone}Accent`] }),
|
|
2660
2660
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native17.View, { style: { flex: 1, minWidth: 0 }, children: [
|
|
2661
2661
|
toast.title && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(KText, { style: { fontWeight: typeStyle("control").fontWeight, marginBottom: import_tokens15.tokens.extensions.toast.titleGap }, children: toast.title }),
|
|
2662
2662
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(KText, { style: { color: colors.textSecondary }, children: toast.message }),
|
|
@@ -2704,7 +2704,7 @@ function ToastView({
|
|
|
2704
2704
|
justifyContent: "center",
|
|
2705
2705
|
borderRadius: import_tokens15.tokens.extensions.toast.closeRadius
|
|
2706
2706
|
},
|
|
2707
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(KjunIcon, { name: "x", color: colors.textTertiary })
|
|
2708
2708
|
}
|
|
2709
2709
|
),
|
|
2710
2710
|
toast.showProgress !== false && !!toast.duration && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -2886,7 +2886,7 @@ function FeedbackDialog({
|
|
|
2886
2886
|
}) {
|
|
2887
2887
|
const { options, value, error, busy, edit, cancel, submit } = useFeedbackDialog(controller, request);
|
|
2888
2888
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2889
|
-
|
|
2889
|
+
KjunModal,
|
|
2890
2890
|
{
|
|
2891
2891
|
open,
|
|
2892
2892
|
onOpenChange: (open2) => {
|
|
@@ -2905,7 +2905,7 @@ function FeedbackDialog({
|
|
|
2905
2905
|
children: [
|
|
2906
2906
|
options.message && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(KText, { style: { marginBottom: import_tokens18.tokens.dimension.value16 }, children: options.message }),
|
|
2907
2907
|
request.kind === "prompt" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2908
|
-
|
|
2908
|
+
KjunInput,
|
|
2909
2909
|
{
|
|
2910
2910
|
autoFocus: true,
|
|
2911
2911
|
value,
|
|
@@ -2974,7 +2974,7 @@ var import_tokens19 = require("@kjun-ui/tokens");
|
|
|
2974
2974
|
var import_react32 = require("react");
|
|
2975
2975
|
var import_react_native21 = require("react-native");
|
|
2976
2976
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2977
|
-
function
|
|
2977
|
+
function KjunCheckbox({
|
|
2978
2978
|
value,
|
|
2979
2979
|
val,
|
|
2980
2980
|
label,
|
|
@@ -3023,7 +3023,7 @@ function DsCheckbox({
|
|
|
3023
3023
|
backgroundColor: checked ? colors.brand : colors.surface
|
|
3024
3024
|
},
|
|
3025
3025
|
children: checked && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3026
|
-
|
|
3026
|
+
KjunIcon,
|
|
3027
3027
|
{
|
|
3028
3028
|
name: "check",
|
|
3029
3029
|
size: import_tokens19.tokens.extensions.checkbox.iconSizes[size],
|
|
@@ -3052,7 +3052,7 @@ function useControlFocus(disabled) {
|
|
|
3052
3052
|
ring: focused && !disabled ? { outlineStyle: "solid", outlineWidth: import_tokens19.tokens.states.focus.width, outlineOffset: import_tokens19.tokens.states.focus.choiceOffset, outlineColor: colors.focusRing } : {}
|
|
3053
3053
|
};
|
|
3054
3054
|
}
|
|
3055
|
-
function
|
|
3055
|
+
function KjunSwitch({
|
|
3056
3056
|
value,
|
|
3057
3057
|
label,
|
|
3058
3058
|
ariaLabel,
|
|
@@ -3152,7 +3152,7 @@ function DsSwitch({
|
|
|
3152
3152
|
);
|
|
3153
3153
|
}
|
|
3154
3154
|
var RadioContext = (0, import_react32.createContext)(null);
|
|
3155
|
-
function
|
|
3155
|
+
function KjunRadio({
|
|
3156
3156
|
value,
|
|
3157
3157
|
val,
|
|
3158
3158
|
label,
|
|
@@ -3228,7 +3228,7 @@ function DsRadio({
|
|
|
3228
3228
|
}
|
|
3229
3229
|
);
|
|
3230
3230
|
}
|
|
3231
|
-
function
|
|
3231
|
+
function KjunRadioGroup({
|
|
3232
3232
|
value,
|
|
3233
3233
|
options = [],
|
|
3234
3234
|
direction = "horizontal",
|
|
@@ -3261,7 +3261,7 @@ function DsRadioGroup({
|
|
|
3261
3261
|
gap: direction === "vertical" ? import_tokens19.tokens.dimension.value8 : import_tokens19.tokens.dimension.value16
|
|
3262
3262
|
},
|
|
3263
3263
|
children: children || options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3264
|
-
|
|
3264
|
+
KjunRadio,
|
|
3265
3265
|
{
|
|
3266
3266
|
val: option.value,
|
|
3267
3267
|
label: option.label,
|
|
@@ -3363,7 +3363,7 @@ function ButtonGroupLabel({ label, active, size, reduced }) {
|
|
|
3363
3363
|
|
|
3364
3364
|
// packages/native/src/selection-groups.tsx
|
|
3365
3365
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3366
|
-
function
|
|
3366
|
+
function KjunButtonGroup({
|
|
3367
3367
|
value,
|
|
3368
3368
|
options,
|
|
3369
3369
|
size = "md",
|
|
@@ -3464,7 +3464,7 @@ function DsButtonGroup({
|
|
|
3464
3464
|
}),
|
|
3465
3465
|
children: [
|
|
3466
3466
|
option.icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3467
|
-
|
|
3467
|
+
KjunIcon,
|
|
3468
3468
|
{
|
|
3469
3469
|
name: option.icon,
|
|
3470
3470
|
size: import_tokens21.tokens.extensions.selection.iconSize,
|
|
@@ -3491,7 +3491,7 @@ function DsButtonGroup({
|
|
|
3491
3491
|
}
|
|
3492
3492
|
);
|
|
3493
3493
|
}
|
|
3494
|
-
function
|
|
3494
|
+
function KjunFilterGroup({
|
|
3495
3495
|
value,
|
|
3496
3496
|
options,
|
|
3497
3497
|
size = "sm",
|
|
@@ -3561,7 +3561,7 @@ function DsFilterGroup({
|
|
|
3561
3561
|
}
|
|
3562
3562
|
),
|
|
3563
3563
|
option.icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3564
|
-
|
|
3564
|
+
KjunIcon,
|
|
3565
3565
|
{
|
|
3566
3566
|
name: option.icon,
|
|
3567
3567
|
size: import_tokens21.tokens.extensions.selection.iconSize,
|
|
@@ -3619,8 +3619,8 @@ var import_tokens22 = require("@kjun-ui/tokens");
|
|
|
3619
3619
|
var import_react35 = require("react");
|
|
3620
3620
|
var import_react_native24 = require("react-native");
|
|
3621
3621
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3622
|
-
var
|
|
3623
|
-
function
|
|
3622
|
+
var KjunTextarea = (0, import_react35.forwardRef)(
|
|
3623
|
+
function KjunTextarea2({
|
|
3624
3624
|
value,
|
|
3625
3625
|
size = "md",
|
|
3626
3626
|
error = false,
|
|
@@ -3693,7 +3693,7 @@ var import_react36 = require("react");
|
|
|
3693
3693
|
var import_react_native25 = require("react-native");
|
|
3694
3694
|
var import_react_native26 = require("react-native");
|
|
3695
3695
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3696
|
-
function
|
|
3696
|
+
function KjunDrawer({
|
|
3697
3697
|
open,
|
|
3698
3698
|
onOpenChange,
|
|
3699
3699
|
title,
|
|
@@ -3801,14 +3801,14 @@ function DsDrawer({
|
|
|
3801
3801
|
}
|
|
3802
3802
|
) }),
|
|
3803
3803
|
closable && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3804
|
-
|
|
3804
|
+
KjunButton,
|
|
3805
3805
|
{
|
|
3806
3806
|
size: "sm",
|
|
3807
3807
|
variant: "ghost",
|
|
3808
3808
|
ariaLabel: "\uB2EB\uAE30",
|
|
3809
3809
|
onPress: close,
|
|
3810
3810
|
style: { borderRadius: import_tokens23.tokens.extensions.drawer.closeRadius, width: import_tokens23.tokens.extensions.drawer.closeSize, height: import_tokens23.tokens.extensions.drawer.closeSize, paddingHorizontal: 0, paddingVertical: 0 },
|
|
3811
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3811
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(KjunIcon, { name: "x", size: import_tokens23.tokens.extensions.drawer.closeIconSize })
|
|
3812
3812
|
}
|
|
3813
3813
|
)
|
|
3814
3814
|
]
|
|
@@ -4100,7 +4100,7 @@ var import_react38 = require("react");
|
|
|
4100
4100
|
var import_react_native29 = require("react-native");
|
|
4101
4101
|
var import_tokens25 = require("@kjun-ui/tokens");
|
|
4102
4102
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4103
|
-
function
|
|
4103
|
+
function KjunPopover({
|
|
4104
4104
|
noPadding = false,
|
|
4105
4105
|
open: controlled,
|
|
4106
4106
|
onOpenChange,
|
|
@@ -4150,7 +4150,7 @@ function DsPopover({
|
|
|
4150
4150
|
)
|
|
4151
4151
|
] });
|
|
4152
4152
|
}
|
|
4153
|
-
function
|
|
4153
|
+
function KjunTooltip({
|
|
4154
4154
|
content: message = "",
|
|
4155
4155
|
placement = "top",
|
|
4156
4156
|
delay = 0,
|
|
@@ -4267,9 +4267,9 @@ var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
|
4267
4267
|
var DropdownContext = (0, import_react39.createContext)(null);
|
|
4268
4268
|
var MenuIconSlotContext = (0, import_react39.createContext)(false);
|
|
4269
4269
|
function hasLeadingIcon(node) {
|
|
4270
|
-
return import_react39.Children.toArray(node).some((child) => (0, import_react39.isValidElement)(child) && (child.type === import_react39.Fragment ? hasLeadingIcon(child.props.children) : child.type ===
|
|
4270
|
+
return import_react39.Children.toArray(node).some((child) => (0, import_react39.isValidElement)(child) && (child.type === import_react39.Fragment ? hasLeadingIcon(child.props.children) : child.type === KjunDropdownItem && !!child.props.icon));
|
|
4271
4271
|
}
|
|
4272
|
-
function
|
|
4272
|
+
function KjunDropdown({
|
|
4273
4273
|
disabled = false,
|
|
4274
4274
|
placement = "bottom-start",
|
|
4275
4275
|
trigger,
|
|
@@ -4279,7 +4279,7 @@ function DsDropdown({
|
|
|
4279
4279
|
}) {
|
|
4280
4280
|
const [open, setOpen] = (0, import_react39.useState)(false), currentOpen = (0, import_react39.useRef)(false), ref = (0, import_react39.useRef)(null);
|
|
4281
4281
|
let control = trigger;
|
|
4282
|
-
while ((0, import_react39.isValidElement)(control) && control.type ===
|
|
4282
|
+
while ((0, import_react39.isValidElement)(control) && control.type === KjunTooltip)
|
|
4283
4283
|
control = control.props.children;
|
|
4284
4284
|
const unavailable = disabled || (0, import_react39.isValidElement)(control) && !!(control.props.disabled || control.props.loading);
|
|
4285
4285
|
const change = (v) => {
|
|
@@ -4315,7 +4315,7 @@ function DsDropdown({
|
|
|
4315
4315
|
)
|
|
4316
4316
|
] });
|
|
4317
4317
|
}
|
|
4318
|
-
function
|
|
4318
|
+
function KjunDropdownItem({
|
|
4319
4319
|
variant = "default",
|
|
4320
4320
|
icon,
|
|
4321
4321
|
disabled = false,
|
|
@@ -4353,14 +4353,14 @@ function DsDropdownItem({
|
|
|
4353
4353
|
opacity: disabled ? import_tokens26.tokens.states.opacity.disabled : 1
|
|
4354
4354
|
}),
|
|
4355
4355
|
children: [
|
|
4356
|
-
icon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4356
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(KjunIcon, { name: icon, size: import_tokens26.tokens.extensions.menu.iconSize, color: iconColor }) : reserveIcon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native30.View, { style: { width: import_tokens26.tokens.extensions.menu.iconSize }, accessible: false }),
|
|
4357
4357
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native30.View, { style: { flexGrow: 1, flexShrink: 1 }, children: content(children, { color, fontSize: import_tokens26.tokens.extensions.menu.optionFontSize, lineHeight: import_tokens26.tokens.extensions.menu.optionLineHeight }) }),
|
|
4358
|
-
selected !== null && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native30.View, { style: { opacity: selected ? 1 : 0 }, accessible: false, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4358
|
+
selected !== null && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native30.View, { style: { opacity: selected ? 1 : 0 }, accessible: false, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(KjunIcon, { name: "check", size: import_tokens26.tokens.extensions.menu.iconSize, color: colors.brand }) })
|
|
4359
4359
|
]
|
|
4360
4360
|
}
|
|
4361
4361
|
);
|
|
4362
4362
|
}
|
|
4363
|
-
function
|
|
4363
|
+
function KjunDropdownDivider() {
|
|
4364
4364
|
const { colors } = useKjunStyles();
|
|
4365
4365
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4366
4366
|
import_react_native30.View,
|
|
@@ -4370,7 +4370,7 @@ function DsDropdownDivider() {
|
|
|
4370
4370
|
}
|
|
4371
4371
|
);
|
|
4372
4372
|
}
|
|
4373
|
-
function
|
|
4373
|
+
function KjunMenuButton({
|
|
4374
4374
|
label,
|
|
4375
4375
|
size = "md",
|
|
4376
4376
|
variant = "secondary",
|
|
@@ -4386,7 +4386,7 @@ function DsMenuButton({
|
|
|
4386
4386
|
}) {
|
|
4387
4387
|
const [open, setOpen] = (0, import_react39.useState)(false);
|
|
4388
4388
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4389
|
-
|
|
4389
|
+
KjunDropdown,
|
|
4390
4390
|
{
|
|
4391
4391
|
...props,
|
|
4392
4392
|
onOpen: () => {
|
|
@@ -4398,13 +4398,13 @@ function DsMenuButton({
|
|
|
4398
4398
|
onClose == null ? void 0 : onClose();
|
|
4399
4399
|
},
|
|
4400
4400
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4401
|
-
|
|
4401
|
+
KjunTooltip,
|
|
4402
4402
|
{
|
|
4403
4403
|
content: open ? "" : tooltip,
|
|
4404
4404
|
placement: tooltipPlacement,
|
|
4405
4405
|
delay: tooltipDelay,
|
|
4406
4406
|
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4407
|
-
|
|
4407
|
+
KjunButton,
|
|
4408
4408
|
{
|
|
4409
4409
|
size,
|
|
4410
4410
|
variant,
|
|
@@ -4564,7 +4564,7 @@ function OptionRow({
|
|
|
4564
4564
|
}),
|
|
4565
4565
|
children: [
|
|
4566
4566
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native31.View, { style: { flex: 1 }, children: content(children || label, { fontSize: import_tokens27.tokens.extensions.menu.optionFontSize, lineHeight: import_tokens27.tokens.extensions.menu.optionLineHeight }) }),
|
|
4567
|
-
selected && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4567
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(KjunIcon, { name: "check", size: import_tokens27.tokens.extensions.menu.iconSize, color: colors.brand })
|
|
4568
4568
|
]
|
|
4569
4569
|
}
|
|
4570
4570
|
);
|
|
@@ -4572,7 +4572,7 @@ function OptionRow({
|
|
|
4572
4572
|
|
|
4573
4573
|
// packages/native/src/combobox.tsx
|
|
4574
4574
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4575
|
-
function
|
|
4575
|
+
function KjunCombobox({
|
|
4576
4576
|
value,
|
|
4577
4577
|
options = [],
|
|
4578
4578
|
placeholder = "\uAC80\uC0C9 \uB610\uB294 \uC120\uD0DD",
|
|
@@ -4680,7 +4680,7 @@ function SearchField({
|
|
|
4680
4680
|
onSubmitEditing: onEnter
|
|
4681
4681
|
};
|
|
4682
4682
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
4683
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native32.View, { ref, collapsable: false, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4683
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native32.View, { ref, collapsable: false, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(KjunInput, { ...inputProps, ...import_react_native32.Platform.OS === "web" ? { onClick: openFromPress } : { onPressIn: openFromPress }, "aria-expanded": open && !disabled, onBlur: focusGuard.clear, onFocus: () => {
|
|
4684
4684
|
if (!clearing.current && focusGuard.canOpen()) onOpenChange(true);
|
|
4685
4685
|
} }) }),
|
|
4686
4686
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
@@ -4702,12 +4702,12 @@ function SearchField({
|
|
|
4702
4702
|
borderBottomWidth: import_tokens28.tokens.border.defaultWidth,
|
|
4703
4703
|
borderBottomColor: colors.border
|
|
4704
4704
|
},
|
|
4705
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4705
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(KjunInput, { ...inputProps, nativeID: searchId, autoFocus: true })
|
|
4706
4706
|
}
|
|
4707
4707
|
),
|
|
4708
4708
|
loading ? (
|
|
4709
4709
|
// Centered like the Select loading row on every platform.
|
|
4710
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native32.View, { style: { padding: import_tokens28.tokens.dimension.value12, alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4710
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native32.View, { style: { padding: import_tokens28.tokens.dimension.value12, alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(KjunSpinner, { size: "sm", text: "\uAC80\uC0C9 \uC911..." }) })
|
|
4711
4711
|
) : failed ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4712
4712
|
KText,
|
|
4713
4713
|
{
|
|
@@ -4758,7 +4758,7 @@ function displayMonth(value) {
|
|
|
4758
4758
|
const date = /* @__PURE__ */ new Date(value + "T12:00:00");
|
|
4759
4759
|
return Number.isNaN(date.getTime()) ? /* @__PURE__ */ new Date() : date;
|
|
4760
4760
|
}
|
|
4761
|
-
function
|
|
4761
|
+
function KjunDatePicker({
|
|
4762
4762
|
value,
|
|
4763
4763
|
min,
|
|
4764
4764
|
max,
|
|
@@ -4823,7 +4823,7 @@ function DsDatePicker({
|
|
|
4823
4823
|
}
|
|
4824
4824
|
),
|
|
4825
4825
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4826
|
-
|
|
4826
|
+
KjunIcon,
|
|
4827
4827
|
{
|
|
4828
4828
|
name: "calendar",
|
|
4829
4829
|
size: spec.iconSize,
|
|
@@ -4854,7 +4854,7 @@ function DsDatePicker({
|
|
|
4854
4854
|
},
|
|
4855
4855
|
children: [
|
|
4856
4856
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4857
|
-
|
|
4857
|
+
KjunButton,
|
|
4858
4858
|
{
|
|
4859
4859
|
size: "sm",
|
|
4860
4860
|
variant: "ghost",
|
|
@@ -4870,7 +4870,7 @@ function DsDatePicker({
|
|
|
4870
4870
|
"\uC6D4"
|
|
4871
4871
|
] }),
|
|
4872
4872
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4873
|
-
|
|
4873
|
+
KjunButton,
|
|
4874
4874
|
{
|
|
4875
4875
|
size: "sm",
|
|
4876
4876
|
variant: "ghost",
|
|
@@ -5035,7 +5035,7 @@ function useSearchInputModel({
|
|
|
5035
5035
|
|
|
5036
5036
|
// packages/native/src/search-input.tsx
|
|
5037
5037
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5038
|
-
function
|
|
5038
|
+
function KjunSearchInput({
|
|
5039
5039
|
value,
|
|
5040
5040
|
placeholder = "\uAC80\uC0C9...",
|
|
5041
5041
|
ariaLabel,
|
|
@@ -5070,7 +5070,7 @@ function DsSearchInput({
|
|
|
5070
5070
|
};
|
|
5071
5071
|
if (!loadOptions)
|
|
5072
5072
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5073
|
-
|
|
5073
|
+
KjunInput,
|
|
5074
5074
|
{
|
|
5075
5075
|
error,
|
|
5076
5076
|
value: query,
|
|
@@ -5169,7 +5169,7 @@ function useSelectState(controlled, disabled, pageSize, onOpenChange) {
|
|
|
5169
5169
|
// packages/native/src/select-control.tsx
|
|
5170
5170
|
var import_react_native35 = require("react-native");
|
|
5171
5171
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5172
|
-
function
|
|
5172
|
+
function KjunSelect({
|
|
5173
5173
|
value,
|
|
5174
5174
|
options = [],
|
|
5175
5175
|
placeholder = "\uC120\uD0DD",
|
|
@@ -5280,7 +5280,7 @@ function DsSelect({
|
|
|
5280
5280
|
}, children: label || placeholder })
|
|
5281
5281
|
] }),
|
|
5282
5282
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native35.View, { style: { transform: [{ rotate: expanded ? "180deg" : "0deg" }] }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5283
|
-
|
|
5283
|
+
KjunIcon,
|
|
5284
5284
|
{
|
|
5285
5285
|
name: "chevron-down",
|
|
5286
5286
|
size: compound ? import_tokens31.tokens.extensions.timePicker.iconSize : spec.iconSize,
|
|
@@ -5332,7 +5332,7 @@ function DsSelect({
|
|
|
5332
5332
|
borderBottomColor: colors.border
|
|
5333
5333
|
},
|
|
5334
5334
|
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5335
|
-
|
|
5335
|
+
KjunInput,
|
|
5336
5336
|
{
|
|
5337
5337
|
autoFocus: true,
|
|
5338
5338
|
value: query,
|
|
@@ -5348,7 +5348,7 @@ function DsSelect({
|
|
|
5348
5348
|
)
|
|
5349
5349
|
}
|
|
5350
5350
|
),
|
|
5351
|
-
loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native35.View, { style: { padding: import_tokens31.tokens.dimension.value12 }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5351
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native35.View, { style: { padding: import_tokens31.tokens.dimension.value12 }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(KjunSpinner, { size: "sm", text: "\uAC80\uC0C9 \uC911..." }) }) : visible.map(({ option: o, key }, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5352
5352
|
OptionRow,
|
|
5353
5353
|
{
|
|
5354
5354
|
selected: selected(o),
|
|
@@ -5378,7 +5378,7 @@ function DsSelect({
|
|
|
5378
5378
|
}
|
|
5379
5379
|
),
|
|
5380
5380
|
!loading && visible.length < matching.length && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5381
|
-
|
|
5381
|
+
KjunButton,
|
|
5382
5382
|
{
|
|
5383
5383
|
size: "sm",
|
|
5384
5384
|
variant: "ghost",
|
|
@@ -5597,7 +5597,7 @@ function usePanelFocus(root) {
|
|
|
5597
5597
|
// packages/native/src/tabs.tsx
|
|
5598
5598
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5599
5599
|
var TabContext = (0, import_react51.createContext)({ value: "", id: "", names: [] });
|
|
5600
|
-
function
|
|
5600
|
+
function KjunTabs({
|
|
5601
5601
|
value,
|
|
5602
5602
|
items = [],
|
|
5603
5603
|
density = "comfortable",
|
|
@@ -5613,15 +5613,15 @@ function DsTabs({
|
|
|
5613
5613
|
const { colors } = useKjunStyles(), panes = import_react51.Children.toArray(children).filter(
|
|
5614
5614
|
import_react51.isValidElement
|
|
5615
5615
|
);
|
|
5616
|
-
const tabs = items.length ? items : panes.filter((child) => child.type ===
|
|
5617
|
-
const id = (0, import_react51.useId)(), root = (0, import_react51.useRef)(null);
|
|
5616
|
+
const tabs = items.length ? items : panes.filter((child) => child.type === KjunTabPane).map((child) => child.props);
|
|
5617
|
+
const id = "kjun-" + (0, import_react51.useId)(), root = (0, import_react51.useRef)(null);
|
|
5618
5618
|
const menuState = (0, import_react51.useRef)({ tabs, onTabMenu });
|
|
5619
5619
|
menuState.current = { tabs, onTabMenu };
|
|
5620
5620
|
const pressedMenu = (0, import_react51.useRef)(null);
|
|
5621
5621
|
(0, import_react51.useLayoutEffect)(() => {
|
|
5622
5622
|
if (!onTabMenu || !tabs.some((tab) => tab.name === pressedMenu.current && !tab.disabled)) pressedMenu.current = null;
|
|
5623
5623
|
}, [tabs, onTabMenu]);
|
|
5624
|
-
const panelNames = panes.filter((child) => child.type ===
|
|
5624
|
+
const panelNames = panes.filter((child) => child.type === KjunTabPane).map((child) => child.props.name);
|
|
5625
5625
|
const geometry2 = import_tokens33.tokens.extensions.tabs;
|
|
5626
5626
|
const underline = variant === "underline";
|
|
5627
5627
|
const [hoveredTab, setHoveredTab] = (0, import_react51.useState)(null);
|
|
@@ -5752,7 +5752,7 @@ function DsTabs({
|
|
|
5752
5752
|
},
|
|
5753
5753
|
children: [
|
|
5754
5754
|
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5755
|
-
|
|
5755
|
+
KjunIcon,
|
|
5756
5756
|
{
|
|
5757
5757
|
name: tab.icon,
|
|
5758
5758
|
size: geometry2.iconSize,
|
|
@@ -5803,7 +5803,7 @@ function DsTabs({
|
|
|
5803
5803
|
children && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native37.View, { style: { marginTop: geometry2.contentGap }, children })
|
|
5804
5804
|
] }) });
|
|
5805
5805
|
}
|
|
5806
|
-
function
|
|
5806
|
+
function KjunTabPane({ name, children }) {
|
|
5807
5807
|
const { value, id, names } = (0, import_react51.useContext)(TabContext);
|
|
5808
5808
|
const root = (0, import_react51.useRef)(null);
|
|
5809
5809
|
usePanelFocus(root);
|
|
@@ -5829,7 +5829,7 @@ function DsTabPane({ name, children }) {
|
|
|
5829
5829
|
// packages/native/src/navigation.tsx
|
|
5830
5830
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5831
5831
|
var AccordionContext = (0, import_react52.createContext)(null);
|
|
5832
|
-
function
|
|
5832
|
+
function KjunAccordion({
|
|
5833
5833
|
multiple = false,
|
|
5834
5834
|
tone = "card",
|
|
5835
5835
|
children
|
|
@@ -5853,14 +5853,14 @@ function DsAccordion({
|
|
|
5853
5853
|
}
|
|
5854
5854
|
);
|
|
5855
5855
|
}
|
|
5856
|
-
function
|
|
5856
|
+
function KjunAccordionItem({
|
|
5857
5857
|
title = "",
|
|
5858
5858
|
defaultOpen = false,
|
|
5859
5859
|
disabled = false,
|
|
5860
5860
|
header,
|
|
5861
5861
|
children
|
|
5862
5862
|
}) {
|
|
5863
|
-
const { colors } = useKjunStyles(), group = (0, import_react52.useContext)(AccordionContext), id = (0, import_react52.useId)(), [own, setOwn] = (0, import_react52.useState)(defaultOpen), open = group ? group.opened.has(id) : own;
|
|
5863
|
+
const { colors } = useKjunStyles(), group = (0, import_react52.useContext)(AccordionContext), id = "kjun-" + (0, import_react52.useId)(), [own, setOwn] = (0, import_react52.useState)(defaultOpen), open = group ? group.opened.has(id) : own;
|
|
5864
5864
|
const rotation = useMotionValue(open ? 1 : 0, import_tokens34.tokens.motion.collapse, void 0, void 0, true);
|
|
5865
5865
|
const geometry2 = import_tokens34.tokens.extensions.accordion;
|
|
5866
5866
|
const [hovered, setHovered] = (0, import_react52.useState)(false);
|
|
@@ -5895,7 +5895,7 @@ function DsAccordionItem({
|
|
|
5895
5895
|
}),
|
|
5896
5896
|
children: [
|
|
5897
5897
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native38.View, { style: { flex: 1, minWidth: 0 }, children: content(header || title, { ...typeStyle("control"), ...wrapping }) }),
|
|
5898
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native38.Animated.View, { style: { flexShrink: 0, transform: [{ rotate: rotation.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] }) }] }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5898
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native38.Animated.View, { style: { flexShrink: 0, transform: [{ rotate: rotation.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] }) }] }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(KjunIcon, { name: "chevron-down", size: geometry2.iconSize, color: colors.textSecondary }) })
|
|
5899
5899
|
]
|
|
5900
5900
|
}
|
|
5901
5901
|
),
|
|
@@ -5909,7 +5909,7 @@ function DsAccordionItem({
|
|
|
5909
5909
|
) })
|
|
5910
5910
|
] });
|
|
5911
5911
|
}
|
|
5912
|
-
function
|
|
5912
|
+
function KjunBreadcrumb({
|
|
5913
5913
|
items,
|
|
5914
5914
|
renderLink,
|
|
5915
5915
|
onNavigate,
|
|
@@ -5928,7 +5928,7 @@ function DsBreadcrumb({
|
|
|
5928
5928
|
},
|
|
5929
5929
|
children: items.map((item, i) => {
|
|
5930
5930
|
const label = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native38.View, { style: { flexDirection: "row", alignItems: "center", gap: import_tokens34.tokens.dimension.value4 }, children: [
|
|
5931
|
-
item.icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5931
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(KjunIcon, { name: item.icon, size: import_tokens34.tokens.extensions.breadcrumb.iconSize, color: colors.textSecondary }),
|
|
5932
5932
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5933
5933
|
KText,
|
|
5934
5934
|
{
|
|
@@ -5942,7 +5942,7 @@ function DsBreadcrumb({
|
|
|
5942
5942
|
] });
|
|
5943
5943
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react52.Fragment, { children: [
|
|
5944
5944
|
i > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5945
|
-
|
|
5945
|
+
KjunIcon,
|
|
5946
5946
|
{
|
|
5947
5947
|
name: "chevron-right",
|
|
5948
5948
|
size: import_tokens34.tokens.extensions.breadcrumb.separatorSize,
|
|
@@ -5964,7 +5964,7 @@ function DsBreadcrumb({
|
|
|
5964
5964
|
}
|
|
5965
5965
|
);
|
|
5966
5966
|
}
|
|
5967
|
-
function
|
|
5967
|
+
function KjunPagination({
|
|
5968
5968
|
currentPage,
|
|
5969
5969
|
page,
|
|
5970
5970
|
totalPages,
|
|
@@ -6006,7 +6006,7 @@ function DsPagination({
|
|
|
6006
6006
|
};
|
|
6007
6007
|
const arrowSize = (_b = Object.keys(import_tokens34.tokens.button.iconSizes).find((size) => import_tokens34.tokens.button.iconSizes[size] === import_tokens34.tokens.extensions.pagination.iconSize)) != null ? _b : "sm";
|
|
6008
6008
|
const button = (target, label, icon) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6009
|
-
|
|
6009
|
+
KjunButton,
|
|
6010
6010
|
{
|
|
6011
6011
|
style: pageButtonStyle,
|
|
6012
6012
|
size: arrowSize,
|
|
@@ -6051,7 +6051,7 @@ function DsPagination({
|
|
|
6051
6051
|
},
|
|
6052
6052
|
children: [
|
|
6053
6053
|
showSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native38.View, { style: { minWidth: import_tokens34.tokens.extensions.pagination.selectorMinimumWidth }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6054
|
-
|
|
6054
|
+
KjunSelect,
|
|
6055
6055
|
{
|
|
6056
6056
|
size: "sm",
|
|
6057
6057
|
ariaLabel: "\uD398\uC774\uC9C0\uB2F9 \uD56D\uBAA9 \uC218",
|
|
@@ -6076,7 +6076,7 @@ function DsPagination({
|
|
|
6076
6076
|
totalPages
|
|
6077
6077
|
] }) : pages.map(
|
|
6078
6078
|
(n, i) => typeof n === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(KText, { children: "..." }, "dots" + i) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6079
|
-
|
|
6079
|
+
KjunButton,
|
|
6080
6080
|
{
|
|
6081
6081
|
style: pageButtonStyle,
|
|
6082
6082
|
size: "sm",
|
|
@@ -6104,7 +6104,7 @@ var import_tokens35 = require("@kjun-ui/tokens");
|
|
|
6104
6104
|
var import_react53 = require("react");
|
|
6105
6105
|
var import_react_native39 = require("react-native");
|
|
6106
6106
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6107
|
-
function
|
|
6107
|
+
function KjunIconToggle({
|
|
6108
6108
|
active = false,
|
|
6109
6109
|
activeIcon,
|
|
6110
6110
|
inactiveIcon,
|
|
@@ -6122,7 +6122,7 @@ function DsIconToggle({
|
|
|
6122
6122
|
const { colors } = useKjunStyles();
|
|
6123
6123
|
const navigation = (0, import_react53.useContext)(TopNavigationContext);
|
|
6124
6124
|
const box = navigation ? navigation.controlSize : size === "xs" ? import_tokens35.tokens.extensions.iconToggle.compactSize : import_tokens35.tokens.extensions.iconToggle.sizes[size];
|
|
6125
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(KjunTooltip, { content: disabled || loading ? "" : tooltip != null ? tooltip : ariaLabel, placement: tooltipPlacement, delay: tooltipDelay, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6126
6126
|
AccessiblePressable,
|
|
6127
6127
|
{
|
|
6128
6128
|
accessibilityRole: "button",
|
|
@@ -6159,8 +6159,8 @@ function DsIconToggle({
|
|
|
6159
6159
|
}),
|
|
6160
6160
|
children: ({ pressed, hovered }) => {
|
|
6161
6161
|
var _a;
|
|
6162
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native39.View, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", borderRadius: import_tokens35.tokens.extensions.iconToggle.radii[size], backgroundColor: !disabled && !loading && (pressed || hovered) ? colors.hover : "transparent" }, children: loading ? navigation ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6163
|
-
|
|
6162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native39.View, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", borderRadius: import_tokens35.tokens.extensions.iconToggle.radii[size], backgroundColor: !disabled && !loading && (pressed || hovered) ? colors.hover : "transparent" }, children: loading ? navigation ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(KjunIcon, { name: "loader-2", spin: true, size: navigation.iconSize }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(KjunSpinner, { size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6163
|
+
KjunIcon,
|
|
6164
6164
|
{
|
|
6165
6165
|
name: active ? activeIcon : inactiveIcon || activeIcon,
|
|
6166
6166
|
filled: active,
|
|
@@ -6172,7 +6172,7 @@ function DsIconToggle({
|
|
|
6172
6172
|
}
|
|
6173
6173
|
) });
|
|
6174
6174
|
}
|
|
6175
|
-
function
|
|
6175
|
+
function KjunCopyButton({
|
|
6176
6176
|
value,
|
|
6177
6177
|
ariaLabel,
|
|
6178
6178
|
text,
|
|
@@ -6237,7 +6237,7 @@ function DsCopyButton({
|
|
|
6237
6237
|
}),
|
|
6238
6238
|
children: [
|
|
6239
6239
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6240
|
-
|
|
6240
|
+
KjunIcon,
|
|
6241
6241
|
{
|
|
6242
6242
|
name: copied ? "check" : "copy",
|
|
6243
6243
|
size: import_tokens35.tokens.button.iconSizes[size],
|
|
@@ -6258,7 +6258,7 @@ function DsCopyButton({
|
|
|
6258
6258
|
}
|
|
6259
6259
|
) });
|
|
6260
6260
|
}
|
|
6261
|
-
function
|
|
6261
|
+
function KjunRefreshButton({
|
|
6262
6262
|
targetName = "",
|
|
6263
6263
|
mode = "icon",
|
|
6264
6264
|
text = "\uC0C8\uB85C\uACE0\uCE68",
|
|
@@ -6275,8 +6275,8 @@ function DsRefreshButton({
|
|
|
6275
6275
|
const reduced = useReducedMotion();
|
|
6276
6276
|
const label = ariaLabel || [targetName, "\uC0C8\uB85C\uACE0\uCE68"].filter(Boolean).join(" ");
|
|
6277
6277
|
const hint = tooltip != null ? tooltip : mode === "icon" ? label : "";
|
|
6278
|
-
const button = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6279
|
-
|
|
6278
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(KjunTooltip, { content: props.disabled || props.loading ? "" : hint, placement: tooltipPlacement, delay: tooltipDelay, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6279
|
+
KjunButton,
|
|
6280
6280
|
{
|
|
6281
6281
|
...props,
|
|
6282
6282
|
size,
|
|
@@ -6298,14 +6298,14 @@ function safeExternalUrl(href) {
|
|
|
6298
6298
|
return "";
|
|
6299
6299
|
}
|
|
6300
6300
|
}
|
|
6301
|
-
function
|
|
6301
|
+
function KjunExternalLink({
|
|
6302
6302
|
href = "",
|
|
6303
6303
|
mode = "text",
|
|
6304
6304
|
label,
|
|
6305
6305
|
children,
|
|
6306
6306
|
openUrl
|
|
6307
6307
|
}) {
|
|
6308
|
-
const { colors } = useKjunStyles(), url = safeExternalUrl(href), name = label || (mode === "icon" ? "\uC678\uBD80 \uB9C1\uD06C" : void 0), body = mode === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6308
|
+
const { colors } = useKjunStyles(), url = safeExternalUrl(href), name = label || (mode === "icon" ? "\uC678\uBD80 \uB9C1\uD06C" : void 0), body = mode === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(KjunIcon, { name: "external-link", color: colors.text }) : content(children);
|
|
6309
6309
|
return url ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6310
6310
|
AccessiblePressable,
|
|
6311
6311
|
{
|
|
@@ -6317,13 +6317,13 @@ function DsExternalLink({
|
|
|
6317
6317
|
// Like Web, text links show the new-window cue after the text.
|
|
6318
6318
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native39.View, { style: { flexDirection: "row", alignItems: "center", gap: import_tokens35.tokens.dimension.value4 }, children: [
|
|
6319
6319
|
body,
|
|
6320
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6320
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(KjunIcon, { name: "external-link", size: import_tokens35.tokens.iconSizes.small, color: colors.text })
|
|
6321
6321
|
] })
|
|
6322
6322
|
) : body
|
|
6323
6323
|
}
|
|
6324
6324
|
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native39.View, { children: body });
|
|
6325
6325
|
}
|
|
6326
|
-
function
|
|
6326
|
+
function KjunScrollFade({ children }) {
|
|
6327
6327
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6328
6328
|
import_react_native39.ScrollView,
|
|
6329
6329
|
{
|
|
@@ -6350,7 +6350,7 @@ function useQueryDisplay(props) {
|
|
|
6350
6350
|
}
|
|
6351
6351
|
return (0, import_tokens36.queryDisplayStatus)(next, props);
|
|
6352
6352
|
}
|
|
6353
|
-
function
|
|
6353
|
+
function KjunDataState({
|
|
6354
6354
|
preserveContent = false,
|
|
6355
6355
|
refreshing = false,
|
|
6356
6356
|
refreshError,
|
|
@@ -6399,7 +6399,7 @@ function DsDataState({
|
|
|
6399
6399
|
backgroundColor: colors.surface
|
|
6400
6400
|
},
|
|
6401
6401
|
children: [
|
|
6402
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6402
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KjunSpinner, { size: "xs" }),
|
|
6403
6403
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KText, { style: { ...typeStyle("caption"), color: colors.textTertiary, flexShrink: 1, minWidth: 0 }, children: refreshingText })
|
|
6404
6404
|
]
|
|
6405
6405
|
}
|
|
@@ -6409,12 +6409,12 @@ function DsDataState({
|
|
|
6409
6409
|
{
|
|
6410
6410
|
accessibilityLabel: loadingText,
|
|
6411
6411
|
style: { paddingVertical: loadingPadding === "none" ? 0 : padding },
|
|
6412
|
-
children: loadingContent || (skeleton ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native40.View, { style: { gap: import_tokens36.tokens.dimension.value12 }, children: Array.from({ length: skeletonCount }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6413
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6412
|
+
children: loadingContent || (skeleton ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native40.View, { style: { gap: import_tokens36.tokens.dimension.value12 }, children: Array.from({ length: skeletonCount }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KjunSkeleton, { type: skeletonType }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native40.View, { style: { alignItems: "center", gap: import_tokens36.tokens.dimension.value12 }, children: [
|
|
6413
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KjunSpinner, { size: "md" }),
|
|
6414
6414
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KText, { style: { ...typeStyle("body"), color: colors.textSecondary, textAlign: "center", maxWidth: "100%" }, children: loadingText })
|
|
6415
6415
|
] }))
|
|
6416
6416
|
}
|
|
6417
|
-
) : blockingError ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native40.View, { style: { paddingVertical: padding }, children: errorContent || /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6417
|
+
) : blockingError ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native40.View, { style: { paddingVertical: padding }, children: errorContent || /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KjunAlert, { type: "danger", title: "\uC624\uB958 \uBC1C\uC0DD", actions: onRetry && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KjunButton, { variant: "secondary", onPress: onRetry, children: retryText }), children: query.error }) }) }) : empty ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataStateContentContext.Provider, { value: "empty", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native40.View, { style: { paddingVertical: padding }, children: emptyContent || /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KjunEmpty, { text: emptyText, icon: emptyIcon, children: emptyActionText && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KjunButton, { onPress: onEmptyAction, children: emptyActionText }) }) }) }) : null,
|
|
6418
6418
|
(!concealed || preserveContent && state.hasQueryResult) && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6419
6419
|
import_react_native40.View,
|
|
6420
6420
|
{
|
|
@@ -6433,7 +6433,7 @@ function DsDataState({
|
|
|
6433
6433
|
},
|
|
6434
6434
|
"content"
|
|
6435
6435
|
),
|
|
6436
|
-
visibleRefreshError && !state.initialLoading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native40.View, { style: { marginTop: import_tokens36.tokens.dimension.value12 }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6436
|
+
visibleRefreshError && !state.initialLoading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataStateContentContext.Provider, { value: "message", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native40.View, { style: { marginTop: import_tokens36.tokens.dimension.value12 }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KjunAlert, { type: "warning", size: "sm", actions: onRetry && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(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.` }) }) })
|
|
6437
6437
|
]
|
|
6438
6438
|
}
|
|
6439
6439
|
);
|
|
@@ -6442,7 +6442,7 @@ function BoundaryDescription() {
|
|
|
6442
6442
|
const { colors } = useKjunStyles();
|
|
6443
6443
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KText, { style: { ...typeStyle({ ...import_tokens36.tokens.typography.caption, fontSizePx: import_tokens36.tokens.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." });
|
|
6444
6444
|
}
|
|
6445
|
-
var
|
|
6445
|
+
var KjunErrorBoundary = class extends import_react54.Component {
|
|
6446
6446
|
constructor() {
|
|
6447
6447
|
super(...arguments);
|
|
6448
6448
|
this.state = { error: false };
|
|
@@ -6470,7 +6470,7 @@ var DsErrorBoundary = class extends import_react54.Component {
|
|
|
6470
6470
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(BoundaryDescription, {})
|
|
6471
6471
|
] }),
|
|
6472
6472
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6473
|
-
|
|
6473
|
+
KjunButton,
|
|
6474
6474
|
{
|
|
6475
6475
|
style: { alignSelf: "center" },
|
|
6476
6476
|
onPress: () => {
|
|
@@ -6529,28 +6529,28 @@ var marketRowStyle = { minHeight: marketGeometry.rowHeight, flexDirection: "row"
|
|
|
6529
6529
|
|
|
6530
6530
|
// packages/native/src/market-skeleton.tsx
|
|
6531
6531
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6532
|
-
function
|
|
6532
|
+
function KjunMarketTableSkeleton({ columns = [], rows = 8, showActions = false }) {
|
|
6533
6533
|
const { colors } = useKjunStyles();
|
|
6534
6534
|
const cols = normalizeMarketColumns(columns), layout = useMarketLayout(cols, showActions);
|
|
6535
6535
|
const actions = { width: marketGeometry.actionsWidth, paddingVertical: import_tokens39.tokens.dimension.value12, paddingHorizontal: import_tokens39.tokens.dimension.value4, justifyContent: "center", alignItems: "center" };
|
|
6536
6536
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.ScrollView, { horizontal: true, onLayout: layout.onLayout, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_native41.View, { style: { width: layout.width }, children: [
|
|
6537
6537
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_native41.View, { style: { ...marketHeaderStyle, borderBottomColor: colors.border }, children: [
|
|
6538
|
-
showActions && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: actions, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6538
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: actions, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(KjunSkeleton, { type: "block", width: import_tokens39.tokens.extensions.marketTable.actionSkeletonWidth, height: import_tokens39.tokens.extensions.marketTable.headerSkeletonHeight }) }),
|
|
6539
6539
|
cols.map((col, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: { width: layout.widths[i], padding: import_tokens39.tokens.dimension.value12, justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(KText, { style: { ...typeStyle("meta"), color: colors.textTertiary, textAlign: col.align }, children: col.label }) }, col.key || i))
|
|
6540
6540
|
] }),
|
|
6541
6541
|
Array.from({ length: Math.max(0, rows) }, (_, row) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_native41.View, { style: { ...marketRowStyle, borderBottomColor: colors.border }, children: [
|
|
6542
|
-
showActions && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: actions, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6542
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: actions, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(KjunSkeleton, { type: "block", width: import_tokens39.tokens.extensions.marketTable.actionSkeletonWidth, height: import_tokens39.tokens.extensions.financial.priceSkeletonHeight }) }),
|
|
6543
6543
|
cols.map((col, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: { width: layout.widths[i], paddingVertical: import_tokens39.tokens.dimension.value14, paddingHorizontal: import_tokens39.tokens.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__ */ (0, import_jsx_runtime38.jsxs)(import_react_native41.View, { style: { gap: import_tokens39.tokens.dimension.value2 }, children: [
|
|
6544
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: { height: import_tokens39.tokens.typography.body.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6545
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: { height: import_tokens39.tokens.typography.caption.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6546
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6544
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: { height: import_tokens39.tokens.typography.body.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(KjunSkeleton, { type: "block", width: "80%", height: import_tokens39.tokens.extensions.skeleton.lineHeights.md }) }),
|
|
6545
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native41.View, { style: { height: import_tokens39.tokens.typography.caption.lineHeightPx, justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(KjunSkeleton, { type: "block", width: "60%", height: import_tokens39.tokens.extensions.skeleton.lineHeights.sm }) })
|
|
6546
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(KjunSkeleton, { type: "block", width: import_tokens39.tokens.extensions.financial.priceSkeletonWidth, height: import_tokens39.tokens.extensions.financial.priceSkeletonHeight }) }, col.key || i))
|
|
6547
6547
|
] }, row))
|
|
6548
6548
|
] }) });
|
|
6549
6549
|
}
|
|
6550
6550
|
|
|
6551
6551
|
// packages/native/src/skeletons.tsx
|
|
6552
6552
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6553
|
-
function
|
|
6553
|
+
function KjunListSkeleton({
|
|
6554
6554
|
rows = 8,
|
|
6555
6555
|
variant = "market",
|
|
6556
6556
|
avatar = true,
|
|
@@ -6580,21 +6580,21 @@ function DsListSkeleton({
|
|
|
6580
6580
|
borderBottomColor: colors.border
|
|
6581
6581
|
},
|
|
6582
6582
|
children: [
|
|
6583
|
-
avatar && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6583
|
+
avatar && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(KjunSkeleton, { type: "avatar", width: avatarSize, height: avatarSize }),
|
|
6584
6584
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native42.View, { style: { flex: 1, minWidth: 0, gap: market ? import_tokens40.tokens.dimension.value2 : import_tokens40.tokens.extensions.skeleton.detailGap }, children: [
|
|
6585
6585
|
slot(0, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6586
|
-
|
|
6586
|
+
KjunSkeleton,
|
|
6587
6587
|
{
|
|
6588
6588
|
type: "block",
|
|
6589
6589
|
height: import_tokens40.tokens.extensions.skeleton.lineHeights.md,
|
|
6590
6590
|
width: i % 2 ? "80%" : "65%"
|
|
6591
6591
|
}
|
|
6592
6592
|
)),
|
|
6593
|
-
slot(1, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6593
|
+
slot(1, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(KjunSkeleton, { type: "block", height: import_tokens40.tokens.extensions.skeleton.lineHeights.sm, width: "50%" }))
|
|
6594
6594
|
] }),
|
|
6595
6595
|
quote && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native42.View, { style: { alignItems: "flex-end", gap: market ? import_tokens40.tokens.dimension.value2 : import_tokens40.tokens.extensions.skeleton.detailGap }, children: [
|
|
6596
|
-
slot(0, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6597
|
-
slot(1, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6596
|
+
slot(0, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(KjunSkeleton, { type: "block", height: import_tokens40.tokens.extensions.skeleton.quoteHeight, width: import_tokens40.tokens.extensions.skeleton.quoteWidth })),
|
|
6597
|
+
slot(1, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(KjunSkeleton, { type: "block", height: import_tokens40.tokens.extensions.skeleton.lineHeights.sm, width: import_tokens40.tokens.extensions.skeleton.detailWidth }))
|
|
6598
6598
|
] })
|
|
6599
6599
|
]
|
|
6600
6600
|
},
|
|
@@ -6603,7 +6603,7 @@ function DsListSkeleton({
|
|
|
6603
6603
|
}
|
|
6604
6604
|
);
|
|
6605
6605
|
}
|
|
6606
|
-
function
|
|
6606
|
+
function KjunFormSkeleton({
|
|
6607
6607
|
fields = ["", "", "", ""],
|
|
6608
6608
|
columns = 1,
|
|
6609
6609
|
multiline = false,
|
|
@@ -6634,10 +6634,10 @@ function DsFormSkeleton({
|
|
|
6634
6634
|
children: [
|
|
6635
6635
|
field ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(KText, { style: { color: colors.text, ...typeStyle("label") }, children: typeof field === "string" ? field : field.label }) : (
|
|
6636
6636
|
// The bar sits in a label-line slot so the field starts where the real input will.
|
|
6637
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native42.View, { style: { height: typeStyle("label").lineHeight, justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6637
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native42.View, { style: { height: typeStyle("label").lineHeight, justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(KjunSkeleton, { type: "block", height: import_tokens40.tokens.extensions.skeleton.formLabelHeight, width: import_tokens40.tokens.extensions.skeleton.formLabelWidth }) })
|
|
6638
6638
|
),
|
|
6639
6639
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native42.View, { style: { borderRadius: import_tokens40.tokens.input[size].radius, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6640
|
-
|
|
6640
|
+
KjunSkeleton,
|
|
6641
6641
|
{
|
|
6642
6642
|
type: "block",
|
|
6643
6643
|
height: typeof field === "object" && field.height != null ? field.height : multiline ? import_tokens40.tokens.input[size].lineHeight * 3 + import_tokens40.tokens.input[size].textareaPaddingY * 2 + 2 * import_tokens40.tokens.border.controlWidth : import_tokens40.tokens.input[size].height
|
|
@@ -6650,7 +6650,7 @@ function DsFormSkeleton({
|
|
|
6650
6650
|
}
|
|
6651
6651
|
);
|
|
6652
6652
|
}
|
|
6653
|
-
function
|
|
6653
|
+
function KjunChartSkeleton({
|
|
6654
6654
|
loadingText = "\uCC28\uD2B8\uB97C \uBD88\uB7EC\uC624\uB294 \uC911",
|
|
6655
6655
|
kind = "line",
|
|
6656
6656
|
height = import_tokens40.tokens.extensions.chartSkeleton.height
|
|
@@ -6704,7 +6704,7 @@ function DsChartSkeleton({
|
|
|
6704
6704
|
alignItems: "center",
|
|
6705
6705
|
justifyContent: "center"
|
|
6706
6706
|
},
|
|
6707
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(KjunSkeleton, { type: "block", width: import_tokens40.tokens.extensions.chartSkeleton.donutLabelWidth, height: import_tokens40.tokens.extensions.chartSkeleton.donutLabelHeight })
|
|
6708
6708
|
}
|
|
6709
6709
|
) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
6710
6710
|
import_react_native_svg5.default,
|
|
@@ -6874,7 +6874,7 @@ function useCountUp(value, animated, fromPrevious) {
|
|
|
6874
6874
|
return useNumberMotion(value, animated, fromPrevious, useReducedMotion());
|
|
6875
6875
|
}
|
|
6876
6876
|
var MarketQuoteTypeContext = (0, import_react58.createContext)(null);
|
|
6877
|
-
function
|
|
6877
|
+
function KjunAnimatedNumber({
|
|
6878
6878
|
value,
|
|
6879
6879
|
decimals = 0,
|
|
6880
6880
|
prefix = "",
|
|
@@ -6909,7 +6909,7 @@ function DsAnimatedNumber({
|
|
|
6909
6909
|
}
|
|
6910
6910
|
);
|
|
6911
6911
|
}
|
|
6912
|
-
function
|
|
6912
|
+
function KjunFreshness({
|
|
6913
6913
|
stale = false,
|
|
6914
6914
|
source,
|
|
6915
6915
|
fetchedAt,
|
|
@@ -6917,14 +6917,14 @@ function DsFreshness({
|
|
|
6917
6917
|
}) {
|
|
6918
6918
|
const label = source === "close" ? "\uC885\uAC00" : "\uC9C0\uC5F0";
|
|
6919
6919
|
return stale ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6920
|
-
|
|
6920
|
+
KjunTooltip,
|
|
6921
6921
|
{
|
|
6922
6922
|
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)) : ""),
|
|
6923
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AccessiblePressable, { accessibilityLabel: label, focusRingRadius: import_tokens42.tokens.extensions.badge.radius, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6923
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AccessiblePressable, { accessibilityLabel: label, focusRingRadius: import_tokens42.tokens.extensions.badge.radius, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(KjunBadge, { variant: "warning", size: "xs", children: label }) })
|
|
6924
6924
|
}
|
|
6925
6925
|
) : null;
|
|
6926
6926
|
}
|
|
6927
|
-
function
|
|
6927
|
+
function KjunPriceCell({
|
|
6928
6928
|
value,
|
|
6929
6929
|
formatter,
|
|
6930
6930
|
stale = false,
|
|
@@ -6934,13 +6934,13 @@ function DsPriceCell({
|
|
|
6934
6934
|
fromPrevious = true
|
|
6935
6935
|
}) {
|
|
6936
6936
|
const { colors } = useKjunStyles(), quoteType = (0, import_react58.useContext)(MarketQuoteTypeContext);
|
|
6937
|
-
return value == null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6937
|
+
return value == null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(KjunSkeleton, { type: "block", height: import_tokens42.tokens.extensions.financial.priceSkeletonHeight, width: import_tokens42.tokens.extensions.financial.priceSkeletonWidth }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native43.View, { style: { flexDirection: "row", alignItems: "center", gap: import_tokens42.tokens.extensions.financial.affixGap }, children: [
|
|
6938
6938
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6939
6939
|
import_react_native43.View,
|
|
6940
6940
|
{
|
|
6941
6941
|
style: quoteType ? void 0 : { paddingVertical: import_tokens42.tokens.extensions.financial.pillPaddingY, paddingHorizontal: import_tokens42.tokens.extensions.financial.pillPaddingX, borderRadius: import_tokens42.tokens.radius.radius9999 },
|
|
6942
6942
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6943
|
-
|
|
6943
|
+
KjunAnimatedNumber,
|
|
6944
6944
|
{
|
|
6945
6945
|
value,
|
|
6946
6946
|
formatter,
|
|
@@ -6950,10 +6950,10 @@ function DsPriceCell({
|
|
|
6950
6950
|
)
|
|
6951
6951
|
}
|
|
6952
6952
|
),
|
|
6953
|
-
showFreshness && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native43.View, { style: { alignSelf: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6953
|
+
showFreshness && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native43.View, { style: { alignSelf: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(KjunFreshness, { stale, source, fetchedAt }) })
|
|
6954
6954
|
] });
|
|
6955
6955
|
}
|
|
6956
|
-
function
|
|
6956
|
+
function KjunSignedValue({
|
|
6957
6957
|
value,
|
|
6958
6958
|
format: kind = "number",
|
|
6959
6959
|
isRaw = false,
|
|
@@ -6984,7 +6984,7 @@ function DsSignedValue({
|
|
|
6984
6984
|
backgroundColor: tone === "pill" && !stale && !loading && n !== null ? domainColor(domainColors, role + "Bg") : void 0
|
|
6985
6985
|
},
|
|
6986
6986
|
children: [
|
|
6987
|
-
loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6987
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(KjunSkeleton, { type: "block", width: import_tokens42.tokens.extensions.financial.signedSkeletonWidth, height: import_tokens42.tokens.extensions.financial.signedSkeletonHeight }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6988
6988
|
KText,
|
|
6989
6989
|
{
|
|
6990
6990
|
style: {
|
|
@@ -6998,7 +6998,7 @@ function DsSignedValue({
|
|
|
6998
6998
|
children: display
|
|
6999
6999
|
}
|
|
7000
7000
|
),
|
|
7001
|
-
!loading && showFreshness && stale && n !== null && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native43.View, { style: { alignSelf: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7001
|
+
!loading && showFreshness && stale && n !== null && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native43.View, { style: { alignSelf: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(KjunFreshness, { stale: true }) })
|
|
7002
7002
|
]
|
|
7003
7003
|
}
|
|
7004
7004
|
);
|
|
@@ -7006,7 +7006,7 @@ function DsSignedValue({
|
|
|
7006
7006
|
|
|
7007
7007
|
// packages/native/src/financial-display.tsx
|
|
7008
7008
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
7009
|
-
function
|
|
7009
|
+
function KjunDeviation({
|
|
7010
7010
|
value,
|
|
7011
7011
|
variant = "pill",
|
|
7012
7012
|
signalThreshold = 1,
|
|
@@ -7029,7 +7029,7 @@ function DsDeviation({
|
|
|
7029
7029
|
},
|
|
7030
7030
|
children: [
|
|
7031
7031
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7032
|
-
|
|
7032
|
+
KjunBadge,
|
|
7033
7033
|
{
|
|
7034
7034
|
variant: neutral ? "secondary" : n > 0 ? "price-up" : "price-down",
|
|
7035
7035
|
size: "sm",
|
|
@@ -7045,7 +7045,7 @@ function DsDeviation({
|
|
|
7045
7045
|
}
|
|
7046
7046
|
),
|
|
7047
7047
|
!signal && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native44.View, { style: { width: import_tokens43.tokens.extensions.financial.warningIconSize, flexShrink: 0 } }),
|
|
7048
|
-
signal && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native44.View, { style: { alignSelf: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7048
|
+
signal && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native44.View, { style: { alignSelf: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(KjunTooltip, { content: `\uAD34\uB9AC\uC728 ${signalThreshold}% \uCD08\uACFC \u2014 \uCC28\uC775\uAC70\uB798 \uAE30\uD68C \uAC00\uB2A5`, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7049
7049
|
AccessiblePressable,
|
|
7050
7050
|
{
|
|
7051
7051
|
accessibilityRole: "image",
|
|
@@ -7059,7 +7059,7 @@ function DsDeviation({
|
|
|
7059
7059
|
alignItems: "center",
|
|
7060
7060
|
justifyContent: "center"
|
|
7061
7061
|
},
|
|
7062
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(KjunIcon, { name: "alert-triangle", size: import_tokens43.tokens.extensions.financial.warningIconSize, color: colors.warning })
|
|
7063
7063
|
}
|
|
7064
7064
|
) }) }) })
|
|
7065
7065
|
]
|
|
@@ -7107,7 +7107,7 @@ function DsDeviation({
|
|
|
7107
7107
|
}
|
|
7108
7108
|
);
|
|
7109
7109
|
}
|
|
7110
|
-
function
|
|
7110
|
+
function KjunHeatmapCell({
|
|
7111
7111
|
value = 0,
|
|
7112
7112
|
min = 0,
|
|
7113
7113
|
max = 1,
|
|
@@ -7151,7 +7151,7 @@ function DsHeatmapCell({
|
|
|
7151
7151
|
}
|
|
7152
7152
|
);
|
|
7153
7153
|
}
|
|
7154
|
-
function
|
|
7154
|
+
function KjunProgressCell({
|
|
7155
7155
|
value = 0,
|
|
7156
7156
|
max = 100,
|
|
7157
7157
|
showLabel = true,
|
|
@@ -7214,7 +7214,7 @@ function DsProgressCell({
|
|
|
7214
7214
|
}
|
|
7215
7215
|
);
|
|
7216
7216
|
}
|
|
7217
|
-
function
|
|
7217
|
+
function KjunCollectionMark({
|
|
7218
7218
|
kind,
|
|
7219
7219
|
active = false,
|
|
7220
7220
|
size = "md"
|
|
@@ -7222,7 +7222,7 @@ function DsCollectionMark({
|
|
|
7222
7222
|
const { colors, domainColors } = useKjunStyles();
|
|
7223
7223
|
const box = import_tokens43.tokens.extensions.financial.markSizes[size], glyph = kind === "interest" ? import_tokens43.tokens.extensions.financial.heartMarkSizes[size] : box;
|
|
7224
7224
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native44.View, { style: { width: box, height: box, alignItems: "center", justifyContent: "center", overflow: "visible" }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7225
|
-
|
|
7225
|
+
KjunIcon,
|
|
7226
7226
|
{
|
|
7227
7227
|
name: kind === "favorite" ? "star" : "heart",
|
|
7228
7228
|
filled: active,
|
|
@@ -7241,15 +7241,15 @@ var executionStates = {
|
|
|
7241
7241
|
completed_with_errors: ["warning", "\uC644\uB8CC (\uC624\uB958)"],
|
|
7242
7242
|
failed: ["danger", "\uC2E4\uD328"]
|
|
7243
7243
|
};
|
|
7244
|
-
function
|
|
7244
|
+
function KjunExecutionStatusBadge({
|
|
7245
7245
|
status,
|
|
7246
7246
|
label,
|
|
7247
7247
|
size = "md"
|
|
7248
7248
|
}) {
|
|
7249
7249
|
const state = status ? executionStates[status] : void 0;
|
|
7250
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(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") });
|
|
7251
7251
|
}
|
|
7252
|
-
function
|
|
7252
|
+
function KjunSparkline({
|
|
7253
7253
|
data = [],
|
|
7254
7254
|
width = import_tokens43.tokens.extensions.financial.sparklineWidth,
|
|
7255
7255
|
height = import_tokens43.tokens.extensions.financial.sparklineHeight,
|
|
@@ -7260,7 +7260,7 @@ function DsSparkline({
|
|
|
7260
7260
|
stretch = false,
|
|
7261
7261
|
ariaLabel
|
|
7262
7262
|
}) {
|
|
7263
|
-
const { colors, domainColors } = useKjunStyles(), id = (0, import_react59.useId)().replace(/:/g, ""), values = data.filter(Number.isFinite), min = Math.min(...values), max = Math.max(...values), range = max - min || 1, points = values.map(
|
|
7263
|
+
const { colors, domainColors } = useKjunStyles(), id = "kjun-" + (0, import_react59.useId)().replace(/:/g, ""), values = data.filter(Number.isFinite), min = Math.min(...values), max = Math.max(...values), range = max - min || 1, points = values.map(
|
|
7264
7264
|
(v, i) => `${2 + i / Math.max(1, values.length - 1) * (width - 4)},${2 + height - 4 - (v - min) / range * (height - 4)}`
|
|
7265
7265
|
).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"));
|
|
7266
7266
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
@@ -7461,9 +7461,9 @@ function TableToolbar({
|
|
|
7461
7461
|
selected.length,
|
|
7462
7462
|
"\uAC1C \uC120\uD0DD"
|
|
7463
7463
|
] }),
|
|
7464
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7464
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(KjunButton, { size: "xs", variant: "ghost", onPress: toggleAll, children: "\uC804\uCCB4 \uC120\uD0DD" }),
|
|
7465
7465
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7466
|
-
|
|
7466
|
+
KjunButton,
|
|
7467
7467
|
{
|
|
7468
7468
|
size: "xs",
|
|
7469
7469
|
variant: "ghost",
|
|
@@ -7478,7 +7478,7 @@ function TableToolbar({
|
|
|
7478
7478
|
(searchable || toolbar) && // Like Web: the search toolbar sits on the surface so the filled search field stands out from it.
|
|
7479
7479
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native45.View, { style: { ...toolbarStyle, backgroundColor: colors.surface }, children: [
|
|
7480
7480
|
searchable && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native45.View, { style: { width: import_tokens45.tokens.table.searchWidth, maxWidth: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7481
|
-
|
|
7481
|
+
KjunInput,
|
|
7482
7482
|
{
|
|
7483
7483
|
size: "sm",
|
|
7484
7484
|
value: search,
|
|
@@ -7540,7 +7540,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7540
7540
|
},
|
|
7541
7541
|
children: [
|
|
7542
7542
|
selectable && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native46.View, { style: { width: geometry2.actionColumnWidth, alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7543
|
-
|
|
7543
|
+
KjunCheckbox,
|
|
7544
7544
|
{
|
|
7545
7545
|
size: "sm",
|
|
7546
7546
|
value: state.all,
|
|
@@ -7579,7 +7579,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7579
7579
|
}
|
|
7580
7580
|
),
|
|
7581
7581
|
sortable !== false && state.sort.key === col.key && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7582
|
-
|
|
7582
|
+
KjunIcon,
|
|
7583
7583
|
{
|
|
7584
7584
|
name: state.sort.order === "asc" ? "sort-ascending" : "sort-descending",
|
|
7585
7585
|
size: import_tokens46.tokens.table.sortIconSize,
|
|
@@ -7605,7 +7605,7 @@ function TableGrid({ initialLoading, skeletonRows, state, onRowClick, selectable
|
|
|
7605
7605
|
paddingHorizontal: cellPadding.x
|
|
7606
7606
|
},
|
|
7607
7607
|
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7608
|
-
|
|
7608
|
+
KjunSkeleton,
|
|
7609
7609
|
{
|
|
7610
7610
|
type: "block",
|
|
7611
7611
|
height: geometry2.skeletonHeight,
|
|
@@ -7721,7 +7721,7 @@ function TableCards({
|
|
|
7721
7721
|
const { colors } = useKjunStyles();
|
|
7722
7722
|
const { title, subtitle, badges, inline, sections, actions, columnsForSection } = layout;
|
|
7723
7723
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native47.View, { style: { gap: import_tokens47.tokens.extensions.tableCard.gap, padding: import_tokens47.tokens.extensions.tableCard.listPadding }, children: [
|
|
7724
|
-
initialLoading ? Array.from({ length: skeletonRows }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7724
|
+
initialLoading ? Array.from({ length: skeletonRows }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(KjunSkeleton, { type: "card" }, i)) : state.rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
7725
7725
|
AccessiblePressable,
|
|
7726
7726
|
{
|
|
7727
7727
|
accessible: false,
|
|
@@ -7867,7 +7867,7 @@ function TableCards({
|
|
|
7867
7867
|
|
|
7868
7868
|
// packages/native/src/table-view.tsx
|
|
7869
7869
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
7870
|
-
function
|
|
7870
|
+
function KjunTable(props) {
|
|
7871
7871
|
const {
|
|
7872
7872
|
skeletonRows = 8,
|
|
7873
7873
|
emptyText = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
@@ -7921,7 +7921,7 @@ function DsTable(props) {
|
|
|
7921
7921
|
});
|
|
7922
7922
|
};
|
|
7923
7923
|
const checkbox = (row, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7924
|
-
|
|
7924
|
+
KjunCheckbox,
|
|
7925
7925
|
{
|
|
7926
7926
|
value: state.selectedRow(row),
|
|
7927
7927
|
ariaLabel: `\uD589 \uC120\uD0DD ${i + 1}`,
|
|
@@ -7930,7 +7930,7 @@ function DsTable(props) {
|
|
|
7930
7930
|
}
|
|
7931
7931
|
);
|
|
7932
7932
|
const expand = (row, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7933
|
-
|
|
7933
|
+
KjunButton,
|
|
7934
7934
|
{
|
|
7935
7935
|
variant: "ghost",
|
|
7936
7936
|
size: "xs",
|
|
@@ -7960,7 +7960,7 @@ function DsTable(props) {
|
|
|
7960
7960
|
}
|
|
7961
7961
|
),
|
|
7962
7962
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
7963
|
-
|
|
7963
|
+
KjunDataState,
|
|
7964
7964
|
{
|
|
7965
7965
|
queryKey: props.queryKey,
|
|
7966
7966
|
resultKey: query.usesQueryState ? query.hasCurrentResult ? props.queryKey : null : void 0,
|
|
@@ -7972,7 +7972,7 @@ function DsTable(props) {
|
|
|
7972
7972
|
children: [
|
|
7973
7973
|
card ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableCards, { ...{ initialLoading: query.initialLoading, skeletonRows, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, layout } }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableGrid, { ...{ initialLoading: query.initialLoading, skeletonRows, state, onRowClick, selectable, checkbox, cell, expandable, expand, renderExpand, emptyContent, emptyText, visible, maxHeight, stickyHeader, compact, striped, hoverable }, sortable: props.sortable }),
|
|
7974
7974
|
pagination && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7975
|
-
|
|
7975
|
+
KjunPagination,
|
|
7976
7976
|
{
|
|
7977
7977
|
currentPage: pagination.page,
|
|
7978
7978
|
totalPages: Math.ceil(
|
|
@@ -8014,7 +8014,7 @@ var kpiFormat = (item, value = item.value) => {
|
|
|
8014
8014
|
maximumFractionDigits: (_b = item.decimals) != null ? _b : 0
|
|
8015
8015
|
}).format(item.semantic === "price" ? Math.abs(value) : value);
|
|
8016
8016
|
};
|
|
8017
|
-
function
|
|
8017
|
+
function KjunKpiHero(props) {
|
|
8018
8018
|
const {
|
|
8019
8019
|
loading = false,
|
|
8020
8020
|
label,
|
|
@@ -8093,7 +8093,7 @@ function DsKpiHero(props) {
|
|
|
8093
8093
|
),
|
|
8094
8094
|
loading ? (
|
|
8095
8095
|
// Placeholders fill each line's height, like Web's 1lh; the value width approximates Web's 7ch.
|
|
8096
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8096
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(KjunSkeleton, { type: "block", height: typeStyle(numberRole).lineHeight, width: font * 4.8 })
|
|
8097
8097
|
) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8098
8098
|
KpiNumberLine,
|
|
8099
8099
|
{
|
|
@@ -8103,7 +8103,7 @@ function DsKpiHero(props) {
|
|
|
8103
8103
|
suffixGap: geometry2.suffixGap,
|
|
8104
8104
|
style: { ...numeric, ...typeStyle(numberRole) },
|
|
8105
8105
|
unitStyle,
|
|
8106
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(KjunAnimatedNumber, { value, decimals, animated, formatter, style: typeStyle(numberRole) })
|
|
8107
8107
|
}
|
|
8108
8108
|
),
|
|
8109
8109
|
showDelta && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -8116,7 +8116,7 @@ function DsKpiHero(props) {
|
|
|
8116
8116
|
alignItems: "baseline",
|
|
8117
8117
|
gap: spec.deltaGap
|
|
8118
8118
|
},
|
|
8119
|
-
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8119
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(KjunSkeleton, { type: "block", height: typeStyle("numberMd").lineHeight, width: geometry2.deltaSkeletonWidth }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
8120
8120
|
deltaAbsolute !== null && delta(deltaAbsolute, "absolute", { ...numeric, color: direction(deltaAbsolute), ...typeStyle("numberMd") }),
|
|
8121
8121
|
deltaPercent !== null && delta(deltaPercent, "percent", { ...numeric, color: direction(deltaPercent), ...typeStyle("numberMd"), opacity: 0.9 }),
|
|
8122
8122
|
deltaDescription && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -8173,7 +8173,7 @@ function DsKpiHero(props) {
|
|
|
8173
8173
|
}
|
|
8174
8174
|
),
|
|
8175
8175
|
loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8176
|
-
|
|
8176
|
+
KjunSkeleton,
|
|
8177
8177
|
{
|
|
8178
8178
|
type: "block",
|
|
8179
8179
|
height: typeStyle("numberMd").lineHeight,
|
|
@@ -8192,7 +8192,7 @@ function DsKpiHero(props) {
|
|
|
8192
8192
|
}
|
|
8193
8193
|
),
|
|
8194
8194
|
item.desc && (loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8195
|
-
|
|
8195
|
+
KjunSkeleton,
|
|
8196
8196
|
{
|
|
8197
8197
|
type: "block",
|
|
8198
8198
|
width: geometry2.descriptionSkeletonWidth,
|
|
@@ -8225,7 +8225,7 @@ var import_tokens50 = require("@kjun-ui/tokens");
|
|
|
8225
8225
|
var import_react62 = require("react");
|
|
8226
8226
|
var import_react_native51 = require("react-native");
|
|
8227
8227
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
8228
|
-
function
|
|
8228
|
+
function KjunKpiRow({
|
|
8229
8229
|
loading = false,
|
|
8230
8230
|
items,
|
|
8231
8231
|
size = "md",
|
|
@@ -8330,7 +8330,7 @@ function DsKpiRow({
|
|
|
8330
8330
|
marginBottom: sub ? 0 : spec.labelMargin
|
|
8331
8331
|
},
|
|
8332
8332
|
children: [
|
|
8333
|
-
busy && !item.label ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8333
|
+
busy && !item.label ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(KjunSkeleton, { type: "block", width: geometry2.labelSkeletonWidth, height: geometry2.labelSkeletonHeight }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(KText, { style: { minWidth: 0, flexShrink: 1, color: colors.textSecondary, ...typeStyle("caption") }, children: item.label }),
|
|
8334
8334
|
!busy && item.badgePlacement !== "value" && badge(item)
|
|
8335
8335
|
]
|
|
8336
8336
|
}
|
|
@@ -8359,7 +8359,7 @@ function DsKpiRow({
|
|
|
8359
8359
|
}
|
|
8360
8360
|
),
|
|
8361
8361
|
busy && !seg.separator ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8362
|
-
|
|
8362
|
+
KjunSkeleton,
|
|
8363
8363
|
{
|
|
8364
8364
|
type: "block",
|
|
8365
8365
|
height: valueStyle.lineHeight,
|
|
@@ -8381,7 +8381,7 @@ function DsKpiRow({
|
|
|
8381
8381
|
// Like Web's 1lh × 5ch: the placeholder fills the value line, and its width (set for the display
|
|
8382
8382
|
// number) scales with the value's font so a text value gets a text-sized bar.
|
|
8383
8383
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8384
|
-
|
|
8384
|
+
KjunSkeleton,
|
|
8385
8385
|
{
|
|
8386
8386
|
type: "block",
|
|
8387
8387
|
height: valueStyle.lineHeight,
|
|
@@ -8403,7 +8403,7 @@ function DsKpiRow({
|
|
|
8403
8403
|
}
|
|
8404
8404
|
),
|
|
8405
8405
|
item.animated && typeof item.value === "number" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8406
|
-
|
|
8406
|
+
KjunAnimatedNumber,
|
|
8407
8407
|
{
|
|
8408
8408
|
fromPrevious: true,
|
|
8409
8409
|
value: item.value,
|
|
@@ -8427,7 +8427,7 @@ function DsKpiRow({
|
|
|
8427
8427
|
]
|
|
8428
8428
|
}
|
|
8429
8429
|
),
|
|
8430
|
-
item.desc && (busy ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8430
|
+
item.desc && (busy ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(KjunSkeleton, { type: "block", height: typeStyle("caption").lineHeight, width: geometry2.descriptionSkeletonWidth }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8431
8431
|
KText,
|
|
8432
8432
|
{
|
|
8433
8433
|
style: {
|
|
@@ -8550,8 +8550,8 @@ function MarketIdentity({
|
|
|
8550
8550
|
children: label
|
|
8551
8551
|
}
|
|
8552
8552
|
),
|
|
8553
|
-
((_f = props.interestKeys) == null ? void 0 : _f.has(id)) && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8554
|
-
((_g = props.favoriteKeys) == null ? void 0 : _g.has(id)) && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8553
|
+
((_f = props.interestKeys) == null ? void 0 : _f.has(id)) && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(KjunCollectionMark, { kind: "interest", size: "sm", active: true }),
|
|
8554
|
+
((_g = props.favoriteKeys) == null ? void 0 : _g.has(id)) && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(KjunCollectionMark, { kind: "favorite", size: "sm", active: true }),
|
|
8555
8555
|
(_h = props.renderNameSuffix) == null ? void 0 : _h.call(props, row)
|
|
8556
8556
|
]
|
|
8557
8557
|
}
|
|
@@ -8598,7 +8598,7 @@ function MarketFooter({
|
|
|
8598
8598
|
} = props;
|
|
8599
8599
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
8600
8600
|
pagination && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8601
|
-
|
|
8601
|
+
KjunPagination,
|
|
8602
8602
|
{
|
|
8603
8603
|
currentPage: pagination.page,
|
|
8604
8604
|
totalPages: Math.ceil(pagination.total / pagination.size),
|
|
@@ -8636,7 +8636,7 @@ function MarketFooter({
|
|
|
8636
8636
|
|
|
8637
8637
|
// packages/native/src/market-cards.tsx
|
|
8638
8638
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
8639
|
-
function
|
|
8639
|
+
function KjunMarketCards(props) {
|
|
8640
8640
|
const {
|
|
8641
8641
|
rows = [],
|
|
8642
8642
|
rowKey = "id",
|
|
@@ -8714,13 +8714,13 @@ function DsMarketCards(props) {
|
|
|
8714
8714
|
metricDisplay: display
|
|
8715
8715
|
}) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
8716
8716
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
8717
|
-
|
|
8717
|
+
KjunDataState,
|
|
8718
8718
|
{
|
|
8719
8719
|
...props,
|
|
8720
8720
|
loadingPadding: "none",
|
|
8721
8721
|
empty: !rows.length,
|
|
8722
|
-
loadingContent: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
8723
|
-
emptyContent: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
8722
|
+
loadingContent: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(KjunListSkeleton, { variant: "compact" }),
|
|
8723
|
+
emptyContent: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
8724
8724
|
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_native53.View, { children: [
|
|
8725
8725
|
state.pill && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(KText, { style: { textAlign: "right", paddingHorizontal: import_tokens52.tokens.dimension.value16, paddingVertical: import_tokens52.tokens.dimension.value8, ...typeStyle("caption"), color: colors.textSecondary }, children: state.pill.label }),
|
|
8726
8726
|
rows.map((row, i) => {
|
|
@@ -8746,21 +8746,21 @@ function DsMarketCards(props) {
|
|
|
8746
8746
|
children: [
|
|
8747
8747
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MarketIdentity, { row, props, compact: true }),
|
|
8748
8748
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native53.View, { style: { marginLeft: import_tokens52.tokens.dimension.value12, alignItems: "flex-end" }, children: ((_b = state.pill) == null ? void 0 : _b.format) === "sparkline" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
8749
|
-
|
|
8749
|
+
KjunSparkline,
|
|
8750
8750
|
{
|
|
8751
8751
|
data: getValue(row, state.key) || [],
|
|
8752
8752
|
width: import_tokens52.tokens.extensions.marketTable.sparklineWidth,
|
|
8753
8753
|
height: import_tokens52.tokens.extensions.marketTable.sparklineHeight
|
|
8754
8754
|
}
|
|
8755
|
-
) : state.pill ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: metricLoading(row, state.key) ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
8756
|
-
|
|
8755
|
+
) : state.pill ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: metricLoading(row, state.key) ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(KjunSkeleton, { type: "block", height: import_tokens52.tokens.extensions.marketTable.valueSkeletonHeight, width: import_tokens52.tokens.extensions.marketTable.valueSkeletonWidth }) : isChange && getValue(row, state.key) != null ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
8756
|
+
KjunSignedValue,
|
|
8757
8757
|
{
|
|
8758
8758
|
value: finiteNumber(getValue(row, state.key)),
|
|
8759
8759
|
formatter: () => display(row),
|
|
8760
8760
|
stale: !!getValue(row, "stale"),
|
|
8761
8761
|
tone: "pill"
|
|
8762
8762
|
}
|
|
8763
|
-
) : isPrice && getValue(row, state.key) == null ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
8763
|
+
) : isPrice && getValue(row, state.key) == null ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(KjunSkeleton, { type: "block", height: import_tokens52.tokens.extensions.financial.priceSkeletonHeight, width: import_tokens52.tokens.extensions.financial.priceSkeletonWidth }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
8764
8764
|
import_react_native53.View,
|
|
8765
8765
|
{
|
|
8766
8766
|
style: {
|
|
@@ -8810,7 +8810,7 @@ var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
|
8810
8810
|
var changeWeight = { fontWeight: typeStyle("label").fontWeight };
|
|
8811
8811
|
var quoteDesktop = { price: typeStyle("control"), change: { ...typeStyle("caption"), ...changeWeight } };
|
|
8812
8812
|
var quoteMobile = { price: typeStyle("input"), change: { ...typeStyle("body"), ...changeWeight } };
|
|
8813
|
-
function
|
|
8813
|
+
function KjunMarketSimpleList(props) {
|
|
8814
8814
|
const {
|
|
8815
8815
|
rows = [],
|
|
8816
8816
|
rowKey = "id",
|
|
@@ -8824,14 +8824,14 @@ function DsMarketSimpleList(props) {
|
|
|
8824
8824
|
} = props, { colors } = useKjunStyles(), mobile = (0, import_react_native54.useWindowDimensions)().width < import_tokens53.tokens.responsive.market;
|
|
8825
8825
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_react_native54.View, { children: [
|
|
8826
8826
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8827
|
-
|
|
8827
|
+
KjunDataState,
|
|
8828
8828
|
{
|
|
8829
8829
|
...props,
|
|
8830
8830
|
loadingPadding: "none",
|
|
8831
8831
|
empty: !rows.length,
|
|
8832
8832
|
emptyText: emptyMessage,
|
|
8833
|
-
loadingContent: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8834
|
-
emptyContent: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8833
|
+
loadingContent: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(KjunListSkeleton, {}),
|
|
8834
|
+
emptyContent: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
8835
8835
|
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native54.View, { children: rows.map((row, i) => {
|
|
8836
8836
|
var _a, _b;
|
|
8837
8837
|
const price = priceValue(row), change = changeValue(row), stale = !!getValue(row, "stale"), source = String(getValue(row, "source") || ""), fetchedAt = String(getValue(row, "fetched_at") || "");
|
|
@@ -8868,7 +8868,7 @@ function DsMarketSimpleList(props) {
|
|
|
8868
8868
|
},
|
|
8869
8869
|
children: [
|
|
8870
8870
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8871
|
-
|
|
8871
|
+
KjunPriceCell,
|
|
8872
8872
|
{
|
|
8873
8873
|
value: price,
|
|
8874
8874
|
formatter: priceFormatter,
|
|
@@ -8889,16 +8889,16 @@ function DsMarketSimpleList(props) {
|
|
|
8889
8889
|
},
|
|
8890
8890
|
children: [
|
|
8891
8891
|
price !== null && ((_b = props.renderPricePrefix) == null ? void 0 : _b.call(props, row)),
|
|
8892
|
-
(finiteNumber(price) !== null || !changeLoading(row) && finiteNumber(change) !== null) && (closingPrice && !stale ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8893
|
-
|
|
8892
|
+
(finiteNumber(price) !== null || !changeLoading(row) && finiteNumber(change) !== null) && (closingPrice && !stale ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(KjunBadge, { variant: "secondary", size: "xs", children: "\uC885\uAC00" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8893
|
+
KjunFreshness,
|
|
8894
8894
|
{
|
|
8895
8895
|
stale,
|
|
8896
8896
|
source: closingPrice ? "close" : source,
|
|
8897
8897
|
fetchedAt
|
|
8898
8898
|
}
|
|
8899
8899
|
)),
|
|
8900
|
-
changeLoading(row) ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8901
|
-
|
|
8900
|
+
changeLoading(row) ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(KjunSkeleton, { type: "block", height: import_tokens53.tokens.extensions.marketList.changeSkeletonHeight, width: import_tokens53.tokens.extensions.marketList.changeSkeletonWidth }) : change !== null ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8901
|
+
KjunSignedValue,
|
|
8902
8902
|
{
|
|
8903
8903
|
value: change,
|
|
8904
8904
|
stale,
|
|
@@ -8934,12 +8934,12 @@ function DsMarketSimpleList(props) {
|
|
|
8934
8934
|
var import_tokens54 = require("@kjun-ui/tokens");
|
|
8935
8935
|
var import_react_native55 = require("react-native");
|
|
8936
8936
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
8937
|
-
function
|
|
8937
|
+
function KjunMarketListPanel({
|
|
8938
8938
|
controls,
|
|
8939
8939
|
children
|
|
8940
8940
|
}) {
|
|
8941
8941
|
const { colors } = useKjunStyles();
|
|
8942
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
8942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(KjunCard, { children: [
|
|
8943
8943
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native55.View, { children: controls }),
|
|
8944
8944
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8945
8945
|
import_react_native55.View,
|
|
@@ -8961,7 +8961,7 @@ var import_react64 = require("react");
|
|
|
8961
8961
|
var import_react_native56 = require("react-native");
|
|
8962
8962
|
var import_react_native_svg8 = __toESM(require("react-native-svg"), 1);
|
|
8963
8963
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
8964
|
-
function
|
|
8964
|
+
function KjunMarketTable(props) {
|
|
8965
8965
|
const {
|
|
8966
8966
|
rows = [],
|
|
8967
8967
|
columns,
|
|
@@ -8983,13 +8983,13 @@ function DsMarketTable(props) {
|
|
|
8983
8983
|
const render = (row, col) => {
|
|
8984
8984
|
const value = getValue(row, col.key), stale = !!getValue(row, "stale");
|
|
8985
8985
|
if (cellLoading(row, col))
|
|
8986
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
8986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(KjunSkeleton, { type: "block", height: import_tokens55.tokens.extensions.marketTable.valueSkeletonHeight, width: import_tokens55.tokens.extensions.marketTable.valueSkeletonWidth });
|
|
8987
8987
|
if (renderCell) return content(renderCell(row, col));
|
|
8988
8988
|
if (["stock_name", "name", "symbol"].includes(col.key))
|
|
8989
8989
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(MarketIdentity, { row, props, table: true });
|
|
8990
8990
|
if (col.type === "sparkline")
|
|
8991
8991
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
8992
|
-
|
|
8992
|
+
KjunSparkline,
|
|
8993
8993
|
{
|
|
8994
8994
|
data: Array.isArray(value) ? value : [],
|
|
8995
8995
|
width: import_tokens55.tokens.extensions.marketTable.sparklineWidth,
|
|
@@ -8998,7 +8998,7 @@ function DsMarketTable(props) {
|
|
|
8998
8998
|
);
|
|
8999
8999
|
if (col.type === "price")
|
|
9000
9000
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9001
|
-
|
|
9001
|
+
KjunPriceCell,
|
|
9002
9002
|
{
|
|
9003
9003
|
value: finiteNumber(value),
|
|
9004
9004
|
formatter: priceFormatter,
|
|
@@ -9008,7 +9008,7 @@ function DsMarketTable(props) {
|
|
|
9008
9008
|
);
|
|
9009
9009
|
if (col.type === "percent")
|
|
9010
9010
|
return value == null ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(KText, { children: "-" }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9011
|
-
|
|
9011
|
+
KjunSignedValue,
|
|
9012
9012
|
{
|
|
9013
9013
|
value: finiteNumber(value),
|
|
9014
9014
|
format: "percent",
|
|
@@ -9024,7 +9024,7 @@ function DsMarketTable(props) {
|
|
|
9024
9024
|
);
|
|
9025
9025
|
const text = formatMetric ? formatMetric(value, col.type || "text", { currency, row, column: col }) : value == null ? "-" : String(value);
|
|
9026
9026
|
return ["investor", "net_amount", "net_volume"].includes(col.type || "") ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9027
|
-
|
|
9027
|
+
KjunSignedValue,
|
|
9028
9028
|
{
|
|
9029
9029
|
value: finiteNumber(value),
|
|
9030
9030
|
formatter: () => text,
|
|
@@ -9055,14 +9055,14 @@ function DsMarketTable(props) {
|
|
|
9055
9055
|
},
|
|
9056
9056
|
children: [
|
|
9057
9057
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9058
|
-
|
|
9058
|
+
KjunDataState,
|
|
9059
9059
|
{
|
|
9060
9060
|
...props,
|
|
9061
9061
|
loadingPadding: "none",
|
|
9062
9062
|
empty: !rows.length,
|
|
9063
9063
|
emptyText: emptyMessage,
|
|
9064
|
-
loadingContent: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9065
|
-
emptyContent: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9064
|
+
loadingContent: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(KjunMarketTableSkeleton, { columns, showActions }),
|
|
9065
|
+
emptyContent: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(KjunEmpty, { text: emptyMessage, description: emptySubMessage }),
|
|
9066
9066
|
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(MarketQuoteTypeContext.Provider, { value: tableQuote, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_react_native56.View, { style: { position: "relative", minWidth: 0 }, children: [
|
|
9067
9067
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9068
9068
|
import_react_native56.ScrollView,
|
|
@@ -9097,7 +9097,7 @@ function DsMarketTable(props) {
|
|
|
9097
9097
|
alignItems: "center",
|
|
9098
9098
|
justifyContent: "center"
|
|
9099
9099
|
},
|
|
9100
|
-
children: ["interest", "favorite"].map((kind) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_native56.View, { style: { width: Math.max(import_tokens55.tokens.native.minimumTouchTarget, import_tokens55.tokens.extensions.iconToggle.sizes.xs), alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9100
|
+
children: ["interest", "favorite"].map((kind) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_native56.View, { style: { width: Math.max(import_tokens55.tokens.native.minimumTouchTarget, import_tokens55.tokens.extensions.iconToggle.sizes.xs), alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(KjunCollectionMark, { kind, size: "md" }) }, kind))
|
|
9101
9101
|
}
|
|
9102
9102
|
),
|
|
9103
9103
|
columns.map((col, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
@@ -9130,7 +9130,7 @@ function DsMarketTable(props) {
|
|
|
9130
9130
|
}
|
|
9131
9131
|
),
|
|
9132
9132
|
col.sortable && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9133
|
-
|
|
9133
|
+
KjunIcon,
|
|
9134
9134
|
{
|
|
9135
9135
|
name: sortKey === col.key ? sortOrder === "asc" ? "sort-ascending" : "sort-descending" : "arrows-sort",
|
|
9136
9136
|
size: import_tokens55.tokens.extensions.marketTable.sortIconSize,
|
|
@@ -9176,7 +9176,7 @@ function DsMarketTable(props) {
|
|
|
9176
9176
|
},
|
|
9177
9177
|
children: [
|
|
9178
9178
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9179
|
-
|
|
9179
|
+
KjunIconToggle,
|
|
9180
9180
|
{
|
|
9181
9181
|
size: "xs",
|
|
9182
9182
|
active: (_a = props.interestKeys) == null ? void 0 : _a.has(id),
|
|
@@ -9195,7 +9195,7 @@ function DsMarketTable(props) {
|
|
|
9195
9195
|
}
|
|
9196
9196
|
),
|
|
9197
9197
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9198
|
-
|
|
9198
|
+
KjunIconToggle,
|
|
9199
9199
|
{
|
|
9200
9200
|
size: "xs",
|
|
9201
9201
|
active: (_d = props.favoriteKeys) == null ? void 0 : _d.has(id),
|
|
@@ -9229,7 +9229,7 @@ function DsMarketTable(props) {
|
|
|
9229
9229
|
children: [
|
|
9230
9230
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_native56.View, { style: { alignSelf: col.align === "right" ? "flex-end" : col.align === "center" ? "center" : void 0 }, children: render(row, col) }),
|
|
9231
9231
|
col.key === (priceCol == null ? void 0 : priceCol.key) && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9232
|
-
|
|
9232
|
+
KjunFreshness,
|
|
9233
9233
|
{
|
|
9234
9234
|
stale: !!getValue(row, "stale"),
|
|
9235
9235
|
source: String(getValue(row, "source") || ""),
|
|
@@ -9270,7 +9270,7 @@ var import_react65 = require("react");
|
|
|
9270
9270
|
var import_react_native57 = require("react-native");
|
|
9271
9271
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
9272
9272
|
var LastListRow = (0, import_react65.createContext)(false);
|
|
9273
|
-
function
|
|
9273
|
+
function KjunListRow({ title, description, leading, trailing, actions, href, disabled = false, onPress }) {
|
|
9274
9274
|
const { colors } = useKjunStyles(), last = (0, import_react65.useContext)(LastListRow);
|
|
9275
9275
|
const parts = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
9276
9276
|
leading && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_native57.View, { children: content(leading) }),
|
|
@@ -9286,7 +9286,7 @@ function DsListRow({ title, description, leading, trailing, actions, href, disab
|
|
|
9286
9286
|
actions && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_native57.View, { pointerEvents: disabled ? "none" : "auto", ...disabled && import_react_native57.Platform.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: import_tokens56.tokens.extensions.list.actionsGap, paddingRight: import_tokens56.tokens.extensions.list.actionsPadding, opacity: disabled ? import_tokens56.tokens.states.opacity.disabled : 1 }, children: content(actions) })
|
|
9287
9287
|
] });
|
|
9288
9288
|
}
|
|
9289
|
-
function
|
|
9289
|
+
function KjunListSection({ title, description, actions, children, ariaLabel }) {
|
|
9290
9290
|
const { colors } = useKjunStyles();
|
|
9291
9291
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react_native57.View, { style: { minWidth: 0, backgroundColor: colors.surface }, children: [
|
|
9292
9292
|
(title || description || actions) && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react_native57.View, { style: { flexDirection: "row", alignItems: "center", gap: import_tokens56.tokens.extensions.list.gap, padding: import_tokens56.tokens.extensions.list.padding }, children: [
|
|
@@ -9305,7 +9305,7 @@ var import_tokens57 = require("@kjun-ui/tokens");
|
|
|
9305
9305
|
var import_react66 = require("react");
|
|
9306
9306
|
var import_react_native58 = require("react-native");
|
|
9307
9307
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
9308
|
-
function
|
|
9308
|
+
function KjunTopNavigation({ title, description, leading, actions, safeAreaTop = 0 }) {
|
|
9309
9309
|
const { colors } = useKjunStyles();
|
|
9310
9310
|
const geometry2 = import_tokens57.tokens.extensions.topNavigation;
|
|
9311
9311
|
const titleInset = Math.max(0, (geometry2.controlSize - import_tokens57.tokens.typography.sectionTitle.lineHeightPx) / 2);
|
|
@@ -9328,7 +9328,7 @@ function DsTopNavigation({ title, description, leading, actions, safeAreaTop = 0
|
|
|
9328
9328
|
actions && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TopNavigationContext.Provider, { value: { ...geometry2, slot: "actions" }, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_native58.View, { 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__ */ (0, import_jsx_runtime55.jsx)(import_react_native58.View, { onLayout: square("trailing"), style: { flexShrink: 1, minWidth: 0, maxWidth: "100%", marginRight: iconEdges.trailing ? -edgeInset : 0 }, children: content(action) }, "trailing")) }) })
|
|
9329
9329
|
] }) }) });
|
|
9330
9330
|
}
|
|
9331
|
-
function
|
|
9331
|
+
function KjunBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0C9", safeAreaBottom = 0, keyboardVisible = false, hideOnKeyboard = true, onNavigate }) {
|
|
9332
9332
|
const { colors } = useKjunStyles();
|
|
9333
9333
|
const geometry2 = import_tokens57.tokens.extensions.bottomNavigation;
|
|
9334
9334
|
const hasIcons = items.some((item) => item.icon);
|
|
@@ -9375,7 +9375,7 @@ function DsBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0
|
|
|
9375
9375
|
},
|
|
9376
9376
|
children: [
|
|
9377
9377
|
hasIcons && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_react_native58.View, { style: { width: geometry2.iconSize, height: geometry2.iconSize, flexShrink: 0 }, children: [
|
|
9378
|
-
item.icon && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
9378
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(KjunIcon, { name: item.icon, size: geometry2.iconSize, color: ink }),
|
|
9379
9379
|
badge
|
|
9380
9380
|
] }),
|
|
9381
9381
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_react_native58.View, { style: { maxWidth: "100%" }, children: [
|
|
@@ -9389,7 +9389,7 @@ function DsBottomNavigation({ items, value, ariaLabel = "\uC8FC\uC694 \uD0D0\uC0
|
|
|
9389
9389
|
);
|
|
9390
9390
|
}) });
|
|
9391
9391
|
}
|
|
9392
|
-
function
|
|
9392
|
+
function KjunBottomActionBar({ description, children, safeAreaBottom = 0, keyboardVisible = false, hideOnKeyboard = false }) {
|
|
9393
9393
|
const { colors } = useKjunStyles();
|
|
9394
9394
|
const [width, setWidth] = (0, import_react66.useState)(0);
|
|
9395
9395
|
const geometry2 = import_tokens57.tokens.extensions.navigation;
|
|
@@ -9417,7 +9417,7 @@ var import_react67 = require("react");
|
|
|
9417
9417
|
var import_react_native59 = require("react-native");
|
|
9418
9418
|
var import_tokens58 = require("@kjun-ui/tokens");
|
|
9419
9419
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
9420
|
-
function
|
|
9420
|
+
function KjunImage({ src, source, alt, decorative = false, aspectRatio = 1, fit = "cover", fallback: fallback2, onLoad, onError }) {
|
|
9421
9421
|
const { colors } = useKjunStyles();
|
|
9422
9422
|
const request = JSON.stringify(source != null ? source : src), current = (0, import_react67.useRef)({ request, version: 0 });
|
|
9423
9423
|
if (current.current.request !== request) current.current = { request, version: current.current.version + 1 };
|
|
@@ -9431,23 +9431,23 @@ function DsImage({ src, source, alt, decorative = false, aspectRatio = 1, fit =
|
|
|
9431
9431
|
setFailed(version);
|
|
9432
9432
|
onError == null ? void 0 : onError();
|
|
9433
9433
|
}
|
|
9434
|
-
} }, version) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_native59.View, { 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__ */ (0, import_jsx_runtime56.jsx)(
|
|
9434
|
+
} }, version) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_native59.View, { 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__ */ (0, import_jsx_runtime56.jsx)(KjunIcon, { name: "image", size: import_tokens58.tokens.extensions.image.fallbackIconSize, color: colors.textSecondary }), { color: colors.textSecondary, fontWeight: typeStyle("control").fontWeight, textAlign: "center" }) }) });
|
|
9435
9435
|
}
|
|
9436
|
-
function
|
|
9436
|
+
function KjunAvatar({ src, source, name = "", alt, decorative = false, size = "md", shape = "circle", fallback: fallback2, onLoad, onError }) {
|
|
9437
9437
|
const { colors } = useKjunStyles(), initial = Array.from(name.trim())[0];
|
|
9438
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_native59.View, { style: { width: import_tokens58.tokens.extensions.avatar[size], height: import_tokens58.tokens.extensions.avatar[size], borderRadius: shape === "circle" ? import_tokens58.tokens.radius.radius9999 : import_tokens58.tokens.radius.radius8, overflow: "hidden", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_native59.View, { style: { width: import_tokens58.tokens.extensions.avatar[size], height: import_tokens58.tokens.extensions.avatar[size], borderRadius: shape === "circle" ? import_tokens58.tokens.radius.radius9999 : import_tokens58.tokens.radius.radius8, overflow: "hidden", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(KjunImage, { src, source, alt: alt || name || "\uC0AC\uC6A9\uC790", decorative, fallback: fallback2 != null ? fallback2 : initial ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(KText, { style: { ...typeStyle(size === "sm" ? "control" : size === "lg" ? "sectionTitle" : "input"), fontWeight: typeStyle("control").fontWeight, color: colors.textSecondary }, children: initial.toLocaleUpperCase() }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(KjunIcon, { name: "user", size: import_tokens58.tokens.extensions.avatar.fallbackIconSizes[size] }), onLoad, onError }) });
|
|
9439
9439
|
}
|
|
9440
9440
|
|
|
9441
9441
|
// packages/native/src/chip.tsx
|
|
9442
9442
|
var import_react_native60 = require("react-native");
|
|
9443
9443
|
var import_tokens59 = require("@kjun-ui/tokens");
|
|
9444
9444
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
9445
|
-
function
|
|
9445
|
+
function KjunChip({ label, icon, removable = false, disabled = false, size = "md", removeLabel, onRemove }) {
|
|
9446
9446
|
const { colors } = useKjunStyles();
|
|
9447
9447
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react_native60.View, { style: { alignSelf: "flex-start", maxWidth: "100%", minWidth: 0, flexShrink: 1, flexDirection: "row", alignItems: "center", gap: import_tokens59.tokens.extensions.chip.gap, minHeight: removable ? import_tokens59.tokens.extensions.chip.nativeRemoveSize : import_tokens59.tokens.extensions.chip[size], paddingVertical: removable ? 0 : import_tokens59.tokens.extensions.chip.paddingY, paddingLeft: import_tokens59.tokens.extensions.chip.paddingX, paddingRight: removable ? 0 : import_tokens59.tokens.extensions.chip.paddingX, borderRadius: import_tokens59.tokens.extensions.chip.radius, backgroundColor: colors.secondary, opacity: disabled ? import_tokens59.tokens.states.opacity.disabled : 1 }, children: [
|
|
9448
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
9448
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(KjunIcon, { name: icon, size: import_tokens59.tokens.extensions.chip.iconSizes[size] }),
|
|
9449
9449
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(KText, { style: { ...typeStyle(import_tokens59.tokens.extensions.chip.typography[size]), flexShrink: 1, minWidth: 0 }, children: label }),
|
|
9450
|
-
removable && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(AccessiblePressable, { accessibilityRole: "button", accessibilityLabel: removeLabel || label + " \uC0AD\uC81C", disabled, accessibilityState: { disabled }, onPress: onRemove, style: { width: import_tokens59.tokens.extensions.chip.nativeRemoveSize, height: import_tokens59.tokens.extensions.chip.nativeRemoveSize, borderRadius: import_tokens59.tokens.extensions.chip.radius, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
9450
|
+
removable && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(AccessiblePressable, { accessibilityRole: "button", accessibilityLabel: removeLabel || label + " \uC0AD\uC81C", disabled, accessibilityState: { disabled }, onPress: onRemove, style: { width: import_tokens59.tokens.extensions.chip.nativeRemoveSize, height: import_tokens59.tokens.extensions.chip.nativeRemoveSize, borderRadius: import_tokens59.tokens.extensions.chip.radius, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(KjunIcon, { name: "x", size: import_tokens59.tokens.extensions.chip.removeIconSizes[size] }) })
|
|
9451
9451
|
] });
|
|
9452
9452
|
}
|
|
9453
9453
|
|
|
@@ -9744,10 +9744,10 @@ function RangeInput({
|
|
|
9744
9744
|
}
|
|
9745
9745
|
);
|
|
9746
9746
|
}
|
|
9747
|
-
function
|
|
9747
|
+
function KjunSlider(props) {
|
|
9748
9748
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(RangeInput, { ...props });
|
|
9749
9749
|
}
|
|
9750
|
-
function
|
|
9750
|
+
function KjunRangeSlider(props) {
|
|
9751
9751
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(RangeInput, { ...props });
|
|
9752
9752
|
}
|
|
9753
9753
|
|
|
@@ -9762,7 +9762,7 @@ var componentIcons = { minus: import_minus.default };
|
|
|
9762
9762
|
|
|
9763
9763
|
// packages/native/src/quantity-stepper.tsx
|
|
9764
9764
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
9765
|
-
function
|
|
9765
|
+
function KjunQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disabled = false, error = false, size = "md", block = false, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }) {
|
|
9766
9766
|
const { colors, fontFamily } = useKjunStyles();
|
|
9767
9767
|
const field = useKjunField();
|
|
9768
9768
|
const invalid = error || !!(field == null ? void 0 : field.error);
|
|
@@ -9860,7 +9860,7 @@ function DsQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disab
|
|
|
9860
9860
|
const surfaceBox = { position: "absolute", left: 0, right: 0, top: "50%", height: import_tokens61.tokens.input[size].height, marginTop: -import_tokens61.tokens.input[size].height / 2, borderRadius: surface.spec.radius };
|
|
9861
9861
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconFallbacks, { icons: componentIcons, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_native62.View, { style: { flexDirection: "row", alignItems: "center", alignSelf: block ? "stretch" : "flex-start", maxWidth: "100%" }, children: [
|
|
9862
9862
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_native62.View, { pointerEvents: "none", "aria-hidden": true, style: { ...surfaceBox, backgroundColor: colors.inputBg } }),
|
|
9863
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CompoundTarget, { square: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
9863
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CompoundTarget, { square: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(KjunButton, { size, style: decreaseStyle, variant: "ghost", ariaLabel: "\uC218\uB7C9 \uC904\uC774\uAE30", disabled: blocked || value <= min, onPress: () => move(-1), prefixIcon: "minus" }) }),
|
|
9864
9864
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_native62.View, { style: { flex: block ? 1 : void 0, width: block ? void 0 : geometry2.valueWidth, minWidth: 0, minHeight: finePointer() ? void 0 : import_tokens61.tokens.native.minimumTouchTarget, justifyContent: "center" }, ...fieldTarget(() => {
|
|
9865
9865
|
var _a;
|
|
9866
9866
|
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -9893,7 +9893,7 @@ function DsQuantityStepper({ value, min = 0, max, step = 1, precision = 0, disab
|
|
|
9893
9893
|
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 - import_tokens61.tokens.border.controlWidth, paddingVertical: 0 }
|
|
9894
9894
|
}
|
|
9895
9895
|
) }),
|
|
9896
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CompoundTarget, { square: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
9896
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CompoundTarget, { square: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(KjunButton, { size, style: increaseStyle, variant: "ghost", ariaLabel: "\uC218\uB7C9 \uB298\uB9AC\uAE30", disabled: blocked || max !== void 0 && value >= max, onPress: () => move(1), prefixIcon: "plus" }) }),
|
|
9897
9897
|
(invalid || surface.active) && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_native62.View, { pointerEvents: "none", "aria-hidden": true, style: { ...surfaceBox, borderWidth: invalid ? import_tokens61.tokens.border.controlWidth : import_tokens61.tokens.states.focus.width, borderColor: invalid ? colors.danger : colors.focusRing } })
|
|
9898
9898
|
] }) });
|
|
9899
9899
|
}
|
|
@@ -9903,7 +9903,7 @@ var import_react70 = require("react");
|
|
|
9903
9903
|
var import_react_native63 = require("react-native");
|
|
9904
9904
|
var import_tokens62 = require("@kjun-ui/tokens");
|
|
9905
9905
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
9906
|
-
function
|
|
9906
|
+
function KjunTimePicker({ value, precision = "minute", min, max, minuteStep = 1, secondStep = 1, disabled = false, error = false, clearable = true, size = "md", ariaLabel = "\uC2DC\uAC04", onValueChange, onChangeCommit }) {
|
|
9907
9907
|
const geometry2 = import_tokens62.tokens.extensions.timePicker, spec = import_tokens62.tokens.input[size];
|
|
9908
9908
|
const { colors } = useKjunStyles();
|
|
9909
9909
|
const first = (0, import_react70.useRef)(null);
|
|
@@ -9924,7 +9924,7 @@ function DsTimePicker({ value, precision = "minute", min, max, minuteStep = 1, s
|
|
|
9924
9924
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react_native63.View, { accessibilityLabel: ariaLabel, style: { flexDirection: "row", alignItems: "center", maxWidth: "100%", minWidth: 0, backgroundColor: colors.inputBg, borderRadius: spec.radius }, children: [
|
|
9925
9925
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_native63.View, { style: { flex: 1, flexDirection: "row", alignItems: "center", minWidth: 0 }, children: ["\uC2DC", "\uBD84", "\uCD08"].slice(0, precision === "second" ? 3 : 2).map((label, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react70.Fragment, { children: [
|
|
9926
9926
|
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(KText, { "aria-hidden": true, style: { ...inputTypeStyle(size), width: geometry2.separatorWidth, textAlign: "center", color: disabled || !valid ? colors.textDisabled : colors.textSecondary }, children: ":" }),
|
|
9927
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FieldContext.Provider, { value: { ...field, id: index === 0 ? fieldId : `${fieldId}-${index}` }, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CompoundControlContext.Provider, { value: { size, focusRef: index === 0 ? first : void 0, onFocusChange: setFocused, leading: index === 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_native63.View, { style: { flexShrink: 0, minWidth: geometry2.segmentMinimumWidth }, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
9927
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FieldContext.Provider, { value: { ...field, id: index === 0 ? fieldId : `${fieldId}-${index}` }, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CompoundControlContext.Provider, { value: { size, focusRef: index === 0 ? first : void 0, onFocusChange: setFocused, leading: index === 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_native63.View, { style: { flexShrink: 0, minWidth: geometry2.segmentMinimumWidth }, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(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) => {
|
|
9928
9928
|
if (typeof next === "number") change(domain.select(value, index, next));
|
|
9929
9929
|
}, 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 }) }) }) })
|
|
9930
9930
|
] }, label)) }),
|