@khipu/design-system 0.1.0-alpha.55 → 0.2.0-alpha.2

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
@@ -1,5 +1,51 @@
1
- // src/theme/index.ts
2
- import { createTheme } from "@mui/material/styles";
1
+ // src/components/core/utils.ts
2
+ import { clsx } from "clsx";
3
+ function hexToRgb(hex) {
4
+ let h = hex.replace("#", "");
5
+ if (h.length === 3) {
6
+ h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];
7
+ }
8
+ return [
9
+ parseInt(h.slice(0, 2), 16),
10
+ parseInt(h.slice(2, 4), 16),
11
+ parseInt(h.slice(4, 6), 16)
12
+ ];
13
+ }
14
+ function rgbToHex(r, g, b) {
15
+ const clamp = (v) => Math.max(0, Math.min(255, Math.round(v)));
16
+ return `#${[r, g, b].map((v) => clamp(v).toString(16).padStart(2, "0")).join("")}`;
17
+ }
18
+ function relativeLuminance(r, g, b) {
19
+ const [rs, gs, bs] = [r, g, b].map((c) => {
20
+ const s = c / 255;
21
+ return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
22
+ });
23
+ return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
24
+ }
25
+ function getContrastColor(hex) {
26
+ const [r, g, b] = hexToRgb(hex);
27
+ return relativeLuminance(r, g, b) > 0.179 ? "#1a1a1a" : "#ffffff";
28
+ }
29
+ function lighten(hex, amount) {
30
+ const [r, g, b] = hexToRgb(hex);
31
+ return rgbToHex(
32
+ r + (255 - r) * amount,
33
+ g + (255 - g) * amount,
34
+ b + (255 - b) * amount
35
+ );
36
+ }
37
+
38
+ // src/theme/KdsThemeProvider.tsx
39
+ import { jsx } from "react/jsx-runtime";
40
+ function KdsThemeProvider({ primaryColor, mode = "light", children }) {
41
+ const style = primaryColor ? {
42
+ "--primary": primaryColor,
43
+ "--on-primary": getContrastColor(primaryColor),
44
+ "--primary-container": lighten(primaryColor, 0.85),
45
+ "--on-primary-container": primaryColor
46
+ } : void 0;
47
+ return /* @__PURE__ */ jsx("div", { className: `kds-theme-root ${mode}`, style, children });
48
+ }
3
49
 
4
50
  // src/tokens/index.ts
5
51
  var lightModeColors = {
@@ -764,6 +810,24 @@ var responsiveTypography = {
764
810
  // 12px
765
811
  }
766
812
  };
813
+ var responsiveBaseFontSizes = {
814
+ xs: { mobile: "0.6875rem", tablet: "0.75rem", desktop: "0.75rem" },
815
+ // 11px → 12px
816
+ sm: { mobile: "0.8125rem", tablet: "0.875rem", desktop: "0.875rem" },
817
+ // 13px → 14px
818
+ base: { mobile: "0.875rem", tablet: "1rem", desktop: "1rem" },
819
+ // 14px → 16px
820
+ lg: { mobile: "1rem", tablet: "1.125rem", desktop: "1.125rem" },
821
+ // 16px → 18px
822
+ xl: { mobile: "1.125rem", tablet: "1.25rem", desktop: "1.25rem" },
823
+ // 18px → 20px
824
+ "2xl": { mobile: "1.25rem", tablet: "1.5rem", desktop: "1.5rem" },
825
+ // 20px → 24px
826
+ "3xl": { mobile: "1.5rem", tablet: "1.875rem", desktop: "1.875rem" },
827
+ // 24px → 30px
828
+ "4xl": { mobile: "1.875rem", tablet: "2.25rem", desktop: "2.25rem" }
829
+ // 30px → 36px
830
+ };
767
831
  var borderRadius = {
768
832
  none: "0px",
769
833
  sm: "4px",
@@ -894,6 +958,7 @@ var tokensByMode = {
894
958
  semanticSpacing,
895
959
  responsiveSpacing,
896
960
  responsiveTypography,
961
+ responsiveBaseFontSizes,
897
962
  borderRadius,
898
963
  borders,
899
964
  shadows,
@@ -913,6 +978,7 @@ var tokensByMode = {
913
978
  semanticSpacing,
914
979
  responsiveSpacing,
915
980
  responsiveTypography,
981
+ responsiveBaseFontSizes,
916
982
  borderRadius,
917
983
  borders,
918
984
  shadows,
@@ -933,6 +999,7 @@ var tokens = {
933
999
  semanticSpacing,
934
1000
  responsiveSpacing,
935
1001
  responsiveTypography,
1002
+ responsiveBaseFontSizes,
936
1003
  borderRadius,
937
1004
  borders,
938
1005
  shadows,
@@ -941,915 +1008,94 @@ var tokens = {
941
1008
  breakpoints
942
1009
  };
943
1010
 
944
- // src/theme/index.ts
945
- var figmaColors = {
946
- ...colors,
947
- // Add states to info color (not in tokens yet)
948
- info: {
949
- ...colors.info,
950
- states: {
951
- outlinedBorder: "rgba(2, 136, 209, 0.5)"
952
- }
953
- },
954
- // Add input colors (not in tokens yet)
955
- input: {
956
- outlined: {
957
- enabledBorder: "rgba(0, 0, 0, 0.23)",
958
- hoverBorder: "rgba(0, 0, 0, 0.87)",
959
- standardBorder: "rgba(0, 0, 0, 0.42)"
960
- }
961
- },
962
- // Add alert colors (not in tokens yet)
963
- alert: {
964
- info: {
965
- background: "#E5F6FD",
966
- color: "#014361"
967
- },
968
- success: {
969
- background: "#EDF7ED",
970
- color: "#1E4620"
971
- }
972
- }
973
- };
974
- var figmaTypography = {
975
- fontFamily: {
976
- primary: fontFamilies.primary,
977
- secondary: fontFamilies.secondary,
978
- display: fontFamilies.primary
979
- },
980
- fontWeight: fontWeights,
981
- fontSize: {
982
- xs: fontSizes.xs,
983
- sm: fontSizes.sm,
984
- base: fontSizes.base,
985
- button: "0.9375rem",
986
- // Not in tokens yet
987
- md: "0.875rem",
988
- // Not in tokens yet
989
- lg: fontSizes.lg,
990
- xl: fontSizes.xl
991
- }
992
- };
993
- var palette = {
994
- primary: {
995
- main: figmaColors.primary.main,
996
- light: figmaColors.primary.light,
997
- dark: figmaColors.primary.dark,
998
- contrastText: figmaColors.primary.contrastText
999
- },
1000
- secondary: {
1001
- main: "#9C27B0",
1002
- light: "#BA68C8",
1003
- dark: "#7B1FA2",
1004
- contrastText: "#FFFFFF"
1005
- },
1006
- success: {
1007
- main: figmaColors.success.main,
1008
- light: figmaColors.success.light,
1009
- dark: figmaColors.success.dark,
1010
- contrastText: figmaColors.success.contrastText
1011
- },
1012
- warning: {
1013
- main: figmaColors.warning.main,
1014
- light: figmaColors.warning.light,
1015
- dark: figmaColors.warning.dark,
1016
- contrastText: figmaColors.warning.contrastText
1017
- },
1018
- error: {
1019
- main: figmaColors.error.main,
1020
- light: figmaColors.error.light,
1021
- dark: figmaColors.error.dark,
1022
- contrastText: figmaColors.error.contrastText
1023
- },
1024
- info: {
1025
- main: figmaColors.info.main,
1026
- light: figmaColors.info.light,
1027
- dark: figmaColors.info.dark,
1028
- contrastText: figmaColors.info.contrastText
1029
- },
1030
- text: {
1031
- primary: figmaColors.text.primary,
1032
- secondary: figmaColors.text.secondary,
1033
- disabled: figmaColors.text.disabled
1034
- },
1035
- background: {
1036
- default: figmaColors.background.default,
1037
- paper: figmaColors.background.paper
1038
- },
1039
- action: {
1040
- active: figmaColors.action.active,
1041
- hover: figmaColors.action.hover,
1042
- selected: figmaColors.action.selected,
1043
- disabled: figmaColors.action.disabled,
1044
- disabledBackground: figmaColors.action.disabledBackground,
1045
- focus: figmaColors.action.focus
1046
- },
1047
- divider: figmaColors.divider
1048
- };
1049
- var typography2 = {
1050
- fontFamily: `${figmaTypography.fontFamily.primary}, ${figmaTypography.fontFamily.secondary}, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,
1051
- // Headings - Public Sans SemiBold
1052
- h1: {
1053
- fontFamily: figmaTypography.fontFamily.primary,
1054
- fontWeight: figmaTypography.fontWeight.bold,
1055
- fontSize: "2.5rem",
1056
- lineHeight: 1.2,
1057
- letterSpacing: "-0.01562em"
1058
- },
1059
- h2: {
1060
- fontFamily: figmaTypography.fontFamily.primary,
1061
- fontWeight: figmaTypography.fontWeight.bold,
1062
- fontSize: "2rem",
1063
- lineHeight: 1.2,
1064
- letterSpacing: "-0.00833em"
1065
- },
1066
- h3: {
1067
- fontFamily: figmaTypography.fontFamily.primary,
1068
- fontWeight: figmaTypography.fontWeight.semiBold,
1069
- fontSize: "1.75rem",
1070
- lineHeight: 1.2,
1071
- letterSpacing: "0em"
1072
- },
1073
- h4: {
1074
- fontFamily: figmaTypography.fontFamily.primary,
1075
- fontWeight: figmaTypography.fontWeight.semiBold,
1076
- fontSize: "1.5rem",
1077
- lineHeight: 1.235,
1078
- letterSpacing: "0.00735em"
1079
- },
1080
- // H5 - Inter Medium 24px (from Figma Light/Typography/H5)
1081
- h5: {
1082
- fontFamily: figmaTypography.fontFamily.display,
1083
- fontWeight: figmaTypography.fontWeight.medium,
1084
- fontSize: "1.5rem",
1085
- // 24px
1086
- lineHeight: 1.334,
1087
- letterSpacing: "0em"
1088
- },
1089
- // H6 - Public Sans SemiBold 20px (from Figma Light/Typography/H6)
1090
- h6: {
1091
- fontFamily: figmaTypography.fontFamily.primary,
1092
- fontWeight: figmaTypography.fontWeight.semiBold,
1093
- fontSize: "1.25rem",
1094
- // 20px
1095
- lineHeight: "32px",
1096
- letterSpacing: "0.15px"
1097
- },
1098
- // Subtitle1 - Roboto Regular 16px
1099
- subtitle1: {
1100
- fontFamily: figmaTypography.fontFamily.secondary,
1101
- fontWeight: figmaTypography.fontWeight.regular,
1102
- fontSize: "1rem",
1103
- lineHeight: 1.75,
1104
- letterSpacing: "0.15px"
1105
- },
1106
- // Subtitle2 - Roboto Medium 14px
1107
- subtitle2: {
1108
- fontFamily: figmaTypography.fontFamily.secondary,
1109
- fontWeight: figmaTypography.fontWeight.medium,
1110
- fontSize: "0.875rem",
1111
- lineHeight: 1.57,
1112
- letterSpacing: "0.1px"
1113
- },
1114
- // Body1 - From Figma typography/body1: Roboto Regular 16px
1115
- body1: {
1116
- fontFamily: figmaTypography.fontFamily.secondary,
1117
- fontWeight: figmaTypography.fontWeight.regular,
1118
- fontSize: "1rem",
1119
- // 16px
1120
- lineHeight: 1.5,
1121
- letterSpacing: "0.15px"
1122
- },
1123
- // Body2 - Roboto Regular 14px
1124
- body2: {
1125
- fontFamily: figmaTypography.fontFamily.secondary,
1126
- fontWeight: figmaTypography.fontWeight.regular,
1127
- fontSize: "0.875rem",
1128
- // 14px
1129
- lineHeight: 1.43,
1130
- letterSpacing: "0.17px"
1131
- },
1132
- // Button - From Figma button/large: Roboto Medium 15px
1133
- button: {
1134
- fontFamily: figmaTypography.fontFamily.secondary,
1135
- fontWeight: figmaTypography.fontWeight.medium,
1136
- fontSize: "0.9375rem",
1137
- // 15px
1138
- lineHeight: "26px",
1139
- letterSpacing: "0.46px",
1140
- textTransform: "uppercase"
1141
- },
1142
- // Caption - From Figma typography/caption: Roboto Regular 12px
1143
- caption: {
1144
- fontFamily: figmaTypography.fontFamily.secondary,
1145
- fontWeight: figmaTypography.fontWeight.regular,
1146
- fontSize: "0.75rem",
1147
- // 12px
1148
- lineHeight: 1.66,
1149
- letterSpacing: "0.4px"
1150
- },
1151
- // Overline - From Figma Light/Typography/Overline: Public Sans Regular 12px
1152
- overline: {
1153
- fontFamily: figmaTypography.fontFamily.primary,
1154
- fontWeight: figmaTypography.fontWeight.regular,
1155
- fontSize: "0.75rem",
1156
- // 12px
1157
- lineHeight: "15px",
1158
- letterSpacing: "1px",
1159
- textTransform: "uppercase"
1160
- }
1161
- };
1162
- var shape = {
1163
- borderRadius: 4
1164
- // borderRadius from Figma
1165
- };
1166
- var components = {
1167
- // CSS Baseline - Font imports
1168
- MuiCssBaseline: {
1169
- styleOverrides: `
1170
- @import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap');
1171
- `
1172
- },
1173
- // ==========================================================================
1174
- // BUTTON - Figma button/large specs
1175
- // ==========================================================================
1176
- MuiButton: {
1177
- styleOverrides: {
1178
- root: {
1179
- fontFamily: figmaTypography.fontFamily.secondary,
1180
- fontWeight: figmaTypography.fontWeight.medium,
1181
- fontSize: "0.9375rem",
1182
- // 15px
1183
- lineHeight: "26px",
1184
- letterSpacing: "0.46px",
1185
- textTransform: "uppercase",
1186
- borderRadius: 4,
1187
- minHeight: 50,
1188
- padding: "8px 22px",
1189
- // Disabled state from Figma
1190
- "&.Mui-disabled": {
1191
- backgroundColor: figmaColors.action.disabledBackground,
1192
- color: figmaColors.action.disabled
1193
- }
1194
- },
1195
- contained: {
1196
- // elevation/2 from Figma
1197
- boxShadow: "0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12)",
1198
- "&:hover": {
1199
- boxShadow: "0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12)"
1200
- }
1201
- },
1202
- containedPrimary: {
1203
- backgroundColor: figmaColors.primary.main,
1204
- color: figmaColors.primary.contrastText,
1205
- "&:hover": {
1206
- backgroundColor: figmaColors.primary.dark
1207
- }
1208
- },
1209
- containedSuccess: {
1210
- // Success button uses success.light (#4CAF50) from Figma
1211
- backgroundColor: figmaColors.success.light,
1212
- color: figmaColors.success.contrastText,
1213
- "&:hover": {
1214
- backgroundColor: figmaColors.success.main
1215
- }
1216
- },
1217
- containedInfo: {
1218
- backgroundColor: figmaColors.info.light,
1219
- color: figmaColors.info.contrastText,
1220
- "&:hover": {
1221
- backgroundColor: figmaColors.info.main
1222
- }
1223
- },
1224
- outlined: {
1225
- borderWidth: 1,
1226
- "&:hover": {
1227
- borderWidth: 1
1228
- }
1229
- },
1230
- outlinedPrimary: {
1231
- borderColor: figmaColors.primary.states.outlinedBorder,
1232
- color: figmaColors.primary.main,
1233
- "&:hover": {
1234
- backgroundColor: figmaColors.primary.states.hover,
1235
- borderColor: figmaColors.primary.main
1236
- }
1237
- },
1238
- outlinedInfo: {
1239
- // From Figma: info/_states/outlinedBorder
1240
- borderColor: figmaColors.info.states.outlinedBorder,
1241
- color: figmaColors.info.main,
1242
- "&:hover": {
1243
- backgroundColor: "rgba(2, 136, 209, 0.04)",
1244
- borderColor: figmaColors.info.main
1245
- }
1246
- },
1247
- sizeSmall: {
1248
- padding: "6px 16px",
1249
- fontSize: "0.8125rem",
1250
- minHeight: 32
1251
- },
1252
- sizeMedium: {
1253
- padding: "8px 22px",
1254
- fontSize: "0.9375rem",
1255
- minHeight: 42
1256
- },
1257
- sizeLarge: {
1258
- padding: "8px 22px",
1259
- fontSize: "0.9375rem",
1260
- minHeight: 50
1261
- }
1262
- },
1263
- defaultProps: {
1264
- disableElevation: false
1265
- }
1266
- },
1267
- // ==========================================================================
1268
- // TEXT FIELD - Figma input specs
1269
- // ==========================================================================
1270
- MuiTextField: {
1271
- styleOverrides: {
1272
- root: {
1273
- "& .MuiOutlinedInput-root": {
1274
- borderRadius: 4,
1275
- fontFamily: figmaTypography.fontFamily.secondary,
1276
- fontSize: "1rem",
1277
- // 16px from _fontSize/1rem
1278
- lineHeight: "24px",
1279
- letterSpacing: "0.15px",
1280
- "& fieldset": {
1281
- borderColor: figmaColors.input.outlined.enabledBorder,
1282
- borderWidth: 1
1283
- },
1284
- "&:hover fieldset": {
1285
- borderColor: figmaColors.input.outlined.hoverBorder
1286
- },
1287
- "&.Mui-focused fieldset": {
1288
- borderColor: figmaColors.primary.main,
1289
- borderWidth: 2
1290
- }
1291
- },
1292
- "& .MuiInputLabel-root": {
1293
- fontFamily: figmaTypography.fontFamily.secondary,
1294
- fontSize: "1rem",
1295
- letterSpacing: "0.15px",
1296
- color: figmaColors.text.secondary,
1297
- "&.Mui-focused": {
1298
- color: figmaColors.primary.main
1299
- },
1300
- "&.MuiInputLabel-shrink": {
1301
- fontSize: "0.75rem",
1302
- // 12px when shrunk
1303
- lineHeight: "12px",
1304
- letterSpacing: "0.15px"
1305
- }
1306
- },
1307
- "& .MuiInputBase-input": {
1308
- fontFamily: figmaTypography.fontFamily.secondary,
1309
- fontSize: "1rem",
1310
- fontWeight: figmaTypography.fontWeight.regular,
1311
- lineHeight: "24px",
1312
- letterSpacing: "0.15px",
1313
- color: figmaColors.text.primary,
1314
- padding: "16px 12px",
1315
- "&::placeholder": {
1316
- color: figmaColors.text.secondary,
1317
- opacity: 1
1318
- }
1319
- },
1320
- // Adornment styling
1321
- "& .MuiInputAdornment-root": {
1322
- color: figmaColors.action.active
1323
- }
1324
- }
1325
- },
1326
- defaultProps: {
1327
- variant: "outlined",
1328
- fullWidth: true
1329
- }
1330
- },
1331
- MuiOutlinedInput: {
1332
- styleOverrides: {
1333
- root: {
1334
- "& .MuiOutlinedInput-notchedOutline": {
1335
- borderColor: figmaColors.input.outlined.enabledBorder
1336
- },
1337
- "&:hover .MuiOutlinedInput-notchedOutline": {
1338
- borderColor: figmaColors.input.outlined.hoverBorder
1339
- },
1340
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
1341
- borderColor: figmaColors.primary.main,
1342
- borderWidth: 2
1343
- }
1344
- },
1345
- input: {
1346
- padding: "16px 12px"
1347
- }
1348
- }
1349
- },
1350
- MuiInputLabel: {
1351
- styleOverrides: {
1352
- root: {
1353
- fontFamily: figmaTypography.fontFamily.secondary,
1354
- "&.Mui-focused": {
1355
- color: figmaColors.primary.main
1356
- }
1357
- },
1358
- shrink: {
1359
- fontSize: "0.75rem"
1360
- }
1361
- }
1362
- },
1363
- // ==========================================================================
1364
- // CHECKBOX - Figma checkbox specs with purple checked state
1365
- // ==========================================================================
1366
- MuiCheckbox: {
1367
- styleOverrides: {
1368
- root: {
1369
- padding: 9,
1370
- color: figmaColors.action.active,
1371
- "&.Mui-checked": {
1372
- color: figmaColors.primary.main
1373
- },
1374
- "&.MuiCheckbox-indeterminate": {
1375
- color: figmaColors.primary.main
1376
- },
1377
- "&:hover": {
1378
- backgroundColor: figmaColors.primary.states.hover
1379
- }
1380
- },
1381
- colorPrimary: {
1382
- "&.Mui-checked": {
1383
- color: figmaColors.primary.main
1384
- }
1385
- }
1386
- },
1387
- defaultProps: {
1388
- color: "primary"
1389
- }
1390
- },
1391
- MuiFormControlLabel: {
1392
- styleOverrides: {
1393
- root: {
1394
- marginLeft: -9,
1395
- marginRight: 0
1396
- },
1397
- label: {
1398
- fontFamily: figmaTypography.fontFamily.secondary,
1399
- fontSize: "1rem",
1400
- fontWeight: figmaTypography.fontWeight.regular,
1401
- lineHeight: 1.5,
1402
- letterSpacing: "0.15px",
1403
- color: figmaColors.text.secondary
1404
- }
1405
- }
1406
- },
1407
- // ==========================================================================
1408
- // CARD - Figma card specs with 6px border radius and outlined border
1409
- // ==========================================================================
1410
- MuiCard: {
1411
- styleOverrides: {
1412
- root: {
1413
- borderRadius: 6
1414
- }
1415
- }
1416
- },
1417
- MuiCardActionArea: {
1418
- styleOverrides: {
1419
- root: {
1420
- "&:hover": {
1421
- backgroundColor: figmaColors.action.hover
1422
- }
1423
- }
1424
- }
1425
- },
1426
- MuiCardContent: {
1427
- styleOverrides: {
1428
- root: {
1429
- padding: "16px 20px",
1430
- "&:last-child": {
1431
- paddingBottom: "16px"
1432
- }
1433
- }
1434
- }
1435
- },
1436
- // ==========================================================================
1437
- // LINEAR PROGRESS - Figma info color (#03A9F4) progress bar
1438
- // ==========================================================================
1439
- MuiLinearProgress: {
1440
- styleOverrides: {
1441
- root: {
1442
- height: 4,
1443
- borderRadius: 0,
1444
- "&.MuiLinearProgress-colorInfo": {
1445
- backgroundColor: `rgba(3, 169, 244, 0.4)`,
1446
- "& .MuiLinearProgress-bar": {
1447
- backgroundColor: figmaColors.info.light
1448
- // #03A9F4
1449
- }
1450
- },
1451
- "&.MuiLinearProgress-colorPrimary": {
1452
- backgroundColor: `rgba(131, 71, 173, 0.4)`,
1453
- "& .MuiLinearProgress-bar": {
1454
- backgroundColor: figmaColors.primary.main
1455
- // #8347AD
1456
- }
1457
- }
1458
- },
1459
- bar: {
1460
- borderRadius: 0
1461
- }
1462
- },
1463
- defaultProps: {
1464
- color: "info"
1465
- }
1466
- },
1467
- // ==========================================================================
1468
- // CIRCULAR PROGRESS
1469
- // ==========================================================================
1470
- MuiCircularProgress: {
1471
- styleOverrides: {
1472
- colorPrimary: {
1473
- color: figmaColors.primary.main
1474
- }
1475
- },
1476
- defaultProps: {
1477
- color: "primary"
1478
- }
1479
- },
1480
- // ==========================================================================
1481
- // ALERT - Figma alert backgrounds and colors
1482
- // ==========================================================================
1483
- MuiAlert: {
1484
- styleOverrides: {
1485
- root: {
1486
- borderRadius: 4,
1487
- fontFamily: figmaTypography.fontFamily.secondary,
1488
- fontSize: "0.875rem",
1489
- lineHeight: 1.43,
1490
- letterSpacing: "0.17px",
1491
- padding: "6px 16px"
1492
- },
1493
- standardInfo: {
1494
- backgroundColor: figmaColors.alert.info.background,
1495
- // #E5F6FD
1496
- color: figmaColors.alert.info.color,
1497
- // #014361
1498
- "& .MuiAlert-icon": {
1499
- color: figmaColors.alert.info.color
1500
- }
1501
- },
1502
- standardSuccess: {
1503
- backgroundColor: figmaColors.alert.success.background,
1504
- // #EDF7ED
1505
- color: figmaColors.alert.success.color,
1506
- // #1E4620
1507
- "& .MuiAlert-icon": {
1508
- color: figmaColors.success.main
1509
- }
1510
- },
1511
- standardWarning: {
1512
- backgroundColor: "#FFF4E5",
1513
- color: "#663C00",
1514
- "& .MuiAlert-icon": {
1515
- color: figmaColors.warning.main
1516
- }
1517
- },
1518
- standardError: {
1519
- backgroundColor: "#FDEDED",
1520
- color: "#5F2120",
1521
- "& .MuiAlert-icon": {
1522
- color: figmaColors.error.main
1523
- }
1524
- },
1525
- icon: {
1526
- padding: "7px 0",
1527
- marginRight: 12
1528
- }
1529
- }
1530
- },
1531
- MuiAlertTitle: {
1532
- styleOverrides: {
1533
- root: {
1534
- fontFamily: figmaTypography.fontFamily.secondary,
1535
- fontWeight: figmaTypography.fontWeight.medium,
1536
- fontSize: "1rem",
1537
- lineHeight: 1.5,
1538
- marginBottom: 4
1539
- }
1540
- }
1541
- },
1542
- // ==========================================================================
1543
- // DIALOG/MODAL - Figma modal specs
1544
- // ==========================================================================
1545
- MuiDialog: {
1546
- styleOverrides: {
1547
- paper: {
1548
- borderRadius: 12,
1549
- boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)"
1550
- }
1551
- }
1552
- },
1553
- MuiDialogTitle: {
1554
- styleOverrides: {
1555
- root: {
1556
- fontFamily: figmaTypography.fontFamily.primary,
1557
- fontWeight: figmaTypography.fontWeight.semiBold,
1558
- fontSize: "1.25rem",
1559
- lineHeight: "32px",
1560
- letterSpacing: "0.15px",
1561
- padding: "16px 24px"
1562
- }
1563
- }
1564
- },
1565
- MuiDialogContent: {
1566
- styleOverrides: {
1567
- root: {
1568
- padding: "16px 24px"
1569
- }
1570
- }
1571
- },
1572
- MuiDialogActions: {
1573
- styleOverrides: {
1574
- root: {
1575
- padding: "16px 24px",
1576
- gap: 8
1577
- }
1578
- }
1579
- },
1580
- // ==========================================================================
1581
- // TOOLTIP - Figma tooltip specs
1582
- // ==========================================================================
1583
- MuiTooltip: {
1584
- styleOverrides: {
1585
- tooltip: {
1586
- backgroundColor: "rgba(97, 97, 97, 0.9)",
1587
- fontFamily: figmaTypography.fontFamily.secondary,
1588
- fontWeight: figmaTypography.fontWeight.medium,
1589
- fontSize: "0.875rem",
1590
- lineHeight: "24px",
1591
- letterSpacing: "0.17px",
1592
- borderRadius: 4,
1593
- padding: "4px 8px"
1594
- }
1595
- }
1596
- },
1597
- // ==========================================================================
1598
- // TYPOGRAPHY COMPONENT
1599
- // ==========================================================================
1600
- MuiTypography: {
1601
- styleOverrides: {
1602
- root: {
1603
- // Default to body text styling
1604
- }
1605
- }
1606
- },
1607
- // ==========================================================================
1608
- // DIVIDER
1609
- // ==========================================================================
1610
- MuiDivider: {
1611
- styleOverrides: {
1612
- root: {
1613
- borderColor: "#DDDEE0"
1614
- }
1615
- }
1616
- },
1617
- // ==========================================================================
1618
- // LINK
1619
- // ==========================================================================
1620
- MuiLink: {
1621
- styleOverrides: {
1622
- root: {
1623
- color: figmaColors.info.main,
1624
- textDecoration: "none",
1625
- "&:hover": {
1626
- textDecoration: "underline"
1627
- }
1628
- }
1629
- }
1630
- },
1631
- // ==========================================================================
1632
- // ICON BUTTON
1633
- // ==========================================================================
1634
- MuiIconButton: {
1635
- styleOverrides: {
1636
- root: {
1637
- color: figmaColors.text.secondary,
1638
- "&:hover": {
1639
- backgroundColor: figmaColors.action.hover
1640
- }
1641
- }
1642
- }
1643
- }
1644
- };
1645
- var shadows2 = [
1646
- "none",
1647
- shadows[1],
1648
- shadows[2],
1649
- shadows[3],
1650
- shadows[4],
1651
- shadows[5],
1652
- shadows[6],
1653
- shadows[7],
1654
- shadows[8],
1655
- shadows[9],
1656
- shadows[10],
1657
- shadows[11],
1658
- shadows[12],
1659
- shadows[13],
1660
- shadows[14],
1661
- shadows[15],
1662
- shadows[16],
1663
- shadows[17],
1664
- shadows[18],
1665
- shadows[19],
1666
- shadows[20],
1667
- shadows[21],
1668
- shadows[22],
1669
- shadows[23],
1670
- shadows[24]
1671
- ];
1672
- var khipuTheme = createTheme({
1673
- palette,
1674
- typography: typography2,
1675
- shape,
1676
- shadows: shadows2,
1677
- components
1678
- });
1679
-
1680
- // src/theme/ThemeProvider.tsx
1681
- import { useMemo } from "react";
1682
- import { ThemeProvider as MuiThemeProvider, CssBaseline, createTheme as createTheme2 } from "@mui/material";
1683
- import { jsx, jsxs } from "react/jsx-runtime";
1684
- function buildDynamicOverrides(props) {
1685
- const overrides = {};
1686
- const paletteOverrides = {};
1687
- let hasPalette = false;
1688
- if (props.mode) {
1689
- paletteOverrides.mode = props.mode;
1690
- hasPalette = true;
1691
- }
1692
- if (props.primaryColor || props.primaryColorVariant || props.buttonFontColor) {
1693
- paletteOverrides.primary = {
1694
- ...props.primaryColor && { main: props.primaryColor },
1695
- ...props.primaryColorVariant && { light: props.primaryColorVariant },
1696
- ...props.buttonFontColor && { contrastText: props.buttonFontColor }
1697
- };
1698
- hasPalette = true;
1699
- }
1700
- if (props.textColor || props.disabledFontColor) {
1701
- paletteOverrides.text = {
1702
- ...props.textColor && { primary: props.textColor },
1703
- ...props.disabledFontColor && { disabled: props.disabledFontColor }
1704
- };
1705
- hasPalette = true;
1706
- }
1707
- if (props.backgroundColor || props.pageBackgroundColor) {
1708
- paletteOverrides.background = {
1709
- ...props.backgroundColor && { default: props.backgroundColor },
1710
- ...props.pageBackgroundColor && { paper: props.pageBackgroundColor }
1711
- };
1712
- hasPalette = true;
1713
- }
1714
- if (props.disabledBackgroundColor || props.disabledFontColor) {
1715
- paletteOverrides.action = {
1716
- ...props.disabledBackgroundColor && { disabledBackground: props.disabledBackgroundColor },
1717
- ...props.disabledFontColor && { disabled: props.disabledFontColor }
1718
- };
1719
- hasPalette = true;
1720
- }
1721
- if (hasPalette) {
1722
- overrides.palette = paletteOverrides;
1723
- }
1724
- if (props.fontFamily) {
1725
- const fontStack = `"${props.fontFamily}", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`;
1726
- overrides.typography = { fontFamily: fontStack };
1727
- }
1728
- return overrides;
1729
- }
1730
- function KhipuThemeProvider({
1731
- children,
1732
- includeCssBaseline = true,
1733
- themeOverrides,
1734
- ...dynamicProps
1735
- }) {
1736
- const theme = useMemo(() => {
1737
- const dynamicOverrides = buildDynamicOverrides(dynamicProps);
1738
- const hasDynamicOverrides = Object.keys(dynamicOverrides).length > 0;
1739
- const hasThemeOverrides = themeOverrides && Object.keys(themeOverrides).length > 0;
1740
- if (!hasDynamicOverrides && !hasThemeOverrides) {
1741
- return khipuTheme;
1742
- }
1743
- const mergedOverrides = [];
1744
- if (hasDynamicOverrides) mergedOverrides.push(dynamicOverrides);
1745
- if (hasThemeOverrides) mergedOverrides.push(themeOverrides);
1746
- return createTheme2(khipuTheme, ...mergedOverrides);
1747
- }, [
1748
- dynamicProps.primaryColor,
1749
- dynamicProps.primaryColorVariant,
1750
- dynamicProps.fontFamily,
1751
- dynamicProps.textColor,
1752
- dynamicProps.backgroundColor,
1753
- dynamicProps.pageBackgroundColor,
1754
- dynamicProps.mode,
1755
- dynamicProps.buttonFontColor,
1756
- dynamicProps.disabledFontColor,
1757
- dynamicProps.disabledBackgroundColor,
1758
- dynamicProps.fontSizeMultiplier,
1759
- themeOverrides
1760
- ]);
1761
- return /* @__PURE__ */ jsxs(MuiThemeProvider, { theme, children: [
1762
- includeCssBaseline && /* @__PURE__ */ jsx(CssBaseline, {}),
1763
- children
1764
- ] });
1765
- }
1766
-
1767
1011
  // src/components/core/KdsButton/KdsButton.tsx
1768
1012
  import { forwardRef } from "react";
1769
- import MuiButton from "@mui/material/Button";
1770
- import CircularProgress from "@mui/material/CircularProgress";
1771
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1013
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
1772
1014
  var KdsButton = forwardRef(
1773
1015
  ({
1774
- variant = "contained",
1775
- color = "primary",
1776
- size = "large",
1016
+ variant = "primary",
1017
+ size,
1777
1018
  fullWidth = false,
1778
1019
  loading = false,
1779
1020
  disabled = false,
1780
1021
  startIcon,
1781
1022
  endIcon,
1782
1023
  children,
1783
- sx,
1024
+ className,
1784
1025
  ...props
1785
- }, ref) => {
1786
- const isDisabled = disabled || loading;
1787
- return /* @__PURE__ */ jsx2(
1788
- MuiButton,
1789
- {
1790
- ref,
1791
- variant,
1792
- color,
1793
- size,
1794
- fullWidth,
1795
- disabled: isDisabled,
1796
- startIcon: loading ? void 0 : startIcon,
1797
- endIcon: loading ? void 0 : endIcon,
1798
- sx: {
1799
- // Additional custom styles can be merged here
1800
- ...sx
1801
- },
1802
- ...props,
1803
- children: loading ? /* @__PURE__ */ jsxs2(Fragment, { children: [
1804
- /* @__PURE__ */ jsx2(
1805
- CircularProgress,
1806
- {
1807
- size: 20,
1808
- color: "inherit",
1809
- sx: { mr: 1 }
1810
- }
1811
- ),
1812
- children
1813
- ] }) : children
1814
- }
1815
- );
1816
- }
1026
+ }, ref) => /* @__PURE__ */ jsxs(
1027
+ "button",
1028
+ {
1029
+ ref,
1030
+ className: clsx(
1031
+ "kds-btn",
1032
+ `kds-btn-${variant}`,
1033
+ size && `kds-btn-${size}`,
1034
+ fullWidth && "kds-btn-block",
1035
+ className
1036
+ ),
1037
+ disabled: disabled || loading,
1038
+ "aria-busy": loading || void 0,
1039
+ ...props,
1040
+ children: [
1041
+ !loading && startIcon && /* @__PURE__ */ jsx2("span", { className: "kds-icon", children: /* @__PURE__ */ jsx2("i", { className: "material-symbols-outlined", children: startIcon }) }),
1042
+ loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
1043
+ /* @__PURE__ */ jsx2("span", { className: "loader small" }),
1044
+ /* @__PURE__ */ jsx2("span", { children })
1045
+ ] }) : /* @__PURE__ */ jsx2("span", { children }),
1046
+ !loading && endIcon && /* @__PURE__ */ jsx2("span", { className: "kds-icon", children: /* @__PURE__ */ jsx2("i", { className: "material-symbols-outlined", children: endIcon }) })
1047
+ ]
1048
+ }
1049
+ )
1817
1050
  );
1818
1051
  KdsButton.displayName = "KdsButton";
1819
1052
 
1820
1053
  // src/components/core/KdsTextField/KdsTextField.tsx
1821
1054
  import { forwardRef as forwardRef2 } from "react";
1822
- import MuiTextField from "@mui/material/TextField";
1823
- import InputAdornment from "@mui/material/InputAdornment";
1824
- import { jsx as jsx3 } from "react/jsx-runtime";
1055
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
1825
1056
  var KdsTextField = forwardRef2(
1826
1057
  ({
1827
- variant = "outlined",
1828
- size = "medium",
1058
+ label,
1059
+ helperText,
1060
+ error,
1829
1061
  fullWidth = true,
1830
- startAdornment,
1831
- endAdornment,
1832
- InputProps,
1062
+ readOnly,
1063
+ startIcon,
1064
+ endIcon,
1065
+ className,
1066
+ id,
1833
1067
  ...props
1834
1068
  }, ref) => {
1835
- const mergedInputProps = {
1836
- ...InputProps,
1837
- ...startAdornment && {
1838
- startAdornment: /* @__PURE__ */ jsx3(InputAdornment, { position: "start", children: startAdornment })
1839
- },
1840
- ...endAdornment && {
1841
- endAdornment: /* @__PURE__ */ jsx3(InputAdornment, { position: "end", children: endAdornment })
1842
- }
1843
- };
1844
- return /* @__PURE__ */ jsx3(
1845
- MuiTextField,
1069
+ const fieldId = id || `kds-field-${label.toLowerCase().replace(/\s+/g, "-")}`;
1070
+ return /* @__PURE__ */ jsxs2(
1071
+ "div",
1846
1072
  {
1847
- inputRef: ref,
1848
- variant,
1849
- size,
1850
- fullWidth,
1851
- InputProps: mergedInputProps,
1852
- ...props
1073
+ className: clsx(
1074
+ "field",
1075
+ "label",
1076
+ "border",
1077
+ error && "invalid",
1078
+ readOnly && "locked",
1079
+ fullWidth && "kds-w-full",
1080
+ className
1081
+ ),
1082
+ children: [
1083
+ startIcon && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", children: startIcon }),
1084
+ /* @__PURE__ */ jsx3(
1085
+ "input",
1086
+ {
1087
+ ref,
1088
+ id: fieldId,
1089
+ placeholder: " ",
1090
+ readOnly,
1091
+ ...props
1092
+ }
1093
+ ),
1094
+ /* @__PURE__ */ jsx3("label", { htmlFor: fieldId, children: label }),
1095
+ readOnly && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", children: "lock" }),
1096
+ endIcon && !readOnly && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", children: endIcon }),
1097
+ helperText && /* @__PURE__ */ jsx3("span", { className: "helper", children: helperText })
1098
+ ]
1853
1099
  }
1854
1100
  );
1855
1101
  }
@@ -1858,577 +1104,182 @@ KdsTextField.displayName = "KdsTextField";
1858
1104
 
1859
1105
  // src/components/core/KdsCheckbox/KdsCheckbox.tsx
1860
1106
  import { forwardRef as forwardRef3 } from "react";
1861
- import MuiCheckbox from "@mui/material/Checkbox";
1862
- import FormControlLabel from "@mui/material/FormControlLabel";
1863
- import { jsx as jsx4 } from "react/jsx-runtime";
1107
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1864
1108
  var KdsCheckbox = forwardRef3(
1865
- ({
1866
- label,
1867
- color = "primary",
1868
- size = "medium",
1869
- disabled = false,
1870
- ...props
1871
- }, ref) => {
1872
- const checkbox = /* @__PURE__ */ jsx4(
1873
- MuiCheckbox,
1874
- {
1875
- ref,
1876
- color,
1877
- size,
1878
- disabled,
1879
- ...props
1880
- }
1881
- );
1882
- if (label) {
1883
- return /* @__PURE__ */ jsx4(
1884
- FormControlLabel,
1885
- {
1886
- control: checkbox,
1887
- label,
1888
- disabled
1889
- }
1890
- );
1891
- }
1892
- return checkbox;
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
+ ] });
1893
1115
  }
1894
1116
  );
1895
1117
  KdsCheckbox.displayName = "KdsCheckbox";
1896
1118
 
1897
1119
  // src/components/core/KdsModal/KdsModal.tsx
1898
1120
  import { forwardRef as forwardRef4 } from "react";
1899
- import Dialog from "@mui/material/Dialog";
1900
- import DialogTitle from "@mui/material/DialogTitle";
1901
- import DialogContent from "@mui/material/DialogContent";
1902
- import DialogActions from "@mui/material/DialogActions";
1903
- import IconButton from "@mui/material/IconButton";
1904
- import CloseIcon from "@mui/icons-material/Close";
1905
- import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
1906
- import Box from "@mui/material/Box";
1907
- import AppBar from "@mui/material/AppBar";
1908
- import Toolbar from "@mui/material/Toolbar";
1909
- import Typography from "@mui/material/Typography";
1910
- import Slide from "@mui/material/Slide";
1911
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1912
- var SlideTransition = forwardRef4(function SlideTransition2(props, ref) {
1913
- return /* @__PURE__ */ jsx5(Slide, { direction: "left", ref, ...props });
1914
- });
1915
- var KdsModal = ({
1916
- open,
1917
- onClose,
1918
- title,
1919
- children,
1920
- footer,
1921
- size = "sm",
1922
- showCloseButton = true,
1923
- fullScreen = false,
1924
- ...props
1925
- }) => {
1926
- if (fullScreen) {
1927
- return /* @__PURE__ */ jsxs3(
1928
- Dialog,
1929
- {
1930
- open,
1931
- onClose,
1932
- fullScreen: true,
1933
- TransitionComponent: SlideTransition,
1934
- ...props,
1935
- children: [
1936
- /* @__PURE__ */ jsx5(
1937
- AppBar,
1938
- {
1939
- sx: {
1940
- position: "relative",
1941
- backgroundColor: "background.paper",
1942
- color: "text.primary",
1943
- boxShadow: 0,
1944
- py: 1
1945
- },
1946
- children: /* @__PURE__ */ jsxs3(Toolbar, { children: [
1947
- /* @__PURE__ */ jsx5(
1948
- IconButton,
1949
- {
1950
- edge: "start",
1951
- color: "inherit",
1952
- onClick: onClose,
1953
- "aria-label": "Cerrar",
1954
- children: /* @__PURE__ */ jsx5(ChevronLeftIcon, {})
1955
- }
1956
- ),
1957
- title && /* @__PURE__ */ jsx5(Typography, { sx: { ml: 1, flex: 1 }, fontWeight: 600, variant: "h6", component: "div", children: title })
1958
- ] })
1959
- }
1960
- ),
1961
- /* @__PURE__ */ jsx5(DialogContent, { sx: { px: 5, py: 5 }, children }),
1962
- footer && /* @__PURE__ */ jsx5(DialogActions, { sx: { px: 3, py: 2, gap: 1 }, children: footer })
1963
- ]
1964
- }
1965
- );
1966
- }
1967
- return /* @__PURE__ */ jsxs3(
1968
- Dialog,
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,
1969
1136
  {
1970
1137
  open,
1971
- onClose,
1972
- maxWidth: size,
1973
- fullWidth: true,
1974
- PaperProps: {
1975
- sx: {
1976
- borderRadius: "12px",
1977
- boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)"
1978
- }
1138
+ onOpenChange: (o) => {
1139
+ if (!o) onClose();
1979
1140
  },
1980
- ...props,
1981
- children: [
1982
- (title || showCloseButton) && /* @__PURE__ */ jsxs3(
1983
- DialogTitle,
1141
+ children: /* @__PURE__ */ jsxs4(Dialog.Portal, { children: [
1142
+ /* @__PURE__ */ jsx5(Dialog.Overlay, { className: "kds-bottom-sheet-scrim" }),
1143
+ /* @__PURE__ */ jsxs4(
1144
+ Dialog.Content,
1984
1145
  {
1985
- sx: {
1986
- display: "flex",
1987
- alignItems: "center",
1988
- justifyContent: title ? "space-between" : "flex-end",
1989
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
1990
- fontFeatureSettings: "'liga' off, 'clig' off",
1991
- fontWeight: 600,
1992
- fontSize: "1.25rem",
1993
- lineHeight: "32px",
1994
- letterSpacing: "0.15px",
1995
- textAlign: "center",
1996
- py: 2,
1997
- px: 3
1998
- },
1146
+ ref,
1147
+ className: clsx(
1148
+ "kds-bottom-sheet",
1149
+ `kds-bottom-sheet-${size}`,
1150
+ className
1151
+ ),
1999
1152
  children: [
2000
- title && /* @__PURE__ */ jsx5(Box, { sx: { flex: 1 }, children: title }),
2001
- showCloseButton && /* @__PURE__ */ jsx5(
2002
- IconButton,
2003
- {
2004
- "aria-label": "Cerrar",
2005
- onClick: onClose,
2006
- sx: {
2007
- color: "text.secondary",
2008
- ml: "auto"
2009
- },
2010
- children: /* @__PURE__ */ jsx5(CloseIcon, {})
2011
- }
2012
- )
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 })
2013
1167
  ]
2014
1168
  }
2015
- ),
2016
- /* @__PURE__ */ jsx5(
2017
- DialogContent,
2018
- {
2019
- sx: {
2020
- px: 3,
2021
- py: 2
2022
- },
2023
- children
2024
- }
2025
- ),
2026
- footer && /* @__PURE__ */ jsx5(
2027
- DialogActions,
2028
- {
2029
- sx: {
2030
- px: 3,
2031
- py: 2,
2032
- gap: 1
2033
- },
2034
- children: footer
2035
- }
2036
1169
  )
2037
- ]
1170
+ ] })
2038
1171
  }
2039
- );
2040
- };
1172
+ )
1173
+ );
2041
1174
  KdsModal.displayName = "KdsModal";
2042
1175
 
2043
1176
  // src/components/core/KdsCard/KdsCard.tsx
2044
1177
  import { forwardRef as forwardRef5 } from "react";
2045
- import MuiCard from "@mui/material/Card";
2046
- import MuiCardHeader from "@mui/material/CardHeader";
2047
- import MuiCardContent from "@mui/material/CardContent";
2048
- import MuiCardActions from "@mui/material/CardActions";
2049
- import CardActionArea from "@mui/material/CardActionArea";
2050
1178
  import { jsx as jsx6 } from "react/jsx-runtime";
2051
- var paddingMap = {
2052
- none: "0",
2053
- sm: "8px 16px",
2054
- // Compact
2055
- md: "10px 20px",
2056
- // Figma default (bank selection cards)
2057
- lg: "16px 20px"
2058
- // Spacious
2059
- };
2060
1179
  var KdsCard = forwardRef5(
2061
- ({
2062
- variant = "elevation",
2063
- elevation = 1,
2064
- padding,
2065
- clickable = false,
2066
- onCardClick,
2067
- children,
2068
- sx,
2069
- ...props
2070
- }, ref) => {
2071
- const cardContent = clickable ? /* @__PURE__ */ jsx6(CardActionArea, { onClick: onCardClick, children }) : children;
2072
- return /* @__PURE__ */ jsx6(
2073
- MuiCard,
2074
- {
2075
- ref,
2076
- variant,
2077
- elevation: variant === "elevation" ? elevation : 0,
2078
- sx: {
2079
- borderRadius: "6px",
2080
- ...variant === "outlined" && {
2081
- border: "1px solid rgba(0, 0, 0, 0.42)"
2082
- },
2083
- ...padding && {
2084
- padding: paddingMap[padding]
2085
- },
2086
- ...sx
2087
- },
2088
- ...props,
2089
- children: cardContent
2090
- }
2091
- );
2092
- }
1180
+ ({ variant = "elevated", dimmed, children, className, ...props }, ref) => /* @__PURE__ */ jsx6(
1181
+ "article",
1182
+ {
1183
+ ref,
1184
+ className: clsx(
1185
+ variant === "elevated" ? "kds-card-elevated" : "kds-card-outlined",
1186
+ dimmed && "kds-card-dimmed",
1187
+ className
1188
+ ),
1189
+ ...props,
1190
+ children
1191
+ }
1192
+ )
2093
1193
  );
2094
1194
  KdsCard.displayName = "KdsCard";
2095
1195
  var KdsCardHeader = forwardRef5(
2096
- (props, ref) => {
2097
- return /* @__PURE__ */ jsx6(MuiCardHeader, { ref, ...props });
2098
- }
1196
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: clsx("kds-card-header", className), ...props, children })
2099
1197
  );
2100
1198
  KdsCardHeader.displayName = "KdsCardHeader";
2101
- var KdsCardContent = forwardRef5(
2102
- (props, ref) => {
2103
- return /* @__PURE__ */ jsx6(MuiCardContent, { ref, ...props });
2104
- }
1199
+ var KdsCardBody = forwardRef5(
1200
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: clsx("kds-card-body", className), ...props, children })
2105
1201
  );
2106
- KdsCardContent.displayName = "KdsCardContent";
2107
- var KdsCardActions = forwardRef5(
2108
- (props, ref) => {
2109
- return /* @__PURE__ */ jsx6(MuiCardActions, { ref, ...props });
2110
- }
1202
+ KdsCardBody.displayName = "KdsCardBody";
1203
+ var KdsCardFooter = forwardRef5(
1204
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: clsx("kds-card-footer", className), ...props, children })
2111
1205
  );
2112
- KdsCardActions.displayName = "KdsCardActions";
1206
+ KdsCardFooter.displayName = "KdsCardFooter";
2113
1207
 
2114
1208
  // src/components/core/KdsSpinner/KdsSpinner.tsx
2115
- import CircularProgress2 from "@mui/material/CircularProgress";
2116
- import Box2 from "@mui/material/Box";
2117
- import { jsx as jsx7 } from "react/jsx-runtime";
2118
- var sizeMap = {
2119
- small: 20,
2120
- medium: 40,
2121
- large: 60
2122
- };
2123
- var KdsSpinner = ({
2124
- size = "medium",
2125
- color = "primary",
2126
- customSize,
2127
- label = "Cargando...",
2128
- sx,
2129
- ...props
2130
- }) => {
2131
- const spinnerSize = customSize || sizeMap[size];
2132
- return /* @__PURE__ */ jsx7(
2133
- Box2,
2134
- {
2135
- sx: {
2136
- display: "inline-flex",
2137
- alignItems: "center",
2138
- justifyContent: "center"
2139
- },
2140
- role: "progressbar",
2141
- "aria-label": label,
2142
- children: /* @__PURE__ */ jsx7(
2143
- CircularProgress2,
2144
- {
2145
- size: spinnerSize,
2146
- color,
2147
- sx,
2148
- ...props
2149
- }
2150
- )
2151
- }
2152
- );
2153
- };
1209
+ import { forwardRef as forwardRef6 } from "react";
1210
+ 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" })
1216
+ ] })
1217
+ );
2154
1218
  KdsSpinner.displayName = "KdsSpinner";
2155
1219
 
2156
1220
  // src/components/core/KdsLinearProgress/KdsLinearProgress.tsx
2157
- import MuiLinearProgress from "@mui/material/LinearProgress";
1221
+ import { forwardRef as forwardRef7 } from "react";
2158
1222
  import { jsx as jsx8 } from "react/jsx-runtime";
2159
- var KdsLinearProgress = ({
2160
- color = "info",
2161
- variant = "indeterminate",
2162
- value,
2163
- sx,
2164
- ...props
2165
- }) => {
2166
- return /* @__PURE__ */ jsx8(
2167
- MuiLinearProgress,
2168
- {
2169
- color,
2170
- variant,
2171
- value,
2172
- sx: {
2173
- height: 4,
2174
- borderRadius: 0,
2175
- backgroundColor: "rgba(3, 169, 244, 0.4)",
2176
- "& .MuiLinearProgress-bar": {
2177
- backgroundColor: "#03A9F4"
2178
- },
2179
- ...sx
2180
- },
2181
- ...props
2182
- }
2183
- );
2184
- };
1223
+ var KdsLinearProgress = forwardRef7(
1224
+ ({ value, max = 100, className, ...props }, ref) => /* @__PURE__ */ jsx8("progress", { ref, className: clsx("kds-progress", className), value, max, ...props })
1225
+ );
2185
1226
  KdsLinearProgress.displayName = "KdsLinearProgress";
2186
1227
 
2187
1228
  // src/components/core/KdsAlert/KdsAlert.tsx
2188
- import MuiAlert from "@mui/material/Alert";
2189
- import AlertTitle from "@mui/material/AlertTitle";
2190
- import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
2191
- var KdsAlert = ({
2192
- severity = "info",
2193
- variant = "standard",
2194
- title,
2195
- children,
2196
- onClose,
2197
- sx,
2198
- ...props
2199
- }) => {
2200
- return /* @__PURE__ */ jsxs4(
2201
- MuiAlert,
1229
+ import { forwardRef as forwardRef8 } from "react";
1230
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
1231
+ var KdsAlert = forwardRef8(
1232
+ ({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => /* @__PURE__ */ jsxs6(
1233
+ "div",
2202
1234
  {
2203
- severity,
2204
- variant,
2205
- onClose,
2206
- sx: {
2207
- borderRadius: "4px",
2208
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2209
- fontFeatureSettings: "'liga' off, 'clig' off",
2210
- fontSize: "0.875rem",
2211
- lineHeight: 1.43,
2212
- letterSpacing: "0.17px",
2213
- ...sx
2214
- },
1235
+ ref,
1236
+ role: "alert",
1237
+ className: clsx("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
2215
1238
  ...props,
2216
1239
  children: [
2217
- title && /* @__PURE__ */ jsx9(AlertTitle, { children: title }),
2218
- 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" }) })
2219
1246
  ]
2220
1247
  }
2221
- );
2222
- };
1248
+ )
1249
+ );
2223
1250
  KdsAlert.displayName = "KdsAlert";
2224
1251
 
2225
1252
  // src/components/core/KdsTypography/KdsTypography.tsx
2226
- import { forwardRef as forwardRef6 } from "react";
2227
- import MuiTypography from "@mui/material/Typography";
1253
+ import { forwardRef as forwardRef9 } from "react";
2228
1254
  import { jsx as jsx10 } from "react/jsx-runtime";
2229
- var colorMap = {
2230
- primary: "#272930",
2231
- // onSurface
2232
- secondary: "rgba(0, 0, 0, 0.60)",
2233
- tertiary: "#81848F",
2234
- disabled: "#9797A5",
2235
- error: "#D32F2F",
2236
- success: "#2E7D32",
2237
- info: "#0288D1",
2238
- inherit: "inherit"
2239
- };
2240
- var fontFeatureSettings = "'liga' off, 'clig' off";
2241
- var variantStyles = {
2242
- // Display variants
2243
- display1: {
2244
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2245
- fontFeatureSettings,
2246
- fontWeight: 700,
2247
- fontSize: "2.5rem",
2248
- // 40px
2249
- lineHeight: 1.2,
2250
- letterSpacing: "-0.01562em"
2251
- },
2252
- display2: {
2253
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2254
- fontFeatureSettings,
2255
- fontWeight: 700,
2256
- fontSize: "2rem",
2257
- // 32px
2258
- lineHeight: 1.2,
2259
- letterSpacing: "-0.00833em"
2260
- },
2261
- // Heading variants
2262
- heading1: {
2263
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2264
- fontFeatureSettings,
2265
- fontWeight: 600,
2266
- fontSize: "1.75rem",
2267
- // 28px
2268
- lineHeight: 1.2,
2269
- letterSpacing: 0
2270
- },
2271
- heading2: {
2272
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2273
- fontFeatureSettings,
2274
- fontWeight: 600,
2275
- fontSize: "1.5rem",
2276
- // 24px
2277
- lineHeight: 1.235,
2278
- letterSpacing: "0.00735em"
2279
- },
2280
- heading3: {
2281
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2282
- fontFeatureSettings,
2283
- fontWeight: 600,
2284
- fontSize: "1.25rem",
2285
- // 20px
2286
- lineHeight: "32px",
2287
- letterSpacing: "0.15px"
2288
- },
2289
- // Body variants
2290
- bodyLarge: {
2291
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2292
- fontFeatureSettings,
2293
- fontWeight: 400,
2294
- fontSize: "1rem",
2295
- // 16px
2296
- lineHeight: 1.5,
2297
- letterSpacing: "0.15px"
2298
- },
2299
- body: {
2300
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2301
- fontFeatureSettings,
2302
- fontWeight: 400,
2303
- fontSize: "0.875rem",
2304
- // 14px
2305
- lineHeight: 1.43,
2306
- letterSpacing: "0.17px"
2307
- },
2308
- bodySmall: {
2309
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2310
- fontFeatureSettings,
2311
- fontWeight: 400,
2312
- fontSize: "0.75rem",
2313
- // 12px
2314
- lineHeight: 1.66,
2315
- letterSpacing: "0.4px"
2316
- },
2317
- // Label variants
2318
- label: {
2319
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2320
- fontFeatureSettings,
2321
- fontWeight: 400,
2322
- fontSize: "0.75rem",
2323
- // 12px
2324
- lineHeight: "15px",
2325
- letterSpacing: "1px",
2326
- textTransform: "uppercase"
2327
- },
2328
- labelSmall: {
2329
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2330
- fontFeatureSettings,
2331
- fontWeight: 500,
2332
- fontSize: "0.625rem",
2333
- // 10px
2334
- lineHeight: "14px",
2335
- letterSpacing: 0
2336
- },
2337
- // Card variants
2338
- cardTitle: {
2339
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2340
- fontFeatureSettings,
2341
- fontWeight: 600,
2342
- fontSize: "1rem",
2343
- // 16px
2344
- lineHeight: "24px",
2345
- letterSpacing: "0.15px"
2346
- },
2347
- cardSubtitle: {
2348
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2349
- fontFeatureSettings,
2350
- fontWeight: 600,
2351
- fontSize: "0.875rem",
2352
- // 14px
2353
- lineHeight: "20px",
2354
- letterSpacing: "0.15px"
2355
- },
2356
- // Semantic variants
2357
- muted: {
2358
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2359
- fontFeatureSettings,
2360
- fontWeight: 400,
2361
- fontSize: "0.875rem",
2362
- // 14px
2363
- lineHeight: 1.43,
2364
- letterSpacing: "0.17px",
2365
- color: "#81848F"
2366
- },
2367
- link: {
2368
- fontFamily: '"Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
2369
- fontFeatureSettings,
2370
- fontWeight: 400,
2371
- fontSize: "0.875rem",
2372
- // 14px
2373
- lineHeight: 1.43,
2374
- letterSpacing: "0.17px",
2375
- color: "#0288D1",
2376
- textDecoration: "none",
2377
- cursor: "pointer",
2378
- "&:hover": {
2379
- textDecoration: "underline"
2380
- }
2381
- }
2382
- };
2383
- var muiVariantMap = {
1255
+ var variantTag = {
2384
1256
  display1: "h1",
2385
1257
  display2: "h2",
2386
- heading1: "h3",
2387
- heading2: "h4",
2388
- heading3: "h6",
2389
- bodyLarge: "body1",
2390
- body: "body2",
2391
- bodySmall: "caption",
2392
- label: "overline",
2393
- labelSmall: "caption",
2394
- cardTitle: "subtitle1",
2395
- cardSubtitle: "subtitle2",
2396
- muted: "body2",
2397
- link: "body2"
1258
+ heading1: "h1",
1259
+ heading2: "h2",
1260
+ heading3: "h3",
1261
+ "body-large": "p",
1262
+ body: "p",
1263
+ "body-small": "p",
1264
+ label: "span",
1265
+ "label-small": "span",
1266
+ muted: "p",
1267
+ link: "span"
2398
1268
  };
2399
- var isKhipuVariant = (variant) => {
2400
- return variant in variantStyles;
2401
- };
2402
- var KdsTypography = forwardRef6(
2403
- ({ variant = "body", color = "primary", truncate, maxLines, sx, ...props }, ref) => {
2404
- const isCustomVariant = typeof variant === "string" && isKhipuVariant(variant);
2405
- const combinedSx = [
2406
- // Apply custom variant styles if it's a Khipu variant
2407
- isCustomVariant ? variantStyles[variant] : {},
2408
- // Apply color (unless it's muted or link which have built-in colors)
2409
- isCustomVariant && variant !== "muted" && variant !== "link" && color ? { color: colorMap[color] || color } : {},
2410
- // Truncation styles
2411
- truncate ? {
2412
- overflow: "hidden",
2413
- textOverflow: "ellipsis",
2414
- ...maxLines ? {
2415
- display: "-webkit-box",
2416
- WebkitLineClamp: maxLines,
2417
- WebkitBoxOrient: "vertical"
2418
- } : {
2419
- whiteSpace: "nowrap"
2420
- }
2421
- } : {},
2422
- // User-provided sx
2423
- ...Array.isArray(sx) ? sx : [sx]
2424
- ];
1269
+ var KdsTypography = forwardRef9(
1270
+ ({ variant = "body", color, as, children, className, ...props }, ref) => {
1271
+ const Tag = as || variantTag[variant];
2425
1272
  return /* @__PURE__ */ jsx10(
2426
- MuiTypography,
1273
+ Tag,
2427
1274
  {
2428
1275
  ref,
2429
- variant: isCustomVariant ? muiVariantMap[variant] : variant,
2430
- sx: combinedSx,
2431
- ...props
1276
+ className: clsx(
1277
+ `kds-text-${variant}`,
1278
+ color && color !== "inherit" && `kds-text-${color}`,
1279
+ className
1280
+ ),
1281
+ ...props,
1282
+ children
2432
1283
  }
2433
1284
  );
2434
1285
  }
@@ -2436,117 +1287,98 @@ var KdsTypography = forwardRef6(
2436
1287
  KdsTypography.displayName = "KdsTypography";
2437
1288
 
2438
1289
  // src/components/core/KdsTabs/KdsTabs.tsx
2439
- import { forwardRef as forwardRef7, createContext } from "react";
2440
- import MuiTabs from "@mui/material/Tabs";
2441
- import MuiTab from "@mui/material/Tab";
2442
- import Box3 from "@mui/material/Box";
1290
+ import React10, { forwardRef as forwardRef10, Children, useMemo } from "react";
1291
+
1292
+ // src/components/core/hooks/useTabsKeyboard.ts
1293
+ import { useCallback } from "react";
1294
+ function useTabsKeyboard(tabCount, activeIndex, onChange) {
1295
+ const onKeyDown = useCallback(
1296
+ (e) => {
1297
+ let next = activeIndex;
1298
+ if (e.key === "ArrowRight") next = (activeIndex + 1) % tabCount;
1299
+ else if (e.key === "ArrowLeft") next = (activeIndex - 1 + tabCount) % tabCount;
1300
+ else if (e.key === "Home") next = 0;
1301
+ else if (e.key === "End") next = tabCount - 1;
1302
+ else return;
1303
+ e.preventDefault();
1304
+ onChange(next);
1305
+ const tablist = e.currentTarget;
1306
+ const buttons = tablist.querySelectorAll('[role="tab"]');
1307
+ buttons[next]?.focus();
1308
+ },
1309
+ [tabCount, activeIndex, onChange]
1310
+ );
1311
+ return { onKeyDown };
1312
+ }
1313
+
1314
+ // src/components/core/KdsTabs/KdsTabs.tsx
2443
1315
  import { jsx as jsx11 } from "react/jsx-runtime";
2444
- var TabsContext = createContext(null);
2445
- var KdsTab = forwardRef7(
2446
- ({ label, value, icon, disabled = false, sx, ...props }, ref) => {
1316
+ var KdsTabs = forwardRef10(
1317
+ ({ activeIndex, onChange, variant = "standard", children, className, style, ...props }, ref) => {
1318
+ const tabCount = Children.count(children);
1319
+ const { onKeyDown } = useTabsKeyboard(tabCount, activeIndex, onChange);
1320
+ const mergedStyle = useMemo(() => {
1321
+ if (variant !== "segmented") return style;
1322
+ return {
1323
+ ...style,
1324
+ "--_tab-count": tabCount,
1325
+ "--_active-idx": activeIndex
1326
+ };
1327
+ }, [variant, tabCount, activeIndex, style]);
2447
1328
  return /* @__PURE__ */ jsx11(
2448
- MuiTab,
1329
+ "div",
2449
1330
  {
2450
1331
  ref,
2451
- label,
2452
- value,
2453
- icon,
2454
- disabled,
2455
- sx: {
2456
- fontFamily: fontFamilies.secondary,
2457
- fontWeight: fontWeights.medium,
2458
- fontSize: "14px",
2459
- lineHeight: "24px",
2460
- letterSpacing: "0.4px",
2461
- textTransform: "uppercase",
2462
- minHeight: "42px",
2463
- padding: "9px 16px",
2464
- flex: 1,
2465
- maxWidth: "none",
2466
- "&.Mui-selected": {
2467
- color: colors.info.main
2468
- },
2469
- "&:not(.Mui-selected)": {
2470
- color: colors.text.secondary
2471
- },
2472
- ...sx
2473
- },
2474
- ...props
1332
+ role: "tablist",
1333
+ className: clsx(variant === "segmented" ? "kds-segmented-tabs" : "kds-tabs", className),
1334
+ style: mergedStyle,
1335
+ onKeyDown,
1336
+ ...props,
1337
+ children: Children.map(children, (child, i) => {
1338
+ if (!React10.isValidElement(child)) return child;
1339
+ return React10.cloneElement(child, {
1340
+ _active: i === activeIndex,
1341
+ _onClick: () => onChange(i)
1342
+ });
1343
+ })
2475
1344
  }
2476
1345
  );
2477
1346
  }
2478
1347
  );
1348
+ KdsTabs.displayName = "KdsTabs";
1349
+ var KdsTab = forwardRef10(
1350
+ ({ _active, _onClick, children, className, ...props }, ref) => /* @__PURE__ */ jsx11(
1351
+ "button",
1352
+ {
1353
+ ref,
1354
+ role: "tab",
1355
+ "aria-selected": _active,
1356
+ tabIndex: _active ? 0 : -1,
1357
+ className: clsx(_active && "active", className),
1358
+ onClick: _onClick,
1359
+ ...props,
1360
+ children
1361
+ }
1362
+ )
1363
+ );
2479
1364
  KdsTab.displayName = "KdsTab";
2480
- var KdsTabPanel = forwardRef7(
2481
- ({ value, selectedValue, children, sx, ...props }, ref) => {
2482
- const isSelected = value === selectedValue;
2483
- if (!isSelected) {
2484
- return null;
1365
+ var KdsTabPanel = forwardRef10(
1366
+ ({ active, children, className, ...props }, ref) => /* @__PURE__ */ jsx11(
1367
+ "div",
1368
+ {
1369
+ ref,
1370
+ role: "tabpanel",
1371
+ hidden: !active,
1372
+ className,
1373
+ ...props,
1374
+ children
2485
1375
  }
2486
- return /* @__PURE__ */ jsx11(
2487
- Box3,
2488
- {
2489
- ref,
2490
- role: "tabpanel",
2491
- id: `tabpanel-${value}`,
2492
- "aria-labelledby": `tab-${value}`,
2493
- sx: {
2494
- width: "100%",
2495
- ...sx
2496
- },
2497
- ...props,
2498
- children
2499
- }
2500
- );
2501
- }
1376
+ )
2502
1377
  );
2503
1378
  KdsTabPanel.displayName = "KdsTabPanel";
2504
- var KdsTabs = forwardRef7(
2505
- ({
2506
- value,
2507
- onChange,
2508
- color = "info",
2509
- variant = "fullWidth",
2510
- children,
2511
- sx,
2512
- ...props
2513
- }, ref) => {
2514
- const indicatorColor = color === "info" ? colors.info.main : color === "primary" ? colors.primary.main : colors.secondary.main;
2515
- return /* @__PURE__ */ jsx11(TabsContext.Provider, { value: { value, onChange }, children: /* @__PURE__ */ jsx11(
2516
- MuiTabs,
2517
- {
2518
- ref,
2519
- value,
2520
- onChange,
2521
- variant,
2522
- textColor: "inherit",
2523
- TabIndicatorProps: {
2524
- sx: {
2525
- backgroundColor: indicatorColor,
2526
- height: "2px"
2527
- }
2528
- },
2529
- sx: {
2530
- width: "100%",
2531
- minHeight: "42px",
2532
- "& .MuiTabs-flexContainer": {
2533
- width: "100%"
2534
- },
2535
- ...sx
2536
- },
2537
- ...props,
2538
- children
2539
- }
2540
- ) });
2541
- }
2542
- );
2543
- KdsTabs.displayName = "KdsTabs";
2544
1379
 
2545
1380
  // src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
2546
- import { forwardRef as forwardRef8 } from "react";
2547
- import Box4 from "@mui/material/Box";
2548
- import IconButton2 from "@mui/material/IconButton";
2549
- import CloseIcon2 from "@mui/icons-material/Close";
1381
+ import { forwardRef as forwardRef11 } from "react";
2550
1382
 
2551
1383
  // src/assets/images/khipu-logo-color.svg
2552
1384
  var khipu_logo_color_default = "./khipu-logo-color-TV75AKOV.svg";
@@ -2554,33 +1386,20 @@ var khipu_logo_color_default = "./khipu-logo-color-TV75AKOV.svg";
2554
1386
  // src/components/core/KdsLogoHeader/KdsLogoHeader.tsx
2555
1387
  import { jsx as jsx12 } from "react/jsx-runtime";
2556
1388
  var KhipuLogo = () => /* @__PURE__ */ jsx12(
2557
- Box4,
1389
+ "img",
2558
1390
  {
2559
- component: "img",
2560
1391
  src: khipu_logo_color_default,
2561
1392
  alt: "Khipu",
2562
- sx: {
2563
- height: "15px",
2564
- maxHeight: "15px",
2565
- width: "auto",
2566
- maxWidth: "50px",
2567
- objectFit: "contain"
2568
- }
1393
+ className: "kds-logo-header-logo-img"
2569
1394
  }
2570
1395
  );
2571
- var KdsLogoHeaderLogo = forwardRef8(
2572
- ({ children, sx, ...props }, ref) => {
1396
+ var KdsLogoHeaderLogo = forwardRef11(
1397
+ ({ children, className, ...props }, ref) => {
2573
1398
  return /* @__PURE__ */ jsx12(
2574
- Box4,
1399
+ "div",
2575
1400
  {
2576
1401
  ref,
2577
- sx: {
2578
- display: "flex",
2579
- alignItems: "center",
2580
- height: "15px",
2581
- overflow: "hidden",
2582
- ...sx
2583
- },
1402
+ className: clsx("kds-logo-header-logo", className),
2584
1403
  ...props,
2585
1404
  children: children || /* @__PURE__ */ jsx12(KhipuLogo, {})
2586
1405
  }
@@ -2588,21 +1407,13 @@ var KdsLogoHeaderLogo = forwardRef8(
2588
1407
  }
2589
1408
  );
2590
1409
  KdsLogoHeaderLogo.displayName = "KdsLogoHeaderLogo";
2591
- var KdsLogoHeaderSeparator = forwardRef8(
2592
- ({ children = "|", sx, ...props }, ref) => {
1410
+ var KdsLogoHeaderSeparator = forwardRef11(
1411
+ ({ children = "|", className, ...props }, ref) => {
2593
1412
  return /* @__PURE__ */ jsx12(
2594
- Box4,
1413
+ "span",
2595
1414
  {
2596
1415
  ref,
2597
- component: "span",
2598
- sx: {
2599
- fontFamily: fontFamilies.secondary,
2600
- fontWeight: fontWeights.medium,
2601
- fontSize: "10px",
2602
- lineHeight: "14px",
2603
- color: "#9797A5",
2604
- ...sx
2605
- },
1416
+ className: clsx("kds-logo-header-separator", className),
2606
1417
  ...props,
2607
1418
  children
2608
1419
  }
@@ -2610,22 +1421,13 @@ var KdsLogoHeaderSeparator = forwardRef8(
2610
1421
  }
2611
1422
  );
2612
1423
  KdsLogoHeaderSeparator.displayName = "KdsLogoHeaderSeparator";
2613
- var KdsLogoHeaderCode = forwardRef8(
2614
- ({ children, sx, ...props }, ref) => {
1424
+ var KdsLogoHeaderCode = forwardRef11(
1425
+ ({ children, className, ...props }, ref) => {
2615
1426
  return /* @__PURE__ */ jsx12(
2616
- Box4,
1427
+ "span",
2617
1428
  {
2618
1429
  ref,
2619
- component: "span",
2620
- sx: {
2621
- fontFamily: fontFamilies.primary,
2622
- fontWeight: fontWeights.medium,
2623
- fontSize: "9px",
2624
- lineHeight: "14px",
2625
- color: "#9797A5",
2626
- whiteSpace: "nowrap",
2627
- ...sx
2628
- },
1430
+ className: clsx("kds-logo-header-code", className),
2629
1431
  ...props,
2630
1432
  children
2631
1433
  }
@@ -2633,55 +1435,29 @@ var KdsLogoHeaderCode = forwardRef8(
2633
1435
  }
2634
1436
  );
2635
1437
  KdsLogoHeaderCode.displayName = "KdsLogoHeaderCode";
2636
- var KdsLogoHeaderCloseButton = forwardRef8(
2637
- ({ onClose, sx, ...props }, ref) => {
2638
- return /* @__PURE__ */ jsx12(
2639
- Box4,
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",
2640
1442
  {
2641
- sx: {
2642
- flex: 1,
2643
- display: "flex",
2644
- justifyContent: "flex-end"
2645
- },
2646
- children: /* @__PURE__ */ jsx12(
2647
- IconButton2,
2648
- {
2649
- ref,
2650
- onClick: onClose,
2651
- size: "small",
2652
- "aria-label": "close",
2653
- sx: {
2654
- color: colors.action.active,
2655
- padding: 0,
2656
- "&:hover": {
2657
- backgroundColor: colors.action.hover
2658
- },
2659
- ...sx
2660
- },
2661
- ...props,
2662
- children: /* @__PURE__ */ jsx12(CloseIcon2, { sx: { fontSize: 24 } })
2663
- }
2664
- )
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" })
2665
1449
  }
2666
- );
1450
+ ) });
2667
1451
  }
2668
1452
  );
2669
1453
  KdsLogoHeaderCloseButton.displayName = "KdsLogoHeaderCloseButton";
2670
- var KdsLogoHeader = forwardRef8(
2671
- ({ children, sx, ...props }, ref) => {
1454
+ var KdsLogoHeader = forwardRef11(
1455
+ ({ children, className, ...props }, ref) => {
2672
1456
  return /* @__PURE__ */ jsx12(
2673
- Box4,
1457
+ "div",
2674
1458
  {
2675
1459
  ref,
2676
- sx: {
2677
- display: "flex",
2678
- alignItems: "center",
2679
- gap: spacing[2],
2680
- paddingX: semanticSpacing.card.paddingX,
2681
- paddingY: semanticSpacing.card.paddingY,
2682
- backgroundColor: colors.background.default,
2683
- ...sx
2684
- },
1460
+ className: clsx("kds-brand-row", className),
2685
1461
  ...props,
2686
1462
  children
2687
1463
  }
@@ -2691,346 +1467,592 @@ var KdsLogoHeader = forwardRef8(
2691
1467
  KdsLogoHeader.displayName = "KdsLogoHeader";
2692
1468
 
2693
1469
  // src/components/core/KdsRadioGroup/KdsRadioGroup.tsx
2694
- import { forwardRef as forwardRef9 } from "react";
2695
- import MuiRadioGroup from "@mui/material/RadioGroup";
2696
- import MuiRadio from "@mui/material/Radio";
2697
- import FormControl from "@mui/material/FormControl";
2698
- import FormControlLabel2 from "@mui/material/FormControlLabel";
2699
- import FormLabel from "@mui/material/FormLabel";
2700
- import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
2701
- var KdsRadio = forwardRef9(
2702
- ({ color = "primary", size = "medium", ...props }, ref) => {
2703
- return /* @__PURE__ */ jsx13(MuiRadio, { ref, color, size, ...props });
2704
- }
2705
- );
2706
- KdsRadio.displayName = "KdsRadio";
2707
- var KdsRadioGroup = forwardRef9(
2708
- ({
2709
- label,
2710
- options,
2711
- color = "primary",
2712
- size = "medium",
2713
- required = false,
2714
- disabled = false,
2715
- error = false,
2716
- children,
2717
- ...props
2718
- }, ref) => {
2719
- const radioGroup = /* @__PURE__ */ jsx13(MuiRadioGroup, { ref, ...props, children: options ? options.map((option) => /* @__PURE__ */ jsx13(
2720
- FormControlLabel2,
2721
- {
2722
- value: option.value,
2723
- disabled: disabled || option.disabled,
2724
- control: /* @__PURE__ */ jsx13(MuiRadio, { color, size }),
2725
- label: option.label
2726
- },
2727
- option.value
2728
- )) : children });
2729
- if (label) {
2730
- return /* @__PURE__ */ jsxs5(FormControl, { required, disabled, error, children: [
2731
- /* @__PURE__ */ jsx13(FormLabel, { children: label }),
2732
- radioGroup
2733
- ] });
2734
- }
2735
- return radioGroup;
2736
- }
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(
1477
+ "input",
1478
+ {
1479
+ type: "radio",
1480
+ name,
1481
+ value: opt.value,
1482
+ checked: value === opt.value,
1483
+ disabled: opt.disabled,
1484
+ onChange: () => onChange?.(opt.value)
1485
+ }
1486
+ ),
1487
+ /* @__PURE__ */ jsx13("span", { children: opt.label })
1488
+ ] }, opt.value))
1489
+ ] })
2737
1490
  );
2738
1491
  KdsRadioGroup.displayName = "KdsRadioGroup";
2739
1492
 
2740
1493
  // src/components/core/KdsSelect/KdsSelect.tsx
2741
- import { forwardRef as forwardRef10 } from "react";
2742
- import MuiSelect from "@mui/material/Select";
2743
- import MuiMenuItem from "@mui/material/MenuItem";
2744
- import FormControl2 from "@mui/material/FormControl";
2745
- import InputLabel from "@mui/material/InputLabel";
2746
- import FormHelperText from "@mui/material/FormHelperText";
2747
- import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
2748
- var KdsMenuItem = forwardRef10(
2749
- (props, ref) => {
2750
- return /* @__PURE__ */ jsx14(MuiMenuItem, { ref, ...props });
2751
- }
2752
- );
2753
- KdsMenuItem.displayName = "KdsMenuItem";
2754
- var KdsSelect = forwardRef10(
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(
2755
1498
  ({
2756
- variant = "outlined",
2757
- size = "medium",
1499
+ value,
1500
+ onValueChange,
1501
+ placeholder,
2758
1502
  label,
2759
- options,
2760
- helperText,
2761
- fullWidth = true,
2762
1503
  error,
2763
- required,
1504
+ helperText,
2764
1505
  disabled,
1506
+ fullWidth = true,
2765
1507
  children,
2766
- ...props
2767
- }, ref) => {
2768
- const labelId = label ? `kds-select-label-${String(label).replace(/\s/g, "-")}` : void 0;
2769
- return /* @__PURE__ */ jsxs6(
2770
- FormControl2,
2771
- {
2772
- variant,
2773
- size,
2774
- fullWidth,
2775
- error,
2776
- required,
2777
- disabled,
2778
- children: [
2779
- label && /* @__PURE__ */ jsx14(InputLabel, { id: labelId, children: label }),
2780
- /* @__PURE__ */ jsx14(
2781
- MuiSelect,
2782
- {
2783
- ref,
2784
- labelId,
2785
- label,
2786
- variant,
2787
- size,
2788
- ...props,
2789
- children: options ? options.map((option) => /* @__PURE__ */ jsx14(
2790
- MuiMenuItem,
2791
- {
2792
- value: option.value,
2793
- disabled: option.disabled,
2794
- children: option.label
2795
- },
2796
- option.value
2797
- )) : children
2798
- }
2799
- ),
2800
- helperText && /* @__PURE__ */ jsx14(FormHelperText, { children: helperText })
2801
- ]
2802
- }
2803
- );
2804
- }
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" }) })
1525
+ ] }),
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
+ ] })
2805
1539
  );
2806
- KdsSelect.displayName = "KdsSelect";
1540
+ KdsSelectItem.displayName = "KdsSelect.Item";
1541
+ var KdsSelect = Object.assign(KdsSelectRoot, {
1542
+ Item: KdsSelectItem
1543
+ });
2807
1544
 
2808
1545
  // src/components/core/KdsChip/KdsChip.tsx
2809
- import { forwardRef as forwardRef11 } from "react";
2810
- import MuiChip from "@mui/material/Chip";
2811
- import { jsx as jsx15 } from "react/jsx-runtime";
2812
- var KdsChip = forwardRef11(
2813
- ({
2814
- variant = "filled",
2815
- color = "default",
2816
- size = "medium",
2817
- sx,
2818
- ...props
2819
- }, ref) => {
2820
- return /* @__PURE__ */ jsx15(
2821
- MuiChip,
2822
- {
2823
- ref,
2824
- variant,
2825
- color,
2826
- size,
2827
- sx: {
2828
- borderRadius: "4px",
2829
- ...sx
2830
- },
2831
- ...props
2832
- }
2833
- );
2834
- }
1546
+ import { forwardRef as forwardRef14 } from "react";
1547
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
1548
+ var KdsChip = forwardRef14(
1549
+ ({ 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" }) })
1553
+ ] })
2835
1554
  );
2836
1555
  KdsChip.displayName = "KdsChip";
2837
1556
 
2838
1557
  // src/components/core/KdsSnackbar/KdsSnackbar.tsx
2839
- import { forwardRef as forwardRef12 } from "react";
2840
- import MuiSnackbar from "@mui/material/Snackbar";
2841
- import IconButton3 from "@mui/material/IconButton";
2842
- import CloseIcon3 from "@mui/icons-material/Close";
2843
- import { jsx as jsx16 } from "react/jsx-runtime";
2844
- var KdsSnackbar = forwardRef12(
2845
- ({
2846
- vertical = "bottom",
2847
- horizontal = "center",
2848
- showCloseButton = false,
2849
- onClose,
2850
- ...props
2851
- }, ref) => {
2852
- const action = showCloseButton ? /* @__PURE__ */ jsx16(
2853
- IconButton3,
2854
- {
2855
- size: "small",
2856
- "aria-label": "Cerrar",
2857
- color: "inherit",
2858
- onClick: (e) => onClose?.(e, "escapeKeyDown"),
2859
- children: /* @__PURE__ */ jsx16(CloseIcon3, { fontSize: "small" })
2860
- }
2861
- ) : void 0;
2862
- return /* @__PURE__ */ jsx16(
2863
- MuiSnackbar,
2864
- {
2865
- ref,
2866
- anchorOrigin: { vertical, horizontal },
2867
- onClose,
2868
- action: props.action || action,
2869
- ...props
2870
- }
2871
- );
1558
+ import { forwardRef as forwardRef15 } from "react";
1559
+
1560
+ // src/components/core/hooks/useAutoHide.ts
1561
+ import { useState, useEffect, useRef } from "react";
1562
+ function useAutoHide(durationMs, onHide) {
1563
+ const [visible, setVisible] = useState(true);
1564
+ const onHideRef = useRef(onHide);
1565
+ onHideRef.current = onHide;
1566
+ useEffect(() => {
1567
+ if (durationMs <= 0) return;
1568
+ const timer = setTimeout(() => {
1569
+ setVisible(false);
1570
+ onHideRef.current?.();
1571
+ }, durationMs);
1572
+ return () => clearTimeout(timer);
1573
+ }, [durationMs]);
1574
+ return { visible, setVisible };
1575
+ }
1576
+
1577
+ // 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);
1582
+ 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
+ ] });
2872
1587
  }
2873
1588
  );
2874
1589
  KdsSnackbar.displayName = "KdsSnackbar";
2875
1590
 
2876
1591
  // src/components/core/KdsTooltip/KdsTooltip.tsx
2877
- import MuiTooltip from "@mui/material/Tooltip";
2878
- import { jsx as jsx17 } from "react/jsx-runtime";
2879
- var KdsTooltip = ({
2880
- arrow = false,
2881
- ...props
2882
- }) => {
2883
- return /* @__PURE__ */ jsx17(MuiTooltip, { arrow, ...props });
2884
- };
2885
- KdsTooltip.displayName = "KdsTooltip";
1592
+ import * as Tooltip from "@radix-ui/react-tooltip";
1593
+ import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1594
+ function KdsTooltip({
1595
+ content,
1596
+ children,
1597
+ placement = "top",
1598
+ className,
1599
+ open,
1600
+ defaultOpen,
1601
+ onOpenChange,
1602
+ delayDuration = 300
1603
+ }) {
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
+ ] }) })
1610
+ ] }) });
1611
+ }
2886
1612
 
2887
1613
  // src/components/core/KdsAccordion/KdsAccordion.tsx
2888
- import { forwardRef as forwardRef13 } from "react";
2889
- import MuiAccordion from "@mui/material/Accordion";
2890
- import MuiAccordionSummary from "@mui/material/AccordionSummary";
2891
- import MuiAccordionDetails from "@mui/material/AccordionDetails";
2892
- import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
2893
- import { jsx as jsx18 } from "react/jsx-runtime";
2894
- var KdsAccordionSummary = forwardRef13(
2895
- ({ expandIcon, ...props }, ref) => {
2896
- return /* @__PURE__ */ jsx18(
2897
- MuiAccordionSummary,
2898
- {
2899
- ref,
2900
- expandIcon: expandIcon || /* @__PURE__ */ jsx18(ExpandMoreIcon, {}),
2901
- ...props
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 })
1618
+ );
1619
+ KdsAccordion.displayName = "KdsAccordion";
1620
+ var KdsAccordionSummary = forwardRef16(
1621
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsxs12("summary", { ref, className: clsx("kds-accordion-summary", className), ...props, children: [
1622
+ children,
1623
+ /* @__PURE__ */ jsx18("i", { className: "material-symbols-outlined", children: "expand_more" })
1624
+ ] })
1625
+ );
1626
+ KdsAccordionSummary.displayName = "KdsAccordionSummary";
1627
+ var KdsAccordionDetails = forwardRef16(
1628
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx18("div", { ref, className: clsx("kds-accordion-details", className), ...props, children })
1629
+ );
1630
+ KdsAccordionDetails.displayName = "KdsAccordionDetails";
1631
+
1632
+ // 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 })
1637
+ );
1638
+ KdsDivider.displayName = "KdsDivider";
1639
+
1640
+ // 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(
1644
+ ({ 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 })
1647
+ ] })
1648
+ );
1649
+ KdsSectionNote.displayName = "KdsSectionNote";
1650
+
1651
+ // 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(
1655
+ ({ 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 }) }),
1657
+ /* @__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 })
1660
+ ] })
1661
+ ] })
1662
+ );
1663
+ KdsStatusBlock.displayName = "KdsStatusBlock";
1664
+
1665
+ // 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)) })
1673
+ );
1674
+ KdsStepper.displayName = "KdsStepper";
1675
+
1676
+ // src/components/core/KdsCopyRow/KdsCopyRow.tsx
1677
+ import { forwardRef as forwardRef21 } from "react";
1678
+
1679
+ // src/components/core/hooks/useCopyToClipboard.ts
1680
+ import { useState as useState2, useCallback as useCallback2 } from "react";
1681
+ function useCopyToClipboard(resetMs = 1200) {
1682
+ const [copied, setCopied] = useState2(false);
1683
+ const copy = useCallback2(
1684
+ async (text) => {
1685
+ try {
1686
+ await navigator.clipboard.writeText(text);
1687
+ setCopied(true);
1688
+ setTimeout(() => setCopied(false), resetMs);
1689
+ } catch {
2902
1690
  }
2903
- );
1691
+ },
1692
+ [resetMs]
1693
+ );
1694
+ return { copied, copy };
1695
+ }
1696
+
1697
+ // 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) => {
1701
+ 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
+ ] });
2904
1707
  }
2905
1708
  );
2906
- KdsAccordionSummary.displayName = "KdsAccordionSummary";
2907
- var KdsAccordionDetails = forwardRef13(
2908
- (props, ref) => {
2909
- return /* @__PURE__ */ jsx18(MuiAccordionDetails, { ref, ...props });
1709
+ KdsCopyRow.displayName = "KdsCopyRow";
1710
+
1711
+ // 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 = () => {
1718
+ const text = rows.map((r) => `${r.label}: ${r.value}`).join("\n");
1719
+ copy(text);
1720
+ };
1721
+ 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
+ ] })
1730
+ ] });
2910
1731
  }
2911
1732
  );
2912
- KdsAccordionDetails.displayName = "KdsAccordionDetails";
2913
- var KdsAccordion = forwardRef13(
2914
- ({
2915
- variant = "elevation",
2916
- sx,
2917
- ...props
2918
- }, ref) => {
2919
- return /* @__PURE__ */ jsx18(
2920
- MuiAccordion,
2921
- {
2922
- ref,
2923
- variant,
2924
- sx: {
2925
- borderRadius: "4px",
2926
- "&:before": { display: "none" },
2927
- ...sx
2928
- },
2929
- ...props
1733
+ KdsCopyableTable.displayName = "KdsCopyableTable";
1734
+
1735
+ // 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(
1739
+ ({ label, defaultExpanded = false, children, className, ...props }, ref) => {
1740
+ const [expanded, setExpanded] = useState3(defaultExpanded);
1741
+ return /* @__PURE__ */ jsxs18("div", { ref, className, ...props, children: [
1742
+ /* @__PURE__ */ jsxs18(
1743
+ "button",
1744
+ {
1745
+ className: "kds-expand-toggle",
1746
+ onClick: () => setExpanded((v) => !v),
1747
+ "aria-expanded": expanded,
1748
+ children: [
1749
+ /* @__PURE__ */ jsx25("span", { children: label }),
1750
+ /* @__PURE__ */ jsx25("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
1751
+ ]
1752
+ }
1753
+ ),
1754
+ /* @__PURE__ */ jsx25("div", { className: clsx("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
1755
+ ] });
1756
+ }
1757
+ );
1758
+ KdsExpandPanel.displayName = "KdsExpandPanel";
1759
+
1760
+ // src/components/core/KdsCountdown/KdsCountdown.tsx
1761
+ import { forwardRef as forwardRef24, useEffect as useEffect3, useRef as useRef2 } from "react";
1762
+
1763
+ // src/components/core/hooks/useCountdown.ts
1764
+ import { useState as useState4, useEffect as useEffect2 } from "react";
1765
+ function calcRemaining(deadline) {
1766
+ const diff = Math.max(0, new Date(deadline).getTime() - Date.now());
1767
+ const totalSeconds = Math.floor(diff / 1e3);
1768
+ return {
1769
+ hours: Math.floor(totalSeconds / 3600),
1770
+ minutes: Math.floor(totalSeconds % 3600 / 60),
1771
+ seconds: totalSeconds % 60,
1772
+ expired: diff === 0,
1773
+ urgent: diff > 0 && diff < 5 * 60 * 1e3
1774
+ };
1775
+ }
1776
+ function useCountdown(deadline) {
1777
+ const [state, setState] = useState4(() => calcRemaining(deadline));
1778
+ useEffect2(() => {
1779
+ const tick = () => setState(calcRemaining(deadline));
1780
+ const id = setInterval(tick, 1e3);
1781
+ return () => clearInterval(id);
1782
+ }, [deadline]);
1783
+ return state;
1784
+ }
1785
+
1786
+ // src/components/core/KdsCountdown/KdsCountdown.tsx
1787
+ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
1788
+ var KdsCountdown = forwardRef24(
1789
+ ({ deadline, label, onExpire, className, ...props }, ref) => {
1790
+ const { hours, minutes, seconds, expired, urgent } = useCountdown(deadline);
1791
+ const onExpireRef = useRef2(onExpire);
1792
+ onExpireRef.current = onExpire;
1793
+ useEffect3(() => {
1794
+ if (expired) {
1795
+ onExpireRef.current?.();
2930
1796
  }
2931
- );
1797
+ }, [expired]);
1798
+ if (expired) {
1799
+ return null;
1800
+ }
1801
+ const pad = (n) => String(n).padStart(2, "0");
1802
+ 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 }),
1804
+ /* @__PURE__ */ jsxs19("span", { className: "kds-countdown-value", children: [
1805
+ pad(hours),
1806
+ ":",
1807
+ pad(minutes),
1808
+ ":",
1809
+ pad(seconds)
1810
+ ] })
1811
+ ] });
2932
1812
  }
2933
1813
  );
2934
- KdsAccordion.displayName = "KdsAccordion";
1814
+ KdsCountdown.displayName = "KdsCountdown";
1815
+
1816
+ // 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 })
1821
+ );
1822
+ KdsSegmentedTabs.displayName = "KdsSegmentedTabs";
2935
1823
 
2936
- // src/index.ts
2937
- import { default as default2 } from "@mui/material/Box";
2938
- import { default as default3 } from "@mui/material/InputAdornment";
2939
- import { default as default4 } from "@mui/material/Divider";
2940
- import { default as default5 } from "@mui/material/Link";
2941
- import { default as default6 } from "@mui/material/IconButton";
2942
- import { default as default7 } from "@mui/material/Stack";
2943
- import { default as default8 } from "@mui/material/Grid";
2944
- import { default as default9 } from "@mui/material/Container";
2945
- import { default as default10 } from "@mui/icons-material/Search";
2946
- import { default as default11 } from "@mui/icons-material/ChevronRight";
2947
- import { default as default12 } from "@mui/icons-material/ChevronLeft";
2948
- import { default as default13 } from "@mui/icons-material/Close";
2949
- import { default as default14 } from "@mui/icons-material/Check";
2950
- import { default as default15 } from "@mui/icons-material/CheckCircle";
2951
- import { default as default16 } from "@mui/icons-material/Person";
2952
- import { default as default17 } from "@mui/icons-material/Lock";
2953
- import { default as default18 } from "@mui/icons-material/LockOutlined";
2954
- import { default as default19 } from "@mui/icons-material/MailOutline";
2955
- import { default as default20 } from "@mui/icons-material/ExpandMore";
2956
- import { default as default21 } from "@mui/icons-material/ExpandLess";
2957
- import { default as default22 } from "@mui/icons-material/Info";
2958
- import { default as default23 } from "@mui/icons-material/Warning";
2959
- import { default as default24 } from "@mui/icons-material/Error";
2960
- import { default as default25 } from "@mui/icons-material/Visibility";
2961
- import { default as default26 } from "@mui/icons-material/VisibilityOff";
2962
- import { default as default27 } from "@mui/icons-material/ContentCopy";
2963
- import { default as default28 } from "@mui/icons-material/KeyboardArrowUp";
2964
- import { default as default29 } from "@mui/icons-material/KeyboardArrowDown";
1824
+ // 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(
1828
+ ({ name, logoUrl, selected, className, ...props }, ref) => /* @__PURE__ */ jsxs20(
1829
+ "button",
1830
+ {
1831
+ ref,
1832
+ type: "button",
1833
+ className: clsx("kds-bank-row", selected && "selected", className),
1834
+ ...props,
1835
+ 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" })
1839
+ ]
1840
+ }
1841
+ )
1842
+ );
1843
+ KdsBankRow.displayName = "KdsBankRow";
1844
+
1845
+ // 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 })
1850
+ );
1851
+ KdsBankList.displayName = "KdsBankList";
1852
+
1853
+ // 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(
1858
+ ({ open, onClose, title = "Selecciona tu banco", searchPlaceholder = "Buscar banco...", onSearch, children, className, container }, ref) => {
1859
+ const [query, setQuery] = useState5("");
1860
+ const handleSearch = (value) => {
1861
+ setQuery(value);
1862
+ onSearch?.(value);
1863
+ };
1864
+ return /* @__PURE__ */ jsx30(Dialog2.Root, { open, onOpenChange: (o) => {
1865
+ 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: [
1867
+ /* @__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" }) }) })
1870
+ ] }),
1871
+ /* @__PURE__ */ jsx30("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ jsx30(
1872
+ "input",
1873
+ {
1874
+ type: "text",
1875
+ placeholder: searchPlaceholder,
1876
+ value: query,
1877
+ onChange: (e) => handleSearch(e.target.value)
1878
+ }
1879
+ ) }),
1880
+ /* @__PURE__ */ jsx30("div", { className: "kds-bank-modal-body", children })
1881
+ ] }) }) }) });
1882
+ }
1883
+ );
1884
+ KdsBankModal.displayName = "KdsBankModal";
1885
+
1886
+ // 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(
1890
+ ({ 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 }) }),
1892
+ /* @__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 })
1895
+ ] }),
1896
+ badge && /* @__PURE__ */ jsx31("span", { className: "kds-qr-badge", children: badge }),
1897
+ /* @__PURE__ */ jsx31("i", { className: "material-symbols-outlined", children: "chevron_right" })
1898
+ ] })
1899
+ );
1900
+ KdsQrRow.displayName = "KdsQrRow";
1901
+
1902
+ // 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(
1906
+ ({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ jsxs23(
1907
+ "button",
1908
+ {
1909
+ ref,
1910
+ type: "button",
1911
+ className: clsx("kds-card-selector", selected && "selected", className),
1912
+ ...props,
1913
+ 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 })
1917
+ ]
1918
+ }
1919
+ )
1920
+ );
1921
+ KdsCardSelector.displayName = "KdsCardSelector";
1922
+
1923
+ // 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(
1927
+ ({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ jsxs24(
1928
+ "div",
1929
+ {
1930
+ ref,
1931
+ className: clsx("kds-card-plan", recommended && "recommended", className),
1932
+ ...props,
1933
+ 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 }) }),
1936
+ /* @__PURE__ */ jsxs24("div", { className: "kds-card-plan-price", children: [
1937
+ /* @__PURE__ */ jsx33("span", { children: price }),
1938
+ period && /* @__PURE__ */ jsxs24("span", { children: [
1939
+ "/",
1940
+ period
1941
+ ] })
1942
+ ] }),
1943
+ features && features.length > 0 && /* @__PURE__ */ jsx33("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ jsx33("li", { children: f }, i)) }),
1944
+ action
1945
+ ]
1946
+ }
1947
+ )
1948
+ );
1949
+ KdsCardPlan.displayName = "KdsCardPlan";
1950
+
1951
+ // 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 })
1956
+ );
1957
+ KdsInvoiceSticky.displayName = "KdsInvoiceSticky";
1958
+
1959
+ // 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
+ ] }) }) }) })
1972
+ );
1973
+ KdsBottomSheet.displayName = "KdsBottomSheet";
1974
+
1975
+ // 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(
1979
+ ({ 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" })
1982
+ ] })
1983
+ );
1984
+ KdsSecureFooter.displayName = "KdsSecureFooter";
1985
+
1986
+ // 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 || "-" })
1993
+ ] }, i)) })
1994
+ );
1995
+ KdsRecapList.displayName = "KdsRecapList";
2965
1996
  export {
2966
- default2 as Box,
2967
- default15 as CheckCircleIcon,
2968
- default14 as CheckIcon,
2969
- default12 as ChevronLeftIcon,
2970
- default11 as ChevronRightIcon,
2971
- default13 as CloseIcon,
2972
- default9 as Container,
2973
- default27 as ContentCopyIcon,
2974
- default4 as Divider,
2975
- default24 as ErrorIcon,
2976
- default21 as ExpandLessIcon,
2977
- default20 as ExpandMoreIcon,
2978
- default8 as Grid,
2979
- default6 as IconButton,
2980
- default22 as InfoIcon,
2981
- default3 as InputAdornment,
2982
1997
  KdsAccordion,
2983
1998
  KdsAccordionDetails,
2984
1999
  KdsAccordionSummary,
2985
2000
  KdsAlert,
2001
+ KdsBankList,
2002
+ KdsBankModal,
2003
+ KdsBankRow,
2004
+ KdsBottomSheet,
2986
2005
  KdsButton,
2987
2006
  KdsCard,
2988
- KdsCardActions,
2989
- KdsCardContent,
2007
+ KdsCardBody,
2008
+ KdsCardFooter,
2990
2009
  KdsCardHeader,
2010
+ KdsCardPlan,
2011
+ KdsCardSelector,
2991
2012
  KdsCheckbox,
2992
2013
  KdsChip,
2014
+ KdsCopyRow,
2015
+ KdsCopyableTable,
2016
+ KdsCountdown,
2017
+ KdsDivider,
2018
+ KdsExpandPanel,
2019
+ KdsInvoiceSticky,
2993
2020
  KdsLinearProgress,
2994
2021
  KdsLogoHeader,
2995
2022
  KdsLogoHeaderCloseButton,
2996
2023
  KdsLogoHeaderCode,
2997
2024
  KdsLogoHeaderLogo,
2998
2025
  KdsLogoHeaderSeparator,
2999
- KdsMenuItem,
3000
2026
  KdsModal,
3001
- KdsRadio,
2027
+ KdsQrRow,
3002
2028
  KdsRadioGroup,
2029
+ KdsRecapList,
2030
+ KdsSectionNote,
2031
+ KdsSecureFooter,
2032
+ KdsSegmentedTabs,
3003
2033
  KdsSelect,
3004
2034
  KdsSnackbar,
3005
2035
  KdsSpinner,
2036
+ KdsStatusBlock,
2037
+ KdsStepper,
3006
2038
  KdsTab,
3007
2039
  KdsTabPanel,
3008
2040
  KdsTabs,
3009
2041
  KdsTextField,
2042
+ KdsThemeProvider,
3010
2043
  KdsTooltip,
3011
2044
  KdsTypography,
3012
- default29 as KeyboardArrowDownIcon,
3013
- default28 as KeyboardArrowUpIcon,
3014
- KhipuThemeProvider,
3015
- default5 as Link,
3016
- default17 as LockIcon,
3017
- default18 as LockOutlinedIcon,
3018
- default19 as MailOutlineIcon,
3019
- default16 as PersonIcon,
3020
- default10 as SearchIcon,
3021
- default7 as Stack,
3022
- default25 as VisibilityIcon,
3023
- default26 as VisibilityOffIcon,
3024
- default23 as WarningIcon,
3025
2045
  borderRadius,
3026
2046
  breakpoints,
2047
+ clsx,
3027
2048
  colors,
3028
2049
  colorsByMode,
3029
2050
  fontFamilies,
3030
2051
  fontSizes,
3031
2052
  fontWeights,
3032
- khipuTheme,
2053
+ getContrastColor,
3033
2054
  letterSpacings,
2055
+ lighten,
3034
2056
  lineHeights,
3035
2057
  semanticSpacing,
3036
2058
  shadows,
@@ -3039,5 +2061,9 @@ export {
3039
2061
  tokensByMode,
3040
2062
  transitions,
3041
2063
  typography,
2064
+ useAutoHide,
2065
+ useCopyToClipboard,
2066
+ useCountdown,
2067
+ useTabsKeyboard,
3042
2068
  zIndex
3043
2069
  };