@khipu/design-system 0.2.0-alpha.21 → 0.2.0-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beercss/khipu-beercss.css +280 -76
- package/dist/beercss/khipu-beercss.min.css +1 -1
- package/dist/beercss/metadata.json +4 -4
- package/dist/index.d.mts +445 -257
- package/dist/index.d.ts +445 -257
- package/dist/index.js +687 -478
- package/dist/index.mjs +671 -460
- package/package.json +12 -9
- package/dist/khipu-logo-color-TV75AKOV.svg +0 -19
package/dist/index.mjs
CHANGED
|
@@ -1040,7 +1040,7 @@ var KdsButton = forwardRef(
|
|
|
1040
1040
|
children: [
|
|
1041
1041
|
!loading && startIcon && /* @__PURE__ */ jsx2("span", { className: "kds-icon", children: /* @__PURE__ */ jsx2("i", { className: "material-symbols-outlined", children: startIcon }) }),
|
|
1042
1042
|
loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1043
|
-
/* @__PURE__ */ jsx2("
|
|
1043
|
+
/* @__PURE__ */ jsx2("progress", { className: "circle indeterminate small" }),
|
|
1044
1044
|
/* @__PURE__ */ jsx2("span", { children })
|
|
1045
1045
|
] }) : /* @__PURE__ */ jsx2("span", { children }),
|
|
1046
1046
|
!loading && endIcon && /* @__PURE__ */ jsx2("span", { className: "kds-icon", children: /* @__PURE__ */ jsx2("i", { className: "material-symbols-outlined", children: endIcon }) })
|
|
@@ -1062,11 +1062,13 @@ var KdsTextField = forwardRef2(
|
|
|
1062
1062
|
readOnly,
|
|
1063
1063
|
startIcon,
|
|
1064
1064
|
endIcon,
|
|
1065
|
+
required,
|
|
1065
1066
|
className,
|
|
1066
1067
|
id,
|
|
1067
1068
|
...props
|
|
1068
1069
|
}, ref) => {
|
|
1069
1070
|
const fieldId = id || `kds-field-${label.toLowerCase().replace(/\s+/g, "-")}`;
|
|
1071
|
+
const hasSuffix = !!endIcon || readOnly;
|
|
1070
1072
|
return /* @__PURE__ */ jsxs2(
|
|
1071
1073
|
"div",
|
|
1072
1074
|
{
|
|
@@ -1074,6 +1076,8 @@ var KdsTextField = forwardRef2(
|
|
|
1074
1076
|
"field",
|
|
1075
1077
|
"label",
|
|
1076
1078
|
"border",
|
|
1079
|
+
startIcon && "prefix",
|
|
1080
|
+
hasSuffix && "suffix",
|
|
1077
1081
|
error && "invalid",
|
|
1078
1082
|
readOnly && "locked",
|
|
1079
1083
|
fullWidth && "kds-w-full",
|
|
@@ -1086,12 +1090,16 @@ var KdsTextField = forwardRef2(
|
|
|
1086
1090
|
{
|
|
1087
1091
|
ref,
|
|
1088
1092
|
id: fieldId,
|
|
1089
|
-
placeholder: " ",
|
|
1090
1093
|
readOnly,
|
|
1091
|
-
|
|
1094
|
+
required,
|
|
1095
|
+
...props,
|
|
1096
|
+
placeholder: " "
|
|
1092
1097
|
}
|
|
1093
1098
|
),
|
|
1094
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ jsxs2("label", { htmlFor: fieldId, children: [
|
|
1100
|
+
label,
|
|
1101
|
+
required && " *"
|
|
1102
|
+
] }),
|
|
1095
1103
|
readOnly && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", children: "lock" }),
|
|
1096
1104
|
endIcon && !readOnly && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", children: endIcon }),
|
|
1097
1105
|
helperText && /* @__PURE__ */ jsx3("span", { className: "helper", children: helperText })
|
|
@@ -1106,78 +1114,18 @@ KdsTextField.displayName = "KdsTextField";
|
|
|
1106
1114
|
import { forwardRef as forwardRef3 } from "react";
|
|
1107
1115
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1108
1116
|
var KdsCheckbox = forwardRef3(
|
|
1109
|
-
({ label, className,
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
/* @__PURE__ */ jsx4("span", { children: label })
|
|
1114
|
-
] });
|
|
1115
|
-
}
|
|
1117
|
+
({ label, className, ...props }, ref) => /* @__PURE__ */ jsxs3("label", { className: clsx("checkbox", className), children: [
|
|
1118
|
+
/* @__PURE__ */ jsx4("input", { ref, type: "checkbox", ...props }),
|
|
1119
|
+
/* @__PURE__ */ jsx4("span", { children: label })
|
|
1120
|
+
] })
|
|
1116
1121
|
);
|
|
1117
1122
|
KdsCheckbox.displayName = "KdsCheckbox";
|
|
1118
1123
|
|
|
1119
|
-
// src/components/core/KdsModal/KdsModal.tsx
|
|
1120
|
-
import { forwardRef as forwardRef4 } from "react";
|
|
1121
|
-
import * as Dialog from "@radix-ui/react-dialog";
|
|
1122
|
-
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1123
|
-
var KdsModal = forwardRef4(
|
|
1124
|
-
({
|
|
1125
|
-
open,
|
|
1126
|
-
onClose,
|
|
1127
|
-
title,
|
|
1128
|
-
description,
|
|
1129
|
-
footer,
|
|
1130
|
-
children,
|
|
1131
|
-
size = "md",
|
|
1132
|
-
showCloseButton = true,
|
|
1133
|
-
className
|
|
1134
|
-
}, ref) => /* @__PURE__ */ jsx5(
|
|
1135
|
-
Dialog.Root,
|
|
1136
|
-
{
|
|
1137
|
-
open,
|
|
1138
|
-
onOpenChange: (o) => {
|
|
1139
|
-
if (!o) onClose();
|
|
1140
|
-
},
|
|
1141
|
-
children: /* @__PURE__ */ jsxs4(Dialog.Portal, { children: [
|
|
1142
|
-
/* @__PURE__ */ jsx5(Dialog.Overlay, { className: "kds-bottom-sheet-scrim" }),
|
|
1143
|
-
/* @__PURE__ */ jsxs4(
|
|
1144
|
-
Dialog.Content,
|
|
1145
|
-
{
|
|
1146
|
-
ref,
|
|
1147
|
-
className: clsx(
|
|
1148
|
-
"kds-bottom-sheet",
|
|
1149
|
-
`kds-bottom-sheet-${size}`,
|
|
1150
|
-
className
|
|
1151
|
-
),
|
|
1152
|
-
children: [
|
|
1153
|
-
title && /* @__PURE__ */ jsxs4("div", { className: "kds-bottom-sheet-header", children: [
|
|
1154
|
-
/* @__PURE__ */ jsx5(Dialog.Title, { className: "kds-bottom-sheet-title", children: title }),
|
|
1155
|
-
showCloseButton && /* @__PURE__ */ jsx5(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx5(
|
|
1156
|
-
"button",
|
|
1157
|
-
{
|
|
1158
|
-
className: "kds-bottom-sheet-close",
|
|
1159
|
-
"aria-label": "Cerrar",
|
|
1160
|
-
children: /* @__PURE__ */ jsx5("i", { className: "material-symbols-outlined", children: "close" })
|
|
1161
|
-
}
|
|
1162
|
-
) })
|
|
1163
|
-
] }),
|
|
1164
|
-
description && /* @__PURE__ */ jsx5(Dialog.Description, { className: "kds-bottom-sheet-description", children: description }),
|
|
1165
|
-
/* @__PURE__ */ jsx5("div", { className: "kds-bottom-sheet-body", children }),
|
|
1166
|
-
footer && /* @__PURE__ */ jsx5("div", { className: "kds-bottom-sheet-actions", children: footer })
|
|
1167
|
-
]
|
|
1168
|
-
}
|
|
1169
|
-
)
|
|
1170
|
-
] })
|
|
1171
|
-
}
|
|
1172
|
-
)
|
|
1173
|
-
);
|
|
1174
|
-
KdsModal.displayName = "KdsModal";
|
|
1175
|
-
|
|
1176
1124
|
// src/components/core/KdsCard/KdsCard.tsx
|
|
1177
|
-
import { forwardRef as
|
|
1178
|
-
import { jsx as
|
|
1179
|
-
var KdsCard =
|
|
1180
|
-
({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */
|
|
1125
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
1126
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1127
|
+
var KdsCard = forwardRef4(
|
|
1128
|
+
({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
1181
1129
|
"article",
|
|
1182
1130
|
{
|
|
1183
1131
|
ref,
|
|
@@ -1192,66 +1140,101 @@ var KdsCard = forwardRef5(
|
|
|
1192
1140
|
)
|
|
1193
1141
|
);
|
|
1194
1142
|
KdsCard.displayName = "KdsCard";
|
|
1195
|
-
var KdsCardHeader =
|
|
1196
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1143
|
+
var KdsCardHeader = forwardRef4(
|
|
1144
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx5("div", { ref, className: clsx("kds-card-header", className), ...props, children })
|
|
1197
1145
|
);
|
|
1198
1146
|
KdsCardHeader.displayName = "KdsCardHeader";
|
|
1199
|
-
var KdsCardBody =
|
|
1200
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1147
|
+
var KdsCardBody = forwardRef4(
|
|
1148
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx5("div", { ref, className: clsx("kds-card-body", className), ...props, children })
|
|
1201
1149
|
);
|
|
1202
1150
|
KdsCardBody.displayName = "KdsCardBody";
|
|
1203
|
-
var KdsCardFooter =
|
|
1204
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1151
|
+
var KdsCardFooter = forwardRef4(
|
|
1152
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx5("div", { ref, className: clsx("kds-card-footer", className), ...props, children })
|
|
1205
1153
|
);
|
|
1206
1154
|
KdsCardFooter.displayName = "KdsCardFooter";
|
|
1207
1155
|
|
|
1208
1156
|
// src/components/core/KdsSpinner/KdsSpinner.tsx
|
|
1209
|
-
import { forwardRef as
|
|
1210
|
-
import { jsx as
|
|
1211
|
-
var
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1157
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
1158
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1159
|
+
var SIZE_CLASS = {
|
|
1160
|
+
small: "small",
|
|
1161
|
+
medium: null,
|
|
1162
|
+
large: "large"
|
|
1163
|
+
};
|
|
1164
|
+
var KdsSpinner = forwardRef5(
|
|
1165
|
+
({ size = "medium", label, className, ...props }, ref) => {
|
|
1166
|
+
const sizeClass = SIZE_CLASS[size];
|
|
1167
|
+
return /* @__PURE__ */ jsxs4(
|
|
1168
|
+
"div",
|
|
1169
|
+
{
|
|
1170
|
+
ref,
|
|
1171
|
+
className: clsx("kds-flex kds-flex-col kds-items-center kds-gap-2", className),
|
|
1172
|
+
role: "status",
|
|
1173
|
+
...props,
|
|
1174
|
+
children: [
|
|
1175
|
+
/* @__PURE__ */ jsx6("progress", { className: clsx("circle indeterminate", sizeClass) }),
|
|
1176
|
+
label && /* @__PURE__ */ jsx6("span", { className: "kds-text-body-small kds-text-muted", children: label }),
|
|
1177
|
+
!label && /* @__PURE__ */ jsx6("span", { className: "kds-hidden", children: "Cargando" })
|
|
1178
|
+
]
|
|
1179
|
+
}
|
|
1180
|
+
);
|
|
1181
|
+
}
|
|
1217
1182
|
);
|
|
1218
1183
|
KdsSpinner.displayName = "KdsSpinner";
|
|
1219
1184
|
|
|
1220
1185
|
// src/components/core/KdsLinearProgress/KdsLinearProgress.tsx
|
|
1221
|
-
import { forwardRef as
|
|
1222
|
-
import { jsx as
|
|
1223
|
-
var KdsLinearProgress =
|
|
1224
|
-
({ value, max = 100, className, ...props }, ref) => /* @__PURE__ */
|
|
1186
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
1187
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1188
|
+
var KdsLinearProgress = forwardRef6(
|
|
1189
|
+
({ value, max = 100, className, ...props }, ref) => /* @__PURE__ */ jsx7("progress", { ref, className: clsx("kds-progress", className), value, max, ...props })
|
|
1225
1190
|
);
|
|
1226
1191
|
KdsLinearProgress.displayName = "KdsLinearProgress";
|
|
1227
1192
|
|
|
1228
1193
|
// src/components/core/KdsAlert/KdsAlert.tsx
|
|
1229
|
-
import { forwardRef as
|
|
1230
|
-
import { jsx as
|
|
1231
|
-
var
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1194
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
1195
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1196
|
+
var DEFAULT_ICONS = {
|
|
1197
|
+
success: "check_circle",
|
|
1198
|
+
info: "info",
|
|
1199
|
+
warning: "warning",
|
|
1200
|
+
error: "error"
|
|
1201
|
+
};
|
|
1202
|
+
var KdsAlert = forwardRef7(
|
|
1203
|
+
({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => {
|
|
1204
|
+
const resolvedIcon = icon === false ? null : typeof icon === "string" ? icon : DEFAULT_ICONS[severity];
|
|
1205
|
+
return /* @__PURE__ */ jsxs5(
|
|
1206
|
+
"div",
|
|
1207
|
+
{
|
|
1208
|
+
ref,
|
|
1209
|
+
role: "alert",
|
|
1210
|
+
className: clsx("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
|
|
1211
|
+
...props,
|
|
1212
|
+
children: [
|
|
1213
|
+
resolvedIcon && /* @__PURE__ */ jsx8("div", { className: "kds-alert-icon", children: /* @__PURE__ */ jsx8("i", { className: "material-symbols-outlined", children: resolvedIcon }) }),
|
|
1214
|
+
/* @__PURE__ */ jsxs5("div", { className: "kds-alert-content", children: [
|
|
1215
|
+
title && /* @__PURE__ */ jsx8("p", { className: "kds-alert-title", children: title }),
|
|
1216
|
+
/* @__PURE__ */ jsx8("p", { className: "kds-alert-description", children })
|
|
1217
|
+
] }),
|
|
1218
|
+
onClose && /* @__PURE__ */ jsx8(
|
|
1219
|
+
"button",
|
|
1220
|
+
{
|
|
1221
|
+
type: "button",
|
|
1222
|
+
className: "kds-alert-close",
|
|
1223
|
+
onClick: onClose,
|
|
1224
|
+
"aria-label": "Cerrar",
|
|
1225
|
+
children: /* @__PURE__ */ jsx8("i", { className: "material-symbols-outlined", children: "close" })
|
|
1226
|
+
}
|
|
1227
|
+
)
|
|
1228
|
+
]
|
|
1229
|
+
}
|
|
1230
|
+
);
|
|
1231
|
+
}
|
|
1249
1232
|
);
|
|
1250
1233
|
KdsAlert.displayName = "KdsAlert";
|
|
1251
1234
|
|
|
1252
1235
|
// src/components/core/KdsTypography/KdsTypography.tsx
|
|
1253
|
-
import { forwardRef as
|
|
1254
|
-
import { jsx as
|
|
1236
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
1237
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1255
1238
|
var variantTag = {
|
|
1256
1239
|
display1: "h1",
|
|
1257
1240
|
display2: "h2",
|
|
@@ -1266,10 +1249,10 @@ var variantTag = {
|
|
|
1266
1249
|
muted: "p",
|
|
1267
1250
|
link: "span"
|
|
1268
1251
|
};
|
|
1269
|
-
var KdsTypography =
|
|
1252
|
+
var KdsTypography = forwardRef8(
|
|
1270
1253
|
({ variant = "body", color, as, children, className, ...props }, ref) => {
|
|
1271
1254
|
const Tag = as || variantTag[variant];
|
|
1272
|
-
return /* @__PURE__ */
|
|
1255
|
+
return /* @__PURE__ */ jsx9(
|
|
1273
1256
|
Tag,
|
|
1274
1257
|
{
|
|
1275
1258
|
ref,
|
|
@@ -1287,7 +1270,7 @@ var KdsTypography = forwardRef9(
|
|
|
1287
1270
|
KdsTypography.displayName = "KdsTypography";
|
|
1288
1271
|
|
|
1289
1272
|
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
1290
|
-
import
|
|
1273
|
+
import React9, { forwardRef as forwardRef9, Children, useMemo } from "react";
|
|
1291
1274
|
|
|
1292
1275
|
// src/components/core/hooks/useTabsKeyboard.ts
|
|
1293
1276
|
import { useCallback } from "react";
|
|
@@ -1312,31 +1295,31 @@ function useTabsKeyboard(tabCount, activeIndex, onChange) {
|
|
|
1312
1295
|
}
|
|
1313
1296
|
|
|
1314
1297
|
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
1315
|
-
import { jsx as
|
|
1316
|
-
var KdsTabs =
|
|
1317
|
-
({ activeIndex, onChange,
|
|
1298
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1299
|
+
var KdsTabs = forwardRef9(
|
|
1300
|
+
({ activeIndex, onChange, children, className, style, ...props }, ref) => {
|
|
1318
1301
|
const tabCount = Children.count(children);
|
|
1319
1302
|
const { onKeyDown } = useTabsKeyboard(tabCount, activeIndex, onChange);
|
|
1320
|
-
const mergedStyle = useMemo(
|
|
1321
|
-
|
|
1322
|
-
return {
|
|
1303
|
+
const mergedStyle = useMemo(
|
|
1304
|
+
() => ({
|
|
1323
1305
|
...style,
|
|
1324
1306
|
"--_tab-count": tabCount,
|
|
1325
1307
|
"--_active-idx": activeIndex
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
|
|
1308
|
+
}),
|
|
1309
|
+
[tabCount, activeIndex, style]
|
|
1310
|
+
);
|
|
1311
|
+
return /* @__PURE__ */ jsx10(
|
|
1329
1312
|
"div",
|
|
1330
1313
|
{
|
|
1331
1314
|
ref,
|
|
1332
1315
|
role: "tablist",
|
|
1333
|
-
className: clsx(
|
|
1316
|
+
className: clsx("kds-segmented-tabs", className),
|
|
1334
1317
|
style: mergedStyle,
|
|
1335
1318
|
onKeyDown,
|
|
1336
1319
|
...props,
|
|
1337
1320
|
children: Children.map(children, (child, i) => {
|
|
1338
|
-
if (!
|
|
1339
|
-
return
|
|
1321
|
+
if (!React9.isValidElement(child)) return child;
|
|
1322
|
+
return React9.cloneElement(child, {
|
|
1340
1323
|
_active: i === activeIndex,
|
|
1341
1324
|
_onClick: () => onChange(i)
|
|
1342
1325
|
});
|
|
@@ -1346,11 +1329,12 @@ var KdsTabs = forwardRef10(
|
|
|
1346
1329
|
}
|
|
1347
1330
|
);
|
|
1348
1331
|
KdsTabs.displayName = "KdsTabs";
|
|
1349
|
-
var KdsTab =
|
|
1350
|
-
({ _active, _onClick, children, className, ...props }, ref) => /* @__PURE__ */
|
|
1332
|
+
var KdsTab = forwardRef9(
|
|
1333
|
+
({ _active, _onClick, children, className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1351
1334
|
"button",
|
|
1352
1335
|
{
|
|
1353
1336
|
ref,
|
|
1337
|
+
type: "button",
|
|
1354
1338
|
role: "tab",
|
|
1355
1339
|
"aria-selected": _active,
|
|
1356
1340
|
tabIndex: _active ? 0 : -1,
|
|
@@ -1362,8 +1346,8 @@ var KdsTab = forwardRef10(
|
|
|
1362
1346
|
)
|
|
1363
1347
|
);
|
|
1364
1348
|
KdsTab.displayName = "KdsTab";
|
|
1365
|
-
var KdsTabPanel =
|
|
1366
|
-
({ active, children, className, ...props }, ref) => /* @__PURE__ */
|
|
1349
|
+
var KdsTabPanel = forwardRef9(
|
|
1350
|
+
({ active, children, className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1367
1351
|
"div",
|
|
1368
1352
|
{
|
|
1369
1353
|
ref,
|
|
@@ -1377,103 +1361,14 @@ var KdsTabPanel = forwardRef10(
|
|
|
1377
1361
|
);
|
|
1378
1362
|
KdsTabPanel.displayName = "KdsTabPanel";
|
|
1379
1363
|
|
|
1380
|
-
// src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
|
|
1381
|
-
import { forwardRef as forwardRef11 } from "react";
|
|
1382
|
-
|
|
1383
|
-
// src/assets/images/khipu-logo-color.svg
|
|
1384
|
-
var khipu_logo_color_default = "./khipu-logo-color-TV75AKOV.svg";
|
|
1385
|
-
|
|
1386
|
-
// src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
|
|
1387
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1388
|
-
var KhipuLogo = () => /* @__PURE__ */ jsx12(
|
|
1389
|
-
"img",
|
|
1390
|
-
{
|
|
1391
|
-
src: khipu_logo_color_default,
|
|
1392
|
-
alt: "Khipu",
|
|
1393
|
-
className: "kds-logo-header-logo-img"
|
|
1394
|
-
}
|
|
1395
|
-
);
|
|
1396
|
-
var KdsLogoHeaderLogo = forwardRef11(
|
|
1397
|
-
({ children, className, ...props }, ref) => {
|
|
1398
|
-
return /* @__PURE__ */ jsx12(
|
|
1399
|
-
"div",
|
|
1400
|
-
{
|
|
1401
|
-
ref,
|
|
1402
|
-
className: clsx("kds-logo-header-logo", className),
|
|
1403
|
-
...props,
|
|
1404
|
-
children: children || /* @__PURE__ */ jsx12(KhipuLogo, {})
|
|
1405
|
-
}
|
|
1406
|
-
);
|
|
1407
|
-
}
|
|
1408
|
-
);
|
|
1409
|
-
KdsLogoHeaderLogo.displayName = "KdsLogoHeaderLogo";
|
|
1410
|
-
var KdsLogoHeaderSeparator = forwardRef11(
|
|
1411
|
-
({ children = "|", className, ...props }, ref) => {
|
|
1412
|
-
return /* @__PURE__ */ jsx12(
|
|
1413
|
-
"span",
|
|
1414
|
-
{
|
|
1415
|
-
ref,
|
|
1416
|
-
className: clsx("kds-logo-header-separator", className),
|
|
1417
|
-
...props,
|
|
1418
|
-
children
|
|
1419
|
-
}
|
|
1420
|
-
);
|
|
1421
|
-
}
|
|
1422
|
-
);
|
|
1423
|
-
KdsLogoHeaderSeparator.displayName = "KdsLogoHeaderSeparator";
|
|
1424
|
-
var KdsLogoHeaderCode = forwardRef11(
|
|
1425
|
-
({ children, className, ...props }, ref) => {
|
|
1426
|
-
return /* @__PURE__ */ jsx12(
|
|
1427
|
-
"span",
|
|
1428
|
-
{
|
|
1429
|
-
ref,
|
|
1430
|
-
className: clsx("kds-logo-header-code", className),
|
|
1431
|
-
...props,
|
|
1432
|
-
children
|
|
1433
|
-
}
|
|
1434
|
-
);
|
|
1435
|
-
}
|
|
1436
|
-
);
|
|
1437
|
-
KdsLogoHeaderCode.displayName = "KdsLogoHeaderCode";
|
|
1438
|
-
var KdsLogoHeaderCloseButton = forwardRef11(
|
|
1439
|
-
({ onClose, className, ...props }, ref) => {
|
|
1440
|
-
return /* @__PURE__ */ jsx12("div", { className: "kds-logo-header-close-wrapper", children: /* @__PURE__ */ jsx12(
|
|
1441
|
-
"button",
|
|
1442
|
-
{
|
|
1443
|
-
ref,
|
|
1444
|
-
onClick: onClose,
|
|
1445
|
-
className: clsx("kds-btn kds-btn-icon", className),
|
|
1446
|
-
"aria-label": "close",
|
|
1447
|
-
...props,
|
|
1448
|
-
children: /* @__PURE__ */ jsx12("i", { className: "material-symbols-outlined", children: "close" })
|
|
1449
|
-
}
|
|
1450
|
-
) });
|
|
1451
|
-
}
|
|
1452
|
-
);
|
|
1453
|
-
KdsLogoHeaderCloseButton.displayName = "KdsLogoHeaderCloseButton";
|
|
1454
|
-
var KdsLogoHeader = forwardRef11(
|
|
1455
|
-
({ children, className, ...props }, ref) => {
|
|
1456
|
-
return /* @__PURE__ */ jsx12(
|
|
1457
|
-
"div",
|
|
1458
|
-
{
|
|
1459
|
-
ref,
|
|
1460
|
-
className: clsx("kds-brand-row", className),
|
|
1461
|
-
...props,
|
|
1462
|
-
children
|
|
1463
|
-
}
|
|
1464
|
-
);
|
|
1465
|
-
}
|
|
1466
|
-
);
|
|
1467
|
-
KdsLogoHeader.displayName = "KdsLogoHeader";
|
|
1468
|
-
|
|
1469
1364
|
// src/components/core/KdsRadioGroup/KdsRadioGroup.tsx
|
|
1470
|
-
import { forwardRef as
|
|
1471
|
-
import { jsx as
|
|
1472
|
-
var KdsRadioGroup =
|
|
1473
|
-
({ label, name, options, value, onChange, className, ...props }, ref) => /* @__PURE__ */
|
|
1474
|
-
label && /* @__PURE__ */
|
|
1475
|
-
options.map((opt) => /* @__PURE__ */
|
|
1476
|
-
/* @__PURE__ */
|
|
1365
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
1366
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1367
|
+
var KdsRadioGroup = forwardRef10(
|
|
1368
|
+
({ label, name, options, value, onChange, size, className, ...props }, ref) => /* @__PURE__ */ jsxs6("fieldset", { ref, className: clsx("kds-radio-group", className), ...props, children: [
|
|
1369
|
+
label && /* @__PURE__ */ jsx11("legend", { children: label }),
|
|
1370
|
+
options.map((opt) => /* @__PURE__ */ jsxs6("label", { className: clsx("radio", size), children: [
|
|
1371
|
+
/* @__PURE__ */ jsx11(
|
|
1477
1372
|
"input",
|
|
1478
1373
|
{
|
|
1479
1374
|
type: "radio",
|
|
@@ -1484,78 +1379,97 @@ var KdsRadioGroup = forwardRef12(
|
|
|
1484
1379
|
onChange: () => onChange?.(opt.value)
|
|
1485
1380
|
}
|
|
1486
1381
|
),
|
|
1487
|
-
/* @__PURE__ */
|
|
1382
|
+
/* @__PURE__ */ jsx11("span", { children: opt.label })
|
|
1488
1383
|
] }, opt.value))
|
|
1489
1384
|
] })
|
|
1490
1385
|
);
|
|
1491
1386
|
KdsRadioGroup.displayName = "KdsRadioGroup";
|
|
1492
1387
|
|
|
1493
1388
|
// src/components/core/KdsSelect/KdsSelect.tsx
|
|
1494
|
-
import { forwardRef as
|
|
1495
|
-
import
|
|
1496
|
-
|
|
1497
|
-
var KdsSelectRoot = forwardRef13(
|
|
1389
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
1390
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1391
|
+
var KdsSelect = forwardRef11(
|
|
1498
1392
|
({
|
|
1499
|
-
value,
|
|
1500
|
-
onValueChange,
|
|
1501
|
-
placeholder,
|
|
1502
1393
|
label,
|
|
1503
|
-
|
|
1394
|
+
options,
|
|
1395
|
+
placeholder,
|
|
1504
1396
|
helperText,
|
|
1505
|
-
|
|
1397
|
+
error,
|
|
1398
|
+
prefixIcon,
|
|
1506
1399
|
fullWidth = true,
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
className
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1400
|
+
disabled,
|
|
1401
|
+
required,
|
|
1402
|
+
className,
|
|
1403
|
+
id,
|
|
1404
|
+
...props
|
|
1405
|
+
}, ref) => {
|
|
1406
|
+
const fieldId = id || `kds-select-${label.toLowerCase().replace(/\s+/g, "-")}`;
|
|
1407
|
+
return /* @__PURE__ */ jsxs7(
|
|
1408
|
+
"div",
|
|
1409
|
+
{
|
|
1410
|
+
className: clsx(
|
|
1411
|
+
"field",
|
|
1412
|
+
"label",
|
|
1413
|
+
"border",
|
|
1414
|
+
prefixIcon && "prefix",
|
|
1415
|
+
error && "invalid",
|
|
1416
|
+
fullWidth && "kds-w-full",
|
|
1417
|
+
className
|
|
1418
|
+
),
|
|
1419
|
+
children: [
|
|
1420
|
+
prefixIcon && /* @__PURE__ */ jsx12("i", { className: "material-symbols-outlined", children: prefixIcon }),
|
|
1421
|
+
/* @__PURE__ */ jsxs7(
|
|
1422
|
+
"select",
|
|
1423
|
+
{
|
|
1424
|
+
ref,
|
|
1425
|
+
id: fieldId,
|
|
1426
|
+
disabled,
|
|
1427
|
+
required,
|
|
1428
|
+
...props,
|
|
1429
|
+
children: [
|
|
1430
|
+
placeholder !== void 0 && /* @__PURE__ */ jsx12("option", { value: "", children: placeholder }),
|
|
1431
|
+
options.map((opt) => /* @__PURE__ */ jsx12("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
|
|
1432
|
+
]
|
|
1433
|
+
}
|
|
1434
|
+
),
|
|
1435
|
+
/* @__PURE__ */ jsxs7("label", { htmlFor: fieldId, children: [
|
|
1436
|
+
label,
|
|
1437
|
+
required && " *"
|
|
1525
1438
|
] }),
|
|
1526
|
-
|
|
1527
|
-
]
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
)
|
|
1532
|
-
);
|
|
1533
|
-
KdsSelectRoot.displayName = "KdsSelect";
|
|
1534
|
-
var KdsSelectItem = forwardRef13(
|
|
1535
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ jsxs8(Select.Item, { ref, className: clsx("kds-select-item", className), ...props, children: [
|
|
1536
|
-
/* @__PURE__ */ jsx14(Select.ItemText, { children }),
|
|
1537
|
-
/* @__PURE__ */ jsx14(Select.ItemIndicator, { className: "kds-select-item-indicator", children: /* @__PURE__ */ jsx14("i", { className: "material-symbols-outlined", children: "check" }) })
|
|
1538
|
-
] })
|
|
1439
|
+
helperText && /* @__PURE__ */ jsx12("span", { className: "helper", children: helperText })
|
|
1440
|
+
]
|
|
1441
|
+
}
|
|
1442
|
+
);
|
|
1443
|
+
}
|
|
1539
1444
|
);
|
|
1540
|
-
|
|
1541
|
-
var KdsSelect = Object.assign(KdsSelectRoot, {
|
|
1542
|
-
Item: KdsSelectItem
|
|
1543
|
-
});
|
|
1445
|
+
KdsSelect.displayName = "KdsSelect";
|
|
1544
1446
|
|
|
1545
1447
|
// src/components/core/KdsChip/KdsChip.tsx
|
|
1546
|
-
import { forwardRef as
|
|
1547
|
-
import { jsx as
|
|
1548
|
-
var KdsChip =
|
|
1549
|
-
({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */
|
|
1550
|
-
icon && /* @__PURE__ */
|
|
1551
|
-
children,
|
|
1552
|
-
onDelete && /* @__PURE__ */
|
|
1448
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
1449
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1450
|
+
var KdsChip = forwardRef12(
|
|
1451
|
+
({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */ jsxs8("span", { ref, className: clsx("kds-badge", color, className), ...props, children: [
|
|
1452
|
+
icon && /* @__PURE__ */ jsx13("i", { className: "material-symbols-outlined", children: icon }),
|
|
1453
|
+
/* @__PURE__ */ jsx13("span", { children }),
|
|
1454
|
+
onDelete && /* @__PURE__ */ jsx13(
|
|
1455
|
+
"button",
|
|
1456
|
+
{
|
|
1457
|
+
type: "button",
|
|
1458
|
+
className: "kds-badge-close",
|
|
1459
|
+
onClick: (e) => {
|
|
1460
|
+
e.stopPropagation();
|
|
1461
|
+
onDelete();
|
|
1462
|
+
},
|
|
1463
|
+
"aria-label": "Eliminar",
|
|
1464
|
+
children: /* @__PURE__ */ jsx13("i", { className: "material-symbols-outlined", children: "close" })
|
|
1465
|
+
}
|
|
1466
|
+
)
|
|
1553
1467
|
] })
|
|
1554
1468
|
);
|
|
1555
1469
|
KdsChip.displayName = "KdsChip";
|
|
1556
1470
|
|
|
1557
1471
|
// src/components/core/KdsSnackbar/KdsSnackbar.tsx
|
|
1558
|
-
import { forwardRef as
|
|
1472
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
1559
1473
|
|
|
1560
1474
|
// src/components/core/hooks/useAutoHide.ts
|
|
1561
1475
|
import { useState, useEffect, useRef } from "react";
|
|
@@ -1575,22 +1489,61 @@ function useAutoHide(durationMs, onHide) {
|
|
|
1575
1489
|
}
|
|
1576
1490
|
|
|
1577
1491
|
// src/components/core/KdsSnackbar/KdsSnackbar.tsx
|
|
1578
|
-
import { jsx as
|
|
1579
|
-
var
|
|
1580
|
-
|
|
1581
|
-
|
|
1492
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1493
|
+
var DEFAULT_ICONS2 = {
|
|
1494
|
+
info: "info",
|
|
1495
|
+
success: "check_circle",
|
|
1496
|
+
error: "error"
|
|
1497
|
+
};
|
|
1498
|
+
var KdsSnackbar = forwardRef13(
|
|
1499
|
+
({
|
|
1500
|
+
message,
|
|
1501
|
+
type = "info",
|
|
1502
|
+
duration = 5e3,
|
|
1503
|
+
onClose,
|
|
1504
|
+
open = true,
|
|
1505
|
+
icon,
|
|
1506
|
+
className,
|
|
1507
|
+
style,
|
|
1508
|
+
...props
|
|
1509
|
+
}, ref) => {
|
|
1510
|
+
const autoDismiss = duration > 0;
|
|
1511
|
+
const { visible } = useAutoHide(autoDismiss ? duration : 0, onClose);
|
|
1582
1512
|
if (!open || !visible) return null;
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1513
|
+
const resolvedIcon = icon === false ? null : icon ?? DEFAULT_ICONS2[type];
|
|
1514
|
+
const mergedStyle = autoDismiss ? { ...style, ["--kds-snackbar-duration"]: `${duration}ms` } : style ?? {};
|
|
1515
|
+
return /* @__PURE__ */ jsxs9(
|
|
1516
|
+
"div",
|
|
1517
|
+
{
|
|
1518
|
+
ref,
|
|
1519
|
+
role: "status",
|
|
1520
|
+
className: clsx("snackbar", "active", type, className),
|
|
1521
|
+
"data-auto-dismiss": autoDismiss ? "true" : void 0,
|
|
1522
|
+
style: mergedStyle,
|
|
1523
|
+
...props,
|
|
1524
|
+
children: [
|
|
1525
|
+
resolvedIcon && /* @__PURE__ */ jsx14("i", { className: "material-symbols-outlined", children: resolvedIcon }),
|
|
1526
|
+
/* @__PURE__ */ jsx14("span", { className: "max", children: message }),
|
|
1527
|
+
onClose && /* @__PURE__ */ jsx14(
|
|
1528
|
+
"button",
|
|
1529
|
+
{
|
|
1530
|
+
type: "button",
|
|
1531
|
+
className: "kds-snackbar-close",
|
|
1532
|
+
onClick: onClose,
|
|
1533
|
+
"aria-label": "Cerrar",
|
|
1534
|
+
children: /* @__PURE__ */ jsx14("i", { className: "material-symbols-outlined", children: "close" })
|
|
1535
|
+
}
|
|
1536
|
+
)
|
|
1537
|
+
]
|
|
1538
|
+
}
|
|
1539
|
+
);
|
|
1587
1540
|
}
|
|
1588
1541
|
);
|
|
1589
1542
|
KdsSnackbar.displayName = "KdsSnackbar";
|
|
1590
1543
|
|
|
1591
1544
|
// src/components/core/KdsTooltip/KdsTooltip.tsx
|
|
1592
1545
|
import * as Tooltip from "@radix-ui/react-tooltip";
|
|
1593
|
-
import { jsx as
|
|
1546
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1594
1547
|
function KdsTooltip({
|
|
1595
1548
|
content,
|
|
1596
1549
|
children,
|
|
@@ -1601,80 +1554,96 @@ function KdsTooltip({
|
|
|
1601
1554
|
onOpenChange,
|
|
1602
1555
|
delayDuration = 300
|
|
1603
1556
|
}) {
|
|
1604
|
-
return /* @__PURE__ */
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
/* @__PURE__ */
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1557
|
+
return /* @__PURE__ */ jsx15(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ jsxs10(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1558
|
+
/* @__PURE__ */ jsx15(Tooltip.Trigger, { asChild: true, children }),
|
|
1559
|
+
/* @__PURE__ */ jsx15(Tooltip.Portal, { children: /* @__PURE__ */ jsxs10(
|
|
1560
|
+
Tooltip.Content,
|
|
1561
|
+
{
|
|
1562
|
+
className: clsx("kds-tooltip", className),
|
|
1563
|
+
side: placement,
|
|
1564
|
+
sideOffset: 6,
|
|
1565
|
+
collisionPadding: 8,
|
|
1566
|
+
children: [
|
|
1567
|
+
content,
|
|
1568
|
+
/* @__PURE__ */ jsx15(Tooltip.Arrow, { className: "kds-tooltip-arrow", width: 10, height: 5 })
|
|
1569
|
+
]
|
|
1570
|
+
}
|
|
1571
|
+
) })
|
|
1610
1572
|
] }) });
|
|
1611
1573
|
}
|
|
1612
1574
|
|
|
1613
1575
|
// src/components/core/KdsAccordion/KdsAccordion.tsx
|
|
1614
|
-
import { forwardRef as
|
|
1615
|
-
import { jsx as
|
|
1616
|
-
var KdsAccordion =
|
|
1617
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1576
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
1577
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1578
|
+
var KdsAccordion = forwardRef14(
|
|
1579
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx16("details", { ref, className: clsx("kds-accordion", className), ...props, children })
|
|
1618
1580
|
);
|
|
1619
1581
|
KdsAccordion.displayName = "KdsAccordion";
|
|
1620
|
-
var KdsAccordionSummary =
|
|
1621
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1582
|
+
var KdsAccordionSummary = forwardRef14(
|
|
1583
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsxs11("summary", { ref, className: clsx("kds-accordion-summary", className), ...props, children: [
|
|
1622
1584
|
children,
|
|
1623
|
-
/* @__PURE__ */
|
|
1585
|
+
/* @__PURE__ */ jsx16("i", { className: "material-symbols-outlined", children: "expand_more" })
|
|
1624
1586
|
] })
|
|
1625
1587
|
);
|
|
1626
1588
|
KdsAccordionSummary.displayName = "KdsAccordionSummary";
|
|
1627
|
-
var KdsAccordionDetails =
|
|
1628
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1589
|
+
var KdsAccordionDetails = forwardRef14(
|
|
1590
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx16("div", { ref, className: clsx("kds-accordion-details", className), ...props, children })
|
|
1629
1591
|
);
|
|
1630
1592
|
KdsAccordionDetails.displayName = "KdsAccordionDetails";
|
|
1631
1593
|
|
|
1632
1594
|
// src/components/core/KdsDivider/KdsDivider.tsx
|
|
1633
|
-
import { forwardRef as
|
|
1634
|
-
import { jsx as
|
|
1635
|
-
var KdsDivider =
|
|
1636
|
-
({ dashed, className, ...props }, ref) => /* @__PURE__ */
|
|
1595
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
1596
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1597
|
+
var KdsDivider = forwardRef15(
|
|
1598
|
+
({ dashed, className, ...props }, ref) => /* @__PURE__ */ jsx17("hr", { ref, className: clsx(dashed ? "kds-hr-dashed" : "kds-hr", className), ...props })
|
|
1637
1599
|
);
|
|
1638
1600
|
KdsDivider.displayName = "KdsDivider";
|
|
1639
1601
|
|
|
1640
1602
|
// src/components/core/KdsSectionNote/KdsSectionNote.tsx
|
|
1641
|
-
import { forwardRef as
|
|
1642
|
-
import { jsx as
|
|
1643
|
-
var KdsSectionNote =
|
|
1644
|
-
({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */
|
|
1645
|
-
/* @__PURE__ */
|
|
1646
|
-
/* @__PURE__ */
|
|
1603
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
1604
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1605
|
+
var KdsSectionNote = forwardRef16(
|
|
1606
|
+
({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ jsxs12("p", { ref, className: clsx("kds-section-note", className), ...props, children: [
|
|
1607
|
+
/* @__PURE__ */ jsx18("i", { className: "material-symbols-outlined", children: icon }),
|
|
1608
|
+
/* @__PURE__ */ jsx18("span", { children })
|
|
1647
1609
|
] })
|
|
1648
1610
|
);
|
|
1649
1611
|
KdsSectionNote.displayName = "KdsSectionNote";
|
|
1650
1612
|
|
|
1651
1613
|
// src/components/core/KdsStatusBlock/KdsStatusBlock.tsx
|
|
1652
|
-
import { forwardRef as
|
|
1653
|
-
import { jsx as
|
|
1654
|
-
var KdsStatusBlock =
|
|
1655
|
-
({ status, icon, title, description, inline, className, ...props }, ref) => /* @__PURE__ */
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
/* @__PURE__ */
|
|
1658
|
-
/* @__PURE__ */
|
|
1659
|
-
description && /* @__PURE__ */
|
|
1614
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
1615
|
+
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1616
|
+
var KdsStatusBlock = forwardRef17(
|
|
1617
|
+
({ status, icon, title, description, inline, className, ...props }, ref) => /* @__PURE__ */ jsxs13("div", { ref, className: clsx("kds-status-block", inline && "inline", className), "data-status": status, ...props, children: [
|
|
1618
|
+
/* @__PURE__ */ jsx19("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ jsx19("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
1619
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
1620
|
+
/* @__PURE__ */ jsx19("h2", { className: "kds-status-block-title", children: title }),
|
|
1621
|
+
description && /* @__PURE__ */ jsx19("p", { className: "kds-status-block-description", children: description })
|
|
1660
1622
|
] })
|
|
1661
1623
|
] })
|
|
1662
1624
|
);
|
|
1663
1625
|
KdsStatusBlock.displayName = "KdsStatusBlock";
|
|
1664
1626
|
|
|
1665
1627
|
// src/components/core/KdsStepper/KdsStepper.tsx
|
|
1666
|
-
import { forwardRef as
|
|
1667
|
-
import { jsx as
|
|
1668
|
-
var KdsStepper =
|
|
1669
|
-
({ steps, current, className, ...props }, ref) => /* @__PURE__ */
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1628
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
1629
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1630
|
+
var KdsStepper = forwardRef18(
|
|
1631
|
+
({ steps, current, className, ...props }, ref) => /* @__PURE__ */ jsx20("div", { ref, className: clsx("kds-stepper", className), ...props, children: steps.map((label, i) => /* @__PURE__ */ jsxs14(
|
|
1632
|
+
"div",
|
|
1633
|
+
{
|
|
1634
|
+
className: clsx("kds-step", i < current && "completed", i === current && "current"),
|
|
1635
|
+
children: [
|
|
1636
|
+
/* @__PURE__ */ jsx20("div", { className: "kds-step-indicator" }),
|
|
1637
|
+
/* @__PURE__ */ jsx20("div", { className: "kds-step-label", children: label })
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
`${i}-${label}`
|
|
1641
|
+
)) })
|
|
1673
1642
|
);
|
|
1674
1643
|
KdsStepper.displayName = "KdsStepper";
|
|
1675
1644
|
|
|
1676
1645
|
// src/components/core/KdsCopyRow/KdsCopyRow.tsx
|
|
1677
|
-
import { forwardRef as
|
|
1646
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
1678
1647
|
|
|
1679
1648
|
// src/components/core/hooks/useCopyToClipboard.ts
|
|
1680
1649
|
import { useState as useState2, useCallback as useCallback2 } from "react";
|
|
@@ -1695,73 +1664,218 @@ function useCopyToClipboard(resetMs = 1200) {
|
|
|
1695
1664
|
}
|
|
1696
1665
|
|
|
1697
1666
|
// src/components/core/KdsCopyRow/KdsCopyRow.tsx
|
|
1698
|
-
import { jsx as
|
|
1699
|
-
var KdsCopyRow =
|
|
1700
|
-
({ label, value, className, ...props }, ref) => {
|
|
1667
|
+
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1668
|
+
var KdsCopyRow = forwardRef19(
|
|
1669
|
+
({ label, value, copiedText = "Copiado", className, ...props }, ref) => {
|
|
1701
1670
|
const { copied, copy } = useCopyToClipboard();
|
|
1702
|
-
return /* @__PURE__ */
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1671
|
+
return /* @__PURE__ */ jsxs15(
|
|
1672
|
+
"button",
|
|
1673
|
+
{
|
|
1674
|
+
ref,
|
|
1675
|
+
type: "button",
|
|
1676
|
+
className: clsx("kds-copy-row", copied && "copied", className),
|
|
1677
|
+
"data-copy": value,
|
|
1678
|
+
onClick: () => copy(value),
|
|
1679
|
+
"aria-label": `Copiar ${label}: ${value}`,
|
|
1680
|
+
...props,
|
|
1681
|
+
children: [
|
|
1682
|
+
/* @__PURE__ */ jsx21("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "content_copy" }),
|
|
1683
|
+
/* @__PURE__ */ jsxs15("div", { children: [
|
|
1684
|
+
/* @__PURE__ */ jsx21("span", { className: "kds-copy-row-label", children: label }),
|
|
1685
|
+
/* @__PURE__ */ jsx21("span", { className: "kds-copy-row-value", children: value })
|
|
1686
|
+
] }),
|
|
1687
|
+
/* @__PURE__ */ jsxs15("span", { className: "kds-copy-toast", "aria-hidden": "true", children: [
|
|
1688
|
+
/* @__PURE__ */ jsx21("i", { className: "material-symbols-outlined", children: "check_circle" }),
|
|
1689
|
+
" ",
|
|
1690
|
+
copiedText
|
|
1691
|
+
] })
|
|
1692
|
+
]
|
|
1693
|
+
}
|
|
1694
|
+
);
|
|
1707
1695
|
}
|
|
1708
1696
|
);
|
|
1709
1697
|
KdsCopyRow.displayName = "KdsCopyRow";
|
|
1710
1698
|
|
|
1711
1699
|
// src/components/core/KdsCopyableTable/KdsCopyableTable.tsx
|
|
1712
|
-
import { forwardRef as
|
|
1713
|
-
import { Fragment as Fragment2, jsx as
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1700
|
+
import { forwardRef as forwardRef20, useState as useState3, useRef as useRef2, useCallback as useCallback3 } from "react";
|
|
1701
|
+
import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1702
|
+
async function copyToClipboard(text) {
|
|
1703
|
+
try {
|
|
1704
|
+
if (navigator.clipboard?.writeText) {
|
|
1705
|
+
await navigator.clipboard.writeText(text);
|
|
1706
|
+
return true;
|
|
1707
|
+
}
|
|
1708
|
+
} catch {
|
|
1709
|
+
}
|
|
1710
|
+
const ta = document.createElement("textarea");
|
|
1711
|
+
ta.value = text;
|
|
1712
|
+
ta.style.position = "fixed";
|
|
1713
|
+
ta.style.opacity = "0";
|
|
1714
|
+
document.body.appendChild(ta);
|
|
1715
|
+
ta.select();
|
|
1716
|
+
try {
|
|
1717
|
+
document.execCommand("copy");
|
|
1718
|
+
return true;
|
|
1719
|
+
} catch {
|
|
1720
|
+
return false;
|
|
1721
|
+
} finally {
|
|
1722
|
+
document.body.removeChild(ta);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
var TRANSITION_MS = 300;
|
|
1726
|
+
var KdsCopyableTable = forwardRef20(
|
|
1727
|
+
({
|
|
1728
|
+
rows,
|
|
1729
|
+
copyAllLabel = "Copiar todos los datos",
|
|
1730
|
+
copiedAllLabel = "Datos copiados",
|
|
1731
|
+
showCopyAll = true,
|
|
1732
|
+
className,
|
|
1733
|
+
...props
|
|
1734
|
+
}, ref) => {
|
|
1735
|
+
const copiedTimers = useRef2(/* @__PURE__ */ new Map());
|
|
1736
|
+
const settlingTimers = useRef2(/* @__PURE__ */ new Map());
|
|
1737
|
+
const [copiedRows, setCopiedRows] = useState3(/* @__PURE__ */ new Set());
|
|
1738
|
+
const [settlingRows, setSettlingRows] = useState3(/* @__PURE__ */ new Set());
|
|
1739
|
+
const [allCopied, setAllCopied] = useState3(false);
|
|
1740
|
+
const markCopied = useCallback3((indexes, duration = 1500) => {
|
|
1741
|
+
setCopiedRows((prev) => {
|
|
1742
|
+
const next = new Set(prev);
|
|
1743
|
+
indexes.forEach((i) => next.add(i));
|
|
1744
|
+
return next;
|
|
1745
|
+
});
|
|
1746
|
+
indexes.forEach((i) => {
|
|
1747
|
+
const st = settlingTimers.current.get(i);
|
|
1748
|
+
if (st) {
|
|
1749
|
+
clearTimeout(st);
|
|
1750
|
+
settlingTimers.current.delete(i);
|
|
1751
|
+
}
|
|
1752
|
+
});
|
|
1753
|
+
setSettlingRows((prev) => {
|
|
1754
|
+
const next = new Set(prev);
|
|
1755
|
+
indexes.forEach((i) => next.delete(i));
|
|
1756
|
+
return next;
|
|
1757
|
+
});
|
|
1758
|
+
indexes.forEach((i) => {
|
|
1759
|
+
const existing = copiedTimers.current.get(i);
|
|
1760
|
+
if (existing) clearTimeout(existing);
|
|
1761
|
+
const t = setTimeout(() => {
|
|
1762
|
+
setCopiedRows((prev) => {
|
|
1763
|
+
const next = new Set(prev);
|
|
1764
|
+
next.delete(i);
|
|
1765
|
+
return next;
|
|
1766
|
+
});
|
|
1767
|
+
setSettlingRows((prev) => {
|
|
1768
|
+
const next = new Set(prev);
|
|
1769
|
+
next.add(i);
|
|
1770
|
+
return next;
|
|
1771
|
+
});
|
|
1772
|
+
copiedTimers.current.delete(i);
|
|
1773
|
+
const settlingT = setTimeout(() => {
|
|
1774
|
+
setSettlingRows((prev) => {
|
|
1775
|
+
const next = new Set(prev);
|
|
1776
|
+
next.delete(i);
|
|
1777
|
+
return next;
|
|
1778
|
+
});
|
|
1779
|
+
settlingTimers.current.delete(i);
|
|
1780
|
+
}, TRANSITION_MS);
|
|
1781
|
+
settlingTimers.current.set(i, settlingT);
|
|
1782
|
+
}, duration);
|
|
1783
|
+
copiedTimers.current.set(i, t);
|
|
1784
|
+
});
|
|
1785
|
+
}, []);
|
|
1786
|
+
const handleRowCopy = async (row, index) => {
|
|
1787
|
+
const ok = await copyToClipboard(row.copy ?? row.value);
|
|
1788
|
+
if (ok) markCopied([index]);
|
|
1789
|
+
};
|
|
1790
|
+
const handleCopyAll = async () => {
|
|
1718
1791
|
const text = rows.map((r) => `${r.label}: ${r.value}`).join("\n");
|
|
1719
|
-
|
|
1792
|
+
const ok = await copyToClipboard(text);
|
|
1793
|
+
if (ok) {
|
|
1794
|
+
markCopied(rows.map((_, i) => i));
|
|
1795
|
+
setAllCopied(true);
|
|
1796
|
+
setTimeout(() => setAllCopied(false), 2e3);
|
|
1797
|
+
}
|
|
1720
1798
|
};
|
|
1721
|
-
return /* @__PURE__ */
|
|
1722
|
-
/* @__PURE__ */
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1799
|
+
return /* @__PURE__ */ jsxs16(Fragment2, { children: [
|
|
1800
|
+
/* @__PURE__ */ jsx22("div", { ref, className: clsx("kds-copyable-table", className), ...props, children: rows.map((row, i) => /* @__PURE__ */ jsxs16(
|
|
1801
|
+
"div",
|
|
1802
|
+
{
|
|
1803
|
+
className: clsx(
|
|
1804
|
+
"kds-copyable-table-row",
|
|
1805
|
+
copiedRows.has(i) && "copied",
|
|
1806
|
+
settlingRows.has(i) && "settling"
|
|
1807
|
+
),
|
|
1808
|
+
role: "button",
|
|
1809
|
+
tabIndex: 0,
|
|
1810
|
+
onClick: () => handleRowCopy(row, i),
|
|
1811
|
+
onKeyDown: (e) => {
|
|
1812
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1813
|
+
e.preventDefault();
|
|
1814
|
+
handleRowCopy(row, i);
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
"aria-label": `Copiar ${row.label}: ${row.value}`,
|
|
1818
|
+
children: [
|
|
1819
|
+
/* @__PURE__ */ jsx22("span", { className: "k", children: row.label }),
|
|
1820
|
+
/* @__PURE__ */ jsx22("span", { className: "v", children: row.value })
|
|
1821
|
+
]
|
|
1822
|
+
},
|
|
1823
|
+
`${row.label}-${i}`
|
|
1824
|
+
)) }),
|
|
1825
|
+
showCopyAll && /* @__PURE__ */ jsxs16(
|
|
1826
|
+
"button",
|
|
1827
|
+
{
|
|
1828
|
+
type: "button",
|
|
1829
|
+
className: clsx(
|
|
1830
|
+
"kds-btn",
|
|
1831
|
+
"kds-btn-outlined",
|
|
1832
|
+
"kds-btn-block",
|
|
1833
|
+
"kds-copy-all-btn",
|
|
1834
|
+
allCopied && "copied"
|
|
1835
|
+
),
|
|
1836
|
+
onClick: handleCopyAll,
|
|
1837
|
+
"aria-label": allCopied ? copiedAllLabel : copyAllLabel,
|
|
1838
|
+
children: [
|
|
1839
|
+
/* @__PURE__ */ jsx22("span", { className: "kds-icon", children: /* @__PURE__ */ jsx22("i", { className: "material-symbols-outlined", children: allCopied ? "check" : "content_copy" }) }),
|
|
1840
|
+
/* @__PURE__ */ jsx22("span", { children: allCopied ? copiedAllLabel : copyAllLabel })
|
|
1841
|
+
]
|
|
1842
|
+
}
|
|
1843
|
+
)
|
|
1730
1844
|
] });
|
|
1731
1845
|
}
|
|
1732
1846
|
);
|
|
1733
1847
|
KdsCopyableTable.displayName = "KdsCopyableTable";
|
|
1734
1848
|
|
|
1735
1849
|
// src/components/core/KdsExpandPanel/KdsExpandPanel.tsx
|
|
1736
|
-
import { forwardRef as
|
|
1737
|
-
import { jsx as
|
|
1738
|
-
var KdsExpandPanel =
|
|
1850
|
+
import { forwardRef as forwardRef21, useState as useState4 } from "react";
|
|
1851
|
+
import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1852
|
+
var KdsExpandPanel = forwardRef21(
|
|
1739
1853
|
({ label, defaultExpanded = false, children, className, ...props }, ref) => {
|
|
1740
|
-
const [expanded, setExpanded] =
|
|
1741
|
-
return /* @__PURE__ */
|
|
1742
|
-
/* @__PURE__ */
|
|
1854
|
+
const [expanded, setExpanded] = useState4(defaultExpanded);
|
|
1855
|
+
return /* @__PURE__ */ jsxs17("div", { ref, className, ...props, children: [
|
|
1856
|
+
/* @__PURE__ */ jsxs17(
|
|
1743
1857
|
"button",
|
|
1744
1858
|
{
|
|
1745
1859
|
className: "kds-expand-toggle",
|
|
1746
1860
|
onClick: () => setExpanded((v) => !v),
|
|
1747
1861
|
"aria-expanded": expanded,
|
|
1748
1862
|
children: [
|
|
1749
|
-
/* @__PURE__ */
|
|
1750
|
-
/* @__PURE__ */
|
|
1863
|
+
/* @__PURE__ */ jsx23("span", { children: label }),
|
|
1864
|
+
/* @__PURE__ */ jsx23("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
|
|
1751
1865
|
]
|
|
1752
1866
|
}
|
|
1753
1867
|
),
|
|
1754
|
-
/* @__PURE__ */
|
|
1868
|
+
/* @__PURE__ */ jsx23("div", { className: clsx("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
|
|
1755
1869
|
] });
|
|
1756
1870
|
}
|
|
1757
1871
|
);
|
|
1758
1872
|
KdsExpandPanel.displayName = "KdsExpandPanel";
|
|
1759
1873
|
|
|
1760
1874
|
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
1761
|
-
import { forwardRef as
|
|
1875
|
+
import { forwardRef as forwardRef22, useEffect as useEffect3, useRef as useRef3 } from "react";
|
|
1762
1876
|
|
|
1763
1877
|
// src/components/core/hooks/useCountdown.ts
|
|
1764
|
-
import { useState as
|
|
1878
|
+
import { useState as useState5, useEffect as useEffect2 } from "react";
|
|
1765
1879
|
function calcRemaining(deadline) {
|
|
1766
1880
|
const diff = Math.max(0, new Date(deadline).getTime() - Date.now());
|
|
1767
1881
|
const totalSeconds = Math.floor(diff / 1e3);
|
|
@@ -1774,7 +1888,7 @@ function calcRemaining(deadline) {
|
|
|
1774
1888
|
};
|
|
1775
1889
|
}
|
|
1776
1890
|
function useCountdown(deadline) {
|
|
1777
|
-
const [state, setState] =
|
|
1891
|
+
const [state, setState] = useState5(() => calcRemaining(deadline));
|
|
1778
1892
|
useEffect2(() => {
|
|
1779
1893
|
const tick = () => setState(calcRemaining(deadline));
|
|
1780
1894
|
const id = setInterval(tick, 1e3);
|
|
@@ -1784,11 +1898,11 @@ function useCountdown(deadline) {
|
|
|
1784
1898
|
}
|
|
1785
1899
|
|
|
1786
1900
|
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
1787
|
-
import { jsx as
|
|
1788
|
-
var KdsCountdown =
|
|
1901
|
+
import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1902
|
+
var KdsCountdown = forwardRef22(
|
|
1789
1903
|
({ deadline, label, onExpire, className, ...props }, ref) => {
|
|
1790
1904
|
const { hours, minutes, seconds, expired, urgent } = useCountdown(deadline);
|
|
1791
|
-
const onExpireRef =
|
|
1905
|
+
const onExpireRef = useRef3(onExpire);
|
|
1792
1906
|
onExpireRef.current = onExpire;
|
|
1793
1907
|
useEffect3(() => {
|
|
1794
1908
|
if (expired) {
|
|
@@ -1799,9 +1913,9 @@ var KdsCountdown = forwardRef24(
|
|
|
1799
1913
|
return null;
|
|
1800
1914
|
}
|
|
1801
1915
|
const pad = (n) => String(n).padStart(2, "0");
|
|
1802
|
-
return /* @__PURE__ */
|
|
1803
|
-
label && /* @__PURE__ */
|
|
1804
|
-
/* @__PURE__ */
|
|
1916
|
+
return /* @__PURE__ */ jsxs18("div", { ref, className: clsx("kds-countdown", urgent && "urgent", className), ...props, children: [
|
|
1917
|
+
label && /* @__PURE__ */ jsx24("span", { className: "kds-countdown-label", children: label }),
|
|
1918
|
+
/* @__PURE__ */ jsxs18("span", { className: "kds-countdown-value", children: [
|
|
1805
1919
|
pad(hours),
|
|
1806
1920
|
":",
|
|
1807
1921
|
pad(minutes),
|
|
@@ -1814,18 +1928,18 @@ var KdsCountdown = forwardRef24(
|
|
|
1814
1928
|
KdsCountdown.displayName = "KdsCountdown";
|
|
1815
1929
|
|
|
1816
1930
|
// src/components/core/KdsSegmentedTabs/KdsSegmentedTabs.tsx
|
|
1817
|
-
import { forwardRef as
|
|
1818
|
-
import { jsx as
|
|
1819
|
-
var KdsSegmentedTabs =
|
|
1820
|
-
(props, ref) => /* @__PURE__ */
|
|
1931
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
1932
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1933
|
+
var KdsSegmentedTabs = forwardRef23(
|
|
1934
|
+
(props, ref) => /* @__PURE__ */ jsx25(KdsTabs, { ref, ...props })
|
|
1821
1935
|
);
|
|
1822
1936
|
KdsSegmentedTabs.displayName = "KdsSegmentedTabs";
|
|
1823
1937
|
|
|
1824
1938
|
// src/components/domain/KdsBankRow/KdsBankRow.tsx
|
|
1825
|
-
import { forwardRef as
|
|
1826
|
-
import { jsx as
|
|
1827
|
-
var KdsBankRow =
|
|
1828
|
-
({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */
|
|
1939
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
1940
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1941
|
+
var KdsBankRow = forwardRef24(
|
|
1942
|
+
({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */ jsxs19(
|
|
1829
1943
|
"button",
|
|
1830
1944
|
{
|
|
1831
1945
|
ref,
|
|
@@ -1833,9 +1947,9 @@ var KdsBankRow = forwardRef26(
|
|
|
1833
1947
|
className: clsx("kds-bank-row", selected && "selected", className),
|
|
1834
1948
|
...props,
|
|
1835
1949
|
children: [
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */
|
|
1950
|
+
/* @__PURE__ */ jsx26("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ jsx26("img", { src: logoUrl, alt: name }) : /* @__PURE__ */ jsx26("span", { className: "initials", children: name.charAt(0) }) }),
|
|
1951
|
+
/* @__PURE__ */ jsx26("span", { className: "kds-bank-row-name", children: name }),
|
|
1952
|
+
/* @__PURE__ */ jsx26("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
|
|
1839
1953
|
]
|
|
1840
1954
|
}
|
|
1841
1955
|
)
|
|
@@ -1843,32 +1957,32 @@ var KdsBankRow = forwardRef26(
|
|
|
1843
1957
|
KdsBankRow.displayName = "KdsBankRow";
|
|
1844
1958
|
|
|
1845
1959
|
// src/components/domain/KdsBankList/KdsBankList.tsx
|
|
1846
|
-
import { forwardRef as
|
|
1847
|
-
import { jsx as
|
|
1848
|
-
var KdsBankList =
|
|
1849
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1960
|
+
import { forwardRef as forwardRef25 } from "react";
|
|
1961
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1962
|
+
var KdsBankList = forwardRef25(
|
|
1963
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx27("div", { ref, className: clsx("kds-bank-list", className), role: "list", ...props, children })
|
|
1850
1964
|
);
|
|
1851
1965
|
KdsBankList.displayName = "KdsBankList";
|
|
1852
1966
|
|
|
1853
1967
|
// src/components/domain/KdsBankModal/KdsBankModal.tsx
|
|
1854
|
-
import { forwardRef as
|
|
1855
|
-
import * as
|
|
1856
|
-
import { jsx as
|
|
1857
|
-
var KdsBankModal =
|
|
1968
|
+
import { forwardRef as forwardRef26, useState as useState6 } from "react";
|
|
1969
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
1970
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1971
|
+
var KdsBankModal = forwardRef26(
|
|
1858
1972
|
({ open, onClose, title = "Selecciona tu banco", searchPlaceholder = "Buscar banco...", onSearch, children, className, container }, ref) => {
|
|
1859
|
-
const [query, setQuery] =
|
|
1973
|
+
const [query, setQuery] = useState6("");
|
|
1860
1974
|
const handleSearch = (value) => {
|
|
1861
1975
|
setQuery(value);
|
|
1862
1976
|
onSearch?.(value);
|
|
1863
1977
|
};
|
|
1864
|
-
return /* @__PURE__ */
|
|
1978
|
+
return /* @__PURE__ */ jsx28(Dialog.Root, { open, onOpenChange: (o) => {
|
|
1865
1979
|
if (!o) onClose();
|
|
1866
|
-
}, children: /* @__PURE__ */
|
|
1867
|
-
/* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */
|
|
1869
|
-
/* @__PURE__ */
|
|
1980
|
+
}, children: /* @__PURE__ */ jsx28(Dialog.Portal, { container, children: /* @__PURE__ */ jsx28(Dialog.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ jsxs20(Dialog.Content, { ref, className: clsx("kds-bank-modal", className), children: [
|
|
1981
|
+
/* @__PURE__ */ jsxs20("div", { className: "kds-bank-modal-header", children: [
|
|
1982
|
+
/* @__PURE__ */ jsx28(Dialog.Title, { asChild: true, children: /* @__PURE__ */ jsx28("h3", { children: title }) }),
|
|
1983
|
+
/* @__PURE__ */ jsx28(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx28("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ jsx28("i", { className: "material-symbols-outlined", children: "close" }) }) })
|
|
1870
1984
|
] }),
|
|
1871
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ jsx28("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ jsx28(
|
|
1872
1986
|
"input",
|
|
1873
1987
|
{
|
|
1874
1988
|
type: "text",
|
|
@@ -1877,33 +1991,33 @@ var KdsBankModal = forwardRef28(
|
|
|
1877
1991
|
onChange: (e) => handleSearch(e.target.value)
|
|
1878
1992
|
}
|
|
1879
1993
|
) }),
|
|
1880
|
-
/* @__PURE__ */
|
|
1994
|
+
/* @__PURE__ */ jsx28("div", { className: "kds-bank-modal-body", children })
|
|
1881
1995
|
] }) }) }) });
|
|
1882
1996
|
}
|
|
1883
1997
|
);
|
|
1884
1998
|
KdsBankModal.displayName = "KdsBankModal";
|
|
1885
1999
|
|
|
1886
2000
|
// src/components/domain/KdsQrRow/KdsQrRow.tsx
|
|
1887
|
-
import { forwardRef as
|
|
1888
|
-
import { jsx as
|
|
1889
|
-
var KdsQrRow =
|
|
1890
|
-
({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */
|
|
1891
|
-
/* @__PURE__ */
|
|
1892
|
-
/* @__PURE__ */
|
|
1893
|
-
/* @__PURE__ */
|
|
1894
|
-
description && /* @__PURE__ */
|
|
2001
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
2002
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2003
|
+
var KdsQrRow = forwardRef27(
|
|
2004
|
+
({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ jsxs21("button", { ref, type: "button", className: clsx("kds-qr-row", className), ...props, children: [
|
|
2005
|
+
/* @__PURE__ */ jsx29("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx29("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2006
|
+
/* @__PURE__ */ jsxs21("span", { className: "kds-qr-text", children: [
|
|
2007
|
+
/* @__PURE__ */ jsx29("span", { className: "title", children: name }),
|
|
2008
|
+
description && /* @__PURE__ */ jsx29("span", { className: "sub", children: description })
|
|
1895
2009
|
] }),
|
|
1896
|
-
badge && /* @__PURE__ */
|
|
1897
|
-
/* @__PURE__ */
|
|
2010
|
+
badge && /* @__PURE__ */ jsx29("span", { className: "kds-qr-badge", children: badge }),
|
|
2011
|
+
/* @__PURE__ */ jsx29("i", { className: "material-symbols-outlined", children: "chevron_right" })
|
|
1898
2012
|
] })
|
|
1899
2013
|
);
|
|
1900
2014
|
KdsQrRow.displayName = "KdsQrRow";
|
|
1901
2015
|
|
|
1902
2016
|
// src/components/domain/KdsCardSelector/KdsCardSelector.tsx
|
|
1903
|
-
import { forwardRef as
|
|
1904
|
-
import { jsx as
|
|
1905
|
-
var KdsCardSelector =
|
|
1906
|
-
({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */
|
|
2017
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
2018
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2019
|
+
var KdsCardSelector = forwardRef28(
|
|
2020
|
+
({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ jsxs22(
|
|
1907
2021
|
"button",
|
|
1908
2022
|
{
|
|
1909
2023
|
ref,
|
|
@@ -1911,9 +2025,9 @@ var KdsCardSelector = forwardRef30(
|
|
|
1911
2025
|
className: clsx("kds-card-selector", selected && "selected", className),
|
|
1912
2026
|
...props,
|
|
1913
2027
|
children: [
|
|
1914
|
-
icon && /* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
1916
|
-
description && /* @__PURE__ */
|
|
2028
|
+
icon && /* @__PURE__ */ jsx30("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ jsx30("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2029
|
+
/* @__PURE__ */ jsx30("span", { className: "kds-card-selector-title", children: title }),
|
|
2030
|
+
description && /* @__PURE__ */ jsx30("span", { className: "kds-card-selector-description", children: description })
|
|
1917
2031
|
]
|
|
1918
2032
|
}
|
|
1919
2033
|
)
|
|
@@ -1921,26 +2035,26 @@ var KdsCardSelector = forwardRef30(
|
|
|
1921
2035
|
KdsCardSelector.displayName = "KdsCardSelector";
|
|
1922
2036
|
|
|
1923
2037
|
// src/components/domain/KdsCardPlan/KdsCardPlan.tsx
|
|
1924
|
-
import { forwardRef as
|
|
1925
|
-
import { jsx as
|
|
1926
|
-
var KdsCardPlan =
|
|
1927
|
-
({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */
|
|
2038
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
2039
|
+
import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2040
|
+
var KdsCardPlan = forwardRef29(
|
|
2041
|
+
({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
1928
2042
|
"div",
|
|
1929
2043
|
{
|
|
1930
2044
|
ref,
|
|
1931
2045
|
className: clsx("kds-card-plan", recommended && "recommended", className),
|
|
1932
2046
|
...props,
|
|
1933
2047
|
children: [
|
|
1934
|
-
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
|
|
1937
|
-
/* @__PURE__ */
|
|
1938
|
-
period && /* @__PURE__ */ jsxs24("span", { children: [
|
|
2048
|
+
/* @__PURE__ */ jsx31("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ jsx31("h3", { children: title }) }),
|
|
2049
|
+
/* @__PURE__ */ jsxs23("div", { className: "kds-card-plan-price", children: [
|
|
2050
|
+
/* @__PURE__ */ jsx31("span", { className: "kds-price", children: price }),
|
|
2051
|
+
period && /* @__PURE__ */ jsxs23("span", { className: "kds-price-period", children: [
|
|
1939
2052
|
"/",
|
|
1940
2053
|
period
|
|
1941
2054
|
] })
|
|
1942
2055
|
] }),
|
|
1943
|
-
|
|
2056
|
+
badgeText && /* @__PURE__ */ jsx31("span", { className: "kds-card-plan-badge", children: badgeText }),
|
|
2057
|
+
features && features.length > 0 && /* @__PURE__ */ jsx31("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ jsx31("li", { children: f }, i)) }),
|
|
1944
2058
|
action
|
|
1945
2059
|
]
|
|
1946
2060
|
}
|
|
@@ -1949,50 +2063,149 @@ var KdsCardPlan = forwardRef31(
|
|
|
1949
2063
|
KdsCardPlan.displayName = "KdsCardPlan";
|
|
1950
2064
|
|
|
1951
2065
|
// src/components/domain/KdsInvoiceSticky/KdsInvoiceSticky.tsx
|
|
1952
|
-
import { forwardRef as
|
|
1953
|
-
import { jsx as
|
|
1954
|
-
var KdsInvoiceSticky =
|
|
1955
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
2066
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
2067
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2068
|
+
var KdsInvoiceSticky = forwardRef30(
|
|
2069
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx32("div", { ref, className: clsx("kds-card-elevated", "kds-invoice-sticky", className), ...props, children })
|
|
1956
2070
|
);
|
|
1957
2071
|
KdsInvoiceSticky.displayName = "KdsInvoiceSticky";
|
|
1958
2072
|
|
|
1959
2073
|
// src/components/domain/KdsBottomSheet/KdsBottomSheet.tsx
|
|
1960
|
-
import { forwardRef as
|
|
1961
|
-
import * as
|
|
1962
|
-
import { jsx as
|
|
1963
|
-
var KdsBottomSheet =
|
|
1964
|
-
({
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
actions
|
|
1971
|
-
|
|
2074
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
2075
|
+
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
2076
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2077
|
+
var KdsBottomSheet = forwardRef31(
|
|
2078
|
+
({
|
|
2079
|
+
open,
|
|
2080
|
+
onClose,
|
|
2081
|
+
title,
|
|
2082
|
+
description,
|
|
2083
|
+
children,
|
|
2084
|
+
actions,
|
|
2085
|
+
showGrabber = true,
|
|
2086
|
+
showCloseButton = false,
|
|
2087
|
+
container,
|
|
2088
|
+
className
|
|
2089
|
+
}, ref) => /* @__PURE__ */ jsx33(
|
|
2090
|
+
Dialog2.Root,
|
|
2091
|
+
{
|
|
2092
|
+
open,
|
|
2093
|
+
onOpenChange: (o) => {
|
|
2094
|
+
if (!o) onClose();
|
|
2095
|
+
},
|
|
2096
|
+
children: /* @__PURE__ */ jsx33(Dialog2.Portal, { container, children: /* @__PURE__ */ jsx33(Dialog2.Overlay, { className: "kds-bottom-sheet-scrim open", children: /* @__PURE__ */ jsxs24(
|
|
2097
|
+
Dialog2.Content,
|
|
2098
|
+
{
|
|
2099
|
+
ref,
|
|
2100
|
+
className: clsx("kds-bottom-sheet", className),
|
|
2101
|
+
onPointerDownOutside: (e) => {
|
|
2102
|
+
const target = e.target;
|
|
2103
|
+
if (target.closest(".kds-bottom-sheet")) e.preventDefault();
|
|
2104
|
+
},
|
|
2105
|
+
children: [
|
|
2106
|
+
showGrabber && /* @__PURE__ */ jsx33("div", { className: "kds-bottom-sheet-grabber", "aria-hidden": "true" }),
|
|
2107
|
+
showCloseButton && /* @__PURE__ */ jsx33(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx33(
|
|
2108
|
+
"button",
|
|
2109
|
+
{
|
|
2110
|
+
type: "button",
|
|
2111
|
+
className: "kds-bottom-sheet-close",
|
|
2112
|
+
"aria-label": "Cerrar",
|
|
2113
|
+
children: /* @__PURE__ */ jsx33("i", { className: "material-symbols-outlined", children: "close" })
|
|
2114
|
+
}
|
|
2115
|
+
) }),
|
|
2116
|
+
title && /* @__PURE__ */ jsx33(Dialog2.Title, { className: "kds-bottom-sheet-title", children: title }),
|
|
2117
|
+
description && /* @__PURE__ */ jsx33(Dialog2.Description, { className: "kds-bottom-sheet-description", children: description }),
|
|
2118
|
+
/* @__PURE__ */ jsx33("div", { className: "kds-bottom-sheet-body", children }),
|
|
2119
|
+
actions && /* @__PURE__ */ jsx33("div", { className: "kds-bottom-sheet-actions", children: actions })
|
|
2120
|
+
]
|
|
2121
|
+
}
|
|
2122
|
+
) }) })
|
|
2123
|
+
}
|
|
2124
|
+
)
|
|
1972
2125
|
);
|
|
1973
2126
|
KdsBottomSheet.displayName = "KdsBottomSheet";
|
|
1974
2127
|
|
|
1975
2128
|
// src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
|
|
1976
|
-
import { forwardRef as
|
|
1977
|
-
import { jsx as
|
|
1978
|
-
var KdsSecureFooter =
|
|
1979
|
-
({ variant = "default", children, className, ...props }, ref) => /* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
1981
|
-
children || /* @__PURE__ */
|
|
2129
|
+
import { forwardRef as forwardRef32 } from "react";
|
|
2130
|
+
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2131
|
+
var KdsSecureFooter = forwardRef32(
|
|
2132
|
+
({ variant = "default", children, className, ...props }, ref) => /* @__PURE__ */ jsxs25("footer", { ref, className: clsx("kds-secure-footer", variant === "inside" && "inside", className), ...props, children: [
|
|
2133
|
+
/* @__PURE__ */ jsx34("i", { className: "material-symbols-outlined", children: "lock" }),
|
|
2134
|
+
children || /* @__PURE__ */ jsx34("span", { children: "Pago seguro con Khipu" })
|
|
1982
2135
|
] })
|
|
1983
2136
|
);
|
|
1984
2137
|
KdsSecureFooter.displayName = "KdsSecureFooter";
|
|
1985
2138
|
|
|
1986
2139
|
// src/components/domain/KdsRecapList/KdsRecapList.tsx
|
|
1987
|
-
import { forwardRef as
|
|
1988
|
-
import { jsx as
|
|
1989
|
-
var KdsRecapList =
|
|
1990
|
-
({ items, className, ...props }, ref) => /* @__PURE__ */
|
|
1991
|
-
/* @__PURE__ */
|
|
1992
|
-
/* @__PURE__ */
|
|
2140
|
+
import { forwardRef as forwardRef33 } from "react";
|
|
2141
|
+
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2142
|
+
var KdsRecapList = forwardRef33(
|
|
2143
|
+
({ items, className, ...props }, ref) => /* @__PURE__ */ jsx35("ul", { ref, className: clsx("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ jsxs26("li", { children: [
|
|
2144
|
+
/* @__PURE__ */ jsx35("span", { className: "k", children: item.label }),
|
|
2145
|
+
/* @__PURE__ */ jsx35("span", { className: clsx("v", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
|
|
1993
2146
|
] }, i)) })
|
|
1994
2147
|
);
|
|
1995
2148
|
KdsRecapList.displayName = "KdsRecapList";
|
|
2149
|
+
|
|
2150
|
+
// src/components/domain/KdsMontoRow/KdsMontoRow.tsx
|
|
2151
|
+
import { forwardRef as forwardRef34 } from "react";
|
|
2152
|
+
import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2153
|
+
var KdsMontoRow = forwardRef34(
|
|
2154
|
+
({ title, value, deadline, className, ...props }, ref) => /* @__PURE__ */ jsxs27("div", { ref, className: clsx("kds-monto-row", className), ...props, children: [
|
|
2155
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
2156
|
+
/* @__PURE__ */ jsx36("div", { className: "kds-monto-row-title", children: title }),
|
|
2157
|
+
deadline && /* @__PURE__ */ jsx36("div", { className: "kds-monto-row-deadline", children: deadline })
|
|
2158
|
+
] }),
|
|
2159
|
+
/* @__PURE__ */ jsx36("div", { className: "kds-monto-row-value", children: value })
|
|
2160
|
+
] })
|
|
2161
|
+
);
|
|
2162
|
+
KdsMontoRow.displayName = "KdsMontoRow";
|
|
2163
|
+
|
|
2164
|
+
// src/components/domain/KdsMerchantTile/KdsMerchantTile.tsx
|
|
2165
|
+
import { forwardRef as forwardRef35 } from "react";
|
|
2166
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2167
|
+
var KdsMerchantTile = forwardRef35(
|
|
2168
|
+
({ name, logoUrl, initials, compact, className, ...props }, ref) => {
|
|
2169
|
+
const displayInitials = (initials ?? name.slice(0, 2)).toUpperCase();
|
|
2170
|
+
return /* @__PURE__ */ jsx37(
|
|
2171
|
+
"div",
|
|
2172
|
+
{
|
|
2173
|
+
ref,
|
|
2174
|
+
className: clsx("kds-merchant-tile", logoUrl && "logo", compact && "compact", className),
|
|
2175
|
+
"aria-label": name,
|
|
2176
|
+
...props,
|
|
2177
|
+
children: logoUrl ? /* @__PURE__ */ jsx37("img", { src: logoUrl, alt: name }) : displayInitials
|
|
2178
|
+
}
|
|
2179
|
+
);
|
|
2180
|
+
}
|
|
2181
|
+
);
|
|
2182
|
+
KdsMerchantTile.displayName = "KdsMerchantTile";
|
|
2183
|
+
|
|
2184
|
+
// src/components/domain/KdsBillAttachment/KdsBillAttachment.tsx
|
|
2185
|
+
import { forwardRef as forwardRef36 } from "react";
|
|
2186
|
+
import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2187
|
+
var KdsBillAttachment = forwardRef36(
|
|
2188
|
+
({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */ jsxs28(
|
|
2189
|
+
"a",
|
|
2190
|
+
{
|
|
2191
|
+
ref,
|
|
2192
|
+
href,
|
|
2193
|
+
target: "_blank",
|
|
2194
|
+
rel: "noopener noreferrer",
|
|
2195
|
+
className: clsx("kds-bill-attachment", className),
|
|
2196
|
+
...props,
|
|
2197
|
+
children: [
|
|
2198
|
+
/* @__PURE__ */ jsx38("i", { className: "material-symbols-outlined", children: icon }),
|
|
2199
|
+
/* @__PURE__ */ jsx38("span", { children: filename })
|
|
2200
|
+
]
|
|
2201
|
+
}
|
|
2202
|
+
)
|
|
2203
|
+
);
|
|
2204
|
+
KdsBillAttachment.displayName = "KdsBillAttachment";
|
|
2205
|
+
var KdsBillAttachments = forwardRef36(
|
|
2206
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx38("div", { ref, className: clsx("kds-bill-attachments", className), ...props, children })
|
|
2207
|
+
);
|
|
2208
|
+
KdsBillAttachments.displayName = "KdsBillAttachments";
|
|
1996
2209
|
export {
|
|
1997
2210
|
KdsAccordion,
|
|
1998
2211
|
KdsAccordionDetails,
|
|
@@ -2001,6 +2214,8 @@ export {
|
|
|
2001
2214
|
KdsBankList,
|
|
2002
2215
|
KdsBankModal,
|
|
2003
2216
|
KdsBankRow,
|
|
2217
|
+
KdsBillAttachment,
|
|
2218
|
+
KdsBillAttachments,
|
|
2004
2219
|
KdsBottomSheet,
|
|
2005
2220
|
KdsButton,
|
|
2006
2221
|
KdsCard,
|
|
@@ -2018,12 +2233,8 @@ export {
|
|
|
2018
2233
|
KdsExpandPanel,
|
|
2019
2234
|
KdsInvoiceSticky,
|
|
2020
2235
|
KdsLinearProgress,
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
KdsLogoHeaderCode,
|
|
2024
|
-
KdsLogoHeaderLogo,
|
|
2025
|
-
KdsLogoHeaderSeparator,
|
|
2026
|
-
KdsModal,
|
|
2236
|
+
KdsMerchantTile,
|
|
2237
|
+
KdsMontoRow,
|
|
2027
2238
|
KdsQrRow,
|
|
2028
2239
|
KdsRadioGroup,
|
|
2029
2240
|
KdsRecapList,
|