@khipu/design-system 0.2.0-alpha.4 → 0.2.0-alpha.41

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/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,17 +56,15 @@ __export(index_exports, {
54
56
  KdsExpandPanel: () => KdsExpandPanel,
55
57
  KdsInvoiceSticky: () => KdsInvoiceSticky,
56
58
  KdsLinearProgress: () => KdsLinearProgress,
57
- KdsLogoHeader: () => KdsLogoHeader,
58
- KdsLogoHeaderCloseButton: () => KdsLogoHeaderCloseButton,
59
- KdsLogoHeaderCode: () => KdsLogoHeaderCode,
60
- KdsLogoHeaderLogo: () => KdsLogoHeaderLogo,
61
- KdsLogoHeaderSeparator: () => KdsLogoHeaderSeparator,
62
- KdsModal: () => KdsModal,
59
+ KdsMerchantTile: () => KdsMerchantTile,
60
+ KdsMontoRow: () => KdsMontoRow,
61
+ KdsPaymentTotal: () => KdsPaymentTotal,
63
62
  KdsQrRow: () => KdsQrRow,
64
63
  KdsRadioGroup: () => KdsRadioGroup,
65
64
  KdsRecapList: () => KdsRecapList,
66
65
  KdsSectionNote: () => KdsSectionNote,
67
66
  KdsSecureFooter: () => KdsSecureFooter,
67
+ KdsSecureLoader: () => KdsSecureLoader,
68
68
  KdsSegmentedTabs: () => KdsSegmentedTabs,
69
69
  KdsSelect: () => KdsSelect,
70
70
  KdsSnackbar: () => KdsSnackbar,
@@ -454,6 +454,8 @@ var semanticColors = {
454
454
  // From Figma: warning/light
455
455
  dark: "#E65100",
456
456
  // From Figma: warning/dark
457
+ warm: "#8A6D1A",
458
+ // Warm/olive variant for header icons (LigoPay handoff v2)
457
459
  container: "#FFFBEB",
458
460
  // Light amber background for chips/badges
459
461
  contrastText: "#FFFFFF"
@@ -472,6 +474,8 @@ var semanticColors = {
472
474
  main: "#0288D1",
473
475
  light: "#03A9F4",
474
476
  dark: "#01579B",
477
+ blue: "#5A5FE0",
478
+ // Khipu-blue / LigoPay informational blue (distinct from cyan main)
475
479
  container: "#EFF6FF",
476
480
  // Light blue background for chips/badges
477
481
  contrastText: "#FFFFFF"
@@ -514,8 +518,10 @@ var fontSizes = {
514
518
  // 24px
515
519
  "3xl": "1.875rem",
516
520
  // 30px
517
- "4xl": "2.25rem"
521
+ "4xl": "2.25rem",
518
522
  // 36px
523
+ decimalSup: "0.5em"
524
+ // Relative size for decimal superscript in amount displays
519
525
  };
520
526
  var lineHeights = {
521
527
  tight: 1.2,
@@ -1147,7 +1153,7 @@ var KdsButton = (0, import_react.forwardRef)(
1147
1153
  children: [
1148
1154
  !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
1155
  loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
1150
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "loader small" }),
1156
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("progress", { className: "circle indeterminate small" }),
1151
1157
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children })
1152
1158
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children }),
1153
1159
  !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 +1175,13 @@ var KdsTextField = (0, import_react2.forwardRef)(
1169
1175
  readOnly,
1170
1176
  startIcon,
1171
1177
  endIcon,
1178
+ required,
1172
1179
  className,
1173
1180
  id,
1174
1181
  ...props
1175
1182
  }, ref) => {
1176
1183
  const fieldId = id || `kds-field-${label.toLowerCase().replace(/\s+/g, "-")}`;
1184
+ const hasSuffix = !!endIcon || readOnly;
1177
1185
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1178
1186
  "div",
1179
1187
  {
@@ -1181,6 +1189,8 @@ var KdsTextField = (0, import_react2.forwardRef)(
1181
1189
  "field",
1182
1190
  "label",
1183
1191
  "border",
1192
+ startIcon && "prefix",
1193
+ hasSuffix && "suffix",
1184
1194
  error && "invalid",
1185
1195
  readOnly && "locked",
1186
1196
  fullWidth && "kds-w-full",
@@ -1193,12 +1203,16 @@ var KdsTextField = (0, import_react2.forwardRef)(
1193
1203
  {
1194
1204
  ref,
1195
1205
  id: fieldId,
1196
- placeholder: " ",
1197
1206
  readOnly,
1198
- ...props
1207
+ required,
1208
+ ...props,
1209
+ placeholder: " "
1199
1210
  }
1200
1211
  ),
1201
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { htmlFor: fieldId, children: label }),
1212
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { htmlFor: fieldId, children: [
1213
+ label,
1214
+ required && " *"
1215
+ ] }),
1202
1216
  readOnly && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("i", { className: "material-symbols-outlined", children: "lock" }),
1203
1217
  endIcon && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("i", { className: "material-symbols-outlined", children: endIcon }),
1204
1218
  helperText && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "helper", children: helperText })
@@ -1213,78 +1227,18 @@ KdsTextField.displayName = "KdsTextField";
1213
1227
  var import_react3 = require("react");
1214
1228
  var import_jsx_runtime4 = require("react/jsx-runtime");
1215
1229
  var KdsCheckbox = (0, import_react3.forwardRef)(
1216
- ({ label, className, id, ...props }, ref) => {
1217
- const fieldId = id || `kds-cb-${label?.toLowerCase().replace(/\s+/g, "-") || "check"}`;
1218
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { className: (0, import_clsx.clsx)("field", className), htmlFor: fieldId, children: [
1219
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", { ref, type: "checkbox", id: fieldId, ...props }),
1220
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: label })
1221
- ] });
1222
- }
1230
+ ({ label, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { className: (0, import_clsx.clsx)("checkbox", className), children: [
1231
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", { ref, type: "checkbox", ...props }),
1232
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: label })
1233
+ ] })
1223
1234
  );
1224
1235
  KdsCheckbox.displayName = "KdsCheckbox";
1225
1236
 
1226
- // src/components/core/KdsModal/KdsModal.tsx
1237
+ // src/components/core/KdsCard/KdsCard.tsx
1227
1238
  var import_react4 = require("react");
1228
- var Dialog = __toESM(require("@radix-ui/react-dialog"));
1229
1239
  var import_jsx_runtime5 = require("react/jsx-runtime");
1230
- var KdsModal = (0, import_react4.forwardRef)(
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)(
1240
+ var KdsCard = (0, import_react4.forwardRef)(
1241
+ ({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1288
1242
  "article",
1289
1243
  {
1290
1244
  ref,
@@ -1299,30 +1253,64 @@ var KdsCard = (0, import_react5.forwardRef)(
1299
1253
  )
1300
1254
  );
1301
1255
  KdsCard.displayName = "KdsCard";
1302
- var KdsCardHeader = (0, import_react5.forwardRef)(
1303
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-header", className), ...props, children })
1256
+ var KdsCardHeader = (0, import_react4.forwardRef)(
1257
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-header", className), ...props, children })
1304
1258
  );
1305
1259
  KdsCardHeader.displayName = "KdsCardHeader";
1306
- var KdsCardBody = (0, import_react5.forwardRef)(
1307
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-body", className), ...props, children })
1260
+ var KdsCardBody = (0, import_react4.forwardRef)(
1261
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-body", className), ...props, children })
1308
1262
  );
1309
1263
  KdsCardBody.displayName = "KdsCardBody";
1310
- var KdsCardFooter = (0, import_react5.forwardRef)(
1311
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-footer", className), ...props, children })
1264
+ var KdsCardFooter = (0, import_react4.forwardRef)(
1265
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-footer", className), ...props, children })
1312
1266
  );
1313
1267
  KdsCardFooter.displayName = "KdsCardFooter";
1314
1268
 
1315
1269
  // src/components/core/KdsSpinner/KdsSpinner.tsx
1270
+ var import_react5 = require("react");
1271
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1272
+ var SIZE_CLASS = {
1273
+ small: "small",
1274
+ medium: null,
1275
+ large: "large"
1276
+ };
1277
+ var KdsSpinner = (0, import_react5.forwardRef)(
1278
+ ({ size = "medium", label, className, ...props }, ref) => {
1279
+ const sizeClass = SIZE_CLASS[size];
1280
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1281
+ "div",
1282
+ {
1283
+ ref,
1284
+ className: (0, import_clsx.clsx)("kds-flex kds-flex-col kds-items-center kds-gap-2", className),
1285
+ role: "status",
1286
+ ...props,
1287
+ children: [
1288
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("progress", { className: (0, import_clsx.clsx)("circle indeterminate", sizeClass) }),
1289
+ label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "kds-text-body-small kds-text-muted", children: label }),
1290
+ !label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "kds-hidden", children: "Cargando" })
1291
+ ]
1292
+ }
1293
+ );
1294
+ }
1295
+ );
1296
+ KdsSpinner.displayName = "KdsSpinner";
1297
+
1298
+ // src/components/core/KdsSecureLoader/KdsSecureLoader.tsx
1316
1299
  var import_react6 = require("react");
1317
1300
  var import_jsx_runtime7 = require("react/jsx-runtime");
1318
- var KdsSpinner = (0, import_react6.forwardRef)(
1319
- ({ size = "medium", label, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-flex kds-flex-col kds-items-center kds-gap-2", className), role: "status", ...props, children: [
1320
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: (0, import_clsx.clsx)("loader", size) }),
1321
- label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "kds-text-body-small kds-text-muted", children: label }),
1322
- !label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "kds-hidden", children: "Cargando" })
1301
+ var KdsSecureLoader = (0, import_react6.forwardRef)(
1302
+ ({ title, message, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-secure-loader", className), role: "status", "aria-busy": "true", ...props, children: [
1303
+ (title || message) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kds-secure-loader-text", children: [
1304
+ title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "kds-secure-loader-title", children: title }),
1305
+ message && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "kds-secure-loader-message", children: message })
1306
+ ] }),
1307
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kds-secure-loader-spinner", children: [
1308
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { className: "kds-secure-loader-ring", viewBox: "22 22 44 44", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "44", cy: "44", r: "20.2" }) }),
1309
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("i", { className: "material-symbols-outlined kds-secure-loader-lock", "aria-hidden": "true", children: "lock" })
1310
+ ] })
1323
1311
  ] })
1324
1312
  );
1325
- KdsSpinner.displayName = "KdsSpinner";
1313
+ KdsSecureLoader.displayName = "KdsSecureLoader";
1326
1314
 
1327
1315
  // src/components/core/KdsLinearProgress/KdsLinearProgress.tsx
1328
1316
  var import_react7 = require("react");
@@ -1335,24 +1323,42 @@ KdsLinearProgress.displayName = "KdsLinearProgress";
1335
1323
  // src/components/core/KdsAlert/KdsAlert.tsx
1336
1324
  var import_react8 = require("react");
1337
1325
  var import_jsx_runtime9 = require("react/jsx-runtime");
1326
+ var DEFAULT_ICONS = {
1327
+ success: "check_circle",
1328
+ info: "info",
1329
+ warning: "warning",
1330
+ error: "error"
1331
+ };
1338
1332
  var KdsAlert = (0, import_react8.forwardRef)(
1339
- ({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1340
- "div",
1341
- {
1342
- ref,
1343
- role: "alert",
1344
- className: (0, import_clsx.clsx)("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
1345
- ...props,
1346
- children: [
1347
- icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "kds-alert-icon", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
1348
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "kds-alert-content", children: [
1349
- title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "kds-alert-title", children: title }),
1350
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "kds-alert-description", children })
1351
- ] }),
1352
- onClose && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "kds-btn kds-btn-text kds-btn-sm", onClick: onClose, "aria-label": "Cerrar", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: "material-symbols-outlined", children: "close" }) })
1353
- ]
1354
- }
1355
- )
1333
+ ({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => {
1334
+ const resolvedIcon = icon === false ? null : typeof icon === "string" ? icon : DEFAULT_ICONS[severity];
1335
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1336
+ "div",
1337
+ {
1338
+ ref,
1339
+ role: "alert",
1340
+ className: (0, import_clsx.clsx)("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
1341
+ ...props,
1342
+ children: [
1343
+ resolvedIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "kds-alert-icon", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: "material-symbols-outlined", children: resolvedIcon }) }),
1344
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "kds-alert-content", children: [
1345
+ title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "kds-alert-title", children: title }),
1346
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "kds-alert-description", children })
1347
+ ] }),
1348
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1349
+ "button",
1350
+ {
1351
+ type: "button",
1352
+ className: "kds-alert-close",
1353
+ onClick: onClose,
1354
+ "aria-label": "Cerrar",
1355
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: "material-symbols-outlined", children: "close" })
1356
+ }
1357
+ )
1358
+ ]
1359
+ }
1360
+ );
1361
+ }
1356
1362
  );
1357
1363
  KdsAlert.displayName = "KdsAlert";
1358
1364
 
@@ -1421,23 +1427,23 @@ function useTabsKeyboard(tabCount, activeIndex, onChange) {
1421
1427
  // src/components/core/KdsTabs/KdsTabs.tsx
1422
1428
  var import_jsx_runtime11 = require("react/jsx-runtime");
1423
1429
  var KdsTabs = (0, import_react11.forwardRef)(
1424
- ({ activeIndex, onChange, variant = "standard", children, className, style, ...props }, ref) => {
1430
+ ({ activeIndex, onChange, children, className, style, ...props }, ref) => {
1425
1431
  const tabCount = import_react11.Children.count(children);
1426
1432
  const { onKeyDown } = useTabsKeyboard(tabCount, activeIndex, onChange);
1427
- const mergedStyle = (0, import_react11.useMemo)(() => {
1428
- if (variant !== "segmented") return style;
1429
- return {
1433
+ const mergedStyle = (0, import_react11.useMemo)(
1434
+ () => ({
1430
1435
  ...style,
1431
1436
  "--_tab-count": tabCount,
1432
1437
  "--_active-idx": activeIndex
1433
- };
1434
- }, [variant, tabCount, activeIndex, style]);
1438
+ }),
1439
+ [tabCount, activeIndex, style]
1440
+ );
1435
1441
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1436
1442
  "div",
1437
1443
  {
1438
1444
  ref,
1439
1445
  role: "tablist",
1440
- className: (0, import_clsx.clsx)(variant === "segmented" ? "kds-segmented-tabs" : "kds-tabs", className),
1446
+ className: (0, import_clsx.clsx)("kds-segmented-tabs", className),
1441
1447
  style: mergedStyle,
1442
1448
  onKeyDown,
1443
1449
  ...props,
@@ -1458,6 +1464,7 @@ var KdsTab = (0, import_react11.forwardRef)(
1458
1464
  "button",
1459
1465
  {
1460
1466
  ref,
1467
+ type: "button",
1461
1468
  role: "tab",
1462
1469
  "aria-selected": _active,
1463
1470
  tabIndex: _active ? 0 : -1,
@@ -1484,103 +1491,14 @@ var KdsTabPanel = (0, import_react11.forwardRef)(
1484
1491
  );
1485
1492
  KdsTabPanel.displayName = "KdsTabPanel";
1486
1493
 
1487
- // src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
1494
+ // src/components/core/KdsRadioGroup/KdsRadioGroup.tsx
1488
1495
  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
1496
  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
- // src/components/core/KdsRadioGroup/KdsRadioGroup.tsx
1577
- var import_react13 = require("react");
1578
- var import_jsx_runtime13 = require("react/jsx-runtime");
1579
- var KdsRadioGroup = (0, import_react13.forwardRef)(
1580
- ({ label, name, options, value, onChange, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("fieldset", { ref, className: (0, import_clsx.clsx)("kds-radio-group", className), ...props, children: [
1581
- label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("legend", { children: label }),
1582
- options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "field", children: [
1583
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1497
+ var KdsRadioGroup = (0, import_react12.forwardRef)(
1498
+ ({ label, name, options, value, onChange, size, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("fieldset", { ref, className: (0, import_clsx.clsx)("kds-radio-group", className), ...props, children: [
1499
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("legend", { children: label }),
1500
+ options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: (0, import_clsx.clsx)("radio", size), children: [
1501
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1584
1502
  "input",
1585
1503
  {
1586
1504
  type: "radio",
@@ -1591,86 +1509,105 @@ var KdsRadioGroup = (0, import_react13.forwardRef)(
1591
1509
  onChange: () => onChange?.(opt.value)
1592
1510
  }
1593
1511
  ),
1594
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: opt.label })
1512
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: opt.label })
1595
1513
  ] }, opt.value))
1596
1514
  ] })
1597
1515
  );
1598
1516
  KdsRadioGroup.displayName = "KdsRadioGroup";
1599
1517
 
1600
1518
  // src/components/core/KdsSelect/KdsSelect.tsx
1601
- var import_react14 = require("react");
1602
- var Select = __toESM(require("@radix-ui/react-select"));
1603
- var import_jsx_runtime14 = require("react/jsx-runtime");
1604
- var KdsSelectRoot = (0, import_react14.forwardRef)(
1519
+ var import_react13 = require("react");
1520
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1521
+ var KdsSelect = (0, import_react13.forwardRef)(
1605
1522
  ({
1606
- value,
1607
- onValueChange,
1608
- placeholder,
1609
1523
  label,
1610
- error,
1524
+ options,
1525
+ placeholder,
1611
1526
  helperText,
1612
- disabled,
1527
+ error,
1528
+ prefixIcon,
1613
1529
  fullWidth = true,
1614
- children,
1615
- className
1616
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1617
- "div",
1618
- {
1619
- ref,
1620
- className: (0, import_clsx.clsx)(
1621
- "kds-select",
1622
- error && "kds-select-error",
1623
- fullWidth && "kds-select-full",
1624
- className
1625
- ),
1626
- children: [
1627
- label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { className: "kds-select-label", children: label }),
1628
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Select.Root, { value, onValueChange, disabled, children: [
1629
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Select.Trigger, { className: "kds-select-trigger", children: [
1630
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Value, { placeholder }),
1631
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Icon, { className: "kds-select-icon", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { className: "material-symbols-outlined", children: "expand_more" }) })
1530
+ disabled,
1531
+ required,
1532
+ className,
1533
+ id,
1534
+ ...props
1535
+ }, ref) => {
1536
+ const fieldId = id || `kds-select-${label.toLowerCase().replace(/\s+/g, "-")}`;
1537
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1538
+ "div",
1539
+ {
1540
+ className: (0, import_clsx.clsx)(
1541
+ "field",
1542
+ "label",
1543
+ "border",
1544
+ prefixIcon && "prefix",
1545
+ error && "invalid",
1546
+ fullWidth && "kds-w-full",
1547
+ className
1548
+ ),
1549
+ children: [
1550
+ prefixIcon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { className: "material-symbols-outlined", children: prefixIcon }),
1551
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1552
+ "select",
1553
+ {
1554
+ ref,
1555
+ id: fieldId,
1556
+ disabled,
1557
+ required,
1558
+ ...props,
1559
+ children: [
1560
+ placeholder !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: placeholder }),
1561
+ options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
1562
+ ]
1563
+ }
1564
+ ),
1565
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { htmlFor: fieldId, children: [
1566
+ label,
1567
+ required && " *"
1632
1568
  ] }),
1633
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Content, { className: "kds-select-content", position: "popper", sideOffset: 4, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Select.Viewport, { className: "kds-select-viewport", children }) }) })
1634
- ] }),
1635
- helperText && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: (0, import_clsx.clsx)("kds-select-helper", error && "kds-select-helper-error"), children: helperText })
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
- ] })
1569
+ helperText && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "helper", children: helperText })
1570
+ ]
1571
+ }
1572
+ );
1573
+ }
1646
1574
  );
1647
- KdsSelectItem.displayName = "KdsSelect.Item";
1648
- var KdsSelect = Object.assign(KdsSelectRoot, {
1649
- Item: KdsSelectItem
1650
- });
1575
+ KdsSelect.displayName = "KdsSelect";
1651
1576
 
1652
1577
  // src/components/core/KdsChip/KdsChip.tsx
1653
- var import_react15 = require("react");
1654
- var import_jsx_runtime15 = require("react/jsx-runtime");
1655
- var KdsChip = (0, import_react15.forwardRef)(
1656
- ({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { ref, className: (0, import_clsx.clsx)("kds-badge", color, className), ...props, children: [
1657
- icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", { className: "material-symbols-outlined", children: icon }),
1658
- children,
1659
- onDelete && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "kds-btn kds-btn-text kds-btn-sm", onClick: onDelete, "aria-label": "Eliminar", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", { className: "material-symbols-outlined", children: "close" }) })
1578
+ var import_react14 = require("react");
1579
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1580
+ var KdsChip = (0, import_react14.forwardRef)(
1581
+ ({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { ref, className: (0, import_clsx.clsx)("kds-badge", color, className), ...props, children: [
1582
+ icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { className: "material-symbols-outlined", children: icon }),
1583
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children }),
1584
+ onDelete && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1585
+ "button",
1586
+ {
1587
+ type: "button",
1588
+ className: "kds-badge-close",
1589
+ onClick: (e) => {
1590
+ e.stopPropagation();
1591
+ onDelete();
1592
+ },
1593
+ "aria-label": "Eliminar",
1594
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { className: "material-symbols-outlined", children: "close" })
1595
+ }
1596
+ )
1660
1597
  ] })
1661
1598
  );
1662
1599
  KdsChip.displayName = "KdsChip";
1663
1600
 
1664
1601
  // src/components/core/KdsSnackbar/KdsSnackbar.tsx
1665
- var import_react17 = require("react");
1602
+ var import_react16 = require("react");
1666
1603
 
1667
1604
  // src/components/core/hooks/useAutoHide.ts
1668
- var import_react16 = require("react");
1605
+ var import_react15 = require("react");
1669
1606
  function useAutoHide(durationMs, onHide) {
1670
- const [visible, setVisible] = (0, import_react16.useState)(true);
1671
- const onHideRef = (0, import_react16.useRef)(onHide);
1607
+ const [visible, setVisible] = (0, import_react15.useState)(true);
1608
+ const onHideRef = (0, import_react15.useRef)(onHide);
1672
1609
  onHideRef.current = onHide;
1673
- (0, import_react16.useEffect)(() => {
1610
+ (0, import_react15.useEffect)(() => {
1674
1611
  if (durationMs <= 0) return;
1675
1612
  const timer = setTimeout(() => {
1676
1613
  setVisible(false);
@@ -1682,22 +1619,61 @@ function useAutoHide(durationMs, onHide) {
1682
1619
  }
1683
1620
 
1684
1621
  // src/components/core/KdsSnackbar/KdsSnackbar.tsx
1685
- var import_jsx_runtime16 = require("react/jsx-runtime");
1686
- var KdsSnackbar = (0, import_react17.forwardRef)(
1687
- ({ message, type, duration = 5e3, onClose, open = true, className, ...props }, ref) => {
1688
- const { visible } = useAutoHide(duration, onClose);
1622
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1623
+ var DEFAULT_ICONS2 = {
1624
+ info: "info",
1625
+ success: "check_circle",
1626
+ error: "error"
1627
+ };
1628
+ var KdsSnackbar = (0, import_react16.forwardRef)(
1629
+ ({
1630
+ message,
1631
+ type = "info",
1632
+ duration = 5e3,
1633
+ onClose,
1634
+ open = true,
1635
+ icon,
1636
+ className,
1637
+ style,
1638
+ ...props
1639
+ }, ref) => {
1640
+ const autoDismiss = duration > 0;
1641
+ const { visible } = useAutoHide(autoDismiss ? duration : 0, onClose);
1689
1642
  if (!open || !visible) return null;
1690
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { ref, role: "status", className: (0, import_clsx.clsx)("snackbar", "active", type, className), ...props, children: [
1691
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: message }),
1692
- onClose && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { onClick: onClose, "aria-label": "Cerrar", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", { className: "material-symbols-outlined", children: "close" }) })
1693
- ] });
1643
+ const resolvedIcon = icon === false ? null : icon ?? DEFAULT_ICONS2[type];
1644
+ const mergedStyle = autoDismiss ? { ...style, ["--kds-snackbar-duration"]: `${duration}ms` } : style ?? {};
1645
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1646
+ "div",
1647
+ {
1648
+ ref,
1649
+ role: "status",
1650
+ className: (0, import_clsx.clsx)("snackbar", "active", type, className),
1651
+ "data-auto-dismiss": autoDismiss ? "true" : void 0,
1652
+ style: mergedStyle,
1653
+ ...props,
1654
+ children: [
1655
+ resolvedIcon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", { className: "material-symbols-outlined", children: resolvedIcon }),
1656
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "max", children: message }),
1657
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1658
+ "button",
1659
+ {
1660
+ type: "button",
1661
+ className: "kds-snackbar-close",
1662
+ onClick: onClose,
1663
+ "aria-label": "Cerrar",
1664
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", { className: "material-symbols-outlined", children: "close" })
1665
+ }
1666
+ )
1667
+ ]
1668
+ }
1669
+ );
1694
1670
  }
1695
1671
  );
1696
1672
  KdsSnackbar.displayName = "KdsSnackbar";
1697
1673
 
1698
1674
  // src/components/core/KdsTooltip/KdsTooltip.tsx
1699
1675
  var Tooltip = __toESM(require("@radix-ui/react-tooltip"));
1700
- var import_jsx_runtime17 = require("react/jsx-runtime");
1676
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1701
1677
  function KdsTooltip({
1702
1678
  content,
1703
1679
  children,
@@ -1708,86 +1684,102 @@ function KdsTooltip({
1708
1684
  onOpenChange,
1709
1685
  delayDuration = 300
1710
1686
  }) {
1711
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
1712
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip.Trigger, { asChild: true, children }),
1713
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Tooltip.Content, { className: (0, import_clsx.clsx)("kds-tooltip", className), side: placement, sideOffset: 4, children: [
1714
- content,
1715
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Tooltip.Arrow, { className: "kds-tooltip-arrow" })
1716
- ] }) })
1687
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
1688
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tooltip.Trigger, { asChild: true, children }),
1689
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1690
+ Tooltip.Content,
1691
+ {
1692
+ className: (0, import_clsx.clsx)("kds-tooltip", className),
1693
+ side: placement,
1694
+ sideOffset: 6,
1695
+ collisionPadding: 8,
1696
+ children: [
1697
+ content,
1698
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tooltip.Arrow, { className: "kds-tooltip-arrow", width: 10, height: 5 })
1699
+ ]
1700
+ }
1701
+ ) })
1717
1702
  ] }) });
1718
1703
  }
1719
1704
 
1720
1705
  // src/components/core/KdsAccordion/KdsAccordion.tsx
1721
- var import_react18 = require("react");
1722
- var import_jsx_runtime18 = require("react/jsx-runtime");
1723
- var KdsAccordion = (0, import_react18.forwardRef)(
1724
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("details", { ref, className: (0, import_clsx.clsx)("kds-accordion", className), ...props, children })
1706
+ var import_react17 = require("react");
1707
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1708
+ var KdsAccordion = (0, import_react17.forwardRef)(
1709
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("details", { ref, className: (0, import_clsx.clsx)("kds-accordion", className), ...props, children })
1725
1710
  );
1726
1711
  KdsAccordion.displayName = "KdsAccordion";
1727
- var KdsAccordionSummary = (0, import_react18.forwardRef)(
1728
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("summary", { ref, className: (0, import_clsx.clsx)("kds-accordion-summary", className), ...props, children: [
1712
+ var KdsAccordionSummary = (0, import_react17.forwardRef)(
1713
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("summary", { ref, className: (0, import_clsx.clsx)("kds-accordion-summary", className), ...props, children: [
1729
1714
  children,
1730
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("i", { className: "material-symbols-outlined", children: "expand_more" })
1715
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("i", { className: "material-symbols-outlined", children: "expand_more" })
1731
1716
  ] })
1732
1717
  );
1733
1718
  KdsAccordionSummary.displayName = "KdsAccordionSummary";
1734
- var KdsAccordionDetails = (0, import_react18.forwardRef)(
1735
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-accordion-details", className), ...props, children })
1719
+ var KdsAccordionDetails = (0, import_react17.forwardRef)(
1720
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-accordion-details", className), ...props, children })
1736
1721
  );
1737
1722
  KdsAccordionDetails.displayName = "KdsAccordionDetails";
1738
1723
 
1739
1724
  // src/components/core/KdsDivider/KdsDivider.tsx
1740
- var import_react19 = require("react");
1741
- var import_jsx_runtime19 = require("react/jsx-runtime");
1742
- var KdsDivider = (0, import_react19.forwardRef)(
1743
- ({ dashed, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("hr", { ref, className: (0, import_clsx.clsx)(dashed ? "kds-hr-dashed" : "kds-hr", className), ...props })
1725
+ var import_react18 = require("react");
1726
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1727
+ var KdsDivider = (0, import_react18.forwardRef)(
1728
+ ({ dashed, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", { ref, className: (0, import_clsx.clsx)(dashed ? "kds-hr-dashed" : "kds-hr", className), ...props })
1744
1729
  );
1745
1730
  KdsDivider.displayName = "KdsDivider";
1746
1731
 
1747
1732
  // src/components/core/KdsSectionNote/KdsSectionNote.tsx
1748
- var import_react20 = require("react");
1749
- var import_jsx_runtime20 = require("react/jsx-runtime");
1750
- var KdsSectionNote = (0, import_react20.forwardRef)(
1751
- ({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { ref, className: (0, import_clsx.clsx)("kds-section-note", className), ...props, children: [
1752
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { className: "material-symbols-outlined", children: icon }),
1753
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children })
1733
+ var import_react19 = require("react");
1734
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1735
+ var KdsSectionNote = (0, import_react19.forwardRef)(
1736
+ ({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { ref, className: (0, import_clsx.clsx)("kds-section-note", className), ...props, children: [
1737
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { className: "material-symbols-outlined", children: icon }),
1738
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children })
1754
1739
  ] })
1755
1740
  );
1756
1741
  KdsSectionNote.displayName = "KdsSectionNote";
1757
1742
 
1758
1743
  // src/components/core/KdsStatusBlock/KdsStatusBlock.tsx
1759
- var import_react21 = require("react");
1760
- var import_jsx_runtime21 = require("react/jsx-runtime");
1761
- var KdsStatusBlock = (0, import_react21.forwardRef)(
1762
- ({ status, icon, title, description, inline, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-status-block", inline && "inline", className), "data-status": status, ...props, children: [
1763
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
1764
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
1765
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { className: "kds-status-block-title", children: title }),
1766
- description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "kds-status-block-description", children: description })
1744
+ var import_react20 = require("react");
1745
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1746
+ var KdsStatusBlock = (0, import_react20.forwardRef)(
1747
+ ({ status, icon, title, description, inline, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-status-block", inline && "inline", className), "data-status": status, ...props, children: [
1748
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
1749
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
1750
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "kds-status-block-title", children: title }),
1751
+ description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "kds-status-block-description", children: description })
1767
1752
  ] })
1768
1753
  ] })
1769
1754
  );
1770
1755
  KdsStatusBlock.displayName = "KdsStatusBlock";
1771
1756
 
1772
1757
  // src/components/core/KdsStepper/KdsStepper.tsx
1773
- var import_react22 = require("react");
1774
- var import_jsx_runtime22 = require("react/jsx-runtime");
1775
- var KdsStepper = (0, import_react22.forwardRef)(
1776
- ({ steps, current, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-stepper", className), "data-steps": steps, "data-current": current, ...props, children: Array.from({ length: steps }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_clsx.clsx)("kds-step", i < current && "completed", i === current && "current"), children: [
1777
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "kds-step-indicator", children: i < current ? "\u2713" : i + 1 }),
1778
- i < steps - 1 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "kds-step-line" })
1779
- ] }, i)) })
1758
+ var import_react21 = require("react");
1759
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1760
+ var KdsStepper = (0, import_react21.forwardRef)(
1761
+ ({ steps, current, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-stepper", className), ...props, children: steps.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1762
+ "div",
1763
+ {
1764
+ className: (0, import_clsx.clsx)("kds-step", i < current && "completed", i === current && "current"),
1765
+ children: [
1766
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "kds-step-indicator" }),
1767
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "kds-step-label", children: label })
1768
+ ]
1769
+ },
1770
+ `${i}-${label}`
1771
+ )) })
1780
1772
  );
1781
1773
  KdsStepper.displayName = "KdsStepper";
1782
1774
 
1783
1775
  // src/components/core/KdsCopyRow/KdsCopyRow.tsx
1784
- var import_react24 = require("react");
1776
+ var import_react23 = require("react");
1785
1777
 
1786
1778
  // src/components/core/hooks/useCopyToClipboard.ts
1787
- var import_react23 = require("react");
1779
+ var import_react22 = require("react");
1788
1780
  function useCopyToClipboard(resetMs = 1200) {
1789
- const [copied, setCopied] = (0, import_react23.useState)(false);
1790
- const copy = (0, import_react23.useCallback)(
1781
+ const [copied, setCopied] = (0, import_react22.useState)(false);
1782
+ const copy = (0, import_react22.useCallback)(
1791
1783
  async (text) => {
1792
1784
  try {
1793
1785
  await navigator.clipboard.writeText(text);
@@ -1802,73 +1794,218 @@ function useCopyToClipboard(resetMs = 1200) {
1802
1794
  }
1803
1795
 
1804
1796
  // src/components/core/KdsCopyRow/KdsCopyRow.tsx
1805
- var import_jsx_runtime23 = require("react/jsx-runtime");
1806
- var KdsCopyRow = (0, import_react24.forwardRef)(
1807
- ({ label, value, className, ...props }, ref) => {
1797
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1798
+ var KdsCopyRow = (0, import_react23.forwardRef)(
1799
+ ({ label, value, copiedText = "Copiado", className, ...props }, ref) => {
1808
1800
  const { copied, copy } = useCopyToClipboard();
1809
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-copy-row", copied && "copied", className), ...props, children: [
1810
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "kds-copy-row-label", children: label }),
1811
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "kds-copy-row-value", children: value }),
1812
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "kds-copy-row-btn", onClick: () => copy(value), "aria-label": `Copiar ${label}`, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("i", { className: "material-symbols-outlined", children: copied ? "check" : "content_copy" }) })
1813
- ] });
1801
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1802
+ "button",
1803
+ {
1804
+ ref,
1805
+ type: "button",
1806
+ className: (0, import_clsx.clsx)("kds-copy-row", copied && "copied", className),
1807
+ "data-copy": value,
1808
+ onClick: () => copy(value),
1809
+ "aria-label": `Copiar ${label}: ${value}`,
1810
+ ...props,
1811
+ children: [
1812
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "content_copy" }),
1813
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
1814
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "kds-copy-row-label", children: label }),
1815
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "kds-copy-row-value", children: value })
1816
+ ] }),
1817
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "kds-copy-toast", "aria-hidden": "true", children: [
1818
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("i", { className: "material-symbols-outlined", children: "check_circle" }),
1819
+ " ",
1820
+ copiedText
1821
+ ] })
1822
+ ]
1823
+ }
1824
+ );
1814
1825
  }
1815
1826
  );
1816
1827
  KdsCopyRow.displayName = "KdsCopyRow";
1817
1828
 
1818
1829
  // src/components/core/KdsCopyableTable/KdsCopyableTable.tsx
1819
- var import_react25 = require("react");
1820
- var import_jsx_runtime24 = require("react/jsx-runtime");
1821
- var KdsCopyableTable = (0, import_react25.forwardRef)(
1822
- ({ rows, className, ...props }, ref) => {
1823
- const { copied, copy } = useCopyToClipboard();
1824
- const handleCopyAll = () => {
1830
+ var import_react24 = require("react");
1831
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1832
+ async function copyToClipboard(text) {
1833
+ try {
1834
+ if (navigator.clipboard?.writeText) {
1835
+ await navigator.clipboard.writeText(text);
1836
+ return true;
1837
+ }
1838
+ } catch {
1839
+ }
1840
+ const ta = document.createElement("textarea");
1841
+ ta.value = text;
1842
+ ta.style.position = "fixed";
1843
+ ta.style.opacity = "0";
1844
+ document.body.appendChild(ta);
1845
+ ta.select();
1846
+ try {
1847
+ document.execCommand("copy");
1848
+ return true;
1849
+ } catch {
1850
+ return false;
1851
+ } finally {
1852
+ document.body.removeChild(ta);
1853
+ }
1854
+ }
1855
+ var TRANSITION_MS = 300;
1856
+ var KdsCopyableTable = (0, import_react24.forwardRef)(
1857
+ ({
1858
+ rows,
1859
+ copyAllLabel = "Copiar todos los datos",
1860
+ copiedAllLabel = "Datos copiados",
1861
+ showCopyAll = true,
1862
+ className,
1863
+ ...props
1864
+ }, ref) => {
1865
+ const copiedTimers = (0, import_react24.useRef)(/* @__PURE__ */ new Map());
1866
+ const settlingTimers = (0, import_react24.useRef)(/* @__PURE__ */ new Map());
1867
+ const [copiedRows, setCopiedRows] = (0, import_react24.useState)(/* @__PURE__ */ new Set());
1868
+ const [settlingRows, setSettlingRows] = (0, import_react24.useState)(/* @__PURE__ */ new Set());
1869
+ const [allCopied, setAllCopied] = (0, import_react24.useState)(false);
1870
+ const markCopied = (0, import_react24.useCallback)((indexes, duration = 1500) => {
1871
+ setCopiedRows((prev) => {
1872
+ const next = new Set(prev);
1873
+ indexes.forEach((i) => next.add(i));
1874
+ return next;
1875
+ });
1876
+ indexes.forEach((i) => {
1877
+ const st = settlingTimers.current.get(i);
1878
+ if (st) {
1879
+ clearTimeout(st);
1880
+ settlingTimers.current.delete(i);
1881
+ }
1882
+ });
1883
+ setSettlingRows((prev) => {
1884
+ const next = new Set(prev);
1885
+ indexes.forEach((i) => next.delete(i));
1886
+ return next;
1887
+ });
1888
+ indexes.forEach((i) => {
1889
+ const existing = copiedTimers.current.get(i);
1890
+ if (existing) clearTimeout(existing);
1891
+ const t = setTimeout(() => {
1892
+ setCopiedRows((prev) => {
1893
+ const next = new Set(prev);
1894
+ next.delete(i);
1895
+ return next;
1896
+ });
1897
+ setSettlingRows((prev) => {
1898
+ const next = new Set(prev);
1899
+ next.add(i);
1900
+ return next;
1901
+ });
1902
+ copiedTimers.current.delete(i);
1903
+ const settlingT = setTimeout(() => {
1904
+ setSettlingRows((prev) => {
1905
+ const next = new Set(prev);
1906
+ next.delete(i);
1907
+ return next;
1908
+ });
1909
+ settlingTimers.current.delete(i);
1910
+ }, TRANSITION_MS);
1911
+ settlingTimers.current.set(i, settlingT);
1912
+ }, duration);
1913
+ copiedTimers.current.set(i, t);
1914
+ });
1915
+ }, []);
1916
+ const handleRowCopy = async (row, index) => {
1917
+ const ok = await copyToClipboard(row.copy ?? row.value);
1918
+ if (ok) markCopied([index]);
1919
+ };
1920
+ const handleCopyAll = async () => {
1825
1921
  const text = rows.map((r) => `${r.label}: ${r.value}`).join("\n");
1826
- copy(text);
1922
+ const ok = await copyToClipboard(text);
1923
+ if (ok) {
1924
+ markCopied(rows.map((_, i) => i));
1925
+ setAllCopied(true);
1926
+ setTimeout(() => setAllCopied(false), 2e3);
1927
+ }
1827
1928
  };
1828
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1829
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-copyable-table", className), ...props, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "kds-copyable-table-row", children: [
1830
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-copyable-table-label", children: row.label }),
1831
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-copyable-table-value", children: row.value })
1832
- ] }, row.label)) }),
1833
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("button", { className: `kds-btn kds-btn-outlined kds-btn-block kds-copy-all-btn${copied ? " copied" : ""}`, onClick: handleCopyAll, "aria-label": "Copiar todo", children: [
1834
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("i", { className: "material-symbols-outlined", children: copied ? "check" : "content_copy" }) }),
1835
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: copied ? "Copiado" : "Copiar todos los datos" })
1836
- ] })
1929
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
1930
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-copyable-table", className), ...props, children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1931
+ "div",
1932
+ {
1933
+ className: (0, import_clsx.clsx)(
1934
+ "kds-copyable-table-row",
1935
+ copiedRows.has(i) && "copied",
1936
+ settlingRows.has(i) && "settling"
1937
+ ),
1938
+ role: "button",
1939
+ tabIndex: 0,
1940
+ onClick: () => handleRowCopy(row, i),
1941
+ onKeyDown: (e) => {
1942
+ if (e.key === "Enter" || e.key === " ") {
1943
+ e.preventDefault();
1944
+ handleRowCopy(row, i);
1945
+ }
1946
+ },
1947
+ "aria-label": `Copiar ${row.label}: ${row.value}`,
1948
+ children: [
1949
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "kds-key", children: row.label }),
1950
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "kds-value", children: row.value })
1951
+ ]
1952
+ },
1953
+ `${row.label}-${i}`
1954
+ )) }),
1955
+ showCopyAll && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1956
+ "button",
1957
+ {
1958
+ type: "button",
1959
+ className: (0, import_clsx.clsx)(
1960
+ "kds-btn",
1961
+ "kds-btn-outlined",
1962
+ "kds-btn-block",
1963
+ "kds-copy-all-btn",
1964
+ allCopied && "copied"
1965
+ ),
1966
+ onClick: handleCopyAll,
1967
+ "aria-label": allCopied ? copiedAllLabel : copyAllLabel,
1968
+ children: [
1969
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("i", { className: "material-symbols-outlined", children: allCopied ? "check" : "content_copy" }) }),
1970
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: allCopied ? copiedAllLabel : copyAllLabel })
1971
+ ]
1972
+ }
1973
+ )
1837
1974
  ] });
1838
1975
  }
1839
1976
  );
1840
1977
  KdsCopyableTable.displayName = "KdsCopyableTable";
1841
1978
 
1842
1979
  // src/components/core/KdsExpandPanel/KdsExpandPanel.tsx
1843
- var import_react26 = require("react");
1844
- var import_jsx_runtime25 = require("react/jsx-runtime");
1845
- var KdsExpandPanel = (0, import_react26.forwardRef)(
1980
+ var import_react25 = require("react");
1981
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1982
+ var KdsExpandPanel = (0, import_react25.forwardRef)(
1846
1983
  ({ label, defaultExpanded = false, children, className, ...props }, ref) => {
1847
- const [expanded, setExpanded] = (0, import_react26.useState)(defaultExpanded);
1848
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref, className, ...props, children: [
1849
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1984
+ const [expanded, setExpanded] = (0, import_react25.useState)(defaultExpanded);
1985
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref, className, ...props, children: [
1986
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1850
1987
  "button",
1851
1988
  {
1852
1989
  className: "kds-expand-toggle",
1853
1990
  onClick: () => setExpanded((v) => !v),
1854
1991
  "aria-expanded": expanded,
1855
1992
  children: [
1856
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: label }),
1857
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
1993
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: label }),
1994
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
1858
1995
  ]
1859
1996
  }
1860
1997
  ),
1861
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: (0, import_clsx.clsx)("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
1998
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: (0, import_clsx.clsx)("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
1862
1999
  ] });
1863
2000
  }
1864
2001
  );
1865
2002
  KdsExpandPanel.displayName = "KdsExpandPanel";
1866
2003
 
1867
2004
  // src/components/core/KdsCountdown/KdsCountdown.tsx
1868
- var import_react28 = require("react");
2005
+ var import_react27 = require("react");
1869
2006
 
1870
2007
  // src/components/core/hooks/useCountdown.ts
1871
- var import_react27 = require("react");
2008
+ var import_react26 = require("react");
1872
2009
  function calcRemaining(deadline) {
1873
2010
  const diff = Math.max(0, new Date(deadline).getTime() - Date.now());
1874
2011
  const totalSeconds = Math.floor(diff / 1e3);
@@ -1881,8 +2018,8 @@ function calcRemaining(deadline) {
1881
2018
  };
1882
2019
  }
1883
2020
  function useCountdown(deadline) {
1884
- const [state, setState] = (0, import_react27.useState)(() => calcRemaining(deadline));
1885
- (0, import_react27.useEffect)(() => {
2021
+ const [state, setState] = (0, import_react26.useState)(() => calcRemaining(deadline));
2022
+ (0, import_react26.useEffect)(() => {
1886
2023
  const tick = () => setState(calcRemaining(deadline));
1887
2024
  const id = setInterval(tick, 1e3);
1888
2025
  return () => clearInterval(id);
@@ -1891,13 +2028,13 @@ function useCountdown(deadline) {
1891
2028
  }
1892
2029
 
1893
2030
  // src/components/core/KdsCountdown/KdsCountdown.tsx
1894
- var import_jsx_runtime26 = require("react/jsx-runtime");
1895
- var KdsCountdown = (0, import_react28.forwardRef)(
2031
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2032
+ var KdsCountdown = (0, import_react27.forwardRef)(
1896
2033
  ({ deadline, label, onExpire, className, ...props }, ref) => {
1897
2034
  const { hours, minutes, seconds, expired, urgent } = useCountdown(deadline);
1898
- const onExpireRef = (0, import_react28.useRef)(onExpire);
2035
+ const onExpireRef = (0, import_react27.useRef)(onExpire);
1899
2036
  onExpireRef.current = onExpire;
1900
- (0, import_react28.useEffect)(() => {
2037
+ (0, import_react27.useEffect)(() => {
1901
2038
  if (expired) {
1902
2039
  onExpireRef.current?.();
1903
2040
  }
@@ -1906,9 +2043,9 @@ var KdsCountdown = (0, import_react28.forwardRef)(
1906
2043
  return null;
1907
2044
  }
1908
2045
  const pad = (n) => String(n).padStart(2, "0");
1909
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-countdown", urgent && "urgent", className), ...props, children: [
1910
- label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "kds-countdown-label", children: label }),
1911
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "kds-countdown-value", children: [
2046
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-countdown", urgent && "urgent", className), ...props, children: [
2047
+ label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "kds-countdown-label", children: label }),
2048
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "kds-countdown-value", children: [
1912
2049
  pad(hours),
1913
2050
  ":",
1914
2051
  pad(minutes),
@@ -1921,18 +2058,18 @@ var KdsCountdown = (0, import_react28.forwardRef)(
1921
2058
  KdsCountdown.displayName = "KdsCountdown";
1922
2059
 
1923
2060
  // src/components/core/KdsSegmentedTabs/KdsSegmentedTabs.tsx
1924
- var import_react29 = require("react");
1925
- var import_jsx_runtime27 = require("react/jsx-runtime");
1926
- var KdsSegmentedTabs = (0, import_react29.forwardRef)(
1927
- (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(KdsTabs, { ref, variant: "segmented", ...props })
2061
+ var import_react28 = require("react");
2062
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2063
+ var KdsSegmentedTabs = (0, import_react28.forwardRef)(
2064
+ (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(KdsTabs, { ref, ...props })
1928
2065
  );
1929
2066
  KdsSegmentedTabs.displayName = "KdsSegmentedTabs";
1930
2067
 
1931
2068
  // src/components/domain/KdsBankRow/KdsBankRow.tsx
1932
- var import_react30 = require("react");
1933
- var import_jsx_runtime28 = require("react/jsx-runtime");
1934
- var KdsBankRow = (0, import_react30.forwardRef)(
1935
- ({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2069
+ var import_react29 = require("react");
2070
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2071
+ var KdsBankRow = (0, import_react29.forwardRef)(
2072
+ ({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1936
2073
  "button",
1937
2074
  {
1938
2075
  ref,
@@ -1940,9 +2077,9 @@ var KdsBankRow = (0, import_react30.forwardRef)(
1940
2077
  className: (0, import_clsx.clsx)("kds-bank-row", selected && "selected", className),
1941
2078
  ...props,
1942
2079
  children: [
1943
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("img", { src: logoUrl, alt: name }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "initials", children: name.charAt(0) }) }),
1944
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "kds-bank-row-name", children: name }),
1945
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
2080
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { src: logoUrl, alt: name }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "initials", children: name.charAt(0) }) }),
2081
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "kds-bank-row-name", children: name }),
2082
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
1946
2083
  ]
1947
2084
  }
1948
2085
  )
@@ -1950,32 +2087,32 @@ var KdsBankRow = (0, import_react30.forwardRef)(
1950
2087
  KdsBankRow.displayName = "KdsBankRow";
1951
2088
 
1952
2089
  // src/components/domain/KdsBankList/KdsBankList.tsx
1953
- var import_react31 = require("react");
1954
- var import_jsx_runtime29 = require("react/jsx-runtime");
1955
- var KdsBankList = (0, import_react31.forwardRef)(
1956
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-bank-list", className), role: "list", ...props, children })
2090
+ var import_react30 = require("react");
2091
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2092
+ var KdsBankList = (0, import_react30.forwardRef)(
2093
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-bank-list", className), role: "list", ...props, children })
1957
2094
  );
1958
2095
  KdsBankList.displayName = "KdsBankList";
1959
2096
 
1960
2097
  // src/components/domain/KdsBankModal/KdsBankModal.tsx
1961
- var import_react32 = require("react");
1962
- var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
1963
- var import_jsx_runtime30 = require("react/jsx-runtime");
1964
- var KdsBankModal = (0, import_react32.forwardRef)(
2098
+ var import_react31 = require("react");
2099
+ var Dialog = __toESM(require("@radix-ui/react-dialog"));
2100
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2101
+ var KdsBankModal = (0, import_react31.forwardRef)(
1965
2102
  ({ open, onClose, title = "Selecciona tu banco", searchPlaceholder = "Buscar banco...", onSearch, children, className, container }, ref) => {
1966
- const [query, setQuery] = (0, import_react32.useState)("");
2103
+ const [query, setQuery] = (0, import_react31.useState)("");
1967
2104
  const handleSearch = (value) => {
1968
2105
  setQuery(value);
1969
2106
  onSearch?.(value);
1970
2107
  };
1971
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Root, { open, onOpenChange: (o) => {
2108
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog.Root, { open, onOpenChange: (o) => {
1972
2109
  if (!o) onClose();
1973
- }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Dialog2.Content, { ref, className: (0, import_clsx.clsx)("kds-bank-modal", className), children: [
1974
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "kds-bank-modal-header", children: [
1975
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Title, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { children: title }) }),
1976
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("i", { className: "material-symbols-outlined", children: "close" }) }) })
2110
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Dialog.Content, { ref, className: (0, import_clsx.clsx)("kds-bank-modal", className), children: [
2111
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "kds-bank-modal-header", children: [
2112
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog.Title, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h3", { children: title }) }),
2113
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("i", { className: "material-symbols-outlined", children: "close" }) }) })
1977
2114
  ] }),
1978
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2115
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1979
2116
  "input",
1980
2117
  {
1981
2118
  type: "text",
@@ -1984,33 +2121,33 @@ var KdsBankModal = (0, import_react32.forwardRef)(
1984
2121
  onChange: (e) => handleSearch(e.target.value)
1985
2122
  }
1986
2123
  ) }),
1987
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "kds-bank-modal-body", children })
2124
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "kds-bank-modal-body", children })
1988
2125
  ] }) }) }) });
1989
2126
  }
1990
2127
  );
1991
2128
  KdsBankModal.displayName = "KdsBankModal";
1992
2129
 
1993
2130
  // src/components/domain/KdsQrRow/KdsQrRow.tsx
1994
- var import_react33 = require("react");
1995
- var import_jsx_runtime31 = require("react/jsx-runtime");
1996
- var KdsQrRow = (0, import_react33.forwardRef)(
1997
- ({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("button", { ref, type: "button", className: (0, import_clsx.clsx)("kds-qr-row", className), ...props, children: [
1998
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
1999
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "kds-qr-text", children: [
2000
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "title", children: name }),
2001
- description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "sub", children: description })
2131
+ var import_react32 = require("react");
2132
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2133
+ var KdsQrRow = (0, import_react32.forwardRef)(
2134
+ ({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("button", { ref, type: "button", className: (0, import_clsx.clsx)("kds-qr-row", className), ...props, children: [
2135
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
2136
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "kds-qr-text", children: [
2137
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "kds-qr-title", children: name }),
2138
+ description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "kds-qr-subtitle", children: description })
2002
2139
  ] }),
2003
- badge && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-qr-badge", children: badge }),
2004
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("i", { className: "material-symbols-outlined", children: "chevron_right" })
2140
+ badge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "kds-qr-badge", children: badge }),
2141
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("i", { className: "material-symbols-outlined", children: "chevron_right" })
2005
2142
  ] })
2006
2143
  );
2007
2144
  KdsQrRow.displayName = "KdsQrRow";
2008
2145
 
2009
2146
  // src/components/domain/KdsCardSelector/KdsCardSelector.tsx
2010
- var import_react34 = require("react");
2011
- var import_jsx_runtime32 = require("react/jsx-runtime");
2012
- var KdsCardSelector = (0, import_react34.forwardRef)(
2013
- ({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2147
+ var import_react33 = require("react");
2148
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2149
+ var KdsCardSelector = (0, import_react33.forwardRef)(
2150
+ ({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2014
2151
  "button",
2015
2152
  {
2016
2153
  ref,
@@ -2018,9 +2155,9 @@ var KdsCardSelector = (0, import_react34.forwardRef)(
2018
2155
  className: (0, import_clsx.clsx)("kds-card-selector", selected && "selected", className),
2019
2156
  ...props,
2020
2157
  children: [
2021
- icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
2022
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "kds-card-selector-title", children: title }),
2023
- description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "kds-card-selector-description", children: description })
2158
+ icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("i", { className: "material-symbols-outlined", children: icon }) }),
2159
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-card-selector-title", children: title }),
2160
+ description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "kds-card-selector-description", children: description })
2024
2161
  ]
2025
2162
  }
2026
2163
  )
@@ -2028,26 +2165,26 @@ var KdsCardSelector = (0, import_react34.forwardRef)(
2028
2165
  KdsCardSelector.displayName = "KdsCardSelector";
2029
2166
 
2030
2167
  // src/components/domain/KdsCardPlan/KdsCardPlan.tsx
2031
- var import_react35 = require("react");
2032
- var import_jsx_runtime33 = require("react/jsx-runtime");
2033
- var KdsCardPlan = (0, import_react35.forwardRef)(
2034
- ({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2168
+ var import_react34 = require("react");
2169
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2170
+ var KdsCardPlan = (0, import_react34.forwardRef)(
2171
+ ({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2035
2172
  "div",
2036
2173
  {
2037
2174
  ref,
2038
2175
  className: (0, import_clsx.clsx)("kds-card-plan", recommended && "recommended", className),
2039
2176
  ...props,
2040
2177
  children: [
2041
- badgeText && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "kds-card-plan-badge", children: badgeText }),
2042
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { children: title }) }),
2043
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "kds-card-plan-price", children: [
2044
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: price }),
2045
- period && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { children: [
2178
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { children: title }) }),
2179
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "kds-card-plan-price", children: [
2180
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "kds-price", children: price }),
2181
+ period && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "kds-price-period", children: [
2046
2182
  "/",
2047
2183
  period
2048
2184
  ] })
2049
2185
  ] }),
2050
- features && features.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { children: f }, i)) }),
2186
+ badgeText && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "kds-card-plan-badge", children: badgeText }),
2187
+ features && features.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: f }, i)) }),
2051
2188
  action
2052
2189
  ]
2053
2190
  }
@@ -2056,50 +2193,225 @@ var KdsCardPlan = (0, import_react35.forwardRef)(
2056
2193
  KdsCardPlan.displayName = "KdsCardPlan";
2057
2194
 
2058
2195
  // src/components/domain/KdsInvoiceSticky/KdsInvoiceSticky.tsx
2059
- var import_react36 = require("react");
2060
- var import_jsx_runtime34 = require("react/jsx-runtime");
2061
- var KdsInvoiceSticky = (0, import_react36.forwardRef)(
2062
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-elevated", "kds-invoice-sticky", className), ...props, children })
2196
+ var import_react35 = require("react");
2197
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2198
+ var KdsInvoiceSticky = (0, import_react35.forwardRef)(
2199
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-card-elevated", "kds-invoice-sticky", className), ...props, children })
2063
2200
  );
2064
2201
  KdsInvoiceSticky.displayName = "KdsInvoiceSticky";
2065
2202
 
2066
2203
  // src/components/domain/KdsBottomSheet/KdsBottomSheet.tsx
2067
- var import_react37 = require("react");
2068
- var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
2069
- var import_jsx_runtime35 = require("react/jsx-runtime");
2070
- var KdsBottomSheet = (0, import_react37.forwardRef)(
2071
- ({ open, onClose, title, children, actions, className, container }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog3.Root, { open, onOpenChange: (o) => {
2072
- if (!o) onClose();
2073
- }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog3.Overlay, { className: "kds-bottom-sheet-scrim open", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Dialog3.Content, { ref, className: (0, import_clsx.clsx)("kds-bottom-sheet", className), children: [
2074
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "kds-bottom-sheet-grabber" }),
2075
- title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog3.Title, { className: "kds-bottom-sheet-title", children: title }),
2076
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "kds-bottom-sheet-body", children }),
2077
- actions && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "kds-bottom-sheet-actions", children: actions })
2078
- ] }) }) }) })
2204
+ var import_react36 = require("react");
2205
+ var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
2206
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2207
+ var KdsBottomSheet = (0, import_react36.forwardRef)(
2208
+ ({
2209
+ open,
2210
+ onClose,
2211
+ title,
2212
+ description,
2213
+ children,
2214
+ actions,
2215
+ showGrabber = true,
2216
+ showCloseButton = false,
2217
+ container,
2218
+ className
2219
+ }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2220
+ Dialog2.Root,
2221
+ {
2222
+ open,
2223
+ onOpenChange: (o) => {
2224
+ if (!o) onClose();
2225
+ },
2226
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Dialog2.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Dialog2.Overlay, { className: "kds-bottom-sheet-scrim open", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2227
+ Dialog2.Content,
2228
+ {
2229
+ ref,
2230
+ className: (0, import_clsx.clsx)("kds-bottom-sheet", className),
2231
+ onPointerDownOutside: (e) => {
2232
+ const target = e.target;
2233
+ if (target.closest(".kds-bottom-sheet")) e.preventDefault();
2234
+ },
2235
+ children: [
2236
+ showGrabber && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "kds-bottom-sheet-grabber", "aria-hidden": "true" }),
2237
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2238
+ "button",
2239
+ {
2240
+ type: "button",
2241
+ className: "kds-bottom-sheet-close",
2242
+ "aria-label": "Cerrar",
2243
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("i", { className: "material-symbols-outlined", children: "close" })
2244
+ }
2245
+ ) }),
2246
+ title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Dialog2.Title, { className: "kds-bottom-sheet-title", children: title }),
2247
+ description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Dialog2.Description, { className: "kds-bottom-sheet-description", children: description }),
2248
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "kds-bottom-sheet-body", children }),
2249
+ actions && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "kds-bottom-sheet-actions", children: actions })
2250
+ ]
2251
+ }
2252
+ ) }) })
2253
+ }
2254
+ )
2079
2255
  );
2080
2256
  KdsBottomSheet.displayName = "KdsBottomSheet";
2081
2257
 
2082
2258
  // src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
2083
- var import_react38 = require("react");
2084
- var import_jsx_runtime36 = require("react/jsx-runtime");
2085
- var KdsSecureFooter = (0, import_react38.forwardRef)(
2086
- ({ variant = "default", children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("footer", { ref, className: (0, import_clsx.clsx)("kds-secure-footer", variant === "inside" && "inside", className), ...props, children: [
2087
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("i", { className: "material-symbols-outlined", children: "lock" }),
2088
- children || /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "Pago seguro con Khipu" })
2259
+ var import_react37 = require("react");
2260
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2261
+ var KdsSecureFooter = (0, import_react37.forwardRef)(
2262
+ ({ variant = "default", children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("footer", { ref, className: (0, import_clsx.clsx)("kds-secure-footer", variant === "inside" && "inside", className), ...props, children: [
2263
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("i", { className: "material-symbols-outlined", children: "lock" }),
2264
+ children || /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: "Pago seguro con Khipu" })
2089
2265
  ] })
2090
2266
  );
2091
2267
  KdsSecureFooter.displayName = "KdsSecureFooter";
2092
2268
 
2093
2269
  // src/components/domain/KdsRecapList/KdsRecapList.tsx
2094
- var import_react39 = require("react");
2095
- var import_jsx_runtime37 = require("react/jsx-runtime");
2096
- var KdsRecapList = (0, import_react39.forwardRef)(
2097
- ({ items, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { ref, className: (0, import_clsx.clsx)("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("li", { children: [
2098
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "k", children: item.label }),
2099
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: (0, import_clsx.clsx)("v", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
2270
+ var import_react38 = require("react");
2271
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2272
+ var KdsRecapList = (0, import_react38.forwardRef)(
2273
+ ({ items, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { ref, className: (0, import_clsx.clsx)("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("li", { children: [
2274
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "kds-key", children: item.label }),
2275
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: (0, import_clsx.clsx)("kds-value", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
2100
2276
  ] }, i)) })
2101
2277
  );
2102
2278
  KdsRecapList.displayName = "KdsRecapList";
2279
+
2280
+ // src/components/domain/KdsMontoRow/KdsMontoRow.tsx
2281
+ var import_react39 = require("react");
2282
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2283
+ var KdsMontoRow = (0, import_react39.forwardRef)(
2284
+ ({ title, value, deadline, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { ref, className: (0, import_clsx.clsx)("kds-monto-row", className), ...props, children: [
2285
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
2286
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "kds-monto-row-title", children: title }),
2287
+ deadline && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "kds-monto-row-deadline", children: deadline })
2288
+ ] }),
2289
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "kds-monto-row-value", children: value })
2290
+ ] })
2291
+ );
2292
+ KdsMontoRow.displayName = "KdsMontoRow";
2293
+
2294
+ // src/components/domain/KdsMerchantTile/KdsMerchantTile.tsx
2295
+ var import_react40 = require("react");
2296
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2297
+ var KdsMerchantTile = (0, import_react40.forwardRef)(
2298
+ ({ name, logoUrl, initials, compact, className, ...props }, ref) => {
2299
+ const displayInitials = (initials ?? name.slice(0, 2)).toUpperCase();
2300
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2301
+ "div",
2302
+ {
2303
+ ref,
2304
+ className: (0, import_clsx.clsx)("kds-merchant-tile", logoUrl && "logo", compact && "compact", className),
2305
+ "aria-label": name,
2306
+ ...props,
2307
+ children: logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: logoUrl, alt: name }) : displayInitials
2308
+ }
2309
+ );
2310
+ }
2311
+ );
2312
+ KdsMerchantTile.displayName = "KdsMerchantTile";
2313
+
2314
+ // src/components/domain/KdsPaymentTotal/KdsPaymentTotal.tsx
2315
+ var import_react41 = require("react");
2316
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2317
+ var KdsPaymentTotal = (0, import_react41.forwardRef)(
2318
+ ({
2319
+ variant = "default",
2320
+ tone = "brand",
2321
+ centered = false,
2322
+ amount,
2323
+ currency = "S/",
2324
+ decimals = 2,
2325
+ locale = "es-PE",
2326
+ label = "Monto a pagar",
2327
+ title = "Escanea el QR",
2328
+ titleMobile = "Descarga el QR",
2329
+ className,
2330
+ ...props
2331
+ }, ref) => {
2332
+ const { integer, fraction } = formatAmount(amount, decimals, locale);
2333
+ const isEmail = variant === "email";
2334
+ const isInfoTone = tone === "info";
2335
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2336
+ "div",
2337
+ {
2338
+ ref,
2339
+ className: (0, import_clsx.clsx)(
2340
+ "kds-payment-total",
2341
+ isEmail && "kds-payment-total--email",
2342
+ isInfoTone && "kds-payment-total--tone-info",
2343
+ centered && "kds-payment-total--centered",
2344
+ className
2345
+ ),
2346
+ ...props,
2347
+ children: [
2348
+ !isEmail && title != null && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h5", { className: "kds-payment-total-title", children: title }),
2349
+ !isEmail && titleMobile != null && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h5", { className: "kds-payment-total-title-mobile", children: titleMobile }),
2350
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h6", { className: "kds-payment-label", children: label }),
2351
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("h5", { className: "kds-payment-amount", children: [
2352
+ currency,
2353
+ " ",
2354
+ integer,
2355
+ fraction !== null && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("sup", { className: "kds-payment-total-decimal-sup", children: fraction })
2356
+ ] })
2357
+ ]
2358
+ }
2359
+ );
2360
+ }
2361
+ );
2362
+ KdsPaymentTotal.displayName = "KdsPaymentTotal";
2363
+ function formatAmount(amount, decimals, locale) {
2364
+ const showDecimals = typeof decimals === "number" && decimals > 0;
2365
+ if (typeof amount === "number") {
2366
+ if (showDecimals) {
2367
+ const fixed = amount.toFixed(decimals);
2368
+ const [int, frac] = fixed.split(".");
2369
+ const formattedInt2 = new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(
2370
+ Number(int)
2371
+ );
2372
+ return { integer: formattedInt2, fraction: frac ?? null };
2373
+ }
2374
+ const formattedInt = new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(
2375
+ Math.trunc(amount)
2376
+ );
2377
+ return { integer: formattedInt, fraction: null };
2378
+ }
2379
+ const str = amount.trim();
2380
+ const dotIdx = str.indexOf(".");
2381
+ if (dotIdx === -1 || !showDecimals) {
2382
+ return { integer: str, fraction: null };
2383
+ }
2384
+ return {
2385
+ integer: str.slice(0, dotIdx),
2386
+ fraction: str.slice(dotIdx + 1)
2387
+ };
2388
+ }
2389
+
2390
+ // src/components/domain/KdsBillAttachment/KdsBillAttachment.tsx
2391
+ var import_react42 = require("react");
2392
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2393
+ var KdsBillAttachment = (0, import_react42.forwardRef)(
2394
+ ({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2395
+ "a",
2396
+ {
2397
+ ref,
2398
+ href,
2399
+ target: "_blank",
2400
+ rel: "noopener noreferrer",
2401
+ className: (0, import_clsx.clsx)("kds-bill-attachment", className),
2402
+ ...props,
2403
+ children: [
2404
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("i", { className: "material-symbols-outlined", children: icon }),
2405
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: filename })
2406
+ ]
2407
+ }
2408
+ )
2409
+ );
2410
+ KdsBillAttachment.displayName = "KdsBillAttachment";
2411
+ var KdsBillAttachments = (0, import_react42.forwardRef)(
2412
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-bill-attachments", className), ...props, children })
2413
+ );
2414
+ KdsBillAttachments.displayName = "KdsBillAttachments";
2103
2415
  // Annotate the CommonJS export names for ESM import in node:
2104
2416
  0 && (module.exports = {
2105
2417
  KdsAccordion,
@@ -2109,6 +2421,8 @@ KdsRecapList.displayName = "KdsRecapList";
2109
2421
  KdsBankList,
2110
2422
  KdsBankModal,
2111
2423
  KdsBankRow,
2424
+ KdsBillAttachment,
2425
+ KdsBillAttachments,
2112
2426
  KdsBottomSheet,
2113
2427
  KdsButton,
2114
2428
  KdsCard,
@@ -2126,17 +2440,15 @@ KdsRecapList.displayName = "KdsRecapList";
2126
2440
  KdsExpandPanel,
2127
2441
  KdsInvoiceSticky,
2128
2442
  KdsLinearProgress,
2129
- KdsLogoHeader,
2130
- KdsLogoHeaderCloseButton,
2131
- KdsLogoHeaderCode,
2132
- KdsLogoHeaderLogo,
2133
- KdsLogoHeaderSeparator,
2134
- KdsModal,
2443
+ KdsMerchantTile,
2444
+ KdsMontoRow,
2445
+ KdsPaymentTotal,
2135
2446
  KdsQrRow,
2136
2447
  KdsRadioGroup,
2137
2448
  KdsRecapList,
2138
2449
  KdsSectionNote,
2139
2450
  KdsSecureFooter,
2451
+ KdsSecureLoader,
2140
2452
  KdsSegmentedTabs,
2141
2453
  KdsSelect,
2142
2454
  KdsSnackbar,