@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.mjs CHANGED
@@ -347,6 +347,8 @@ var semanticColors = {
347
347
  // From Figma: warning/light
348
348
  dark: "#E65100",
349
349
  // From Figma: warning/dark
350
+ warm: "#8A6D1A",
351
+ // Warm/olive variant for header icons (LigoPay handoff v2)
350
352
  container: "#FFFBEB",
351
353
  // Light amber background for chips/badges
352
354
  contrastText: "#FFFFFF"
@@ -365,6 +367,8 @@ var semanticColors = {
365
367
  main: "#0288D1",
366
368
  light: "#03A9F4",
367
369
  dark: "#01579B",
370
+ blue: "#5A5FE0",
371
+ // Khipu-blue / LigoPay informational blue (distinct from cyan main)
368
372
  container: "#EFF6FF",
369
373
  // Light blue background for chips/badges
370
374
  contrastText: "#FFFFFF"
@@ -407,8 +411,10 @@ var fontSizes = {
407
411
  // 24px
408
412
  "3xl": "1.875rem",
409
413
  // 30px
410
- "4xl": "2.25rem"
414
+ "4xl": "2.25rem",
411
415
  // 36px
416
+ decimalSup: "0.5em"
417
+ // Relative size for decimal superscript in amount displays
412
418
  };
413
419
  var lineHeights = {
414
420
  tight: 1.2,
@@ -1040,7 +1046,7 @@ var KdsButton = forwardRef(
1040
1046
  children: [
1041
1047
  !loading && startIcon && /* @__PURE__ */ jsx2("span", { className: "kds-icon", children: /* @__PURE__ */ jsx2("i", { className: "material-symbols-outlined", children: startIcon }) }),
1042
1048
  loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
1043
- /* @__PURE__ */ jsx2("span", { className: "loader small" }),
1049
+ /* @__PURE__ */ jsx2("progress", { className: "circle indeterminate small" }),
1044
1050
  /* @__PURE__ */ jsx2("span", { children })
1045
1051
  ] }) : /* @__PURE__ */ jsx2("span", { children }),
1046
1052
  !loading && endIcon && /* @__PURE__ */ jsx2("span", { className: "kds-icon", children: /* @__PURE__ */ jsx2("i", { className: "material-symbols-outlined", children: endIcon }) })
@@ -1062,11 +1068,13 @@ var KdsTextField = forwardRef2(
1062
1068
  readOnly,
1063
1069
  startIcon,
1064
1070
  endIcon,
1071
+ required,
1065
1072
  className,
1066
1073
  id,
1067
1074
  ...props
1068
1075
  }, ref) => {
1069
1076
  const fieldId = id || `kds-field-${label.toLowerCase().replace(/\s+/g, "-")}`;
1077
+ const hasSuffix = !!endIcon || readOnly;
1070
1078
  return /* @__PURE__ */ jsxs2(
1071
1079
  "div",
1072
1080
  {
@@ -1074,6 +1082,8 @@ var KdsTextField = forwardRef2(
1074
1082
  "field",
1075
1083
  "label",
1076
1084
  "border",
1085
+ startIcon && "prefix",
1086
+ hasSuffix && "suffix",
1077
1087
  error && "invalid",
1078
1088
  readOnly && "locked",
1079
1089
  fullWidth && "kds-w-full",
@@ -1086,12 +1096,16 @@ var KdsTextField = forwardRef2(
1086
1096
  {
1087
1097
  ref,
1088
1098
  id: fieldId,
1089
- placeholder: " ",
1090
1099
  readOnly,
1091
- ...props
1100
+ required,
1101
+ ...props,
1102
+ placeholder: " "
1092
1103
  }
1093
1104
  ),
1094
- /* @__PURE__ */ jsx3("label", { htmlFor: fieldId, children: label }),
1105
+ /* @__PURE__ */ jsxs2("label", { htmlFor: fieldId, children: [
1106
+ label,
1107
+ required && " *"
1108
+ ] }),
1095
1109
  readOnly && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", children: "lock" }),
1096
1110
  endIcon && !readOnly && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", children: endIcon }),
1097
1111
  helperText && /* @__PURE__ */ jsx3("span", { className: "helper", children: helperText })
@@ -1106,78 +1120,18 @@ KdsTextField.displayName = "KdsTextField";
1106
1120
  import { forwardRef as forwardRef3 } from "react";
1107
1121
  import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1108
1122
  var KdsCheckbox = forwardRef3(
1109
- ({ label, className, id, ...props }, ref) => {
1110
- const fieldId = id || `kds-cb-${label?.toLowerCase().replace(/\s+/g, "-") || "check"}`;
1111
- return /* @__PURE__ */ jsxs3("label", { className: clsx("field", className), htmlFor: fieldId, children: [
1112
- /* @__PURE__ */ jsx4("input", { ref, type: "checkbox", id: fieldId, ...props }),
1113
- /* @__PURE__ */ jsx4("span", { children: label })
1114
- ] });
1115
- }
1123
+ ({ label, className, ...props }, ref) => /* @__PURE__ */ jsxs3("label", { className: clsx("checkbox", className), children: [
1124
+ /* @__PURE__ */ jsx4("input", { ref, type: "checkbox", ...props }),
1125
+ /* @__PURE__ */ jsx4("span", { children: label })
1126
+ ] })
1116
1127
  );
1117
1128
  KdsCheckbox.displayName = "KdsCheckbox";
1118
1129
 
1119
- // src/components/core/KdsModal/KdsModal.tsx
1120
- import { forwardRef as forwardRef4 } from "react";
1121
- import * as Dialog from "@radix-ui/react-dialog";
1122
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1123
- var KdsModal = forwardRef4(
1124
- ({
1125
- open,
1126
- onClose,
1127
- title,
1128
- description,
1129
- footer,
1130
- children,
1131
- size = "md",
1132
- showCloseButton = true,
1133
- className
1134
- }, ref) => /* @__PURE__ */ jsx5(
1135
- Dialog.Root,
1136
- {
1137
- open,
1138
- onOpenChange: (o) => {
1139
- if (!o) onClose();
1140
- },
1141
- children: /* @__PURE__ */ jsxs4(Dialog.Portal, { children: [
1142
- /* @__PURE__ */ jsx5(Dialog.Overlay, { className: "kds-bottom-sheet-scrim" }),
1143
- /* @__PURE__ */ jsxs4(
1144
- Dialog.Content,
1145
- {
1146
- ref,
1147
- className: clsx(
1148
- "kds-bottom-sheet",
1149
- `kds-bottom-sheet-${size}`,
1150
- className
1151
- ),
1152
- children: [
1153
- title && /* @__PURE__ */ jsxs4("div", { className: "kds-bottom-sheet-header", children: [
1154
- /* @__PURE__ */ jsx5(Dialog.Title, { className: "kds-bottom-sheet-title", children: title }),
1155
- showCloseButton && /* @__PURE__ */ jsx5(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx5(
1156
- "button",
1157
- {
1158
- className: "kds-bottom-sheet-close",
1159
- "aria-label": "Cerrar",
1160
- children: /* @__PURE__ */ jsx5("i", { className: "material-symbols-outlined", children: "close" })
1161
- }
1162
- ) })
1163
- ] }),
1164
- description && /* @__PURE__ */ jsx5(Dialog.Description, { className: "kds-bottom-sheet-description", children: description }),
1165
- /* @__PURE__ */ jsx5("div", { className: "kds-bottom-sheet-body", children }),
1166
- footer && /* @__PURE__ */ jsx5("div", { className: "kds-bottom-sheet-actions", children: footer })
1167
- ]
1168
- }
1169
- )
1170
- ] })
1171
- }
1172
- )
1173
- );
1174
- KdsModal.displayName = "KdsModal";
1175
-
1176
1130
  // src/components/core/KdsCard/KdsCard.tsx
1177
- import { forwardRef as forwardRef5 } from "react";
1178
- import { jsx as jsx6 } from "react/jsx-runtime";
1179
- var KdsCard = forwardRef5(
1180
- ({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */ jsx6(
1131
+ import { forwardRef as forwardRef4 } from "react";
1132
+ import { jsx as jsx5 } from "react/jsx-runtime";
1133
+ var KdsCard = forwardRef4(
1134
+ ({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */ jsx5(
1181
1135
  "article",
1182
1136
  {
1183
1137
  ref,
@@ -1192,30 +1146,64 @@ var KdsCard = forwardRef5(
1192
1146
  )
1193
1147
  );
1194
1148
  KdsCard.displayName = "KdsCard";
1195
- var KdsCardHeader = forwardRef5(
1196
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: clsx("kds-card-header", className), ...props, children })
1149
+ var KdsCardHeader = forwardRef4(
1150
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx5("div", { ref, className: clsx("kds-card-header", className), ...props, children })
1197
1151
  );
1198
1152
  KdsCardHeader.displayName = "KdsCardHeader";
1199
- var KdsCardBody = forwardRef5(
1200
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: clsx("kds-card-body", className), ...props, children })
1153
+ var KdsCardBody = forwardRef4(
1154
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx5("div", { ref, className: clsx("kds-card-body", className), ...props, children })
1201
1155
  );
1202
1156
  KdsCardBody.displayName = "KdsCardBody";
1203
- var KdsCardFooter = forwardRef5(
1204
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: clsx("kds-card-footer", className), ...props, children })
1157
+ var KdsCardFooter = forwardRef4(
1158
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx5("div", { ref, className: clsx("kds-card-footer", className), ...props, children })
1205
1159
  );
1206
1160
  KdsCardFooter.displayName = "KdsCardFooter";
1207
1161
 
1208
1162
  // src/components/core/KdsSpinner/KdsSpinner.tsx
1163
+ import { forwardRef as forwardRef5 } from "react";
1164
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1165
+ var SIZE_CLASS = {
1166
+ small: "small",
1167
+ medium: null,
1168
+ large: "large"
1169
+ };
1170
+ var KdsSpinner = forwardRef5(
1171
+ ({ size = "medium", label, className, ...props }, ref) => {
1172
+ const sizeClass = SIZE_CLASS[size];
1173
+ return /* @__PURE__ */ jsxs4(
1174
+ "div",
1175
+ {
1176
+ ref,
1177
+ className: clsx("kds-flex kds-flex-col kds-items-center kds-gap-2", className),
1178
+ role: "status",
1179
+ ...props,
1180
+ children: [
1181
+ /* @__PURE__ */ jsx6("progress", { className: clsx("circle indeterminate", sizeClass) }),
1182
+ label && /* @__PURE__ */ jsx6("span", { className: "kds-text-body-small kds-text-muted", children: label }),
1183
+ !label && /* @__PURE__ */ jsx6("span", { className: "kds-hidden", children: "Cargando" })
1184
+ ]
1185
+ }
1186
+ );
1187
+ }
1188
+ );
1189
+ KdsSpinner.displayName = "KdsSpinner";
1190
+
1191
+ // src/components/core/KdsSecureLoader/KdsSecureLoader.tsx
1209
1192
  import { forwardRef as forwardRef6 } from "react";
1210
1193
  import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1211
- var KdsSpinner = forwardRef6(
1212
- ({ size = "medium", label, className, ...props }, ref) => /* @__PURE__ */ jsxs5("div", { ref, className: clsx("kds-flex kds-flex-col kds-items-center kds-gap-2", className), role: "status", ...props, children: [
1213
- /* @__PURE__ */ jsx7("span", { className: clsx("loader", size) }),
1214
- label && /* @__PURE__ */ jsx7("span", { className: "kds-text-body-small kds-text-muted", children: label }),
1215
- !label && /* @__PURE__ */ jsx7("span", { className: "kds-hidden", children: "Cargando" })
1194
+ var KdsSecureLoader = forwardRef6(
1195
+ ({ title, message, className, ...props }, ref) => /* @__PURE__ */ jsxs5("div", { ref, className: clsx("kds-secure-loader", className), role: "status", "aria-busy": "true", ...props, children: [
1196
+ (title || message) && /* @__PURE__ */ jsxs5("div", { className: "kds-secure-loader-text", children: [
1197
+ title && /* @__PURE__ */ jsx7("p", { className: "kds-secure-loader-title", children: title }),
1198
+ message && /* @__PURE__ */ jsx7("p", { className: "kds-secure-loader-message", children: message })
1199
+ ] }),
1200
+ /* @__PURE__ */ jsxs5("div", { className: "kds-secure-loader-spinner", children: [
1201
+ /* @__PURE__ */ jsx7("svg", { className: "kds-secure-loader-ring", viewBox: "22 22 44 44", "aria-hidden": "true", children: /* @__PURE__ */ jsx7("circle", { cx: "44", cy: "44", r: "20.2" }) }),
1202
+ /* @__PURE__ */ jsx7("i", { className: "material-symbols-outlined kds-secure-loader-lock", "aria-hidden": "true", children: "lock" })
1203
+ ] })
1216
1204
  ] })
1217
1205
  );
1218
- KdsSpinner.displayName = "KdsSpinner";
1206
+ KdsSecureLoader.displayName = "KdsSecureLoader";
1219
1207
 
1220
1208
  // src/components/core/KdsLinearProgress/KdsLinearProgress.tsx
1221
1209
  import { forwardRef as forwardRef7 } from "react";
@@ -1228,24 +1216,42 @@ KdsLinearProgress.displayName = "KdsLinearProgress";
1228
1216
  // src/components/core/KdsAlert/KdsAlert.tsx
1229
1217
  import { forwardRef as forwardRef8 } from "react";
1230
1218
  import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
1219
+ var DEFAULT_ICONS = {
1220
+ success: "check_circle",
1221
+ info: "info",
1222
+ warning: "warning",
1223
+ error: "error"
1224
+ };
1231
1225
  var KdsAlert = forwardRef8(
1232
- ({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => /* @__PURE__ */ jsxs6(
1233
- "div",
1234
- {
1235
- ref,
1236
- role: "alert",
1237
- className: clsx("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
1238
- ...props,
1239
- children: [
1240
- icon && /* @__PURE__ */ jsx9("div", { className: "kds-alert-icon", children: /* @__PURE__ */ jsx9("i", { className: "material-symbols-outlined", children: icon }) }),
1241
- /* @__PURE__ */ jsxs6("div", { className: "kds-alert-content", children: [
1242
- title && /* @__PURE__ */ jsx9("p", { className: "kds-alert-title", children: title }),
1243
- /* @__PURE__ */ jsx9("p", { className: "kds-alert-description", children })
1244
- ] }),
1245
- onClose && /* @__PURE__ */ jsx9("button", { className: "kds-btn kds-btn-text kds-btn-sm", onClick: onClose, "aria-label": "Cerrar", children: /* @__PURE__ */ jsx9("i", { className: "material-symbols-outlined", children: "close" }) })
1246
- ]
1247
- }
1248
- )
1226
+ ({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => {
1227
+ const resolvedIcon = icon === false ? null : typeof icon === "string" ? icon : DEFAULT_ICONS[severity];
1228
+ return /* @__PURE__ */ jsxs6(
1229
+ "div",
1230
+ {
1231
+ ref,
1232
+ role: "alert",
1233
+ className: clsx("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
1234
+ ...props,
1235
+ children: [
1236
+ resolvedIcon && /* @__PURE__ */ jsx9("div", { className: "kds-alert-icon", children: /* @__PURE__ */ jsx9("i", { className: "material-symbols-outlined", children: resolvedIcon }) }),
1237
+ /* @__PURE__ */ jsxs6("div", { className: "kds-alert-content", children: [
1238
+ title && /* @__PURE__ */ jsx9("p", { className: "kds-alert-title", children: title }),
1239
+ /* @__PURE__ */ jsx9("p", { className: "kds-alert-description", children })
1240
+ ] }),
1241
+ onClose && /* @__PURE__ */ jsx9(
1242
+ "button",
1243
+ {
1244
+ type: "button",
1245
+ className: "kds-alert-close",
1246
+ onClick: onClose,
1247
+ "aria-label": "Cerrar",
1248
+ children: /* @__PURE__ */ jsx9("i", { className: "material-symbols-outlined", children: "close" })
1249
+ }
1250
+ )
1251
+ ]
1252
+ }
1253
+ );
1254
+ }
1249
1255
  );
1250
1256
  KdsAlert.displayName = "KdsAlert";
1251
1257
 
@@ -1314,23 +1320,23 @@ function useTabsKeyboard(tabCount, activeIndex, onChange) {
1314
1320
  // src/components/core/KdsTabs/KdsTabs.tsx
1315
1321
  import { jsx as jsx11 } from "react/jsx-runtime";
1316
1322
  var KdsTabs = forwardRef10(
1317
- ({ activeIndex, onChange, variant = "standard", children, className, style, ...props }, ref) => {
1323
+ ({ activeIndex, onChange, children, className, style, ...props }, ref) => {
1318
1324
  const tabCount = Children.count(children);
1319
1325
  const { onKeyDown } = useTabsKeyboard(tabCount, activeIndex, onChange);
1320
- const mergedStyle = useMemo(() => {
1321
- if (variant !== "segmented") return style;
1322
- return {
1326
+ const mergedStyle = useMemo(
1327
+ () => ({
1323
1328
  ...style,
1324
1329
  "--_tab-count": tabCount,
1325
1330
  "--_active-idx": activeIndex
1326
- };
1327
- }, [variant, tabCount, activeIndex, style]);
1331
+ }),
1332
+ [tabCount, activeIndex, style]
1333
+ );
1328
1334
  return /* @__PURE__ */ jsx11(
1329
1335
  "div",
1330
1336
  {
1331
1337
  ref,
1332
1338
  role: "tablist",
1333
- className: clsx(variant === "segmented" ? "kds-segmented-tabs" : "kds-tabs", className),
1339
+ className: clsx("kds-segmented-tabs", className),
1334
1340
  style: mergedStyle,
1335
1341
  onKeyDown,
1336
1342
  ...props,
@@ -1351,6 +1357,7 @@ var KdsTab = forwardRef10(
1351
1357
  "button",
1352
1358
  {
1353
1359
  ref,
1360
+ type: "button",
1354
1361
  role: "tab",
1355
1362
  "aria-selected": _active,
1356
1363
  tabIndex: _active ? 0 : -1,
@@ -1377,103 +1384,14 @@ var KdsTabPanel = forwardRef10(
1377
1384
  );
1378
1385
  KdsTabPanel.displayName = "KdsTabPanel";
1379
1386
 
1380
- // src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
1381
- import { forwardRef as forwardRef11 } from "react";
1382
-
1383
- // src/assets/images/khipu-logo-color.svg
1384
- var khipu_logo_color_default = "./khipu-logo-color-TV75AKOV.svg";
1385
-
1386
- // src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
1387
- import { jsx as jsx12 } from "react/jsx-runtime";
1388
- var KhipuLogo = () => /* @__PURE__ */ jsx12(
1389
- "img",
1390
- {
1391
- src: khipu_logo_color_default,
1392
- alt: "Khipu",
1393
- className: "kds-logo-header-logo-img"
1394
- }
1395
- );
1396
- var KdsLogoHeaderLogo = forwardRef11(
1397
- ({ children, className, ...props }, ref) => {
1398
- return /* @__PURE__ */ jsx12(
1399
- "div",
1400
- {
1401
- ref,
1402
- className: clsx("kds-logo-header-logo", className),
1403
- ...props,
1404
- children: children || /* @__PURE__ */ jsx12(KhipuLogo, {})
1405
- }
1406
- );
1407
- }
1408
- );
1409
- KdsLogoHeaderLogo.displayName = "KdsLogoHeaderLogo";
1410
- var KdsLogoHeaderSeparator = forwardRef11(
1411
- ({ children = "|", className, ...props }, ref) => {
1412
- return /* @__PURE__ */ jsx12(
1413
- "span",
1414
- {
1415
- ref,
1416
- className: clsx("kds-logo-header-separator", className),
1417
- ...props,
1418
- children
1419
- }
1420
- );
1421
- }
1422
- );
1423
- KdsLogoHeaderSeparator.displayName = "KdsLogoHeaderSeparator";
1424
- var KdsLogoHeaderCode = forwardRef11(
1425
- ({ children, className, ...props }, ref) => {
1426
- return /* @__PURE__ */ jsx12(
1427
- "span",
1428
- {
1429
- ref,
1430
- className: clsx("kds-logo-header-code", className),
1431
- ...props,
1432
- children
1433
- }
1434
- );
1435
- }
1436
- );
1437
- KdsLogoHeaderCode.displayName = "KdsLogoHeaderCode";
1438
- var KdsLogoHeaderCloseButton = forwardRef11(
1439
- ({ onClose, className, ...props }, ref) => {
1440
- return /* @__PURE__ */ jsx12("div", { className: "kds-logo-header-close-wrapper", children: /* @__PURE__ */ jsx12(
1441
- "button",
1442
- {
1443
- ref,
1444
- onClick: onClose,
1445
- className: clsx("kds-btn kds-btn-icon", className),
1446
- "aria-label": "close",
1447
- ...props,
1448
- children: /* @__PURE__ */ jsx12("i", { className: "material-symbols-outlined", children: "close" })
1449
- }
1450
- ) });
1451
- }
1452
- );
1453
- KdsLogoHeaderCloseButton.displayName = "KdsLogoHeaderCloseButton";
1454
- var KdsLogoHeader = forwardRef11(
1455
- ({ children, className, ...props }, ref) => {
1456
- return /* @__PURE__ */ jsx12(
1457
- "div",
1458
- {
1459
- ref,
1460
- className: clsx("kds-brand-row", className),
1461
- ...props,
1462
- children
1463
- }
1464
- );
1465
- }
1466
- );
1467
- KdsLogoHeader.displayName = "KdsLogoHeader";
1468
-
1469
1387
  // src/components/core/KdsRadioGroup/KdsRadioGroup.tsx
1470
- import { forwardRef as forwardRef12 } from "react";
1471
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
1472
- var KdsRadioGroup = forwardRef12(
1473
- ({ label, name, options, value, onChange, className, ...props }, ref) => /* @__PURE__ */ jsxs7("fieldset", { ref, className: clsx("kds-radio-group", className), ...props, children: [
1474
- label && /* @__PURE__ */ jsx13("legend", { children: label }),
1475
- options.map((opt) => /* @__PURE__ */ jsxs7("label", { className: "field", children: [
1476
- /* @__PURE__ */ jsx13(
1388
+ import { forwardRef as forwardRef11 } from "react";
1389
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1390
+ var KdsRadioGroup = forwardRef11(
1391
+ ({ label, name, options, value, onChange, size, className, ...props }, ref) => /* @__PURE__ */ jsxs7("fieldset", { ref, className: clsx("kds-radio-group", className), ...props, children: [
1392
+ label && /* @__PURE__ */ jsx12("legend", { children: label }),
1393
+ options.map((opt) => /* @__PURE__ */ jsxs7("label", { className: clsx("radio", size), children: [
1394
+ /* @__PURE__ */ jsx12(
1477
1395
  "input",
1478
1396
  {
1479
1397
  type: "radio",
@@ -1484,78 +1402,97 @@ var KdsRadioGroup = forwardRef12(
1484
1402
  onChange: () => onChange?.(opt.value)
1485
1403
  }
1486
1404
  ),
1487
- /* @__PURE__ */ jsx13("span", { children: opt.label })
1405
+ /* @__PURE__ */ jsx12("span", { children: opt.label })
1488
1406
  ] }, opt.value))
1489
1407
  ] })
1490
1408
  );
1491
1409
  KdsRadioGroup.displayName = "KdsRadioGroup";
1492
1410
 
1493
1411
  // src/components/core/KdsSelect/KdsSelect.tsx
1494
- import { forwardRef as forwardRef13 } from "react";
1495
- import * as Select from "@radix-ui/react-select";
1496
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
1497
- var KdsSelectRoot = forwardRef13(
1412
+ import { forwardRef as forwardRef12 } from "react";
1413
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
1414
+ var KdsSelect = forwardRef12(
1498
1415
  ({
1499
- value,
1500
- onValueChange,
1501
- placeholder,
1502
1416
  label,
1503
- error,
1417
+ options,
1418
+ placeholder,
1504
1419
  helperText,
1505
- disabled,
1420
+ error,
1421
+ prefixIcon,
1506
1422
  fullWidth = true,
1507
- children,
1508
- className
1509
- }, ref) => /* @__PURE__ */ jsxs8(
1510
- "div",
1511
- {
1512
- ref,
1513
- className: clsx(
1514
- "kds-select",
1515
- error && "kds-select-error",
1516
- fullWidth && "kds-select-full",
1517
- className
1518
- ),
1519
- children: [
1520
- label && /* @__PURE__ */ jsx14("label", { className: "kds-select-label", children: label }),
1521
- /* @__PURE__ */ jsxs8(Select.Root, { value, onValueChange, disabled, children: [
1522
- /* @__PURE__ */ jsxs8(Select.Trigger, { className: "kds-select-trigger", children: [
1523
- /* @__PURE__ */ jsx14(Select.Value, { placeholder }),
1524
- /* @__PURE__ */ jsx14(Select.Icon, { className: "kds-select-icon", children: /* @__PURE__ */ jsx14("i", { className: "material-symbols-outlined", children: "expand_more" }) })
1423
+ disabled,
1424
+ required,
1425
+ className,
1426
+ id,
1427
+ ...props
1428
+ }, ref) => {
1429
+ const fieldId = id || `kds-select-${label.toLowerCase().replace(/\s+/g, "-")}`;
1430
+ return /* @__PURE__ */ jsxs8(
1431
+ "div",
1432
+ {
1433
+ className: clsx(
1434
+ "field",
1435
+ "label",
1436
+ "border",
1437
+ prefixIcon && "prefix",
1438
+ error && "invalid",
1439
+ fullWidth && "kds-w-full",
1440
+ className
1441
+ ),
1442
+ children: [
1443
+ prefixIcon && /* @__PURE__ */ jsx13("i", { className: "material-symbols-outlined", children: prefixIcon }),
1444
+ /* @__PURE__ */ jsxs8(
1445
+ "select",
1446
+ {
1447
+ ref,
1448
+ id: fieldId,
1449
+ disabled,
1450
+ required,
1451
+ ...props,
1452
+ children: [
1453
+ placeholder !== void 0 && /* @__PURE__ */ jsx13("option", { value: "", children: placeholder }),
1454
+ options.map((opt) => /* @__PURE__ */ jsx13("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
1455
+ ]
1456
+ }
1457
+ ),
1458
+ /* @__PURE__ */ jsxs8("label", { htmlFor: fieldId, children: [
1459
+ label,
1460
+ required && " *"
1525
1461
  ] }),
1526
- /* @__PURE__ */ jsx14(Select.Portal, { children: /* @__PURE__ */ jsx14(Select.Content, { className: "kds-select-content", position: "popper", sideOffset: 4, children: /* @__PURE__ */ jsx14(Select.Viewport, { className: "kds-select-viewport", children }) }) })
1527
- ] }),
1528
- helperText && /* @__PURE__ */ jsx14("span", { className: clsx("kds-select-helper", error && "kds-select-helper-error"), children: helperText })
1529
- ]
1530
- }
1531
- )
1532
- );
1533
- KdsSelectRoot.displayName = "KdsSelect";
1534
- var KdsSelectItem = forwardRef13(
1535
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsxs8(Select.Item, { ref, className: clsx("kds-select-item", className), ...props, children: [
1536
- /* @__PURE__ */ jsx14(Select.ItemText, { children }),
1537
- /* @__PURE__ */ jsx14(Select.ItemIndicator, { className: "kds-select-item-indicator", children: /* @__PURE__ */ jsx14("i", { className: "material-symbols-outlined", children: "check" }) })
1538
- ] })
1462
+ helperText && /* @__PURE__ */ jsx13("span", { className: "helper", children: helperText })
1463
+ ]
1464
+ }
1465
+ );
1466
+ }
1539
1467
  );
1540
- KdsSelectItem.displayName = "KdsSelect.Item";
1541
- var KdsSelect = Object.assign(KdsSelectRoot, {
1542
- Item: KdsSelectItem
1543
- });
1468
+ KdsSelect.displayName = "KdsSelect";
1544
1469
 
1545
1470
  // src/components/core/KdsChip/KdsChip.tsx
1546
- import { forwardRef as forwardRef14 } from "react";
1547
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
1548
- var KdsChip = forwardRef14(
1471
+ import { forwardRef as forwardRef13 } from "react";
1472
+ import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
1473
+ var KdsChip = forwardRef13(
1549
1474
  ({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */ jsxs9("span", { ref, className: clsx("kds-badge", color, className), ...props, children: [
1550
- icon && /* @__PURE__ */ jsx15("i", { className: "material-symbols-outlined", children: icon }),
1551
- children,
1552
- onDelete && /* @__PURE__ */ jsx15("button", { className: "kds-btn kds-btn-text kds-btn-sm", onClick: onDelete, "aria-label": "Eliminar", children: /* @__PURE__ */ jsx15("i", { className: "material-symbols-outlined", children: "close" }) })
1475
+ icon && /* @__PURE__ */ jsx14("i", { className: "material-symbols-outlined", children: icon }),
1476
+ /* @__PURE__ */ jsx14("span", { children }),
1477
+ onDelete && /* @__PURE__ */ jsx14(
1478
+ "button",
1479
+ {
1480
+ type: "button",
1481
+ className: "kds-badge-close",
1482
+ onClick: (e) => {
1483
+ e.stopPropagation();
1484
+ onDelete();
1485
+ },
1486
+ "aria-label": "Eliminar",
1487
+ children: /* @__PURE__ */ jsx14("i", { className: "material-symbols-outlined", children: "close" })
1488
+ }
1489
+ )
1553
1490
  ] })
1554
1491
  );
1555
1492
  KdsChip.displayName = "KdsChip";
1556
1493
 
1557
1494
  // src/components/core/KdsSnackbar/KdsSnackbar.tsx
1558
- import { forwardRef as forwardRef15 } from "react";
1495
+ import { forwardRef as forwardRef14 } from "react";
1559
1496
 
1560
1497
  // src/components/core/hooks/useAutoHide.ts
1561
1498
  import { useState, useEffect, useRef } from "react";
@@ -1575,22 +1512,61 @@ function useAutoHide(durationMs, onHide) {
1575
1512
  }
1576
1513
 
1577
1514
  // src/components/core/KdsSnackbar/KdsSnackbar.tsx
1578
- import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
1579
- var KdsSnackbar = forwardRef15(
1580
- ({ message, type, duration = 5e3, onClose, open = true, className, ...props }, ref) => {
1581
- const { visible } = useAutoHide(duration, onClose);
1515
+ import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
1516
+ var DEFAULT_ICONS2 = {
1517
+ info: "info",
1518
+ success: "check_circle",
1519
+ error: "error"
1520
+ };
1521
+ var KdsSnackbar = forwardRef14(
1522
+ ({
1523
+ message,
1524
+ type = "info",
1525
+ duration = 5e3,
1526
+ onClose,
1527
+ open = true,
1528
+ icon,
1529
+ className,
1530
+ style,
1531
+ ...props
1532
+ }, ref) => {
1533
+ const autoDismiss = duration > 0;
1534
+ const { visible } = useAutoHide(autoDismiss ? duration : 0, onClose);
1582
1535
  if (!open || !visible) return null;
1583
- return /* @__PURE__ */ jsxs10("div", { ref, role: "status", className: clsx("snackbar", "active", type, className), ...props, children: [
1584
- /* @__PURE__ */ jsx16("span", { children: message }),
1585
- onClose && /* @__PURE__ */ jsx16("button", { onClick: onClose, "aria-label": "Cerrar", children: /* @__PURE__ */ jsx16("i", { className: "material-symbols-outlined", children: "close" }) })
1586
- ] });
1536
+ const resolvedIcon = icon === false ? null : icon ?? DEFAULT_ICONS2[type];
1537
+ const mergedStyle = autoDismiss ? { ...style, ["--kds-snackbar-duration"]: `${duration}ms` } : style ?? {};
1538
+ return /* @__PURE__ */ jsxs10(
1539
+ "div",
1540
+ {
1541
+ ref,
1542
+ role: "status",
1543
+ className: clsx("snackbar", "active", type, className),
1544
+ "data-auto-dismiss": autoDismiss ? "true" : void 0,
1545
+ style: mergedStyle,
1546
+ ...props,
1547
+ children: [
1548
+ resolvedIcon && /* @__PURE__ */ jsx15("i", { className: "material-symbols-outlined", children: resolvedIcon }),
1549
+ /* @__PURE__ */ jsx15("span", { className: "max", children: message }),
1550
+ onClose && /* @__PURE__ */ jsx15(
1551
+ "button",
1552
+ {
1553
+ type: "button",
1554
+ className: "kds-snackbar-close",
1555
+ onClick: onClose,
1556
+ "aria-label": "Cerrar",
1557
+ children: /* @__PURE__ */ jsx15("i", { className: "material-symbols-outlined", children: "close" })
1558
+ }
1559
+ )
1560
+ ]
1561
+ }
1562
+ );
1587
1563
  }
1588
1564
  );
1589
1565
  KdsSnackbar.displayName = "KdsSnackbar";
1590
1566
 
1591
1567
  // src/components/core/KdsTooltip/KdsTooltip.tsx
1592
1568
  import * as Tooltip from "@radix-ui/react-tooltip";
1593
- import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1569
+ import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
1594
1570
  function KdsTooltip({
1595
1571
  content,
1596
1572
  children,
@@ -1601,80 +1577,96 @@ function KdsTooltip({
1601
1577
  onOpenChange,
1602
1578
  delayDuration = 300
1603
1579
  }) {
1604
- return /* @__PURE__ */ jsx17(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ jsxs11(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
1605
- /* @__PURE__ */ jsx17(Tooltip.Trigger, { asChild: true, children }),
1606
- /* @__PURE__ */ jsx17(Tooltip.Portal, { children: /* @__PURE__ */ jsxs11(Tooltip.Content, { className: clsx("kds-tooltip", className), side: placement, sideOffset: 4, children: [
1607
- content,
1608
- /* @__PURE__ */ jsx17(Tooltip.Arrow, { className: "kds-tooltip-arrow" })
1609
- ] }) })
1580
+ return /* @__PURE__ */ jsx16(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ jsxs11(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
1581
+ /* @__PURE__ */ jsx16(Tooltip.Trigger, { asChild: true, children }),
1582
+ /* @__PURE__ */ jsx16(Tooltip.Portal, { children: /* @__PURE__ */ jsxs11(
1583
+ Tooltip.Content,
1584
+ {
1585
+ className: clsx("kds-tooltip", className),
1586
+ side: placement,
1587
+ sideOffset: 6,
1588
+ collisionPadding: 8,
1589
+ children: [
1590
+ content,
1591
+ /* @__PURE__ */ jsx16(Tooltip.Arrow, { className: "kds-tooltip-arrow", width: 10, height: 5 })
1592
+ ]
1593
+ }
1594
+ ) })
1610
1595
  ] }) });
1611
1596
  }
1612
1597
 
1613
1598
  // src/components/core/KdsAccordion/KdsAccordion.tsx
1614
- import { forwardRef as forwardRef16 } from "react";
1615
- import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
1616
- var KdsAccordion = forwardRef16(
1617
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx18("details", { ref, className: clsx("kds-accordion", className), ...props, children })
1599
+ import { forwardRef as forwardRef15 } from "react";
1600
+ import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1601
+ var KdsAccordion = forwardRef15(
1602
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx17("details", { ref, className: clsx("kds-accordion", className), ...props, children })
1618
1603
  );
1619
1604
  KdsAccordion.displayName = "KdsAccordion";
1620
- var KdsAccordionSummary = forwardRef16(
1605
+ var KdsAccordionSummary = forwardRef15(
1621
1606
  ({ children, className, ...props }, ref) => /* @__PURE__ */ jsxs12("summary", { ref, className: clsx("kds-accordion-summary", className), ...props, children: [
1622
1607
  children,
1623
- /* @__PURE__ */ jsx18("i", { className: "material-symbols-outlined", children: "expand_more" })
1608
+ /* @__PURE__ */ jsx17("i", { className: "material-symbols-outlined", children: "expand_more" })
1624
1609
  ] })
1625
1610
  );
1626
1611
  KdsAccordionSummary.displayName = "KdsAccordionSummary";
1627
- var KdsAccordionDetails = forwardRef16(
1628
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx18("div", { ref, className: clsx("kds-accordion-details", className), ...props, children })
1612
+ var KdsAccordionDetails = forwardRef15(
1613
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx17("div", { ref, className: clsx("kds-accordion-details", className), ...props, children })
1629
1614
  );
1630
1615
  KdsAccordionDetails.displayName = "KdsAccordionDetails";
1631
1616
 
1632
1617
  // src/components/core/KdsDivider/KdsDivider.tsx
1633
- import { forwardRef as forwardRef17 } from "react";
1634
- import { jsx as jsx19 } from "react/jsx-runtime";
1635
- var KdsDivider = forwardRef17(
1636
- ({ dashed, className, ...props }, ref) => /* @__PURE__ */ jsx19("hr", { ref, className: clsx(dashed ? "kds-hr-dashed" : "kds-hr", className), ...props })
1618
+ import { forwardRef as forwardRef16 } from "react";
1619
+ import { jsx as jsx18 } from "react/jsx-runtime";
1620
+ var KdsDivider = forwardRef16(
1621
+ ({ dashed, className, ...props }, ref) => /* @__PURE__ */ jsx18("hr", { ref, className: clsx(dashed ? "kds-hr-dashed" : "kds-hr", className), ...props })
1637
1622
  );
1638
1623
  KdsDivider.displayName = "KdsDivider";
1639
1624
 
1640
1625
  // src/components/core/KdsSectionNote/KdsSectionNote.tsx
1641
- import { forwardRef as forwardRef18 } from "react";
1642
- import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
1643
- var KdsSectionNote = forwardRef18(
1626
+ import { forwardRef as forwardRef17 } from "react";
1627
+ import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
1628
+ var KdsSectionNote = forwardRef17(
1644
1629
  ({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ jsxs13("p", { ref, className: clsx("kds-section-note", className), ...props, children: [
1645
- /* @__PURE__ */ jsx20("i", { className: "material-symbols-outlined", children: icon }),
1646
- /* @__PURE__ */ jsx20("span", { children })
1630
+ /* @__PURE__ */ jsx19("i", { className: "material-symbols-outlined", children: icon }),
1631
+ /* @__PURE__ */ jsx19("span", { children })
1647
1632
  ] })
1648
1633
  );
1649
1634
  KdsSectionNote.displayName = "KdsSectionNote";
1650
1635
 
1651
1636
  // src/components/core/KdsStatusBlock/KdsStatusBlock.tsx
1652
- import { forwardRef as forwardRef19 } from "react";
1653
- import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
1654
- var KdsStatusBlock = forwardRef19(
1637
+ import { forwardRef as forwardRef18 } from "react";
1638
+ import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
1639
+ var KdsStatusBlock = forwardRef18(
1655
1640
  ({ status, icon, title, description, inline, className, ...props }, ref) => /* @__PURE__ */ jsxs14("div", { ref, className: clsx("kds-status-block", inline && "inline", className), "data-status": status, ...props, children: [
1656
- /* @__PURE__ */ jsx21("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ jsx21("i", { className: "material-symbols-outlined", children: icon }) }),
1641
+ /* @__PURE__ */ jsx20("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ jsx20("i", { className: "material-symbols-outlined", children: icon }) }),
1657
1642
  /* @__PURE__ */ jsxs14("div", { children: [
1658
- /* @__PURE__ */ jsx21("h2", { className: "kds-status-block-title", children: title }),
1659
- description && /* @__PURE__ */ jsx21("p", { className: "kds-status-block-description", children: description })
1643
+ /* @__PURE__ */ jsx20("h2", { className: "kds-status-block-title", children: title }),
1644
+ description && /* @__PURE__ */ jsx20("p", { className: "kds-status-block-description", children: description })
1660
1645
  ] })
1661
1646
  ] })
1662
1647
  );
1663
1648
  KdsStatusBlock.displayName = "KdsStatusBlock";
1664
1649
 
1665
1650
  // src/components/core/KdsStepper/KdsStepper.tsx
1666
- import { forwardRef as forwardRef20 } from "react";
1667
- import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1668
- var KdsStepper = forwardRef20(
1669
- ({ steps, current, className, ...props }, ref) => /* @__PURE__ */ jsx22("div", { ref, className: clsx("kds-stepper", className), "data-steps": steps, "data-current": current, ...props, children: Array.from({ length: steps }, (_, i) => /* @__PURE__ */ jsxs15("div", { className: clsx("kds-step", i < current && "completed", i === current && "current"), children: [
1670
- /* @__PURE__ */ jsx22("div", { className: "kds-step-indicator", children: i < current ? "\u2713" : i + 1 }),
1671
- i < steps - 1 && /* @__PURE__ */ jsx22("div", { className: "kds-step-line" })
1672
- ] }, i)) })
1651
+ import { forwardRef as forwardRef19 } from "react";
1652
+ import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
1653
+ var KdsStepper = forwardRef19(
1654
+ ({ steps, current, className, ...props }, ref) => /* @__PURE__ */ jsx21("div", { ref, className: clsx("kds-stepper", className), ...props, children: steps.map((label, i) => /* @__PURE__ */ jsxs15(
1655
+ "div",
1656
+ {
1657
+ className: clsx("kds-step", i < current && "completed", i === current && "current"),
1658
+ children: [
1659
+ /* @__PURE__ */ jsx21("div", { className: "kds-step-indicator" }),
1660
+ /* @__PURE__ */ jsx21("div", { className: "kds-step-label", children: label })
1661
+ ]
1662
+ },
1663
+ `${i}-${label}`
1664
+ )) })
1673
1665
  );
1674
1666
  KdsStepper.displayName = "KdsStepper";
1675
1667
 
1676
1668
  // src/components/core/KdsCopyRow/KdsCopyRow.tsx
1677
- import { forwardRef as forwardRef21 } from "react";
1669
+ import { forwardRef as forwardRef20 } from "react";
1678
1670
 
1679
1671
  // src/components/core/hooks/useCopyToClipboard.ts
1680
1672
  import { useState as useState2, useCallback as useCallback2 } from "react";
@@ -1695,49 +1687,194 @@ function useCopyToClipboard(resetMs = 1200) {
1695
1687
  }
1696
1688
 
1697
1689
  // src/components/core/KdsCopyRow/KdsCopyRow.tsx
1698
- import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
1699
- var KdsCopyRow = forwardRef21(
1700
- ({ label, value, className, ...props }, ref) => {
1690
+ import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
1691
+ var KdsCopyRow = forwardRef20(
1692
+ ({ label, value, copiedText = "Copiado", className, ...props }, ref) => {
1701
1693
  const { copied, copy } = useCopyToClipboard();
1702
- return /* @__PURE__ */ jsxs16("div", { ref, className: clsx("kds-copy-row", copied && "copied", className), ...props, children: [
1703
- /* @__PURE__ */ jsx23("span", { className: "kds-copy-row-label", children: label }),
1704
- /* @__PURE__ */ jsx23("span", { className: "kds-copy-row-value", children: value }),
1705
- /* @__PURE__ */ jsx23("button", { className: "kds-copy-row-btn", onClick: () => copy(value), "aria-label": `Copiar ${label}`, children: /* @__PURE__ */ jsx23("i", { className: "material-symbols-outlined", children: copied ? "check" : "content_copy" }) })
1706
- ] });
1694
+ return /* @__PURE__ */ jsxs16(
1695
+ "button",
1696
+ {
1697
+ ref,
1698
+ type: "button",
1699
+ className: clsx("kds-copy-row", copied && "copied", className),
1700
+ "data-copy": value,
1701
+ onClick: () => copy(value),
1702
+ "aria-label": `Copiar ${label}: ${value}`,
1703
+ ...props,
1704
+ children: [
1705
+ /* @__PURE__ */ jsx22("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "content_copy" }),
1706
+ /* @__PURE__ */ jsxs16("div", { children: [
1707
+ /* @__PURE__ */ jsx22("span", { className: "kds-copy-row-label", children: label }),
1708
+ /* @__PURE__ */ jsx22("span", { className: "kds-copy-row-value", children: value })
1709
+ ] }),
1710
+ /* @__PURE__ */ jsxs16("span", { className: "kds-copy-toast", "aria-hidden": "true", children: [
1711
+ /* @__PURE__ */ jsx22("i", { className: "material-symbols-outlined", children: "check_circle" }),
1712
+ " ",
1713
+ copiedText
1714
+ ] })
1715
+ ]
1716
+ }
1717
+ );
1707
1718
  }
1708
1719
  );
1709
1720
  KdsCopyRow.displayName = "KdsCopyRow";
1710
1721
 
1711
1722
  // src/components/core/KdsCopyableTable/KdsCopyableTable.tsx
1712
- import { forwardRef as forwardRef22 } from "react";
1713
- import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
1714
- var KdsCopyableTable = forwardRef22(
1715
- ({ rows, className, ...props }, ref) => {
1716
- const { copied, copy } = useCopyToClipboard();
1717
- const handleCopyAll = () => {
1723
+ import { forwardRef as forwardRef21, useState as useState3, useRef as useRef2, useCallback as useCallback3 } from "react";
1724
+ import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
1725
+ async function copyToClipboard(text) {
1726
+ try {
1727
+ if (navigator.clipboard?.writeText) {
1728
+ await navigator.clipboard.writeText(text);
1729
+ return true;
1730
+ }
1731
+ } catch {
1732
+ }
1733
+ const ta = document.createElement("textarea");
1734
+ ta.value = text;
1735
+ ta.style.position = "fixed";
1736
+ ta.style.opacity = "0";
1737
+ document.body.appendChild(ta);
1738
+ ta.select();
1739
+ try {
1740
+ document.execCommand("copy");
1741
+ return true;
1742
+ } catch {
1743
+ return false;
1744
+ } finally {
1745
+ document.body.removeChild(ta);
1746
+ }
1747
+ }
1748
+ var TRANSITION_MS = 300;
1749
+ var KdsCopyableTable = forwardRef21(
1750
+ ({
1751
+ rows,
1752
+ copyAllLabel = "Copiar todos los datos",
1753
+ copiedAllLabel = "Datos copiados",
1754
+ showCopyAll = true,
1755
+ className,
1756
+ ...props
1757
+ }, ref) => {
1758
+ const copiedTimers = useRef2(/* @__PURE__ */ new Map());
1759
+ const settlingTimers = useRef2(/* @__PURE__ */ new Map());
1760
+ const [copiedRows, setCopiedRows] = useState3(/* @__PURE__ */ new Set());
1761
+ const [settlingRows, setSettlingRows] = useState3(/* @__PURE__ */ new Set());
1762
+ const [allCopied, setAllCopied] = useState3(false);
1763
+ const markCopied = useCallback3((indexes, duration = 1500) => {
1764
+ setCopiedRows((prev) => {
1765
+ const next = new Set(prev);
1766
+ indexes.forEach((i) => next.add(i));
1767
+ return next;
1768
+ });
1769
+ indexes.forEach((i) => {
1770
+ const st = settlingTimers.current.get(i);
1771
+ if (st) {
1772
+ clearTimeout(st);
1773
+ settlingTimers.current.delete(i);
1774
+ }
1775
+ });
1776
+ setSettlingRows((prev) => {
1777
+ const next = new Set(prev);
1778
+ indexes.forEach((i) => next.delete(i));
1779
+ return next;
1780
+ });
1781
+ indexes.forEach((i) => {
1782
+ const existing = copiedTimers.current.get(i);
1783
+ if (existing) clearTimeout(existing);
1784
+ const t = setTimeout(() => {
1785
+ setCopiedRows((prev) => {
1786
+ const next = new Set(prev);
1787
+ next.delete(i);
1788
+ return next;
1789
+ });
1790
+ setSettlingRows((prev) => {
1791
+ const next = new Set(prev);
1792
+ next.add(i);
1793
+ return next;
1794
+ });
1795
+ copiedTimers.current.delete(i);
1796
+ const settlingT = setTimeout(() => {
1797
+ setSettlingRows((prev) => {
1798
+ const next = new Set(prev);
1799
+ next.delete(i);
1800
+ return next;
1801
+ });
1802
+ settlingTimers.current.delete(i);
1803
+ }, TRANSITION_MS);
1804
+ settlingTimers.current.set(i, settlingT);
1805
+ }, duration);
1806
+ copiedTimers.current.set(i, t);
1807
+ });
1808
+ }, []);
1809
+ const handleRowCopy = async (row, index) => {
1810
+ const ok = await copyToClipboard(row.copy ?? row.value);
1811
+ if (ok) markCopied([index]);
1812
+ };
1813
+ const handleCopyAll = async () => {
1718
1814
  const text = rows.map((r) => `${r.label}: ${r.value}`).join("\n");
1719
- copy(text);
1815
+ const ok = await copyToClipboard(text);
1816
+ if (ok) {
1817
+ markCopied(rows.map((_, i) => i));
1818
+ setAllCopied(true);
1819
+ setTimeout(() => setAllCopied(false), 2e3);
1820
+ }
1720
1821
  };
1721
1822
  return /* @__PURE__ */ jsxs17(Fragment2, { children: [
1722
- /* @__PURE__ */ jsx24("div", { ref, className: clsx("kds-copyable-table", className), ...props, children: rows.map((row) => /* @__PURE__ */ jsxs17("div", { className: "kds-copyable-table-row", children: [
1723
- /* @__PURE__ */ jsx24("span", { className: "kds-copyable-table-label", children: row.label }),
1724
- /* @__PURE__ */ jsx24("span", { className: "kds-copyable-table-value", children: row.value })
1725
- ] }, row.label)) }),
1726
- /* @__PURE__ */ jsxs17("button", { className: `kds-btn kds-btn-outlined kds-btn-block kds-copy-all-btn${copied ? " copied" : ""}`, onClick: handleCopyAll, "aria-label": "Copiar todo", children: [
1727
- /* @__PURE__ */ jsx24("span", { className: "kds-icon", children: /* @__PURE__ */ jsx24("i", { className: "material-symbols-outlined", children: copied ? "check" : "content_copy" }) }),
1728
- /* @__PURE__ */ jsx24("span", { children: copied ? "Copiado" : "Copiar todos los datos" })
1729
- ] })
1823
+ /* @__PURE__ */ jsx23("div", { ref, className: clsx("kds-copyable-table", className), ...props, children: rows.map((row, i) => /* @__PURE__ */ jsxs17(
1824
+ "div",
1825
+ {
1826
+ className: clsx(
1827
+ "kds-copyable-table-row",
1828
+ copiedRows.has(i) && "copied",
1829
+ settlingRows.has(i) && "settling"
1830
+ ),
1831
+ role: "button",
1832
+ tabIndex: 0,
1833
+ onClick: () => handleRowCopy(row, i),
1834
+ onKeyDown: (e) => {
1835
+ if (e.key === "Enter" || e.key === " ") {
1836
+ e.preventDefault();
1837
+ handleRowCopy(row, i);
1838
+ }
1839
+ },
1840
+ "aria-label": `Copiar ${row.label}: ${row.value}`,
1841
+ children: [
1842
+ /* @__PURE__ */ jsx23("span", { className: "kds-key", children: row.label }),
1843
+ /* @__PURE__ */ jsx23("span", { className: "kds-value", children: row.value })
1844
+ ]
1845
+ },
1846
+ `${row.label}-${i}`
1847
+ )) }),
1848
+ showCopyAll && /* @__PURE__ */ jsxs17(
1849
+ "button",
1850
+ {
1851
+ type: "button",
1852
+ className: clsx(
1853
+ "kds-btn",
1854
+ "kds-btn-outlined",
1855
+ "kds-btn-block",
1856
+ "kds-copy-all-btn",
1857
+ allCopied && "copied"
1858
+ ),
1859
+ onClick: handleCopyAll,
1860
+ "aria-label": allCopied ? copiedAllLabel : copyAllLabel,
1861
+ children: [
1862
+ /* @__PURE__ */ jsx23("span", { className: "kds-icon", children: /* @__PURE__ */ jsx23("i", { className: "material-symbols-outlined", children: allCopied ? "check" : "content_copy" }) }),
1863
+ /* @__PURE__ */ jsx23("span", { children: allCopied ? copiedAllLabel : copyAllLabel })
1864
+ ]
1865
+ }
1866
+ )
1730
1867
  ] });
1731
1868
  }
1732
1869
  );
1733
1870
  KdsCopyableTable.displayName = "KdsCopyableTable";
1734
1871
 
1735
1872
  // src/components/core/KdsExpandPanel/KdsExpandPanel.tsx
1736
- import { forwardRef as forwardRef23, useState as useState3 } from "react";
1737
- import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
1738
- var KdsExpandPanel = forwardRef23(
1873
+ import { forwardRef as forwardRef22, useState as useState4 } from "react";
1874
+ import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
1875
+ var KdsExpandPanel = forwardRef22(
1739
1876
  ({ label, defaultExpanded = false, children, className, ...props }, ref) => {
1740
- const [expanded, setExpanded] = useState3(defaultExpanded);
1877
+ const [expanded, setExpanded] = useState4(defaultExpanded);
1741
1878
  return /* @__PURE__ */ jsxs18("div", { ref, className, ...props, children: [
1742
1879
  /* @__PURE__ */ jsxs18(
1743
1880
  "button",
@@ -1746,22 +1883,22 @@ var KdsExpandPanel = forwardRef23(
1746
1883
  onClick: () => setExpanded((v) => !v),
1747
1884
  "aria-expanded": expanded,
1748
1885
  children: [
1749
- /* @__PURE__ */ jsx25("span", { children: label }),
1750
- /* @__PURE__ */ jsx25("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
1886
+ /* @__PURE__ */ jsx24("span", { children: label }),
1887
+ /* @__PURE__ */ jsx24("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
1751
1888
  ]
1752
1889
  }
1753
1890
  ),
1754
- /* @__PURE__ */ jsx25("div", { className: clsx("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
1891
+ /* @__PURE__ */ jsx24("div", { className: clsx("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
1755
1892
  ] });
1756
1893
  }
1757
1894
  );
1758
1895
  KdsExpandPanel.displayName = "KdsExpandPanel";
1759
1896
 
1760
1897
  // src/components/core/KdsCountdown/KdsCountdown.tsx
1761
- import { forwardRef as forwardRef24, useEffect as useEffect3, useRef as useRef2 } from "react";
1898
+ import { forwardRef as forwardRef23, useEffect as useEffect3, useRef as useRef3 } from "react";
1762
1899
 
1763
1900
  // src/components/core/hooks/useCountdown.ts
1764
- import { useState as useState4, useEffect as useEffect2 } from "react";
1901
+ import { useState as useState5, useEffect as useEffect2 } from "react";
1765
1902
  function calcRemaining(deadline) {
1766
1903
  const diff = Math.max(0, new Date(deadline).getTime() - Date.now());
1767
1904
  const totalSeconds = Math.floor(diff / 1e3);
@@ -1774,7 +1911,7 @@ function calcRemaining(deadline) {
1774
1911
  };
1775
1912
  }
1776
1913
  function useCountdown(deadline) {
1777
- const [state, setState] = useState4(() => calcRemaining(deadline));
1914
+ const [state, setState] = useState5(() => calcRemaining(deadline));
1778
1915
  useEffect2(() => {
1779
1916
  const tick = () => setState(calcRemaining(deadline));
1780
1917
  const id = setInterval(tick, 1e3);
@@ -1784,11 +1921,11 @@ function useCountdown(deadline) {
1784
1921
  }
1785
1922
 
1786
1923
  // src/components/core/KdsCountdown/KdsCountdown.tsx
1787
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
1788
- var KdsCountdown = forwardRef24(
1924
+ import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
1925
+ var KdsCountdown = forwardRef23(
1789
1926
  ({ deadline, label, onExpire, className, ...props }, ref) => {
1790
1927
  const { hours, minutes, seconds, expired, urgent } = useCountdown(deadline);
1791
- const onExpireRef = useRef2(onExpire);
1928
+ const onExpireRef = useRef3(onExpire);
1792
1929
  onExpireRef.current = onExpire;
1793
1930
  useEffect3(() => {
1794
1931
  if (expired) {
@@ -1800,7 +1937,7 @@ var KdsCountdown = forwardRef24(
1800
1937
  }
1801
1938
  const pad = (n) => String(n).padStart(2, "0");
1802
1939
  return /* @__PURE__ */ jsxs19("div", { ref, className: clsx("kds-countdown", urgent && "urgent", className), ...props, children: [
1803
- label && /* @__PURE__ */ jsx26("span", { className: "kds-countdown-label", children: label }),
1940
+ label && /* @__PURE__ */ jsx25("span", { className: "kds-countdown-label", children: label }),
1804
1941
  /* @__PURE__ */ jsxs19("span", { className: "kds-countdown-value", children: [
1805
1942
  pad(hours),
1806
1943
  ":",
@@ -1814,17 +1951,17 @@ var KdsCountdown = forwardRef24(
1814
1951
  KdsCountdown.displayName = "KdsCountdown";
1815
1952
 
1816
1953
  // src/components/core/KdsSegmentedTabs/KdsSegmentedTabs.tsx
1817
- import { forwardRef as forwardRef25 } from "react";
1818
- import { jsx as jsx27 } from "react/jsx-runtime";
1819
- var KdsSegmentedTabs = forwardRef25(
1820
- (props, ref) => /* @__PURE__ */ jsx27(KdsTabs, { ref, variant: "segmented", ...props })
1954
+ import { forwardRef as forwardRef24 } from "react";
1955
+ import { jsx as jsx26 } from "react/jsx-runtime";
1956
+ var KdsSegmentedTabs = forwardRef24(
1957
+ (props, ref) => /* @__PURE__ */ jsx26(KdsTabs, { ref, ...props })
1821
1958
  );
1822
1959
  KdsSegmentedTabs.displayName = "KdsSegmentedTabs";
1823
1960
 
1824
1961
  // src/components/domain/KdsBankRow/KdsBankRow.tsx
1825
- import { forwardRef as forwardRef26 } from "react";
1826
- import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
1827
- var KdsBankRow = forwardRef26(
1962
+ import { forwardRef as forwardRef25 } from "react";
1963
+ import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
1964
+ var KdsBankRow = forwardRef25(
1828
1965
  ({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */ jsxs20(
1829
1966
  "button",
1830
1967
  {
@@ -1833,9 +1970,9 @@ var KdsBankRow = forwardRef26(
1833
1970
  className: clsx("kds-bank-row", selected && "selected", className),
1834
1971
  ...props,
1835
1972
  children: [
1836
- /* @__PURE__ */ jsx28("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ jsx28("img", { src: logoUrl, alt: name }) : /* @__PURE__ */ jsx28("span", { className: "initials", children: name.charAt(0) }) }),
1837
- /* @__PURE__ */ jsx28("span", { className: "kds-bank-row-name", children: name }),
1838
- /* @__PURE__ */ jsx28("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
1973
+ /* @__PURE__ */ jsx27("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ jsx27("img", { src: logoUrl, alt: name }) : /* @__PURE__ */ jsx27("span", { className: "initials", children: name.charAt(0) }) }),
1974
+ /* @__PURE__ */ jsx27("span", { className: "kds-bank-row-name", children: name }),
1975
+ /* @__PURE__ */ jsx27("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
1839
1976
  ]
1840
1977
  }
1841
1978
  )
@@ -1843,32 +1980,32 @@ var KdsBankRow = forwardRef26(
1843
1980
  KdsBankRow.displayName = "KdsBankRow";
1844
1981
 
1845
1982
  // src/components/domain/KdsBankList/KdsBankList.tsx
1846
- import { forwardRef as forwardRef27 } from "react";
1847
- import { jsx as jsx29 } from "react/jsx-runtime";
1848
- var KdsBankList = forwardRef27(
1849
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx29("div", { ref, className: clsx("kds-bank-list", className), role: "list", ...props, children })
1983
+ import { forwardRef as forwardRef26 } from "react";
1984
+ import { jsx as jsx28 } from "react/jsx-runtime";
1985
+ var KdsBankList = forwardRef26(
1986
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx28("div", { ref, className: clsx("kds-bank-list", className), role: "list", ...props, children })
1850
1987
  );
1851
1988
  KdsBankList.displayName = "KdsBankList";
1852
1989
 
1853
1990
  // src/components/domain/KdsBankModal/KdsBankModal.tsx
1854
- import { forwardRef as forwardRef28, useState as useState5 } from "react";
1855
- import * as Dialog2 from "@radix-ui/react-dialog";
1856
- import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
1857
- var KdsBankModal = forwardRef28(
1991
+ import { forwardRef as forwardRef27, useState as useState6 } from "react";
1992
+ import * as Dialog from "@radix-ui/react-dialog";
1993
+ import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
1994
+ var KdsBankModal = forwardRef27(
1858
1995
  ({ open, onClose, title = "Selecciona tu banco", searchPlaceholder = "Buscar banco...", onSearch, children, className, container }, ref) => {
1859
- const [query, setQuery] = useState5("");
1996
+ const [query, setQuery] = useState6("");
1860
1997
  const handleSearch = (value) => {
1861
1998
  setQuery(value);
1862
1999
  onSearch?.(value);
1863
2000
  };
1864
- return /* @__PURE__ */ jsx30(Dialog2.Root, { open, onOpenChange: (o) => {
2001
+ return /* @__PURE__ */ jsx29(Dialog.Root, { open, onOpenChange: (o) => {
1865
2002
  if (!o) onClose();
1866
- }, children: /* @__PURE__ */ jsx30(Dialog2.Portal, { container, children: /* @__PURE__ */ jsx30(Dialog2.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ jsxs21(Dialog2.Content, { ref, className: clsx("kds-bank-modal", className), children: [
2003
+ }, children: /* @__PURE__ */ jsx29(Dialog.Portal, { container, children: /* @__PURE__ */ jsx29(Dialog.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ jsxs21(Dialog.Content, { ref, className: clsx("kds-bank-modal", className), children: [
1867
2004
  /* @__PURE__ */ jsxs21("div", { className: "kds-bank-modal-header", children: [
1868
- /* @__PURE__ */ jsx30(Dialog2.Title, { asChild: true, children: /* @__PURE__ */ jsx30("h3", { children: title }) }),
1869
- /* @__PURE__ */ jsx30(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx30("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ jsx30("i", { className: "material-symbols-outlined", children: "close" }) }) })
2005
+ /* @__PURE__ */ jsx29(Dialog.Title, { asChild: true, children: /* @__PURE__ */ jsx29("h3", { children: title }) }),
2006
+ /* @__PURE__ */ jsx29(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx29("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ jsx29("i", { className: "material-symbols-outlined", children: "close" }) }) })
1870
2007
  ] }),
1871
- /* @__PURE__ */ jsx30("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ jsx30(
2008
+ /* @__PURE__ */ jsx29("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ jsx29(
1872
2009
  "input",
1873
2010
  {
1874
2011
  type: "text",
@@ -1877,32 +2014,32 @@ var KdsBankModal = forwardRef28(
1877
2014
  onChange: (e) => handleSearch(e.target.value)
1878
2015
  }
1879
2016
  ) }),
1880
- /* @__PURE__ */ jsx30("div", { className: "kds-bank-modal-body", children })
2017
+ /* @__PURE__ */ jsx29("div", { className: "kds-bank-modal-body", children })
1881
2018
  ] }) }) }) });
1882
2019
  }
1883
2020
  );
1884
2021
  KdsBankModal.displayName = "KdsBankModal";
1885
2022
 
1886
2023
  // src/components/domain/KdsQrRow/KdsQrRow.tsx
1887
- import { forwardRef as forwardRef29 } from "react";
1888
- import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
1889
- var KdsQrRow = forwardRef29(
2024
+ import { forwardRef as forwardRef28 } from "react";
2025
+ import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
2026
+ var KdsQrRow = forwardRef28(
1890
2027
  ({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ jsxs22("button", { ref, type: "button", className: clsx("kds-qr-row", className), ...props, children: [
1891
- /* @__PURE__ */ jsx31("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx31("i", { className: "material-symbols-outlined", children: icon }) }),
2028
+ /* @__PURE__ */ jsx30("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx30("i", { className: "material-symbols-outlined", children: icon }) }),
1892
2029
  /* @__PURE__ */ jsxs22("span", { className: "kds-qr-text", children: [
1893
- /* @__PURE__ */ jsx31("span", { className: "title", children: name }),
1894
- description && /* @__PURE__ */ jsx31("span", { className: "sub", children: description })
2030
+ /* @__PURE__ */ jsx30("span", { className: "kds-qr-title", children: name }),
2031
+ description && /* @__PURE__ */ jsx30("span", { className: "kds-qr-subtitle", children: description })
1895
2032
  ] }),
1896
- badge && /* @__PURE__ */ jsx31("span", { className: "kds-qr-badge", children: badge }),
1897
- /* @__PURE__ */ jsx31("i", { className: "material-symbols-outlined", children: "chevron_right" })
2033
+ badge && /* @__PURE__ */ jsx30("span", { className: "kds-qr-badge", children: badge }),
2034
+ /* @__PURE__ */ jsx30("i", { className: "material-symbols-outlined", children: "chevron_right" })
1898
2035
  ] })
1899
2036
  );
1900
2037
  KdsQrRow.displayName = "KdsQrRow";
1901
2038
 
1902
2039
  // src/components/domain/KdsCardSelector/KdsCardSelector.tsx
1903
- import { forwardRef as forwardRef30 } from "react";
1904
- import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
1905
- var KdsCardSelector = forwardRef30(
2040
+ import { forwardRef as forwardRef29 } from "react";
2041
+ import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
2042
+ var KdsCardSelector = forwardRef29(
1906
2043
  ({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ jsxs23(
1907
2044
  "button",
1908
2045
  {
@@ -1911,9 +2048,9 @@ var KdsCardSelector = forwardRef30(
1911
2048
  className: clsx("kds-card-selector", selected && "selected", className),
1912
2049
  ...props,
1913
2050
  children: [
1914
- icon && /* @__PURE__ */ jsx32("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ jsx32("i", { className: "material-symbols-outlined", children: icon }) }),
1915
- /* @__PURE__ */ jsx32("span", { className: "kds-card-selector-title", children: title }),
1916
- description && /* @__PURE__ */ jsx32("span", { className: "kds-card-selector-description", children: description })
2051
+ icon && /* @__PURE__ */ jsx31("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ jsx31("i", { className: "material-symbols-outlined", children: icon }) }),
2052
+ /* @__PURE__ */ jsx31("span", { className: "kds-card-selector-title", children: title }),
2053
+ description && /* @__PURE__ */ jsx31("span", { className: "kds-card-selector-description", children: description })
1917
2054
  ]
1918
2055
  }
1919
2056
  )
@@ -1921,9 +2058,9 @@ var KdsCardSelector = forwardRef30(
1921
2058
  KdsCardSelector.displayName = "KdsCardSelector";
1922
2059
 
1923
2060
  // src/components/domain/KdsCardPlan/KdsCardPlan.tsx
1924
- import { forwardRef as forwardRef31 } from "react";
1925
- import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
1926
- var KdsCardPlan = forwardRef31(
2061
+ import { forwardRef as forwardRef30 } from "react";
2062
+ import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
2063
+ var KdsCardPlan = forwardRef30(
1927
2064
  ({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ jsxs24(
1928
2065
  "div",
1929
2066
  {
@@ -1931,16 +2068,16 @@ var KdsCardPlan = forwardRef31(
1931
2068
  className: clsx("kds-card-plan", recommended && "recommended", className),
1932
2069
  ...props,
1933
2070
  children: [
1934
- badgeText && /* @__PURE__ */ jsx33("span", { className: "kds-card-plan-badge", children: badgeText }),
1935
- /* @__PURE__ */ jsx33("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ jsx33("h3", { children: title }) }),
2071
+ /* @__PURE__ */ jsx32("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ jsx32("h3", { children: title }) }),
1936
2072
  /* @__PURE__ */ jsxs24("div", { className: "kds-card-plan-price", children: [
1937
- /* @__PURE__ */ jsx33("span", { children: price }),
1938
- period && /* @__PURE__ */ jsxs24("span", { children: [
2073
+ /* @__PURE__ */ jsx32("span", { className: "kds-price", children: price }),
2074
+ period && /* @__PURE__ */ jsxs24("span", { className: "kds-price-period", children: [
1939
2075
  "/",
1940
2076
  period
1941
2077
  ] })
1942
2078
  ] }),
1943
- features && features.length > 0 && /* @__PURE__ */ jsx33("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ jsx33("li", { children: f }, i)) }),
2079
+ badgeText && /* @__PURE__ */ jsx32("span", { className: "kds-card-plan-badge", children: badgeText }),
2080
+ features && features.length > 0 && /* @__PURE__ */ jsx32("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ jsx32("li", { children: f }, i)) }),
1944
2081
  action
1945
2082
  ]
1946
2083
  }
@@ -1949,50 +2086,225 @@ var KdsCardPlan = forwardRef31(
1949
2086
  KdsCardPlan.displayName = "KdsCardPlan";
1950
2087
 
1951
2088
  // src/components/domain/KdsInvoiceSticky/KdsInvoiceSticky.tsx
1952
- import { forwardRef as forwardRef32 } from "react";
1953
- import { jsx as jsx34 } from "react/jsx-runtime";
1954
- var KdsInvoiceSticky = forwardRef32(
1955
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx34("div", { ref, className: clsx("kds-card-elevated", "kds-invoice-sticky", className), ...props, children })
2089
+ import { forwardRef as forwardRef31 } from "react";
2090
+ import { jsx as jsx33 } from "react/jsx-runtime";
2091
+ var KdsInvoiceSticky = forwardRef31(
2092
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx33("div", { ref, className: clsx("kds-card-elevated", "kds-invoice-sticky", className), ...props, children })
1956
2093
  );
1957
2094
  KdsInvoiceSticky.displayName = "KdsInvoiceSticky";
1958
2095
 
1959
2096
  // src/components/domain/KdsBottomSheet/KdsBottomSheet.tsx
1960
- import { forwardRef as forwardRef33 } from "react";
1961
- import * as Dialog3 from "@radix-ui/react-dialog";
1962
- import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
1963
- var KdsBottomSheet = forwardRef33(
1964
- ({ open, onClose, title, children, actions, className, container }, ref) => /* @__PURE__ */ jsx35(Dialog3.Root, { open, onOpenChange: (o) => {
1965
- if (!o) onClose();
1966
- }, children: /* @__PURE__ */ jsx35(Dialog3.Portal, { container, children: /* @__PURE__ */ jsx35(Dialog3.Overlay, { className: "kds-bottom-sheet-scrim open", children: /* @__PURE__ */ jsxs25(Dialog3.Content, { ref, className: clsx("kds-bottom-sheet", className), children: [
1967
- /* @__PURE__ */ jsx35("div", { className: "kds-bottom-sheet-grabber" }),
1968
- title && /* @__PURE__ */ jsx35(Dialog3.Title, { className: "kds-bottom-sheet-title", children: title }),
1969
- /* @__PURE__ */ jsx35("div", { className: "kds-bottom-sheet-body", children }),
1970
- actions && /* @__PURE__ */ jsx35("div", { className: "kds-bottom-sheet-actions", children: actions })
1971
- ] }) }) }) })
2097
+ import { forwardRef as forwardRef32 } from "react";
2098
+ import * as Dialog2 from "@radix-ui/react-dialog";
2099
+ import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
2100
+ var KdsBottomSheet = forwardRef32(
2101
+ ({
2102
+ open,
2103
+ onClose,
2104
+ title,
2105
+ description,
2106
+ children,
2107
+ actions,
2108
+ showGrabber = true,
2109
+ showCloseButton = false,
2110
+ container,
2111
+ className
2112
+ }, ref) => /* @__PURE__ */ jsx34(
2113
+ Dialog2.Root,
2114
+ {
2115
+ open,
2116
+ onOpenChange: (o) => {
2117
+ if (!o) onClose();
2118
+ },
2119
+ children: /* @__PURE__ */ jsx34(Dialog2.Portal, { container, children: /* @__PURE__ */ jsx34(Dialog2.Overlay, { className: "kds-bottom-sheet-scrim open", children: /* @__PURE__ */ jsxs25(
2120
+ Dialog2.Content,
2121
+ {
2122
+ ref,
2123
+ className: clsx("kds-bottom-sheet", className),
2124
+ onPointerDownOutside: (e) => {
2125
+ const target = e.target;
2126
+ if (target.closest(".kds-bottom-sheet")) e.preventDefault();
2127
+ },
2128
+ children: [
2129
+ showGrabber && /* @__PURE__ */ jsx34("div", { className: "kds-bottom-sheet-grabber", "aria-hidden": "true" }),
2130
+ showCloseButton && /* @__PURE__ */ jsx34(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx34(
2131
+ "button",
2132
+ {
2133
+ type: "button",
2134
+ className: "kds-bottom-sheet-close",
2135
+ "aria-label": "Cerrar",
2136
+ children: /* @__PURE__ */ jsx34("i", { className: "material-symbols-outlined", children: "close" })
2137
+ }
2138
+ ) }),
2139
+ title && /* @__PURE__ */ jsx34(Dialog2.Title, { className: "kds-bottom-sheet-title", children: title }),
2140
+ description && /* @__PURE__ */ jsx34(Dialog2.Description, { className: "kds-bottom-sheet-description", children: description }),
2141
+ /* @__PURE__ */ jsx34("div", { className: "kds-bottom-sheet-body", children }),
2142
+ actions && /* @__PURE__ */ jsx34("div", { className: "kds-bottom-sheet-actions", children: actions })
2143
+ ]
2144
+ }
2145
+ ) }) })
2146
+ }
2147
+ )
1972
2148
  );
1973
2149
  KdsBottomSheet.displayName = "KdsBottomSheet";
1974
2150
 
1975
2151
  // src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
1976
- import { forwardRef as forwardRef34 } from "react";
1977
- import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
1978
- var KdsSecureFooter = forwardRef34(
2152
+ import { forwardRef as forwardRef33 } from "react";
2153
+ import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
2154
+ var KdsSecureFooter = forwardRef33(
1979
2155
  ({ variant = "default", children, className, ...props }, ref) => /* @__PURE__ */ jsxs26("footer", { ref, className: clsx("kds-secure-footer", variant === "inside" && "inside", className), ...props, children: [
1980
- /* @__PURE__ */ jsx36("i", { className: "material-symbols-outlined", children: "lock" }),
1981
- children || /* @__PURE__ */ jsx36("span", { children: "Pago seguro con Khipu" })
2156
+ /* @__PURE__ */ jsx35("i", { className: "material-symbols-outlined", children: "lock" }),
2157
+ children || /* @__PURE__ */ jsx35("span", { children: "Pago seguro con Khipu" })
1982
2158
  ] })
1983
2159
  );
1984
2160
  KdsSecureFooter.displayName = "KdsSecureFooter";
1985
2161
 
1986
2162
  // src/components/domain/KdsRecapList/KdsRecapList.tsx
1987
- import { forwardRef as forwardRef35 } from "react";
1988
- import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
1989
- var KdsRecapList = forwardRef35(
1990
- ({ items, className, ...props }, ref) => /* @__PURE__ */ jsx37("ul", { ref, className: clsx("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ jsxs27("li", { children: [
1991
- /* @__PURE__ */ jsx37("span", { className: "k", children: item.label }),
1992
- /* @__PURE__ */ jsx37("span", { className: clsx("v", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
2163
+ import { forwardRef as forwardRef34 } from "react";
2164
+ import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
2165
+ var KdsRecapList = forwardRef34(
2166
+ ({ items, className, ...props }, ref) => /* @__PURE__ */ jsx36("ul", { ref, className: clsx("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ jsxs27("li", { children: [
2167
+ /* @__PURE__ */ jsx36("span", { className: "kds-key", children: item.label }),
2168
+ /* @__PURE__ */ jsx36("span", { className: clsx("kds-value", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
1993
2169
  ] }, i)) })
1994
2170
  );
1995
2171
  KdsRecapList.displayName = "KdsRecapList";
2172
+
2173
+ // src/components/domain/KdsMontoRow/KdsMontoRow.tsx
2174
+ import { forwardRef as forwardRef35 } from "react";
2175
+ import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
2176
+ var KdsMontoRow = forwardRef35(
2177
+ ({ title, value, deadline, className, ...props }, ref) => /* @__PURE__ */ jsxs28("div", { ref, className: clsx("kds-monto-row", className), ...props, children: [
2178
+ /* @__PURE__ */ jsxs28("div", { children: [
2179
+ /* @__PURE__ */ jsx37("div", { className: "kds-monto-row-title", children: title }),
2180
+ deadline && /* @__PURE__ */ jsx37("div", { className: "kds-monto-row-deadline", children: deadline })
2181
+ ] }),
2182
+ /* @__PURE__ */ jsx37("div", { className: "kds-monto-row-value", children: value })
2183
+ ] })
2184
+ );
2185
+ KdsMontoRow.displayName = "KdsMontoRow";
2186
+
2187
+ // src/components/domain/KdsMerchantTile/KdsMerchantTile.tsx
2188
+ import { forwardRef as forwardRef36 } from "react";
2189
+ import { jsx as jsx38 } from "react/jsx-runtime";
2190
+ var KdsMerchantTile = forwardRef36(
2191
+ ({ name, logoUrl, initials, compact, className, ...props }, ref) => {
2192
+ const displayInitials = (initials ?? name.slice(0, 2)).toUpperCase();
2193
+ return /* @__PURE__ */ jsx38(
2194
+ "div",
2195
+ {
2196
+ ref,
2197
+ className: clsx("kds-merchant-tile", logoUrl && "logo", compact && "compact", className),
2198
+ "aria-label": name,
2199
+ ...props,
2200
+ children: logoUrl ? /* @__PURE__ */ jsx38("img", { src: logoUrl, alt: name }) : displayInitials
2201
+ }
2202
+ );
2203
+ }
2204
+ );
2205
+ KdsMerchantTile.displayName = "KdsMerchantTile";
2206
+
2207
+ // src/components/domain/KdsPaymentTotal/KdsPaymentTotal.tsx
2208
+ import { forwardRef as forwardRef37 } from "react";
2209
+ import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
2210
+ var KdsPaymentTotal = forwardRef37(
2211
+ ({
2212
+ variant = "default",
2213
+ tone = "brand",
2214
+ centered = false,
2215
+ amount,
2216
+ currency = "S/",
2217
+ decimals = 2,
2218
+ locale = "es-PE",
2219
+ label = "Monto a pagar",
2220
+ title = "Escanea el QR",
2221
+ titleMobile = "Descarga el QR",
2222
+ className,
2223
+ ...props
2224
+ }, ref) => {
2225
+ const { integer, fraction } = formatAmount(amount, decimals, locale);
2226
+ const isEmail = variant === "email";
2227
+ const isInfoTone = tone === "info";
2228
+ return /* @__PURE__ */ jsxs29(
2229
+ "div",
2230
+ {
2231
+ ref,
2232
+ className: clsx(
2233
+ "kds-payment-total",
2234
+ isEmail && "kds-payment-total--email",
2235
+ isInfoTone && "kds-payment-total--tone-info",
2236
+ centered && "kds-payment-total--centered",
2237
+ className
2238
+ ),
2239
+ ...props,
2240
+ children: [
2241
+ !isEmail && title != null && /* @__PURE__ */ jsx39("h5", { className: "kds-payment-total-title", children: title }),
2242
+ !isEmail && titleMobile != null && /* @__PURE__ */ jsx39("h5", { className: "kds-payment-total-title-mobile", children: titleMobile }),
2243
+ label != null && /* @__PURE__ */ jsx39("h6", { className: "kds-payment-label", children: label }),
2244
+ /* @__PURE__ */ jsxs29("h5", { className: "kds-payment-amount", children: [
2245
+ currency,
2246
+ " ",
2247
+ integer,
2248
+ fraction !== null && /* @__PURE__ */ jsx39("sup", { className: "kds-payment-total-decimal-sup", children: fraction })
2249
+ ] })
2250
+ ]
2251
+ }
2252
+ );
2253
+ }
2254
+ );
2255
+ KdsPaymentTotal.displayName = "KdsPaymentTotal";
2256
+ function formatAmount(amount, decimals, locale) {
2257
+ const showDecimals = typeof decimals === "number" && decimals > 0;
2258
+ if (typeof amount === "number") {
2259
+ if (showDecimals) {
2260
+ const fixed = amount.toFixed(decimals);
2261
+ const [int, frac] = fixed.split(".");
2262
+ const formattedInt2 = new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(
2263
+ Number(int)
2264
+ );
2265
+ return { integer: formattedInt2, fraction: frac ?? null };
2266
+ }
2267
+ const formattedInt = new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(
2268
+ Math.trunc(amount)
2269
+ );
2270
+ return { integer: formattedInt, fraction: null };
2271
+ }
2272
+ const str = amount.trim();
2273
+ const dotIdx = str.indexOf(".");
2274
+ if (dotIdx === -1 || !showDecimals) {
2275
+ return { integer: str, fraction: null };
2276
+ }
2277
+ return {
2278
+ integer: str.slice(0, dotIdx),
2279
+ fraction: str.slice(dotIdx + 1)
2280
+ };
2281
+ }
2282
+
2283
+ // src/components/domain/KdsBillAttachment/KdsBillAttachment.tsx
2284
+ import { forwardRef as forwardRef38 } from "react";
2285
+ import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
2286
+ var KdsBillAttachment = forwardRef38(
2287
+ ({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */ jsxs30(
2288
+ "a",
2289
+ {
2290
+ ref,
2291
+ href,
2292
+ target: "_blank",
2293
+ rel: "noopener noreferrer",
2294
+ className: clsx("kds-bill-attachment", className),
2295
+ ...props,
2296
+ children: [
2297
+ /* @__PURE__ */ jsx40("i", { className: "material-symbols-outlined", children: icon }),
2298
+ /* @__PURE__ */ jsx40("span", { children: filename })
2299
+ ]
2300
+ }
2301
+ )
2302
+ );
2303
+ KdsBillAttachment.displayName = "KdsBillAttachment";
2304
+ var KdsBillAttachments = forwardRef38(
2305
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx40("div", { ref, className: clsx("kds-bill-attachments", className), ...props, children })
2306
+ );
2307
+ KdsBillAttachments.displayName = "KdsBillAttachments";
1996
2308
  export {
1997
2309
  KdsAccordion,
1998
2310
  KdsAccordionDetails,
@@ -2001,6 +2313,8 @@ export {
2001
2313
  KdsBankList,
2002
2314
  KdsBankModal,
2003
2315
  KdsBankRow,
2316
+ KdsBillAttachment,
2317
+ KdsBillAttachments,
2004
2318
  KdsBottomSheet,
2005
2319
  KdsButton,
2006
2320
  KdsCard,
@@ -2018,17 +2332,15 @@ export {
2018
2332
  KdsExpandPanel,
2019
2333
  KdsInvoiceSticky,
2020
2334
  KdsLinearProgress,
2021
- KdsLogoHeader,
2022
- KdsLogoHeaderCloseButton,
2023
- KdsLogoHeaderCode,
2024
- KdsLogoHeaderLogo,
2025
- KdsLogoHeaderSeparator,
2026
- KdsModal,
2335
+ KdsMerchantTile,
2336
+ KdsMontoRow,
2337
+ KdsPaymentTotal,
2027
2338
  KdsQrRow,
2028
2339
  KdsRadioGroup,
2029
2340
  KdsRecapList,
2030
2341
  KdsSectionNote,
2031
2342
  KdsSecureFooter,
2343
+ KdsSecureLoader,
2032
2344
  KdsSegmentedTabs,
2033
2345
  KdsSelect,
2034
2346
  KdsSnackbar,