@khipu/design-system 0.2.0-alpha.22 → 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 +10 -7
- package/dist/khipu-logo-color-TV75AKOV.svg +0 -19
package/dist/index.js
CHANGED
|
@@ -37,6 +37,8 @@ __export(index_exports, {
|
|
|
37
37
|
KdsBankList: () => KdsBankList,
|
|
38
38
|
KdsBankModal: () => KdsBankModal,
|
|
39
39
|
KdsBankRow: () => KdsBankRow,
|
|
40
|
+
KdsBillAttachment: () => KdsBillAttachment,
|
|
41
|
+
KdsBillAttachments: () => KdsBillAttachments,
|
|
40
42
|
KdsBottomSheet: () => KdsBottomSheet,
|
|
41
43
|
KdsButton: () => KdsButton,
|
|
42
44
|
KdsCard: () => KdsCard,
|
|
@@ -54,12 +56,8 @@ __export(index_exports, {
|
|
|
54
56
|
KdsExpandPanel: () => KdsExpandPanel,
|
|
55
57
|
KdsInvoiceSticky: () => KdsInvoiceSticky,
|
|
56
58
|
KdsLinearProgress: () => KdsLinearProgress,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
KdsLogoHeaderCode: () => KdsLogoHeaderCode,
|
|
60
|
-
KdsLogoHeaderLogo: () => KdsLogoHeaderLogo,
|
|
61
|
-
KdsLogoHeaderSeparator: () => KdsLogoHeaderSeparator,
|
|
62
|
-
KdsModal: () => KdsModal,
|
|
59
|
+
KdsMerchantTile: () => KdsMerchantTile,
|
|
60
|
+
KdsMontoRow: () => KdsMontoRow,
|
|
63
61
|
KdsQrRow: () => KdsQrRow,
|
|
64
62
|
KdsRadioGroup: () => KdsRadioGroup,
|
|
65
63
|
KdsRecapList: () => KdsRecapList,
|
|
@@ -1147,7 +1145,7 @@ var KdsButton = (0, import_react.forwardRef)(
|
|
|
1147
1145
|
children: [
|
|
1148
1146
|
!loading && startIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("i", { className: "material-symbols-outlined", children: startIcon }) }),
|
|
1149
1147
|
loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
1150
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("progress", { className: "circle indeterminate small" }),
|
|
1151
1149
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children })
|
|
1152
1150
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children }),
|
|
1153
1151
|
!loading && endIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("i", { className: "material-symbols-outlined", children: endIcon }) })
|
|
@@ -1169,11 +1167,13 @@ var KdsTextField = (0, import_react2.forwardRef)(
|
|
|
1169
1167
|
readOnly,
|
|
1170
1168
|
startIcon,
|
|
1171
1169
|
endIcon,
|
|
1170
|
+
required,
|
|
1172
1171
|
className,
|
|
1173
1172
|
id,
|
|
1174
1173
|
...props
|
|
1175
1174
|
}, ref) => {
|
|
1176
1175
|
const fieldId = id || `kds-field-${label.toLowerCase().replace(/\s+/g, "-")}`;
|
|
1176
|
+
const hasSuffix = !!endIcon || readOnly;
|
|
1177
1177
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
1178
1178
|
"div",
|
|
1179
1179
|
{
|
|
@@ -1181,6 +1181,8 @@ var KdsTextField = (0, import_react2.forwardRef)(
|
|
|
1181
1181
|
"field",
|
|
1182
1182
|
"label",
|
|
1183
1183
|
"border",
|
|
1184
|
+
startIcon && "prefix",
|
|
1185
|
+
hasSuffix && "suffix",
|
|
1184
1186
|
error && "invalid",
|
|
1185
1187
|
readOnly && "locked",
|
|
1186
1188
|
fullWidth && "kds-w-full",
|
|
@@ -1193,12 +1195,16 @@ var KdsTextField = (0, import_react2.forwardRef)(
|
|
|
1193
1195
|
{
|
|
1194
1196
|
ref,
|
|
1195
1197
|
id: fieldId,
|
|
1196
|
-
placeholder: " ",
|
|
1197
1198
|
readOnly,
|
|
1198
|
-
|
|
1199
|
+
required,
|
|
1200
|
+
...props,
|
|
1201
|
+
placeholder: " "
|
|
1199
1202
|
}
|
|
1200
1203
|
),
|
|
1201
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
1204
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { htmlFor: fieldId, children: [
|
|
1205
|
+
label,
|
|
1206
|
+
required && " *"
|
|
1207
|
+
] }),
|
|
1202
1208
|
readOnly && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("i", { className: "material-symbols-outlined", children: "lock" }),
|
|
1203
1209
|
endIcon && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("i", { className: "material-symbols-outlined", children: endIcon }),
|
|
1204
1210
|
helperText && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "helper", children: helperText })
|
|
@@ -1213,78 +1219,18 @@ KdsTextField.displayName = "KdsTextField";
|
|
|
1213
1219
|
var import_react3 = require("react");
|
|
1214
1220
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1215
1221
|
var KdsCheckbox = (0, import_react3.forwardRef)(
|
|
1216
|
-
({ label, className,
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: label })
|
|
1221
|
-
] });
|
|
1222
|
-
}
|
|
1222
|
+
({ label, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { className: (0, import_clsx.clsx)("checkbox", className), children: [
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", { ref, type: "checkbox", ...props }),
|
|
1224
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: label })
|
|
1225
|
+
] })
|
|
1223
1226
|
);
|
|
1224
1227
|
KdsCheckbox.displayName = "KdsCheckbox";
|
|
1225
1228
|
|
|
1226
|
-
// src/components/core/
|
|
1229
|
+
// src/components/core/KdsCard/KdsCard.tsx
|
|
1227
1230
|
var import_react4 = require("react");
|
|
1228
|
-
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
1229
1231
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1230
|
-
var
|
|
1231
|
-
({
|
|
1232
|
-
open,
|
|
1233
|
-
onClose,
|
|
1234
|
-
title,
|
|
1235
|
-
description,
|
|
1236
|
-
footer,
|
|
1237
|
-
children,
|
|
1238
|
-
size = "md",
|
|
1239
|
-
showCloseButton = true,
|
|
1240
|
-
className
|
|
1241
|
-
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1242
|
-
Dialog.Root,
|
|
1243
|
-
{
|
|
1244
|
-
open,
|
|
1245
|
-
onOpenChange: (o) => {
|
|
1246
|
-
if (!o) onClose();
|
|
1247
|
-
},
|
|
1248
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Dialog.Portal, { children: [
|
|
1249
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Dialog.Overlay, { className: "kds-bottom-sheet-scrim" }),
|
|
1250
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1251
|
-
Dialog.Content,
|
|
1252
|
-
{
|
|
1253
|
-
ref,
|
|
1254
|
-
className: (0, import_clsx.clsx)(
|
|
1255
|
-
"kds-bottom-sheet",
|
|
1256
|
-
`kds-bottom-sheet-${size}`,
|
|
1257
|
-
className
|
|
1258
|
-
),
|
|
1259
|
-
children: [
|
|
1260
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "kds-bottom-sheet-header", children: [
|
|
1261
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Dialog.Title, { className: "kds-bottom-sheet-title", children: title }),
|
|
1262
|
-
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1263
|
-
"button",
|
|
1264
|
-
{
|
|
1265
|
-
className: "kds-bottom-sheet-close",
|
|
1266
|
-
"aria-label": "Cerrar",
|
|
1267
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("i", { className: "material-symbols-outlined", children: "close" })
|
|
1268
|
-
}
|
|
1269
|
-
) })
|
|
1270
|
-
] }),
|
|
1271
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Dialog.Description, { className: "kds-bottom-sheet-description", children: description }),
|
|
1272
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "kds-bottom-sheet-body", children }),
|
|
1273
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "kds-bottom-sheet-actions", children: footer })
|
|
1274
|
-
]
|
|
1275
|
-
}
|
|
1276
|
-
)
|
|
1277
|
-
] })
|
|
1278
|
-
}
|
|
1279
|
-
)
|
|
1280
|
-
);
|
|
1281
|
-
KdsModal.displayName = "KdsModal";
|
|
1282
|
-
|
|
1283
|
-
// src/components/core/KdsCard/KdsCard.tsx
|
|
1284
|
-
var import_react5 = require("react");
|
|
1285
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1286
|
-
var KdsCard = (0, import_react5.forwardRef)(
|
|
1287
|
-
({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1232
|
+
var KdsCard = (0, import_react4.forwardRef)(
|
|
1233
|
+
({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1288
1234
|
"article",
|
|
1289
1235
|
{
|
|
1290
1236
|
ref,
|
|
@@ -1299,66 +1245,101 @@ var KdsCard = (0, import_react5.forwardRef)(
|
|
|
1299
1245
|
)
|
|
1300
1246
|
);
|
|
1301
1247
|
KdsCard.displayName = "KdsCard";
|
|
1302
|
-
var KdsCardHeader = (0,
|
|
1303
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1248
|
+
var KdsCardHeader = (0, import_react4.forwardRef)(
|
|
1249
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-header", className), ...props, children })
|
|
1304
1250
|
);
|
|
1305
1251
|
KdsCardHeader.displayName = "KdsCardHeader";
|
|
1306
|
-
var KdsCardBody = (0,
|
|
1307
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1252
|
+
var KdsCardBody = (0, import_react4.forwardRef)(
|
|
1253
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-body", className), ...props, children })
|
|
1308
1254
|
);
|
|
1309
1255
|
KdsCardBody.displayName = "KdsCardBody";
|
|
1310
|
-
var KdsCardFooter = (0,
|
|
1311
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1256
|
+
var KdsCardFooter = (0, import_react4.forwardRef)(
|
|
1257
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-footer", className), ...props, children })
|
|
1312
1258
|
);
|
|
1313
1259
|
KdsCardFooter.displayName = "KdsCardFooter";
|
|
1314
1260
|
|
|
1315
1261
|
// src/components/core/KdsSpinner/KdsSpinner.tsx
|
|
1316
|
-
var
|
|
1317
|
-
var
|
|
1318
|
-
var
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1262
|
+
var import_react5 = require("react");
|
|
1263
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1264
|
+
var SIZE_CLASS = {
|
|
1265
|
+
small: "small",
|
|
1266
|
+
medium: null,
|
|
1267
|
+
large: "large"
|
|
1268
|
+
};
|
|
1269
|
+
var KdsSpinner = (0, import_react5.forwardRef)(
|
|
1270
|
+
({ size = "medium", label, className, ...props }, ref) => {
|
|
1271
|
+
const sizeClass = SIZE_CLASS[size];
|
|
1272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1273
|
+
"div",
|
|
1274
|
+
{
|
|
1275
|
+
ref,
|
|
1276
|
+
className: (0, import_clsx.clsx)("kds-flex kds-flex-col kds-items-center kds-gap-2", className),
|
|
1277
|
+
role: "status",
|
|
1278
|
+
...props,
|
|
1279
|
+
children: [
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("progress", { className: (0, import_clsx.clsx)("circle indeterminate", sizeClass) }),
|
|
1281
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "kds-text-body-small kds-text-muted", children: label }),
|
|
1282
|
+
!label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "kds-hidden", children: "Cargando" })
|
|
1283
|
+
]
|
|
1284
|
+
}
|
|
1285
|
+
);
|
|
1286
|
+
}
|
|
1324
1287
|
);
|
|
1325
1288
|
KdsSpinner.displayName = "KdsSpinner";
|
|
1326
1289
|
|
|
1327
1290
|
// src/components/core/KdsLinearProgress/KdsLinearProgress.tsx
|
|
1328
|
-
var
|
|
1329
|
-
var
|
|
1330
|
-
var KdsLinearProgress = (0,
|
|
1331
|
-
({ value, max = 100, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1291
|
+
var import_react6 = require("react");
|
|
1292
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1293
|
+
var KdsLinearProgress = (0, import_react6.forwardRef)(
|
|
1294
|
+
({ value, max = 100, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("progress", { ref, className: (0, import_clsx.clsx)("kds-progress", className), value, max, ...props })
|
|
1332
1295
|
);
|
|
1333
1296
|
KdsLinearProgress.displayName = "KdsLinearProgress";
|
|
1334
1297
|
|
|
1335
1298
|
// src/components/core/KdsAlert/KdsAlert.tsx
|
|
1336
|
-
var
|
|
1337
|
-
var
|
|
1338
|
-
var
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1299
|
+
var import_react7 = require("react");
|
|
1300
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1301
|
+
var DEFAULT_ICONS = {
|
|
1302
|
+
success: "check_circle",
|
|
1303
|
+
info: "info",
|
|
1304
|
+
warning: "warning",
|
|
1305
|
+
error: "error"
|
|
1306
|
+
};
|
|
1307
|
+
var KdsAlert = (0, import_react7.forwardRef)(
|
|
1308
|
+
({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => {
|
|
1309
|
+
const resolvedIcon = icon === false ? null : typeof icon === "string" ? icon : DEFAULT_ICONS[severity];
|
|
1310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1311
|
+
"div",
|
|
1312
|
+
{
|
|
1313
|
+
ref,
|
|
1314
|
+
role: "alert",
|
|
1315
|
+
className: (0, import_clsx.clsx)("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
|
|
1316
|
+
...props,
|
|
1317
|
+
children: [
|
|
1318
|
+
resolvedIcon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "kds-alert-icon", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { className: "material-symbols-outlined", children: resolvedIcon }) }),
|
|
1319
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "kds-alert-content", children: [
|
|
1320
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "kds-alert-title", children: title }),
|
|
1321
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "kds-alert-description", children })
|
|
1322
|
+
] }),
|
|
1323
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1324
|
+
"button",
|
|
1325
|
+
{
|
|
1326
|
+
type: "button",
|
|
1327
|
+
className: "kds-alert-close",
|
|
1328
|
+
onClick: onClose,
|
|
1329
|
+
"aria-label": "Cerrar",
|
|
1330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("i", { className: "material-symbols-outlined", children: "close" })
|
|
1331
|
+
}
|
|
1332
|
+
)
|
|
1333
|
+
]
|
|
1334
|
+
}
|
|
1335
|
+
);
|
|
1336
|
+
}
|
|
1356
1337
|
);
|
|
1357
1338
|
KdsAlert.displayName = "KdsAlert";
|
|
1358
1339
|
|
|
1359
1340
|
// src/components/core/KdsTypography/KdsTypography.tsx
|
|
1360
|
-
var
|
|
1361
|
-
var
|
|
1341
|
+
var import_react8 = require("react");
|
|
1342
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1362
1343
|
var variantTag = {
|
|
1363
1344
|
display1: "h1",
|
|
1364
1345
|
display2: "h2",
|
|
@@ -1373,10 +1354,10 @@ var variantTag = {
|
|
|
1373
1354
|
muted: "p",
|
|
1374
1355
|
link: "span"
|
|
1375
1356
|
};
|
|
1376
|
-
var KdsTypography = (0,
|
|
1357
|
+
var KdsTypography = (0, import_react8.forwardRef)(
|
|
1377
1358
|
({ variant = "body", color, as, children, className, ...props }, ref) => {
|
|
1378
1359
|
const Tag = as || variantTag[variant];
|
|
1379
|
-
return /* @__PURE__ */ (0,
|
|
1360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1380
1361
|
Tag,
|
|
1381
1362
|
{
|
|
1382
1363
|
ref,
|
|
@@ -1394,12 +1375,12 @@ var KdsTypography = (0, import_react9.forwardRef)(
|
|
|
1394
1375
|
KdsTypography.displayName = "KdsTypography";
|
|
1395
1376
|
|
|
1396
1377
|
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
1397
|
-
var
|
|
1378
|
+
var import_react10 = __toESM(require("react"));
|
|
1398
1379
|
|
|
1399
1380
|
// src/components/core/hooks/useTabsKeyboard.ts
|
|
1400
|
-
var
|
|
1381
|
+
var import_react9 = require("react");
|
|
1401
1382
|
function useTabsKeyboard(tabCount, activeIndex, onChange) {
|
|
1402
|
-
const onKeyDown = (0,
|
|
1383
|
+
const onKeyDown = (0, import_react9.useCallback)(
|
|
1403
1384
|
(e) => {
|
|
1404
1385
|
let next = activeIndex;
|
|
1405
1386
|
if (e.key === "ArrowRight") next = (activeIndex + 1) % tabCount;
|
|
@@ -1419,31 +1400,31 @@ function useTabsKeyboard(tabCount, activeIndex, onChange) {
|
|
|
1419
1400
|
}
|
|
1420
1401
|
|
|
1421
1402
|
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
1422
|
-
var
|
|
1423
|
-
var KdsTabs = (0,
|
|
1424
|
-
({ activeIndex, onChange,
|
|
1425
|
-
const tabCount =
|
|
1403
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1404
|
+
var KdsTabs = (0, import_react10.forwardRef)(
|
|
1405
|
+
({ activeIndex, onChange, children, className, style, ...props }, ref) => {
|
|
1406
|
+
const tabCount = import_react10.Children.count(children);
|
|
1426
1407
|
const { onKeyDown } = useTabsKeyboard(tabCount, activeIndex, onChange);
|
|
1427
|
-
const mergedStyle = (0,
|
|
1428
|
-
|
|
1429
|
-
return {
|
|
1408
|
+
const mergedStyle = (0, import_react10.useMemo)(
|
|
1409
|
+
() => ({
|
|
1430
1410
|
...style,
|
|
1431
1411
|
"--_tab-count": tabCount,
|
|
1432
1412
|
"--_active-idx": activeIndex
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
|
|
1413
|
+
}),
|
|
1414
|
+
[tabCount, activeIndex, style]
|
|
1415
|
+
);
|
|
1416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1436
1417
|
"div",
|
|
1437
1418
|
{
|
|
1438
1419
|
ref,
|
|
1439
1420
|
role: "tablist",
|
|
1440
|
-
className: (0, import_clsx.clsx)(
|
|
1421
|
+
className: (0, import_clsx.clsx)("kds-segmented-tabs", className),
|
|
1441
1422
|
style: mergedStyle,
|
|
1442
1423
|
onKeyDown,
|
|
1443
1424
|
...props,
|
|
1444
|
-
children:
|
|
1445
|
-
if (!
|
|
1446
|
-
return
|
|
1425
|
+
children: import_react10.Children.map(children, (child, i) => {
|
|
1426
|
+
if (!import_react10.default.isValidElement(child)) return child;
|
|
1427
|
+
return import_react10.default.cloneElement(child, {
|
|
1447
1428
|
_active: i === activeIndex,
|
|
1448
1429
|
_onClick: () => onChange(i)
|
|
1449
1430
|
});
|
|
@@ -1453,11 +1434,12 @@ var KdsTabs = (0, import_react11.forwardRef)(
|
|
|
1453
1434
|
}
|
|
1454
1435
|
);
|
|
1455
1436
|
KdsTabs.displayName = "KdsTabs";
|
|
1456
|
-
var KdsTab = (0,
|
|
1457
|
-
({ _active, _onClick, children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1437
|
+
var KdsTab = (0, import_react10.forwardRef)(
|
|
1438
|
+
({ _active, _onClick, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1458
1439
|
"button",
|
|
1459
1440
|
{
|
|
1460
1441
|
ref,
|
|
1442
|
+
type: "button",
|
|
1461
1443
|
role: "tab",
|
|
1462
1444
|
"aria-selected": _active,
|
|
1463
1445
|
tabIndex: _active ? 0 : -1,
|
|
@@ -1469,8 +1451,8 @@ var KdsTab = (0, import_react11.forwardRef)(
|
|
|
1469
1451
|
)
|
|
1470
1452
|
);
|
|
1471
1453
|
KdsTab.displayName = "KdsTab";
|
|
1472
|
-
var KdsTabPanel = (0,
|
|
1473
|
-
({ active, children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1454
|
+
var KdsTabPanel = (0, import_react10.forwardRef)(
|
|
1455
|
+
({ active, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1474
1456
|
"div",
|
|
1475
1457
|
{
|
|
1476
1458
|
ref,
|
|
@@ -1484,103 +1466,14 @@ var KdsTabPanel = (0, import_react11.forwardRef)(
|
|
|
1484
1466
|
);
|
|
1485
1467
|
KdsTabPanel.displayName = "KdsTabPanel";
|
|
1486
1468
|
|
|
1487
|
-
// src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
|
|
1488
|
-
var import_react12 = require("react");
|
|
1489
|
-
|
|
1490
|
-
// src/assets/images/khipu-logo-color.svg
|
|
1491
|
-
var khipu_logo_color_default = "./khipu-logo-color-TV75AKOV.svg";
|
|
1492
|
-
|
|
1493
|
-
// src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
|
|
1494
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1495
|
-
var KhipuLogo = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1496
|
-
"img",
|
|
1497
|
-
{
|
|
1498
|
-
src: khipu_logo_color_default,
|
|
1499
|
-
alt: "Khipu",
|
|
1500
|
-
className: "kds-logo-header-logo-img"
|
|
1501
|
-
}
|
|
1502
|
-
);
|
|
1503
|
-
var KdsLogoHeaderLogo = (0, import_react12.forwardRef)(
|
|
1504
|
-
({ children, className, ...props }, ref) => {
|
|
1505
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1506
|
-
"div",
|
|
1507
|
-
{
|
|
1508
|
-
ref,
|
|
1509
|
-
className: (0, import_clsx.clsx)("kds-logo-header-logo", className),
|
|
1510
|
-
...props,
|
|
1511
|
-
children: children || /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(KhipuLogo, {})
|
|
1512
|
-
}
|
|
1513
|
-
);
|
|
1514
|
-
}
|
|
1515
|
-
);
|
|
1516
|
-
KdsLogoHeaderLogo.displayName = "KdsLogoHeaderLogo";
|
|
1517
|
-
var KdsLogoHeaderSeparator = (0, import_react12.forwardRef)(
|
|
1518
|
-
({ children = "|", className, ...props }, ref) => {
|
|
1519
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1520
|
-
"span",
|
|
1521
|
-
{
|
|
1522
|
-
ref,
|
|
1523
|
-
className: (0, import_clsx.clsx)("kds-logo-header-separator", className),
|
|
1524
|
-
...props,
|
|
1525
|
-
children
|
|
1526
|
-
}
|
|
1527
|
-
);
|
|
1528
|
-
}
|
|
1529
|
-
);
|
|
1530
|
-
KdsLogoHeaderSeparator.displayName = "KdsLogoHeaderSeparator";
|
|
1531
|
-
var KdsLogoHeaderCode = (0, import_react12.forwardRef)(
|
|
1532
|
-
({ children, className, ...props }, ref) => {
|
|
1533
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1534
|
-
"span",
|
|
1535
|
-
{
|
|
1536
|
-
ref,
|
|
1537
|
-
className: (0, import_clsx.clsx)("kds-logo-header-code", className),
|
|
1538
|
-
...props,
|
|
1539
|
-
children
|
|
1540
|
-
}
|
|
1541
|
-
);
|
|
1542
|
-
}
|
|
1543
|
-
);
|
|
1544
|
-
KdsLogoHeaderCode.displayName = "KdsLogoHeaderCode";
|
|
1545
|
-
var KdsLogoHeaderCloseButton = (0, import_react12.forwardRef)(
|
|
1546
|
-
({ onClose, className, ...props }, ref) => {
|
|
1547
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "kds-logo-header-close-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1548
|
-
"button",
|
|
1549
|
-
{
|
|
1550
|
-
ref,
|
|
1551
|
-
onClick: onClose,
|
|
1552
|
-
className: (0, import_clsx.clsx)("kds-btn kds-btn-icon", className),
|
|
1553
|
-
"aria-label": "close",
|
|
1554
|
-
...props,
|
|
1555
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { className: "material-symbols-outlined", children: "close" })
|
|
1556
|
-
}
|
|
1557
|
-
) });
|
|
1558
|
-
}
|
|
1559
|
-
);
|
|
1560
|
-
KdsLogoHeaderCloseButton.displayName = "KdsLogoHeaderCloseButton";
|
|
1561
|
-
var KdsLogoHeader = (0, import_react12.forwardRef)(
|
|
1562
|
-
({ children, className, ...props }, ref) => {
|
|
1563
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1564
|
-
"div",
|
|
1565
|
-
{
|
|
1566
|
-
ref,
|
|
1567
|
-
className: (0, import_clsx.clsx)("kds-brand-row", className),
|
|
1568
|
-
...props,
|
|
1569
|
-
children
|
|
1570
|
-
}
|
|
1571
|
-
);
|
|
1572
|
-
}
|
|
1573
|
-
);
|
|
1574
|
-
KdsLogoHeader.displayName = "KdsLogoHeader";
|
|
1575
|
-
|
|
1576
1469
|
// src/components/core/KdsRadioGroup/KdsRadioGroup.tsx
|
|
1577
|
-
var
|
|
1578
|
-
var
|
|
1579
|
-
var KdsRadioGroup = (0,
|
|
1580
|
-
({ label, name, options, value, onChange, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1581
|
-
label && /* @__PURE__ */ (0,
|
|
1582
|
-
options.map((opt) => /* @__PURE__ */ (0,
|
|
1583
|
-
/* @__PURE__ */ (0,
|
|
1470
|
+
var import_react11 = require("react");
|
|
1471
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1472
|
+
var KdsRadioGroup = (0, import_react11.forwardRef)(
|
|
1473
|
+
({ label, name, options, value, onChange, size, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("fieldset", { ref, className: (0, import_clsx.clsx)("kds-radio-group", className), ...props, children: [
|
|
1474
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("legend", { children: label }),
|
|
1475
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: (0, import_clsx.clsx)("radio", size), children: [
|
|
1476
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1584
1477
|
"input",
|
|
1585
1478
|
{
|
|
1586
1479
|
type: "radio",
|
|
@@ -1591,86 +1484,105 @@ var KdsRadioGroup = (0, import_react13.forwardRef)(
|
|
|
1591
1484
|
onChange: () => onChange?.(opt.value)
|
|
1592
1485
|
}
|
|
1593
1486
|
),
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
1487
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: opt.label })
|
|
1595
1488
|
] }, opt.value))
|
|
1596
1489
|
] })
|
|
1597
1490
|
);
|
|
1598
1491
|
KdsRadioGroup.displayName = "KdsRadioGroup";
|
|
1599
1492
|
|
|
1600
1493
|
// src/components/core/KdsSelect/KdsSelect.tsx
|
|
1601
|
-
var
|
|
1602
|
-
var
|
|
1603
|
-
var
|
|
1604
|
-
var KdsSelectRoot = (0, import_react14.forwardRef)(
|
|
1494
|
+
var import_react12 = require("react");
|
|
1495
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1496
|
+
var KdsSelect = (0, import_react12.forwardRef)(
|
|
1605
1497
|
({
|
|
1606
|
-
value,
|
|
1607
|
-
onValueChange,
|
|
1608
|
-
placeholder,
|
|
1609
1498
|
label,
|
|
1610
|
-
|
|
1499
|
+
options,
|
|
1500
|
+
placeholder,
|
|
1611
1501
|
helperText,
|
|
1612
|
-
|
|
1502
|
+
error,
|
|
1503
|
+
prefixIcon,
|
|
1613
1504
|
fullWidth = true,
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
className
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1505
|
+
disabled,
|
|
1506
|
+
required,
|
|
1507
|
+
className,
|
|
1508
|
+
id,
|
|
1509
|
+
...props
|
|
1510
|
+
}, ref) => {
|
|
1511
|
+
const fieldId = id || `kds-select-${label.toLowerCase().replace(/\s+/g, "-")}`;
|
|
1512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1513
|
+
"div",
|
|
1514
|
+
{
|
|
1515
|
+
className: (0, import_clsx.clsx)(
|
|
1516
|
+
"field",
|
|
1517
|
+
"label",
|
|
1518
|
+
"border",
|
|
1519
|
+
prefixIcon && "prefix",
|
|
1520
|
+
error && "invalid",
|
|
1521
|
+
fullWidth && "kds-w-full",
|
|
1522
|
+
className
|
|
1523
|
+
),
|
|
1524
|
+
children: [
|
|
1525
|
+
prefixIcon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { className: "material-symbols-outlined", children: prefixIcon }),
|
|
1526
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1527
|
+
"select",
|
|
1528
|
+
{
|
|
1529
|
+
ref,
|
|
1530
|
+
id: fieldId,
|
|
1531
|
+
disabled,
|
|
1532
|
+
required,
|
|
1533
|
+
...props,
|
|
1534
|
+
children: [
|
|
1535
|
+
placeholder !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: placeholder }),
|
|
1536
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
|
|
1537
|
+
]
|
|
1538
|
+
}
|
|
1539
|
+
),
|
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { htmlFor: fieldId, children: [
|
|
1541
|
+
label,
|
|
1542
|
+
required && " *"
|
|
1632
1543
|
] }),
|
|
1633
|
-
|
|
1634
|
-
]
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
)
|
|
1639
|
-
);
|
|
1640
|
-
KdsSelectRoot.displayName = "KdsSelect";
|
|
1641
|
-
var KdsSelectItem = (0, import_react14.forwardRef)(
|
|
1642
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Select.Item, { ref, className: (0, import_clsx.clsx)("kds-select-item", className), ...props, children: [
|
|
1643
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.ItemText, { children }),
|
|
1644
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.ItemIndicator, { className: "kds-select-item-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { className: "material-symbols-outlined", children: "check" }) })
|
|
1645
|
-
] })
|
|
1544
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "helper", children: helperText })
|
|
1545
|
+
]
|
|
1546
|
+
}
|
|
1547
|
+
);
|
|
1548
|
+
}
|
|
1646
1549
|
);
|
|
1647
|
-
|
|
1648
|
-
var KdsSelect = Object.assign(KdsSelectRoot, {
|
|
1649
|
-
Item: KdsSelectItem
|
|
1650
|
-
});
|
|
1550
|
+
KdsSelect.displayName = "KdsSelect";
|
|
1651
1551
|
|
|
1652
1552
|
// src/components/core/KdsChip/KdsChip.tsx
|
|
1653
|
-
var
|
|
1654
|
-
var
|
|
1655
|
-
var KdsChip = (0,
|
|
1656
|
-
({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1657
|
-
icon && /* @__PURE__ */ (0,
|
|
1658
|
-
children,
|
|
1659
|
-
onDelete && /* @__PURE__ */ (0,
|
|
1553
|
+
var import_react13 = require("react");
|
|
1554
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1555
|
+
var KdsChip = (0, import_react13.forwardRef)(
|
|
1556
|
+
({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { ref, className: (0, import_clsx.clsx)("kds-badge", color, className), ...props, children: [
|
|
1557
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { className: "material-symbols-outlined", children: icon }),
|
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children }),
|
|
1559
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1560
|
+
"button",
|
|
1561
|
+
{
|
|
1562
|
+
type: "button",
|
|
1563
|
+
className: "kds-badge-close",
|
|
1564
|
+
onClick: (e) => {
|
|
1565
|
+
e.stopPropagation();
|
|
1566
|
+
onDelete();
|
|
1567
|
+
},
|
|
1568
|
+
"aria-label": "Eliminar",
|
|
1569
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { className: "material-symbols-outlined", children: "close" })
|
|
1570
|
+
}
|
|
1571
|
+
)
|
|
1660
1572
|
] })
|
|
1661
1573
|
);
|
|
1662
1574
|
KdsChip.displayName = "KdsChip";
|
|
1663
1575
|
|
|
1664
1576
|
// src/components/core/KdsSnackbar/KdsSnackbar.tsx
|
|
1665
|
-
var
|
|
1577
|
+
var import_react15 = require("react");
|
|
1666
1578
|
|
|
1667
1579
|
// src/components/core/hooks/useAutoHide.ts
|
|
1668
|
-
var
|
|
1580
|
+
var import_react14 = require("react");
|
|
1669
1581
|
function useAutoHide(durationMs, onHide) {
|
|
1670
|
-
const [visible, setVisible] = (0,
|
|
1671
|
-
const onHideRef = (0,
|
|
1582
|
+
const [visible, setVisible] = (0, import_react14.useState)(true);
|
|
1583
|
+
const onHideRef = (0, import_react14.useRef)(onHide);
|
|
1672
1584
|
onHideRef.current = onHide;
|
|
1673
|
-
(0,
|
|
1585
|
+
(0, import_react14.useEffect)(() => {
|
|
1674
1586
|
if (durationMs <= 0) return;
|
|
1675
1587
|
const timer = setTimeout(() => {
|
|
1676
1588
|
setVisible(false);
|
|
@@ -1682,22 +1594,61 @@ function useAutoHide(durationMs, onHide) {
|
|
|
1682
1594
|
}
|
|
1683
1595
|
|
|
1684
1596
|
// src/components/core/KdsSnackbar/KdsSnackbar.tsx
|
|
1685
|
-
var
|
|
1686
|
-
var
|
|
1687
|
-
|
|
1688
|
-
|
|
1597
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1598
|
+
var DEFAULT_ICONS2 = {
|
|
1599
|
+
info: "info",
|
|
1600
|
+
success: "check_circle",
|
|
1601
|
+
error: "error"
|
|
1602
|
+
};
|
|
1603
|
+
var KdsSnackbar = (0, import_react15.forwardRef)(
|
|
1604
|
+
({
|
|
1605
|
+
message,
|
|
1606
|
+
type = "info",
|
|
1607
|
+
duration = 5e3,
|
|
1608
|
+
onClose,
|
|
1609
|
+
open = true,
|
|
1610
|
+
icon,
|
|
1611
|
+
className,
|
|
1612
|
+
style,
|
|
1613
|
+
...props
|
|
1614
|
+
}, ref) => {
|
|
1615
|
+
const autoDismiss = duration > 0;
|
|
1616
|
+
const { visible } = useAutoHide(autoDismiss ? duration : 0, onClose);
|
|
1689
1617
|
if (!open || !visible) return null;
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1618
|
+
const resolvedIcon = icon === false ? null : icon ?? DEFAULT_ICONS2[type];
|
|
1619
|
+
const mergedStyle = autoDismiss ? { ...style, ["--kds-snackbar-duration"]: `${duration}ms` } : style ?? {};
|
|
1620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1621
|
+
"div",
|
|
1622
|
+
{
|
|
1623
|
+
ref,
|
|
1624
|
+
role: "status",
|
|
1625
|
+
className: (0, import_clsx.clsx)("snackbar", "active", type, className),
|
|
1626
|
+
"data-auto-dismiss": autoDismiss ? "true" : void 0,
|
|
1627
|
+
style: mergedStyle,
|
|
1628
|
+
...props,
|
|
1629
|
+
children: [
|
|
1630
|
+
resolvedIcon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { className: "material-symbols-outlined", children: resolvedIcon }),
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "max", children: message }),
|
|
1632
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1633
|
+
"button",
|
|
1634
|
+
{
|
|
1635
|
+
type: "button",
|
|
1636
|
+
className: "kds-snackbar-close",
|
|
1637
|
+
onClick: onClose,
|
|
1638
|
+
"aria-label": "Cerrar",
|
|
1639
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { className: "material-symbols-outlined", children: "close" })
|
|
1640
|
+
}
|
|
1641
|
+
)
|
|
1642
|
+
]
|
|
1643
|
+
}
|
|
1644
|
+
);
|
|
1694
1645
|
}
|
|
1695
1646
|
);
|
|
1696
1647
|
KdsSnackbar.displayName = "KdsSnackbar";
|
|
1697
1648
|
|
|
1698
1649
|
// src/components/core/KdsTooltip/KdsTooltip.tsx
|
|
1699
1650
|
var Tooltip = __toESM(require("@radix-ui/react-tooltip"));
|
|
1700
|
-
var
|
|
1651
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1701
1652
|
function KdsTooltip({
|
|
1702
1653
|
content,
|
|
1703
1654
|
children,
|
|
@@ -1708,86 +1659,102 @@ function KdsTooltip({
|
|
|
1708
1659
|
onOpenChange,
|
|
1709
1660
|
delayDuration = 300
|
|
1710
1661
|
}) {
|
|
1711
|
-
return /* @__PURE__ */ (0,
|
|
1712
|
-
/* @__PURE__ */ (0,
|
|
1713
|
-
/* @__PURE__ */ (0,
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1663
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Tooltip.Trigger, { asChild: true, children }),
|
|
1664
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1665
|
+
Tooltip.Content,
|
|
1666
|
+
{
|
|
1667
|
+
className: (0, import_clsx.clsx)("kds-tooltip", className),
|
|
1668
|
+
side: placement,
|
|
1669
|
+
sideOffset: 6,
|
|
1670
|
+
collisionPadding: 8,
|
|
1671
|
+
children: [
|
|
1672
|
+
content,
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Tooltip.Arrow, { className: "kds-tooltip-arrow", width: 10, height: 5 })
|
|
1674
|
+
]
|
|
1675
|
+
}
|
|
1676
|
+
) })
|
|
1717
1677
|
] }) });
|
|
1718
1678
|
}
|
|
1719
1679
|
|
|
1720
1680
|
// src/components/core/KdsAccordion/KdsAccordion.tsx
|
|
1721
|
-
var
|
|
1722
|
-
var
|
|
1723
|
-
var KdsAccordion = (0,
|
|
1724
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1681
|
+
var import_react16 = require("react");
|
|
1682
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1683
|
+
var KdsAccordion = (0, import_react16.forwardRef)(
|
|
1684
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("details", { ref, className: (0, import_clsx.clsx)("kds-accordion", className), ...props, children })
|
|
1725
1685
|
);
|
|
1726
1686
|
KdsAccordion.displayName = "KdsAccordion";
|
|
1727
|
-
var KdsAccordionSummary = (0,
|
|
1728
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1687
|
+
var KdsAccordionSummary = (0, import_react16.forwardRef)(
|
|
1688
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("summary", { ref, className: (0, import_clsx.clsx)("kds-accordion-summary", className), ...props, children: [
|
|
1729
1689
|
children,
|
|
1730
|
-
/* @__PURE__ */ (0,
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", { className: "material-symbols-outlined", children: "expand_more" })
|
|
1731
1691
|
] })
|
|
1732
1692
|
);
|
|
1733
1693
|
KdsAccordionSummary.displayName = "KdsAccordionSummary";
|
|
1734
|
-
var KdsAccordionDetails = (0,
|
|
1735
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1694
|
+
var KdsAccordionDetails = (0, import_react16.forwardRef)(
|
|
1695
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-accordion-details", className), ...props, children })
|
|
1736
1696
|
);
|
|
1737
1697
|
KdsAccordionDetails.displayName = "KdsAccordionDetails";
|
|
1738
1698
|
|
|
1739
1699
|
// src/components/core/KdsDivider/KdsDivider.tsx
|
|
1740
|
-
var
|
|
1741
|
-
var
|
|
1742
|
-
var KdsDivider = (0,
|
|
1743
|
-
({ dashed, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1700
|
+
var import_react17 = require("react");
|
|
1701
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1702
|
+
var KdsDivider = (0, import_react17.forwardRef)(
|
|
1703
|
+
({ dashed, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("hr", { ref, className: (0, import_clsx.clsx)(dashed ? "kds-hr-dashed" : "kds-hr", className), ...props })
|
|
1744
1704
|
);
|
|
1745
1705
|
KdsDivider.displayName = "KdsDivider";
|
|
1746
1706
|
|
|
1747
1707
|
// src/components/core/KdsSectionNote/KdsSectionNote.tsx
|
|
1748
|
-
var
|
|
1749
|
-
var
|
|
1750
|
-
var KdsSectionNote = (0,
|
|
1751
|
-
({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1752
|
-
/* @__PURE__ */ (0,
|
|
1753
|
-
/* @__PURE__ */ (0,
|
|
1708
|
+
var import_react18 = require("react");
|
|
1709
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1710
|
+
var KdsSectionNote = (0, import_react18.forwardRef)(
|
|
1711
|
+
({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { ref, className: (0, import_clsx.clsx)("kds-section-note", className), ...props, children: [
|
|
1712
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("i", { className: "material-symbols-outlined", children: icon }),
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children })
|
|
1754
1714
|
] })
|
|
1755
1715
|
);
|
|
1756
1716
|
KdsSectionNote.displayName = "KdsSectionNote";
|
|
1757
1717
|
|
|
1758
1718
|
// src/components/core/KdsStatusBlock/KdsStatusBlock.tsx
|
|
1759
|
-
var
|
|
1760
|
-
var
|
|
1761
|
-
var KdsStatusBlock = (0,
|
|
1762
|
-
({ status, icon, title, description, inline, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1763
|
-
/* @__PURE__ */ (0,
|
|
1764
|
-
/* @__PURE__ */ (0,
|
|
1765
|
-
/* @__PURE__ */ (0,
|
|
1766
|
-
description && /* @__PURE__ */ (0,
|
|
1719
|
+
var import_react19 = require("react");
|
|
1720
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1721
|
+
var KdsStatusBlock = (0, import_react19.forwardRef)(
|
|
1722
|
+
({ status, icon, title, description, inline, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-status-block", inline && "inline", className), "data-status": status, ...props, children: [
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
1724
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
1725
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "kds-status-block-title", children: title }),
|
|
1726
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "kds-status-block-description", children: description })
|
|
1767
1727
|
] })
|
|
1768
1728
|
] })
|
|
1769
1729
|
);
|
|
1770
1730
|
KdsStatusBlock.displayName = "KdsStatusBlock";
|
|
1771
1731
|
|
|
1772
1732
|
// src/components/core/KdsStepper/KdsStepper.tsx
|
|
1773
|
-
var
|
|
1774
|
-
var
|
|
1775
|
-
var KdsStepper = (0,
|
|
1776
|
-
({ steps, current, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1733
|
+
var import_react20 = require("react");
|
|
1734
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1735
|
+
var KdsStepper = (0, import_react20.forwardRef)(
|
|
1736
|
+
({ steps, current, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-stepper", className), ...props, children: steps.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1737
|
+
"div",
|
|
1738
|
+
{
|
|
1739
|
+
className: (0, import_clsx.clsx)("kds-step", i < current && "completed", i === current && "current"),
|
|
1740
|
+
children: [
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "kds-step-indicator" }),
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "kds-step-label", children: label })
|
|
1743
|
+
]
|
|
1744
|
+
},
|
|
1745
|
+
`${i}-${label}`
|
|
1746
|
+
)) })
|
|
1780
1747
|
);
|
|
1781
1748
|
KdsStepper.displayName = "KdsStepper";
|
|
1782
1749
|
|
|
1783
1750
|
// src/components/core/KdsCopyRow/KdsCopyRow.tsx
|
|
1784
|
-
var
|
|
1751
|
+
var import_react22 = require("react");
|
|
1785
1752
|
|
|
1786
1753
|
// src/components/core/hooks/useCopyToClipboard.ts
|
|
1787
|
-
var
|
|
1754
|
+
var import_react21 = require("react");
|
|
1788
1755
|
function useCopyToClipboard(resetMs = 1200) {
|
|
1789
|
-
const [copied, setCopied] = (0,
|
|
1790
|
-
const copy = (0,
|
|
1756
|
+
const [copied, setCopied] = (0, import_react21.useState)(false);
|
|
1757
|
+
const copy = (0, import_react21.useCallback)(
|
|
1791
1758
|
async (text) => {
|
|
1792
1759
|
try {
|
|
1793
1760
|
await navigator.clipboard.writeText(text);
|
|
@@ -1802,73 +1769,218 @@ function useCopyToClipboard(resetMs = 1200) {
|
|
|
1802
1769
|
}
|
|
1803
1770
|
|
|
1804
1771
|
// src/components/core/KdsCopyRow/KdsCopyRow.tsx
|
|
1805
|
-
var
|
|
1806
|
-
var KdsCopyRow = (0,
|
|
1807
|
-
({ label, value, className, ...props }, ref) => {
|
|
1772
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1773
|
+
var KdsCopyRow = (0, import_react22.forwardRef)(
|
|
1774
|
+
({ label, value, copiedText = "Copiado", className, ...props }, ref) => {
|
|
1808
1775
|
const { copied, copy } = useCopyToClipboard();
|
|
1809
|
-
return /* @__PURE__ */ (0,
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1777
|
+
"button",
|
|
1778
|
+
{
|
|
1779
|
+
ref,
|
|
1780
|
+
type: "button",
|
|
1781
|
+
className: (0, import_clsx.clsx)("kds-copy-row", copied && "copied", className),
|
|
1782
|
+
"data-copy": value,
|
|
1783
|
+
onClick: () => copy(value),
|
|
1784
|
+
"aria-label": `Copiar ${label}: ${value}`,
|
|
1785
|
+
...props,
|
|
1786
|
+
children: [
|
|
1787
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "content_copy" }),
|
|
1788
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
1789
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "kds-copy-row-label", children: label }),
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "kds-copy-row-value", children: value })
|
|
1791
|
+
] }),
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "kds-copy-toast", "aria-hidden": "true", children: [
|
|
1793
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("i", { className: "material-symbols-outlined", children: "check_circle" }),
|
|
1794
|
+
" ",
|
|
1795
|
+
copiedText
|
|
1796
|
+
] })
|
|
1797
|
+
]
|
|
1798
|
+
}
|
|
1799
|
+
);
|
|
1814
1800
|
}
|
|
1815
1801
|
);
|
|
1816
1802
|
KdsCopyRow.displayName = "KdsCopyRow";
|
|
1817
1803
|
|
|
1818
1804
|
// src/components/core/KdsCopyableTable/KdsCopyableTable.tsx
|
|
1819
|
-
var
|
|
1820
|
-
var
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1805
|
+
var import_react23 = require("react");
|
|
1806
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1807
|
+
async function copyToClipboard(text) {
|
|
1808
|
+
try {
|
|
1809
|
+
if (navigator.clipboard?.writeText) {
|
|
1810
|
+
await navigator.clipboard.writeText(text);
|
|
1811
|
+
return true;
|
|
1812
|
+
}
|
|
1813
|
+
} catch {
|
|
1814
|
+
}
|
|
1815
|
+
const ta = document.createElement("textarea");
|
|
1816
|
+
ta.value = text;
|
|
1817
|
+
ta.style.position = "fixed";
|
|
1818
|
+
ta.style.opacity = "0";
|
|
1819
|
+
document.body.appendChild(ta);
|
|
1820
|
+
ta.select();
|
|
1821
|
+
try {
|
|
1822
|
+
document.execCommand("copy");
|
|
1823
|
+
return true;
|
|
1824
|
+
} catch {
|
|
1825
|
+
return false;
|
|
1826
|
+
} finally {
|
|
1827
|
+
document.body.removeChild(ta);
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
var TRANSITION_MS = 300;
|
|
1831
|
+
var KdsCopyableTable = (0, import_react23.forwardRef)(
|
|
1832
|
+
({
|
|
1833
|
+
rows,
|
|
1834
|
+
copyAllLabel = "Copiar todos los datos",
|
|
1835
|
+
copiedAllLabel = "Datos copiados",
|
|
1836
|
+
showCopyAll = true,
|
|
1837
|
+
className,
|
|
1838
|
+
...props
|
|
1839
|
+
}, ref) => {
|
|
1840
|
+
const copiedTimers = (0, import_react23.useRef)(/* @__PURE__ */ new Map());
|
|
1841
|
+
const settlingTimers = (0, import_react23.useRef)(/* @__PURE__ */ new Map());
|
|
1842
|
+
const [copiedRows, setCopiedRows] = (0, import_react23.useState)(/* @__PURE__ */ new Set());
|
|
1843
|
+
const [settlingRows, setSettlingRows] = (0, import_react23.useState)(/* @__PURE__ */ new Set());
|
|
1844
|
+
const [allCopied, setAllCopied] = (0, import_react23.useState)(false);
|
|
1845
|
+
const markCopied = (0, import_react23.useCallback)((indexes, duration = 1500) => {
|
|
1846
|
+
setCopiedRows((prev) => {
|
|
1847
|
+
const next = new Set(prev);
|
|
1848
|
+
indexes.forEach((i) => next.add(i));
|
|
1849
|
+
return next;
|
|
1850
|
+
});
|
|
1851
|
+
indexes.forEach((i) => {
|
|
1852
|
+
const st = settlingTimers.current.get(i);
|
|
1853
|
+
if (st) {
|
|
1854
|
+
clearTimeout(st);
|
|
1855
|
+
settlingTimers.current.delete(i);
|
|
1856
|
+
}
|
|
1857
|
+
});
|
|
1858
|
+
setSettlingRows((prev) => {
|
|
1859
|
+
const next = new Set(prev);
|
|
1860
|
+
indexes.forEach((i) => next.delete(i));
|
|
1861
|
+
return next;
|
|
1862
|
+
});
|
|
1863
|
+
indexes.forEach((i) => {
|
|
1864
|
+
const existing = copiedTimers.current.get(i);
|
|
1865
|
+
if (existing) clearTimeout(existing);
|
|
1866
|
+
const t = setTimeout(() => {
|
|
1867
|
+
setCopiedRows((prev) => {
|
|
1868
|
+
const next = new Set(prev);
|
|
1869
|
+
next.delete(i);
|
|
1870
|
+
return next;
|
|
1871
|
+
});
|
|
1872
|
+
setSettlingRows((prev) => {
|
|
1873
|
+
const next = new Set(prev);
|
|
1874
|
+
next.add(i);
|
|
1875
|
+
return next;
|
|
1876
|
+
});
|
|
1877
|
+
copiedTimers.current.delete(i);
|
|
1878
|
+
const settlingT = setTimeout(() => {
|
|
1879
|
+
setSettlingRows((prev) => {
|
|
1880
|
+
const next = new Set(prev);
|
|
1881
|
+
next.delete(i);
|
|
1882
|
+
return next;
|
|
1883
|
+
});
|
|
1884
|
+
settlingTimers.current.delete(i);
|
|
1885
|
+
}, TRANSITION_MS);
|
|
1886
|
+
settlingTimers.current.set(i, settlingT);
|
|
1887
|
+
}, duration);
|
|
1888
|
+
copiedTimers.current.set(i, t);
|
|
1889
|
+
});
|
|
1890
|
+
}, []);
|
|
1891
|
+
const handleRowCopy = async (row, index) => {
|
|
1892
|
+
const ok = await copyToClipboard(row.copy ?? row.value);
|
|
1893
|
+
if (ok) markCopied([index]);
|
|
1894
|
+
};
|
|
1895
|
+
const handleCopyAll = async () => {
|
|
1825
1896
|
const text = rows.map((r) => `${r.label}: ${r.value}`).join("\n");
|
|
1826
|
-
|
|
1897
|
+
const ok = await copyToClipboard(text);
|
|
1898
|
+
if (ok) {
|
|
1899
|
+
markCopied(rows.map((_, i) => i));
|
|
1900
|
+
setAllCopied(true);
|
|
1901
|
+
setTimeout(() => setAllCopied(false), 2e3);
|
|
1902
|
+
}
|
|
1827
1903
|
};
|
|
1828
|
-
return /* @__PURE__ */ (0,
|
|
1829
|
-
/* @__PURE__ */ (0,
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
1905
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-copyable-table", className), ...props, children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1906
|
+
"div",
|
|
1907
|
+
{
|
|
1908
|
+
className: (0, import_clsx.clsx)(
|
|
1909
|
+
"kds-copyable-table-row",
|
|
1910
|
+
copiedRows.has(i) && "copied",
|
|
1911
|
+
settlingRows.has(i) && "settling"
|
|
1912
|
+
),
|
|
1913
|
+
role: "button",
|
|
1914
|
+
tabIndex: 0,
|
|
1915
|
+
onClick: () => handleRowCopy(row, i),
|
|
1916
|
+
onKeyDown: (e) => {
|
|
1917
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1918
|
+
e.preventDefault();
|
|
1919
|
+
handleRowCopy(row, i);
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
"aria-label": `Copiar ${row.label}: ${row.value}`,
|
|
1923
|
+
children: [
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "k", children: row.label }),
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "v", children: row.value })
|
|
1926
|
+
]
|
|
1927
|
+
},
|
|
1928
|
+
`${row.label}-${i}`
|
|
1929
|
+
)) }),
|
|
1930
|
+
showCopyAll && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1931
|
+
"button",
|
|
1932
|
+
{
|
|
1933
|
+
type: "button",
|
|
1934
|
+
className: (0, import_clsx.clsx)(
|
|
1935
|
+
"kds-btn",
|
|
1936
|
+
"kds-btn-outlined",
|
|
1937
|
+
"kds-btn-block",
|
|
1938
|
+
"kds-copy-all-btn",
|
|
1939
|
+
allCopied && "copied"
|
|
1940
|
+
),
|
|
1941
|
+
onClick: handleCopyAll,
|
|
1942
|
+
"aria-label": allCopied ? copiedAllLabel : copyAllLabel,
|
|
1943
|
+
children: [
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("i", { className: "material-symbols-outlined", children: allCopied ? "check" : "content_copy" }) }),
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: allCopied ? copiedAllLabel : copyAllLabel })
|
|
1946
|
+
]
|
|
1947
|
+
}
|
|
1948
|
+
)
|
|
1837
1949
|
] });
|
|
1838
1950
|
}
|
|
1839
1951
|
);
|
|
1840
1952
|
KdsCopyableTable.displayName = "KdsCopyableTable";
|
|
1841
1953
|
|
|
1842
1954
|
// src/components/core/KdsExpandPanel/KdsExpandPanel.tsx
|
|
1843
|
-
var
|
|
1844
|
-
var
|
|
1845
|
-
var KdsExpandPanel = (0,
|
|
1955
|
+
var import_react24 = require("react");
|
|
1956
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1957
|
+
var KdsExpandPanel = (0, import_react24.forwardRef)(
|
|
1846
1958
|
({ label, defaultExpanded = false, children, className, ...props }, ref) => {
|
|
1847
|
-
const [expanded, setExpanded] = (0,
|
|
1848
|
-
return /* @__PURE__ */ (0,
|
|
1849
|
-
/* @__PURE__ */ (0,
|
|
1959
|
+
const [expanded, setExpanded] = (0, import_react24.useState)(defaultExpanded);
|
|
1960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { ref, className, ...props, children: [
|
|
1961
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1850
1962
|
"button",
|
|
1851
1963
|
{
|
|
1852
1964
|
className: "kds-expand-toggle",
|
|
1853
1965
|
onClick: () => setExpanded((v) => !v),
|
|
1854
1966
|
"aria-expanded": expanded,
|
|
1855
1967
|
children: [
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
1857
|
-
/* @__PURE__ */ (0,
|
|
1968
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: label }),
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
|
|
1858
1970
|
]
|
|
1859
1971
|
}
|
|
1860
1972
|
),
|
|
1861
|
-
/* @__PURE__ */ (0,
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: (0, import_clsx.clsx)("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
|
|
1862
1974
|
] });
|
|
1863
1975
|
}
|
|
1864
1976
|
);
|
|
1865
1977
|
KdsExpandPanel.displayName = "KdsExpandPanel";
|
|
1866
1978
|
|
|
1867
1979
|
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
1868
|
-
var
|
|
1980
|
+
var import_react26 = require("react");
|
|
1869
1981
|
|
|
1870
1982
|
// src/components/core/hooks/useCountdown.ts
|
|
1871
|
-
var
|
|
1983
|
+
var import_react25 = require("react");
|
|
1872
1984
|
function calcRemaining(deadline) {
|
|
1873
1985
|
const diff = Math.max(0, new Date(deadline).getTime() - Date.now());
|
|
1874
1986
|
const totalSeconds = Math.floor(diff / 1e3);
|
|
@@ -1881,8 +1993,8 @@ function calcRemaining(deadline) {
|
|
|
1881
1993
|
};
|
|
1882
1994
|
}
|
|
1883
1995
|
function useCountdown(deadline) {
|
|
1884
|
-
const [state, setState] = (0,
|
|
1885
|
-
(0,
|
|
1996
|
+
const [state, setState] = (0, import_react25.useState)(() => calcRemaining(deadline));
|
|
1997
|
+
(0, import_react25.useEffect)(() => {
|
|
1886
1998
|
const tick = () => setState(calcRemaining(deadline));
|
|
1887
1999
|
const id = setInterval(tick, 1e3);
|
|
1888
2000
|
return () => clearInterval(id);
|
|
@@ -1891,13 +2003,13 @@ function useCountdown(deadline) {
|
|
|
1891
2003
|
}
|
|
1892
2004
|
|
|
1893
2005
|
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
1894
|
-
var
|
|
1895
|
-
var KdsCountdown = (0,
|
|
2006
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2007
|
+
var KdsCountdown = (0, import_react26.forwardRef)(
|
|
1896
2008
|
({ deadline, label, onExpire, className, ...props }, ref) => {
|
|
1897
2009
|
const { hours, minutes, seconds, expired, urgent } = useCountdown(deadline);
|
|
1898
|
-
const onExpireRef = (0,
|
|
2010
|
+
const onExpireRef = (0, import_react26.useRef)(onExpire);
|
|
1899
2011
|
onExpireRef.current = onExpire;
|
|
1900
|
-
(0,
|
|
2012
|
+
(0, import_react26.useEffect)(() => {
|
|
1901
2013
|
if (expired) {
|
|
1902
2014
|
onExpireRef.current?.();
|
|
1903
2015
|
}
|
|
@@ -1906,9 +2018,9 @@ var KdsCountdown = (0, import_react28.forwardRef)(
|
|
|
1906
2018
|
return null;
|
|
1907
2019
|
}
|
|
1908
2020
|
const pad = (n) => String(n).padStart(2, "0");
|
|
1909
|
-
return /* @__PURE__ */ (0,
|
|
1910
|
-
label && /* @__PURE__ */ (0,
|
|
1911
|
-
/* @__PURE__ */ (0,
|
|
2021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-countdown", urgent && "urgent", className), ...props, children: [
|
|
2022
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-countdown-label", children: label }),
|
|
2023
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "kds-countdown-value", children: [
|
|
1912
2024
|
pad(hours),
|
|
1913
2025
|
":",
|
|
1914
2026
|
pad(minutes),
|
|
@@ -1921,18 +2033,18 @@ var KdsCountdown = (0, import_react28.forwardRef)(
|
|
|
1921
2033
|
KdsCountdown.displayName = "KdsCountdown";
|
|
1922
2034
|
|
|
1923
2035
|
// src/components/core/KdsSegmentedTabs/KdsSegmentedTabs.tsx
|
|
1924
|
-
var
|
|
1925
|
-
var
|
|
1926
|
-
var KdsSegmentedTabs = (0,
|
|
1927
|
-
(props, ref) => /* @__PURE__ */ (0,
|
|
2036
|
+
var import_react27 = require("react");
|
|
2037
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2038
|
+
var KdsSegmentedTabs = (0, import_react27.forwardRef)(
|
|
2039
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(KdsTabs, { ref, ...props })
|
|
1928
2040
|
);
|
|
1929
2041
|
KdsSegmentedTabs.displayName = "KdsSegmentedTabs";
|
|
1930
2042
|
|
|
1931
2043
|
// src/components/domain/KdsBankRow/KdsBankRow.tsx
|
|
1932
|
-
var
|
|
1933
|
-
var
|
|
1934
|
-
var KdsBankRow = (0,
|
|
1935
|
-
({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2044
|
+
var import_react28 = require("react");
|
|
2045
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2046
|
+
var KdsBankRow = (0, import_react28.forwardRef)(
|
|
2047
|
+
({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1936
2048
|
"button",
|
|
1937
2049
|
{
|
|
1938
2050
|
ref,
|
|
@@ -1940,9 +2052,9 @@ var KdsBankRow = (0, import_react30.forwardRef)(
|
|
|
1940
2052
|
className: (0, import_clsx.clsx)("kds-bank-row", selected && "selected", className),
|
|
1941
2053
|
...props,
|
|
1942
2054
|
children: [
|
|
1943
|
-
/* @__PURE__ */ (0,
|
|
1944
|
-
/* @__PURE__ */ (0,
|
|
1945
|
-
/* @__PURE__ */ (0,
|
|
2055
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("img", { src: logoUrl, alt: name }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "initials", children: name.charAt(0) }) }),
|
|
2056
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "kds-bank-row-name", children: name }),
|
|
2057
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
|
|
1946
2058
|
]
|
|
1947
2059
|
}
|
|
1948
2060
|
)
|
|
@@ -1950,32 +2062,32 @@ var KdsBankRow = (0, import_react30.forwardRef)(
|
|
|
1950
2062
|
KdsBankRow.displayName = "KdsBankRow";
|
|
1951
2063
|
|
|
1952
2064
|
// src/components/domain/KdsBankList/KdsBankList.tsx
|
|
1953
|
-
var
|
|
1954
|
-
var
|
|
1955
|
-
var KdsBankList = (0,
|
|
1956
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2065
|
+
var import_react29 = require("react");
|
|
2066
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2067
|
+
var KdsBankList = (0, import_react29.forwardRef)(
|
|
2068
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-bank-list", className), role: "list", ...props, children })
|
|
1957
2069
|
);
|
|
1958
2070
|
KdsBankList.displayName = "KdsBankList";
|
|
1959
2071
|
|
|
1960
2072
|
// src/components/domain/KdsBankModal/KdsBankModal.tsx
|
|
1961
|
-
var
|
|
1962
|
-
var
|
|
1963
|
-
var
|
|
1964
|
-
var KdsBankModal = (0,
|
|
2073
|
+
var import_react30 = require("react");
|
|
2074
|
+
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
2075
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2076
|
+
var KdsBankModal = (0, import_react30.forwardRef)(
|
|
1965
2077
|
({ open, onClose, title = "Selecciona tu banco", searchPlaceholder = "Buscar banco...", onSearch, children, className, container }, ref) => {
|
|
1966
|
-
const [query, setQuery] = (0,
|
|
2078
|
+
const [query, setQuery] = (0, import_react30.useState)("");
|
|
1967
2079
|
const handleSearch = (value) => {
|
|
1968
2080
|
setQuery(value);
|
|
1969
2081
|
onSearch?.(value);
|
|
1970
2082
|
};
|
|
1971
|
-
return /* @__PURE__ */ (0,
|
|
2083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Dialog.Root, { open, onOpenChange: (o) => {
|
|
1972
2084
|
if (!o) onClose();
|
|
1973
|
-
}, children: /* @__PURE__ */ (0,
|
|
1974
|
-
/* @__PURE__ */ (0,
|
|
1975
|
-
/* @__PURE__ */ (0,
|
|
1976
|
-
/* @__PURE__ */ (0,
|
|
2085
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Dialog.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Dialog.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Dialog.Content, { ref, className: (0, import_clsx.clsx)("kds-bank-modal", className), children: [
|
|
2086
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "kds-bank-modal-header", children: [
|
|
2087
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Dialog.Title, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h3", { children: title }) }),
|
|
2088
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("i", { className: "material-symbols-outlined", children: "close" }) }) })
|
|
1977
2089
|
] }),
|
|
1978
|
-
/* @__PURE__ */ (0,
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1979
2091
|
"input",
|
|
1980
2092
|
{
|
|
1981
2093
|
type: "text",
|
|
@@ -1984,33 +2096,33 @@ var KdsBankModal = (0, import_react32.forwardRef)(
|
|
|
1984
2096
|
onChange: (e) => handleSearch(e.target.value)
|
|
1985
2097
|
}
|
|
1986
2098
|
) }),
|
|
1987
|
-
/* @__PURE__ */ (0,
|
|
2099
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "kds-bank-modal-body", children })
|
|
1988
2100
|
] }) }) }) });
|
|
1989
2101
|
}
|
|
1990
2102
|
);
|
|
1991
2103
|
KdsBankModal.displayName = "KdsBankModal";
|
|
1992
2104
|
|
|
1993
2105
|
// src/components/domain/KdsQrRow/KdsQrRow.tsx
|
|
1994
|
-
var
|
|
1995
|
-
var
|
|
1996
|
-
var KdsQrRow = (0,
|
|
1997
|
-
({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1998
|
-
/* @__PURE__ */ (0,
|
|
1999
|
-
/* @__PURE__ */ (0,
|
|
2000
|
-
/* @__PURE__ */ (0,
|
|
2001
|
-
description && /* @__PURE__ */ (0,
|
|
2106
|
+
var import_react31 = require("react");
|
|
2107
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2108
|
+
var KdsQrRow = (0, import_react31.forwardRef)(
|
|
2109
|
+
({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", { ref, type: "button", className: (0, import_clsx.clsx)("kds-qr-row", className), ...props, children: [
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "kds-qr-text", children: [
|
|
2112
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "title", children: name }),
|
|
2113
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "sub", children: description })
|
|
2002
2114
|
] }),
|
|
2003
|
-
badge && /* @__PURE__ */ (0,
|
|
2004
|
-
/* @__PURE__ */ (0,
|
|
2115
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "kds-qr-badge", children: badge }),
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("i", { className: "material-symbols-outlined", children: "chevron_right" })
|
|
2005
2117
|
] })
|
|
2006
2118
|
);
|
|
2007
2119
|
KdsQrRow.displayName = "KdsQrRow";
|
|
2008
2120
|
|
|
2009
2121
|
// src/components/domain/KdsCardSelector/KdsCardSelector.tsx
|
|
2010
|
-
var
|
|
2011
|
-
var
|
|
2012
|
-
var KdsCardSelector = (0,
|
|
2013
|
-
({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2122
|
+
var import_react32 = require("react");
|
|
2123
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2124
|
+
var KdsCardSelector = (0, import_react32.forwardRef)(
|
|
2125
|
+
({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2014
2126
|
"button",
|
|
2015
2127
|
{
|
|
2016
2128
|
ref,
|
|
@@ -2018,9 +2130,9 @@ var KdsCardSelector = (0, import_react34.forwardRef)(
|
|
|
2018
2130
|
className: (0, import_clsx.clsx)("kds-card-selector", selected && "selected", className),
|
|
2019
2131
|
...props,
|
|
2020
2132
|
children: [
|
|
2021
|
-
icon && /* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2023
|
-
description && /* @__PURE__ */ (0,
|
|
2133
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2134
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "kds-card-selector-title", children: title }),
|
|
2135
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "kds-card-selector-description", children: description })
|
|
2024
2136
|
]
|
|
2025
2137
|
}
|
|
2026
2138
|
)
|
|
@@ -2028,26 +2140,26 @@ var KdsCardSelector = (0, import_react34.forwardRef)(
|
|
|
2028
2140
|
KdsCardSelector.displayName = "KdsCardSelector";
|
|
2029
2141
|
|
|
2030
2142
|
// src/components/domain/KdsCardPlan/KdsCardPlan.tsx
|
|
2031
|
-
var
|
|
2032
|
-
var
|
|
2033
|
-
var KdsCardPlan = (0,
|
|
2034
|
-
({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2143
|
+
var import_react33 = require("react");
|
|
2144
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2145
|
+
var KdsCardPlan = (0, import_react33.forwardRef)(
|
|
2146
|
+
({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2035
2147
|
"div",
|
|
2036
2148
|
{
|
|
2037
2149
|
ref,
|
|
2038
2150
|
className: (0, import_clsx.clsx)("kds-card-plan", recommended && "recommended", className),
|
|
2039
2151
|
...props,
|
|
2040
2152
|
children: [
|
|
2041
|
-
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
2043
|
-
|
|
2044
|
-
/* @__PURE__ */ (0,
|
|
2045
|
-
period && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { children: [
|
|
2153
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { children: title }) }),
|
|
2154
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "kds-card-plan-price", children: [
|
|
2155
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-price", children: price }),
|
|
2156
|
+
period && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "kds-price-period", children: [
|
|
2046
2157
|
"/",
|
|
2047
2158
|
period
|
|
2048
2159
|
] })
|
|
2049
2160
|
] }),
|
|
2050
|
-
|
|
2161
|
+
badgeText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-card-plan-badge", children: badgeText }),
|
|
2162
|
+
features && features.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("li", { children: f }, i)) }),
|
|
2051
2163
|
action
|
|
2052
2164
|
]
|
|
2053
2165
|
}
|
|
@@ -2056,50 +2168,149 @@ var KdsCardPlan = (0, import_react35.forwardRef)(
|
|
|
2056
2168
|
KdsCardPlan.displayName = "KdsCardPlan";
|
|
2057
2169
|
|
|
2058
2170
|
// src/components/domain/KdsInvoiceSticky/KdsInvoiceSticky.tsx
|
|
2059
|
-
var
|
|
2060
|
-
var
|
|
2061
|
-
var KdsInvoiceSticky = (0,
|
|
2062
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2171
|
+
var import_react34 = require("react");
|
|
2172
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2173
|
+
var KdsInvoiceSticky = (0, import_react34.forwardRef)(
|
|
2174
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-elevated", "kds-invoice-sticky", className), ...props, children })
|
|
2063
2175
|
);
|
|
2064
2176
|
KdsInvoiceSticky.displayName = "KdsInvoiceSticky";
|
|
2065
2177
|
|
|
2066
2178
|
// src/components/domain/KdsBottomSheet/KdsBottomSheet.tsx
|
|
2067
|
-
var
|
|
2068
|
-
var
|
|
2069
|
-
var
|
|
2070
|
-
var KdsBottomSheet = (0,
|
|
2071
|
-
({
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
actions
|
|
2078
|
-
|
|
2179
|
+
var import_react35 = require("react");
|
|
2180
|
+
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
2181
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2182
|
+
var KdsBottomSheet = (0, import_react35.forwardRef)(
|
|
2183
|
+
({
|
|
2184
|
+
open,
|
|
2185
|
+
onClose,
|
|
2186
|
+
title,
|
|
2187
|
+
description,
|
|
2188
|
+
children,
|
|
2189
|
+
actions,
|
|
2190
|
+
showGrabber = true,
|
|
2191
|
+
showCloseButton = false,
|
|
2192
|
+
container,
|
|
2193
|
+
className
|
|
2194
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2195
|
+
Dialog2.Root,
|
|
2196
|
+
{
|
|
2197
|
+
open,
|
|
2198
|
+
onOpenChange: (o) => {
|
|
2199
|
+
if (!o) onClose();
|
|
2200
|
+
},
|
|
2201
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Overlay, { className: "kds-bottom-sheet-scrim open", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2202
|
+
Dialog2.Content,
|
|
2203
|
+
{
|
|
2204
|
+
ref,
|
|
2205
|
+
className: (0, import_clsx.clsx)("kds-bottom-sheet", className),
|
|
2206
|
+
onPointerDownOutside: (e) => {
|
|
2207
|
+
const target = e.target;
|
|
2208
|
+
if (target.closest(".kds-bottom-sheet")) e.preventDefault();
|
|
2209
|
+
},
|
|
2210
|
+
children: [
|
|
2211
|
+
showGrabber && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "kds-bottom-sheet-grabber", "aria-hidden": "true" }),
|
|
2212
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2213
|
+
"button",
|
|
2214
|
+
{
|
|
2215
|
+
type: "button",
|
|
2216
|
+
className: "kds-bottom-sheet-close",
|
|
2217
|
+
"aria-label": "Cerrar",
|
|
2218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("i", { className: "material-symbols-outlined", children: "close" })
|
|
2219
|
+
}
|
|
2220
|
+
) }),
|
|
2221
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Title, { className: "kds-bottom-sheet-title", children: title }),
|
|
2222
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Description, { className: "kds-bottom-sheet-description", children: description }),
|
|
2223
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "kds-bottom-sheet-body", children }),
|
|
2224
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "kds-bottom-sheet-actions", children: actions })
|
|
2225
|
+
]
|
|
2226
|
+
}
|
|
2227
|
+
) }) })
|
|
2228
|
+
}
|
|
2229
|
+
)
|
|
2079
2230
|
);
|
|
2080
2231
|
KdsBottomSheet.displayName = "KdsBottomSheet";
|
|
2081
2232
|
|
|
2082
2233
|
// src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
|
|
2083
|
-
var
|
|
2084
|
-
var
|
|
2085
|
-
var KdsSecureFooter = (0,
|
|
2086
|
-
({ variant = "default", children, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2087
|
-
/* @__PURE__ */ (0,
|
|
2088
|
-
children || /* @__PURE__ */ (0,
|
|
2234
|
+
var import_react36 = require("react");
|
|
2235
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2236
|
+
var KdsSecureFooter = (0, import_react36.forwardRef)(
|
|
2237
|
+
({ variant = "default", children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("footer", { ref, className: (0, import_clsx.clsx)("kds-secure-footer", variant === "inside" && "inside", className), ...props, children: [
|
|
2238
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("i", { className: "material-symbols-outlined", children: "lock" }),
|
|
2239
|
+
children || /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: "Pago seguro con Khipu" })
|
|
2089
2240
|
] })
|
|
2090
2241
|
);
|
|
2091
2242
|
KdsSecureFooter.displayName = "KdsSecureFooter";
|
|
2092
2243
|
|
|
2093
2244
|
// src/components/domain/KdsRecapList/KdsRecapList.tsx
|
|
2094
|
-
var
|
|
2095
|
-
var
|
|
2096
|
-
var KdsRecapList = (0,
|
|
2097
|
-
({ items, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2245
|
+
var import_react37 = require("react");
|
|
2246
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2247
|
+
var KdsRecapList = (0, import_react37.forwardRef)(
|
|
2248
|
+
({ items, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { ref, className: (0, import_clsx.clsx)("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("li", { children: [
|
|
2249
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "k", children: item.label }),
|
|
2250
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: (0, import_clsx.clsx)("v", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
|
|
2100
2251
|
] }, i)) })
|
|
2101
2252
|
);
|
|
2102
2253
|
KdsRecapList.displayName = "KdsRecapList";
|
|
2254
|
+
|
|
2255
|
+
// src/components/domain/KdsMontoRow/KdsMontoRow.tsx
|
|
2256
|
+
var import_react38 = require("react");
|
|
2257
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2258
|
+
var KdsMontoRow = (0, import_react38.forwardRef)(
|
|
2259
|
+
({ title, value, deadline, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-monto-row", className), ...props, children: [
|
|
2260
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
|
|
2261
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "kds-monto-row-title", children: title }),
|
|
2262
|
+
deadline && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "kds-monto-row-deadline", children: deadline })
|
|
2263
|
+
] }),
|
|
2264
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "kds-monto-row-value", children: value })
|
|
2265
|
+
] })
|
|
2266
|
+
);
|
|
2267
|
+
KdsMontoRow.displayName = "KdsMontoRow";
|
|
2268
|
+
|
|
2269
|
+
// src/components/domain/KdsMerchantTile/KdsMerchantTile.tsx
|
|
2270
|
+
var import_react39 = require("react");
|
|
2271
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2272
|
+
var KdsMerchantTile = (0, import_react39.forwardRef)(
|
|
2273
|
+
({ name, logoUrl, initials, compact, className, ...props }, ref) => {
|
|
2274
|
+
const displayInitials = (initials ?? name.slice(0, 2)).toUpperCase();
|
|
2275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2276
|
+
"div",
|
|
2277
|
+
{
|
|
2278
|
+
ref,
|
|
2279
|
+
className: (0, import_clsx.clsx)("kds-merchant-tile", logoUrl && "logo", compact && "compact", className),
|
|
2280
|
+
"aria-label": name,
|
|
2281
|
+
...props,
|
|
2282
|
+
children: logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("img", { src: logoUrl, alt: name }) : displayInitials
|
|
2283
|
+
}
|
|
2284
|
+
);
|
|
2285
|
+
}
|
|
2286
|
+
);
|
|
2287
|
+
KdsMerchantTile.displayName = "KdsMerchantTile";
|
|
2288
|
+
|
|
2289
|
+
// src/components/domain/KdsBillAttachment/KdsBillAttachment.tsx
|
|
2290
|
+
var import_react40 = require("react");
|
|
2291
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2292
|
+
var KdsBillAttachment = (0, import_react40.forwardRef)(
|
|
2293
|
+
({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2294
|
+
"a",
|
|
2295
|
+
{
|
|
2296
|
+
ref,
|
|
2297
|
+
href,
|
|
2298
|
+
target: "_blank",
|
|
2299
|
+
rel: "noopener noreferrer",
|
|
2300
|
+
className: (0, import_clsx.clsx)("kds-bill-attachment", className),
|
|
2301
|
+
...props,
|
|
2302
|
+
children: [
|
|
2303
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("i", { className: "material-symbols-outlined", children: icon }),
|
|
2304
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: filename })
|
|
2305
|
+
]
|
|
2306
|
+
}
|
|
2307
|
+
)
|
|
2308
|
+
);
|
|
2309
|
+
KdsBillAttachment.displayName = "KdsBillAttachment";
|
|
2310
|
+
var KdsBillAttachments = (0, import_react40.forwardRef)(
|
|
2311
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-bill-attachments", className), ...props, children })
|
|
2312
|
+
);
|
|
2313
|
+
KdsBillAttachments.displayName = "KdsBillAttachments";
|
|
2103
2314
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2104
2315
|
0 && (module.exports = {
|
|
2105
2316
|
KdsAccordion,
|
|
@@ -2109,6 +2320,8 @@ KdsRecapList.displayName = "KdsRecapList";
|
|
|
2109
2320
|
KdsBankList,
|
|
2110
2321
|
KdsBankModal,
|
|
2111
2322
|
KdsBankRow,
|
|
2323
|
+
KdsBillAttachment,
|
|
2324
|
+
KdsBillAttachments,
|
|
2112
2325
|
KdsBottomSheet,
|
|
2113
2326
|
KdsButton,
|
|
2114
2327
|
KdsCard,
|
|
@@ -2126,12 +2339,8 @@ KdsRecapList.displayName = "KdsRecapList";
|
|
|
2126
2339
|
KdsExpandPanel,
|
|
2127
2340
|
KdsInvoiceSticky,
|
|
2128
2341
|
KdsLinearProgress,
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
KdsLogoHeaderCode,
|
|
2132
|
-
KdsLogoHeaderLogo,
|
|
2133
|
-
KdsLogoHeaderSeparator,
|
|
2134
|
-
KdsModal,
|
|
2342
|
+
KdsMerchantTile,
|
|
2343
|
+
KdsMontoRow,
|
|
2135
2344
|
KdsQrRow,
|
|
2136
2345
|
KdsRadioGroup,
|
|
2137
2346
|
KdsRecapList,
|