@khipu/design-system 0.3.5-alpha.4 → 0.3.5-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beercss/khipu-beercss.css +1599 -199
- package/dist/beercss/khipu-beercss.js +59 -52
- package/dist/beercss/khipu-beercss.min.css +1 -1
- package/dist/beercss/khipu-beercss.min.js +1 -1
- package/dist/beercss/khipu-beercss.scoped.css +1598 -198
- package/dist/beercss/khipu-beercss.scoped.min.css +1 -1
- package/dist/beercss/metadata.json +5 -5
- package/dist/index.d.mts +426 -12
- package/dist/index.d.ts +426 -12
- package/dist/index.js +1153 -428
- package/dist/index.mjs +1140 -427
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// src/theme/KdsThemeProvider.tsx
|
|
2
|
-
import { useEffect } from "react";
|
|
3
|
-
|
|
4
1
|
// src/components/core/utils.ts
|
|
5
2
|
import { clsx } from "clsx";
|
|
6
3
|
function hexToRgb(hex) {
|
|
@@ -72,79 +69,28 @@ function formatTime(iso) {
|
|
|
72
69
|
return `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
73
70
|
}
|
|
74
71
|
|
|
72
|
+
// src/version.ts
|
|
73
|
+
var KDS_VERSION = "0.3.5-alpha.41";
|
|
74
|
+
|
|
75
75
|
// src/theme/KdsThemeProvider.tsx
|
|
76
76
|
import { jsx } from "react/jsx-runtime";
|
|
77
|
-
var CARD_MIN_DELTA_PX = 8;
|
|
78
|
-
var CARD_TRANSITION_MS = 280;
|
|
79
|
-
var BODY_CARD_SELECTOR = ".kds-screen > .kds-card-elevated";
|
|
80
|
-
var CARD_MARK_ATTRIBUTE = "data-kds-height-transition";
|
|
81
|
-
function useCardHeightTransition() {
|
|
82
|
-
useEffect(() => {
|
|
83
|
-
if (typeof window === "undefined" || typeof ResizeObserver === "undefined") {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (typeof Element.prototype.animate !== "function") {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const observers = [];
|
|
93
|
-
const observe = (card) => {
|
|
94
|
-
if (card.getAttribute(CARD_MARK_ATTRIBUTE) === "on") {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
card.setAttribute(CARD_MARK_ATTRIBUTE, "on");
|
|
98
|
-
let previous = card.offsetHeight;
|
|
99
|
-
let animating = false;
|
|
100
|
-
const observer = new ResizeObserver(() => {
|
|
101
|
-
if (animating) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
const next = card.offsetHeight;
|
|
105
|
-
if (Math.abs(next - previous) < CARD_MIN_DELTA_PX) {
|
|
106
|
-
previous = next;
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
animating = true;
|
|
110
|
-
const animation = card.animate(
|
|
111
|
-
[{ height: `${previous}px` }, { height: `${next}px` }],
|
|
112
|
-
{ duration: CARD_TRANSITION_MS, easing: "ease-out" }
|
|
113
|
-
);
|
|
114
|
-
previous = next;
|
|
115
|
-
animation.finished.then(() => {
|
|
116
|
-
animating = false;
|
|
117
|
-
previous = card.offsetHeight;
|
|
118
|
-
}).catch(() => {
|
|
119
|
-
animating = false;
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
observer.observe(card);
|
|
123
|
-
observers.push(observer);
|
|
124
|
-
};
|
|
125
|
-
document.querySelectorAll(BODY_CARD_SELECTOR).forEach(observe);
|
|
126
|
-
const tree = new MutationObserver(() => {
|
|
127
|
-
document.querySelectorAll(BODY_CARD_SELECTOR).forEach(observe);
|
|
128
|
-
});
|
|
129
|
-
tree.observe(document.body, { childList: true, subtree: true });
|
|
130
|
-
return () => {
|
|
131
|
-
tree.disconnect();
|
|
132
|
-
observers.forEach((observer) => observer.disconnect());
|
|
133
|
-
document.querySelectorAll(BODY_CARD_SELECTOR).forEach((card) => {
|
|
134
|
-
card.removeAttribute(CARD_MARK_ATTRIBUTE);
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
|
-
}, []);
|
|
138
|
-
}
|
|
139
77
|
function KdsThemeProvider({ primaryColor, mode = "light", children }) {
|
|
140
|
-
useCardHeightTransition();
|
|
141
78
|
const style = primaryColor ? {
|
|
142
79
|
"--primary": primaryColor,
|
|
143
80
|
"--on-primary": getContrastColor(primaryColor),
|
|
144
81
|
"--primary-container": lighten(primaryColor, 0.85),
|
|
145
82
|
"--on-primary-container": primaryColor
|
|
146
83
|
} : void 0;
|
|
147
|
-
return /* @__PURE__ */ jsx(
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: `kds-theme-root ${mode}`,
|
|
88
|
+
"data-theme": mode,
|
|
89
|
+
"data-kds-version": KDS_VERSION,
|
|
90
|
+
style,
|
|
91
|
+
children
|
|
92
|
+
}
|
|
93
|
+
);
|
|
148
94
|
}
|
|
149
95
|
|
|
150
96
|
// src/tokens/index.ts
|
|
@@ -1231,7 +1177,7 @@ var KdsTextField = forwardRef2(
|
|
|
1231
1177
|
label,
|
|
1232
1178
|
required && requiredMark && " *"
|
|
1233
1179
|
] }),
|
|
1234
|
-
readOnly && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", children: "lock" }),
|
|
1180
|
+
readOnly && /* @__PURE__ */ jsx3("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "lock" }),
|
|
1235
1181
|
isRevealable && /* @__PURE__ */ jsx3(
|
|
1236
1182
|
"a",
|
|
1237
1183
|
{
|
|
@@ -1379,8 +1325,64 @@ var KdsSecureLoader = forwardRef7(
|
|
|
1379
1325
|
);
|
|
1380
1326
|
KdsSecureLoader.displayName = "KdsSecureLoader";
|
|
1381
1327
|
|
|
1382
|
-
// src/components/core/
|
|
1328
|
+
// src/components/core/KdsProgressChecklist/KdsProgressChecklist.tsx
|
|
1383
1329
|
import { forwardRef as forwardRef8 } from "react";
|
|
1330
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1331
|
+
var DEFAULT_STATUS_LABELS = {
|
|
1332
|
+
pending: "pendiente",
|
|
1333
|
+
active: "en curso",
|
|
1334
|
+
done: "listo",
|
|
1335
|
+
error: "con error"
|
|
1336
|
+
};
|
|
1337
|
+
function Mark({ status }) {
|
|
1338
|
+
return /* @__PURE__ */ jsxs7("span", { className: "kds-progress-checklist-mark", "aria-hidden": "true", children: [
|
|
1339
|
+
status === "done" && /* @__PURE__ */ jsx9("i", { className: "material-symbols-outlined", children: "check" }),
|
|
1340
|
+
status === "error" && /* @__PURE__ */ jsx9("i", { className: "material-symbols-outlined", children: "error" }),
|
|
1341
|
+
status === "active" && /* @__PURE__ */ jsxs7("span", { className: "kds-dots-loader", children: [
|
|
1342
|
+
/* @__PURE__ */ jsx9("span", {}),
|
|
1343
|
+
/* @__PURE__ */ jsx9("span", {}),
|
|
1344
|
+
/* @__PURE__ */ jsx9("span", {})
|
|
1345
|
+
] }),
|
|
1346
|
+
status === "pending" && /* @__PURE__ */ jsx9("span", { className: "kds-progress-checklist-dot" })
|
|
1347
|
+
] });
|
|
1348
|
+
}
|
|
1349
|
+
var KdsProgressChecklist = forwardRef8(
|
|
1350
|
+
({ items, statusLabels, className, ...props }, ref) => {
|
|
1351
|
+
const labels = { ...DEFAULT_STATUS_LABELS, ...statusLabels };
|
|
1352
|
+
return /* @__PURE__ */ jsx9(
|
|
1353
|
+
"ul",
|
|
1354
|
+
{
|
|
1355
|
+
ref,
|
|
1356
|
+
className: clsx("kds-progress-checklist", className),
|
|
1357
|
+
"aria-live": "polite",
|
|
1358
|
+
...props,
|
|
1359
|
+
children: items.map((item) => /* @__PURE__ */ jsxs7(
|
|
1360
|
+
"li",
|
|
1361
|
+
{
|
|
1362
|
+
className: clsx(
|
|
1363
|
+
"kds-progress-checklist-item",
|
|
1364
|
+
`kds-progress-checklist-item--${item.status}`
|
|
1365
|
+
),
|
|
1366
|
+
"aria-current": item.status === "active" ? "step" : void 0,
|
|
1367
|
+
children: [
|
|
1368
|
+
/* @__PURE__ */ jsx9(Mark, { status: item.status }),
|
|
1369
|
+
/* @__PURE__ */ jsx9("span", { className: "kds-progress-checklist-label", children: item.label }),
|
|
1370
|
+
/* @__PURE__ */ jsxs7("span", { className: "kds-progress-checklist-status", children: [
|
|
1371
|
+
": ",
|
|
1372
|
+
labels[item.status]
|
|
1373
|
+
] })
|
|
1374
|
+
]
|
|
1375
|
+
},
|
|
1376
|
+
item.id ?? item.label
|
|
1377
|
+
))
|
|
1378
|
+
}
|
|
1379
|
+
);
|
|
1380
|
+
}
|
|
1381
|
+
);
|
|
1382
|
+
KdsProgressChecklist.displayName = "KdsProgressChecklist";
|
|
1383
|
+
|
|
1384
|
+
// src/components/core/KdsCopyButton/KdsCopyButton.tsx
|
|
1385
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
1384
1386
|
|
|
1385
1387
|
// src/components/core/hooks/useCopyToClipboard.ts
|
|
1386
1388
|
import { useState as useState2, useCallback } from "react";
|
|
@@ -1401,11 +1403,11 @@ function useCopyToClipboard(resetMs = 1200) {
|
|
|
1401
1403
|
}
|
|
1402
1404
|
|
|
1403
1405
|
// src/components/core/KdsCopyButton/KdsCopyButton.tsx
|
|
1404
|
-
import { jsx as
|
|
1405
|
-
var KdsCopyButton =
|
|
1406
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1407
|
+
var KdsCopyButton = forwardRef9(
|
|
1406
1408
|
({ value, copiedText = "Copiado", className, ...props }, ref) => {
|
|
1407
1409
|
const { copied, copy } = useCopyToClipboard();
|
|
1408
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ jsxs8(
|
|
1409
1411
|
"button",
|
|
1410
1412
|
{
|
|
1411
1413
|
ref,
|
|
@@ -1415,11 +1417,11 @@ var KdsCopyButton = forwardRef8(
|
|
|
1415
1417
|
"aria-label": `Copiar: ${value}`,
|
|
1416
1418
|
...props,
|
|
1417
1419
|
children: [
|
|
1418
|
-
/* @__PURE__ */
|
|
1419
|
-
/* @__PURE__ */
|
|
1420
|
-
/* @__PURE__ */
|
|
1420
|
+
/* @__PURE__ */ jsxs8("span", { className: "kds-copy-button-label", children: [
|
|
1421
|
+
/* @__PURE__ */ jsx10("span", { className: "kds-copy-button-value", "aria-hidden": copied || void 0, children: value }),
|
|
1422
|
+
/* @__PURE__ */ jsx10("span", { className: "kds-copy-button-copied", "aria-hidden": !copied || void 0, children: copiedText })
|
|
1421
1423
|
] }),
|
|
1422
|
-
/* @__PURE__ */
|
|
1424
|
+
/* @__PURE__ */ jsx10("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: copied ? "check" : "content_copy" })
|
|
1423
1425
|
]
|
|
1424
1426
|
}
|
|
1425
1427
|
);
|
|
@@ -1428,26 +1430,26 @@ var KdsCopyButton = forwardRef8(
|
|
|
1428
1430
|
KdsCopyButton.displayName = "KdsCopyButton";
|
|
1429
1431
|
|
|
1430
1432
|
// src/components/core/KdsLinearProgress/KdsLinearProgress.tsx
|
|
1431
|
-
import { forwardRef as
|
|
1432
|
-
import { jsx as
|
|
1433
|
-
var KdsLinearProgress =
|
|
1434
|
-
({ value, max = 100, className, ...props }, ref) => /* @__PURE__ */
|
|
1433
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
1434
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1435
|
+
var KdsLinearProgress = forwardRef10(
|
|
1436
|
+
({ value, max = 100, className, ...props }, ref) => /* @__PURE__ */ jsx11("progress", { ref, className: clsx("kds-progress", className), value, max, ...props })
|
|
1435
1437
|
);
|
|
1436
1438
|
KdsLinearProgress.displayName = "KdsLinearProgress";
|
|
1437
1439
|
|
|
1438
1440
|
// src/components/core/KdsAlert/KdsAlert.tsx
|
|
1439
|
-
import { forwardRef as
|
|
1440
|
-
import { jsx as
|
|
1441
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
1442
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1441
1443
|
var DEFAULT_ICONS = {
|
|
1442
1444
|
success: "check_circle",
|
|
1443
1445
|
info: "info",
|
|
1444
1446
|
warning: "warning",
|
|
1445
1447
|
error: "error"
|
|
1446
1448
|
};
|
|
1447
|
-
var KdsAlert =
|
|
1449
|
+
var KdsAlert = forwardRef11(
|
|
1448
1450
|
({ severity, title, icon, inline, onClose, children, className, ...props }, ref) => {
|
|
1449
1451
|
const resolvedIcon = icon === false ? null : typeof icon === "string" ? icon : DEFAULT_ICONS[severity];
|
|
1450
|
-
return /* @__PURE__ */
|
|
1452
|
+
return /* @__PURE__ */ jsxs9(
|
|
1451
1453
|
"div",
|
|
1452
1454
|
{
|
|
1453
1455
|
ref,
|
|
@@ -1455,19 +1457,19 @@ var KdsAlert = forwardRef10(
|
|
|
1455
1457
|
className: clsx("kds-alert", `kds-${severity}`, inline && "kds-alert-inline", className),
|
|
1456
1458
|
...props,
|
|
1457
1459
|
children: [
|
|
1458
|
-
resolvedIcon && /* @__PURE__ */
|
|
1459
|
-
/* @__PURE__ */
|
|
1460
|
-
title && /* @__PURE__ */
|
|
1461
|
-
/* @__PURE__ */
|
|
1460
|
+
resolvedIcon && /* @__PURE__ */ jsx12("div", { className: "kds-alert-icon", children: /* @__PURE__ */ jsx12("i", { className: "material-symbols-outlined", children: resolvedIcon }) }),
|
|
1461
|
+
/* @__PURE__ */ jsxs9("div", { className: "kds-alert-content", children: [
|
|
1462
|
+
title && /* @__PURE__ */ jsx12("p", { className: "kds-alert-title", children: title }),
|
|
1463
|
+
/* @__PURE__ */ jsx12("p", { className: "kds-alert-description", children })
|
|
1462
1464
|
] }),
|
|
1463
|
-
onClose && /* @__PURE__ */
|
|
1465
|
+
onClose && /* @__PURE__ */ jsx12(
|
|
1464
1466
|
"button",
|
|
1465
1467
|
{
|
|
1466
1468
|
type: "button",
|
|
1467
1469
|
className: "kds-alert-close",
|
|
1468
1470
|
onClick: onClose,
|
|
1469
1471
|
"aria-label": "Cerrar",
|
|
1470
|
-
children: /* @__PURE__ */
|
|
1472
|
+
children: /* @__PURE__ */ jsx12("i", { className: "material-symbols-outlined", children: "close" })
|
|
1471
1473
|
}
|
|
1472
1474
|
)
|
|
1473
1475
|
]
|
|
@@ -1478,8 +1480,8 @@ var KdsAlert = forwardRef10(
|
|
|
1478
1480
|
KdsAlert.displayName = "KdsAlert";
|
|
1479
1481
|
|
|
1480
1482
|
// src/components/core/KdsTypography/KdsTypography.tsx
|
|
1481
|
-
import { forwardRef as
|
|
1482
|
-
import { jsx as
|
|
1483
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
1484
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1483
1485
|
var variantTag = {
|
|
1484
1486
|
display1: "h1",
|
|
1485
1487
|
display2: "h2",
|
|
@@ -1499,10 +1501,10 @@ var variantTag = {
|
|
|
1499
1501
|
link: "span",
|
|
1500
1502
|
strong: "span"
|
|
1501
1503
|
};
|
|
1502
|
-
var KdsTypography =
|
|
1504
|
+
var KdsTypography = forwardRef12(
|
|
1503
1505
|
({ variant = "body", color, as, children, className, ...props }, ref) => {
|
|
1504
1506
|
const Tag = as || variantTag[variant];
|
|
1505
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ jsx13(
|
|
1506
1508
|
Tag,
|
|
1507
1509
|
{
|
|
1508
1510
|
ref,
|
|
@@ -1520,7 +1522,7 @@ var KdsTypography = forwardRef11(
|
|
|
1520
1522
|
KdsTypography.displayName = "KdsTypography";
|
|
1521
1523
|
|
|
1522
1524
|
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
1523
|
-
import React13, { forwardRef as
|
|
1525
|
+
import React13, { forwardRef as forwardRef13, Children, useMemo } from "react";
|
|
1524
1526
|
|
|
1525
1527
|
// src/components/core/hooks/useTabsKeyboard.ts
|
|
1526
1528
|
import { useCallback as useCallback2 } from "react";
|
|
@@ -1545,8 +1547,8 @@ function useTabsKeyboard(tabCount, activeIndex, onChange) {
|
|
|
1545
1547
|
}
|
|
1546
1548
|
|
|
1547
1549
|
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
1548
|
-
import { jsx as
|
|
1549
|
-
var KdsTabs =
|
|
1550
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1551
|
+
var KdsTabs = forwardRef13(
|
|
1550
1552
|
({ activeIndex, onChange, children, className, style, ...props }, ref) => {
|
|
1551
1553
|
const tabCount = Children.count(children);
|
|
1552
1554
|
const { onKeyDown } = useTabsKeyboard(tabCount, activeIndex, onChange);
|
|
@@ -1558,7 +1560,7 @@ var KdsTabs = forwardRef12(
|
|
|
1558
1560
|
}),
|
|
1559
1561
|
[tabCount, activeIndex, style]
|
|
1560
1562
|
);
|
|
1561
|
-
return /* @__PURE__ */
|
|
1563
|
+
return /* @__PURE__ */ jsx14(
|
|
1562
1564
|
"div",
|
|
1563
1565
|
{
|
|
1564
1566
|
ref,
|
|
@@ -1579,8 +1581,8 @@ var KdsTabs = forwardRef12(
|
|
|
1579
1581
|
}
|
|
1580
1582
|
);
|
|
1581
1583
|
KdsTabs.displayName = "KdsTabs";
|
|
1582
|
-
var KdsTab =
|
|
1583
|
-
({ _active, _onClick, children, className, ...props }, ref) => /* @__PURE__ */
|
|
1584
|
+
var KdsTab = forwardRef13(
|
|
1585
|
+
({ _active, _onClick, children, className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1584
1586
|
"button",
|
|
1585
1587
|
{
|
|
1586
1588
|
ref,
|
|
@@ -1596,8 +1598,8 @@ var KdsTab = forwardRef12(
|
|
|
1596
1598
|
)
|
|
1597
1599
|
);
|
|
1598
1600
|
KdsTab.displayName = "KdsTab";
|
|
1599
|
-
var KdsTabPanel =
|
|
1600
|
-
({ active, children, className, ...props }, ref) => /* @__PURE__ */
|
|
1601
|
+
var KdsTabPanel = forwardRef13(
|
|
1602
|
+
({ active, children, className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1601
1603
|
"div",
|
|
1602
1604
|
{
|
|
1603
1605
|
ref,
|
|
@@ -1612,19 +1614,19 @@ var KdsTabPanel = forwardRef12(
|
|
|
1612
1614
|
KdsTabPanel.displayName = "KdsTabPanel";
|
|
1613
1615
|
|
|
1614
1616
|
// src/components/core/KdsRadioGroup/KdsRadioGroup.tsx
|
|
1615
|
-
import { forwardRef as
|
|
1616
|
-
import { jsx as
|
|
1617
|
-
var KdsRadioGroup =
|
|
1618
|
-
({ label, name, options, value, onChange, size, variant, className, ...props }, ref) => /* @__PURE__ */
|
|
1617
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
1618
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1619
|
+
var KdsRadioGroup = forwardRef14(
|
|
1620
|
+
({ label, name, options, value, onChange, size, variant, className, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1619
1621
|
"fieldset",
|
|
1620
1622
|
{
|
|
1621
1623
|
ref,
|
|
1622
1624
|
className: clsx("kds-radio-group", variant === "card" && "kds-radio-group--card", className),
|
|
1623
1625
|
...props,
|
|
1624
1626
|
children: [
|
|
1625
|
-
label && /* @__PURE__ */
|
|
1626
|
-
options.map((opt) => /* @__PURE__ */
|
|
1627
|
-
/* @__PURE__ */
|
|
1627
|
+
label && /* @__PURE__ */ jsx15("legend", { children: label }),
|
|
1628
|
+
options.map((opt) => /* @__PURE__ */ jsxs10("label", { className: clsx("radio", size), children: [
|
|
1629
|
+
/* @__PURE__ */ jsx15(
|
|
1628
1630
|
"input",
|
|
1629
1631
|
{
|
|
1630
1632
|
type: "radio",
|
|
@@ -1635,7 +1637,7 @@ var KdsRadioGroup = forwardRef13(
|
|
|
1635
1637
|
onChange: () => onChange?.(opt.value)
|
|
1636
1638
|
}
|
|
1637
1639
|
),
|
|
1638
|
-
/* @__PURE__ */
|
|
1640
|
+
/* @__PURE__ */ jsx15("span", { children: opt.label })
|
|
1639
1641
|
] }, opt.value))
|
|
1640
1642
|
]
|
|
1641
1643
|
}
|
|
@@ -1644,9 +1646,9 @@ var KdsRadioGroup = forwardRef13(
|
|
|
1644
1646
|
KdsRadioGroup.displayName = "KdsRadioGroup";
|
|
1645
1647
|
|
|
1646
1648
|
// src/components/core/KdsSelect/KdsSelect.tsx
|
|
1647
|
-
import { forwardRef as
|
|
1648
|
-
import { jsx as
|
|
1649
|
-
var KdsSelect =
|
|
1649
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
1650
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1651
|
+
var KdsSelect = forwardRef15(
|
|
1650
1652
|
({
|
|
1651
1653
|
label,
|
|
1652
1654
|
options,
|
|
@@ -1657,12 +1659,49 @@ var KdsSelect = forwardRef14(
|
|
|
1657
1659
|
fullWidth = true,
|
|
1658
1660
|
disabled,
|
|
1659
1661
|
required,
|
|
1662
|
+
readOnly,
|
|
1660
1663
|
className,
|
|
1661
1664
|
id,
|
|
1662
1665
|
...props
|
|
1663
1666
|
}, ref) => {
|
|
1664
1667
|
const fieldId = id || `kds-select-${label.toLowerCase().replace(/\s+/g, "-")}`;
|
|
1665
|
-
|
|
1668
|
+
if (readOnly && !disabled) {
|
|
1669
|
+
const selectedValue = String(props.value ?? props.defaultValue ?? "");
|
|
1670
|
+
const selectedLabel = options.find((opt) => opt.value === selectedValue)?.label ?? "";
|
|
1671
|
+
const passthrough = Object.fromEntries(
|
|
1672
|
+
Object.entries(props).filter(
|
|
1673
|
+
([key]) => key.startsWith("aria-") || key.startsWith("data-") || key === "title"
|
|
1674
|
+
)
|
|
1675
|
+
);
|
|
1676
|
+
return /* @__PURE__ */ jsxs11(
|
|
1677
|
+
"div",
|
|
1678
|
+
{
|
|
1679
|
+
className: clsx(
|
|
1680
|
+
"field",
|
|
1681
|
+
"label",
|
|
1682
|
+
"border",
|
|
1683
|
+
"suffix",
|
|
1684
|
+
"locked",
|
|
1685
|
+
prefixIcon && "prefix",
|
|
1686
|
+
error && "invalid",
|
|
1687
|
+
fullWidth && "kds-w-full",
|
|
1688
|
+
className
|
|
1689
|
+
),
|
|
1690
|
+
children: [
|
|
1691
|
+
prefixIcon && /* @__PURE__ */ jsx16("i", { className: "material-symbols-outlined", children: prefixIcon }),
|
|
1692
|
+
/* @__PURE__ */ jsx16("input", { ...passthrough, id: fieldId, type: "text", value: selectedLabel, placeholder: " ", readOnly: true }),
|
|
1693
|
+
/* @__PURE__ */ jsxs11("label", { htmlFor: fieldId, children: [
|
|
1694
|
+
label,
|
|
1695
|
+
required && " *"
|
|
1696
|
+
] }),
|
|
1697
|
+
/* @__PURE__ */ jsx16("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "lock" }),
|
|
1698
|
+
props.name && /* @__PURE__ */ jsx16("input", { type: "hidden", name: props.name, value: selectedValue, form: props.form }),
|
|
1699
|
+
helperText && /* @__PURE__ */ jsx16("span", { className: "helper", children: helperText })
|
|
1700
|
+
]
|
|
1701
|
+
}
|
|
1702
|
+
);
|
|
1703
|
+
}
|
|
1704
|
+
return /* @__PURE__ */ jsxs11(
|
|
1666
1705
|
"div",
|
|
1667
1706
|
{
|
|
1668
1707
|
className: clsx(
|
|
@@ -1675,8 +1714,8 @@ var KdsSelect = forwardRef14(
|
|
|
1675
1714
|
className
|
|
1676
1715
|
),
|
|
1677
1716
|
children: [
|
|
1678
|
-
prefixIcon && /* @__PURE__ */
|
|
1679
|
-
/* @__PURE__ */
|
|
1717
|
+
prefixIcon && /* @__PURE__ */ jsx16("i", { className: "material-symbols-outlined", children: prefixIcon }),
|
|
1718
|
+
/* @__PURE__ */ jsxs11(
|
|
1680
1719
|
"select",
|
|
1681
1720
|
{
|
|
1682
1721
|
ref,
|
|
@@ -1685,16 +1724,16 @@ var KdsSelect = forwardRef14(
|
|
|
1685
1724
|
required,
|
|
1686
1725
|
...props,
|
|
1687
1726
|
children: [
|
|
1688
|
-
placeholder !== void 0 && /* @__PURE__ */
|
|
1689
|
-
options.map((opt) => /* @__PURE__ */
|
|
1727
|
+
placeholder !== void 0 && /* @__PURE__ */ jsx16("option", { value: "", children: placeholder }),
|
|
1728
|
+
options.map((opt) => /* @__PURE__ */ jsx16("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
|
|
1690
1729
|
]
|
|
1691
1730
|
}
|
|
1692
1731
|
),
|
|
1693
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ jsxs11("label", { htmlFor: fieldId, children: [
|
|
1694
1733
|
label,
|
|
1695
1734
|
required && " *"
|
|
1696
1735
|
] }),
|
|
1697
|
-
helperText && /* @__PURE__ */
|
|
1736
|
+
helperText && /* @__PURE__ */ jsx16("span", { className: "helper", children: helperText })
|
|
1698
1737
|
]
|
|
1699
1738
|
}
|
|
1700
1739
|
);
|
|
@@ -1703,13 +1742,13 @@ var KdsSelect = forwardRef14(
|
|
|
1703
1742
|
KdsSelect.displayName = "KdsSelect";
|
|
1704
1743
|
|
|
1705
1744
|
// src/components/core/KdsChip/KdsChip.tsx
|
|
1706
|
-
import { forwardRef as
|
|
1707
|
-
import { jsx as
|
|
1708
|
-
var KdsChip =
|
|
1709
|
-
({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */
|
|
1710
|
-
icon && /* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
onDelete && /* @__PURE__ */
|
|
1745
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
1746
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1747
|
+
var KdsChip = forwardRef16(
|
|
1748
|
+
({ color, icon, onDelete, children, className, ...props }, ref) => /* @__PURE__ */ jsxs12("span", { ref, className: clsx("kds-badge", color, className), ...props, children: [
|
|
1749
|
+
icon && /* @__PURE__ */ jsx17("i", { className: "material-symbols-outlined", children: icon }),
|
|
1750
|
+
/* @__PURE__ */ jsx17("span", { children }),
|
|
1751
|
+
onDelete && /* @__PURE__ */ jsx17(
|
|
1713
1752
|
"button",
|
|
1714
1753
|
{
|
|
1715
1754
|
type: "button",
|
|
@@ -1719,7 +1758,7 @@ var KdsChip = forwardRef15(
|
|
|
1719
1758
|
onDelete();
|
|
1720
1759
|
},
|
|
1721
1760
|
"aria-label": "Eliminar",
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1761
|
+
children: /* @__PURE__ */ jsx17("i", { className: "material-symbols-outlined", children: "close" })
|
|
1723
1762
|
}
|
|
1724
1763
|
)
|
|
1725
1764
|
] })
|
|
@@ -1727,15 +1766,15 @@ var KdsChip = forwardRef15(
|
|
|
1727
1766
|
KdsChip.displayName = "KdsChip";
|
|
1728
1767
|
|
|
1729
1768
|
// src/components/core/KdsSnackbar/KdsSnackbar.tsx
|
|
1730
|
-
import { forwardRef as
|
|
1769
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
1731
1770
|
|
|
1732
1771
|
// src/components/core/hooks/useAutoHide.ts
|
|
1733
|
-
import { useState as useState3, useEffect
|
|
1772
|
+
import { useState as useState3, useEffect, useRef } from "react";
|
|
1734
1773
|
function useAutoHide(durationMs, onHide) {
|
|
1735
1774
|
const [visible, setVisible] = useState3(true);
|
|
1736
1775
|
const onHideRef = useRef(onHide);
|
|
1737
1776
|
onHideRef.current = onHide;
|
|
1738
|
-
|
|
1777
|
+
useEffect(() => {
|
|
1739
1778
|
if (durationMs <= 0) return;
|
|
1740
1779
|
const timer = setTimeout(() => {
|
|
1741
1780
|
setVisible(false);
|
|
@@ -1747,13 +1786,13 @@ function useAutoHide(durationMs, onHide) {
|
|
|
1747
1786
|
}
|
|
1748
1787
|
|
|
1749
1788
|
// src/components/core/KdsSnackbar/KdsSnackbar.tsx
|
|
1750
|
-
import { jsx as
|
|
1789
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1751
1790
|
var DEFAULT_ICONS2 = {
|
|
1752
1791
|
info: "info",
|
|
1753
1792
|
success: "check_circle",
|
|
1754
1793
|
error: "error"
|
|
1755
1794
|
};
|
|
1756
|
-
var KdsSnackbar =
|
|
1795
|
+
var KdsSnackbar = forwardRef17(
|
|
1757
1796
|
({
|
|
1758
1797
|
message,
|
|
1759
1798
|
type = "info",
|
|
@@ -1770,7 +1809,7 @@ var KdsSnackbar = forwardRef16(
|
|
|
1770
1809
|
if (!open || !visible) return null;
|
|
1771
1810
|
const resolvedIcon = icon === false ? null : icon ?? DEFAULT_ICONS2[type];
|
|
1772
1811
|
const mergedStyle = autoDismiss ? { ...style, ["--kds-snackbar-duration"]: `${duration}ms` } : style ?? {};
|
|
1773
|
-
return /* @__PURE__ */
|
|
1812
|
+
return /* @__PURE__ */ jsxs13(
|
|
1774
1813
|
"div",
|
|
1775
1814
|
{
|
|
1776
1815
|
ref,
|
|
@@ -1780,16 +1819,16 @@ var KdsSnackbar = forwardRef16(
|
|
|
1780
1819
|
style: mergedStyle,
|
|
1781
1820
|
...props,
|
|
1782
1821
|
children: [
|
|
1783
|
-
resolvedIcon && /* @__PURE__ */
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
onClose && /* @__PURE__ */
|
|
1822
|
+
resolvedIcon && /* @__PURE__ */ jsx18("i", { className: "material-symbols-outlined", children: resolvedIcon }),
|
|
1823
|
+
/* @__PURE__ */ jsx18("span", { className: "max", children: message }),
|
|
1824
|
+
onClose && /* @__PURE__ */ jsx18(
|
|
1786
1825
|
"button",
|
|
1787
1826
|
{
|
|
1788
1827
|
type: "button",
|
|
1789
1828
|
className: "kds-snackbar-close",
|
|
1790
1829
|
onClick: onClose,
|
|
1791
1830
|
"aria-label": "Cerrar",
|
|
1792
|
-
children: /* @__PURE__ */
|
|
1831
|
+
children: /* @__PURE__ */ jsx18("i", { className: "material-symbols-outlined", children: "close" })
|
|
1793
1832
|
}
|
|
1794
1833
|
)
|
|
1795
1834
|
]
|
|
@@ -1801,7 +1840,7 @@ KdsSnackbar.displayName = "KdsSnackbar";
|
|
|
1801
1840
|
|
|
1802
1841
|
// src/components/core/KdsTooltip/KdsTooltip.tsx
|
|
1803
1842
|
import * as Tooltip from "@radix-ui/react-tooltip";
|
|
1804
|
-
import { jsx as
|
|
1843
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1805
1844
|
function KdsTooltip({
|
|
1806
1845
|
content,
|
|
1807
1846
|
children,
|
|
@@ -1812,9 +1851,9 @@ function KdsTooltip({
|
|
|
1812
1851
|
onOpenChange,
|
|
1813
1852
|
delayDuration = 300
|
|
1814
1853
|
}) {
|
|
1815
|
-
return /* @__PURE__ */
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */
|
|
1854
|
+
return /* @__PURE__ */ jsx19(Tooltip.Provider, { delayDuration, children: /* @__PURE__ */ jsxs14(Tooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1855
|
+
/* @__PURE__ */ jsx19(Tooltip.Trigger, { asChild: true, children }),
|
|
1856
|
+
/* @__PURE__ */ jsx19(Tooltip.Portal, { children: /* @__PURE__ */ jsx19("div", { className: "kds-theme-root", style: { display: "contents" }, children: /* @__PURE__ */ jsxs14(
|
|
1818
1857
|
Tooltip.Content,
|
|
1819
1858
|
{
|
|
1820
1859
|
className: clsx("kds-tooltip", className),
|
|
@@ -1823,7 +1862,7 @@ function KdsTooltip({
|
|
|
1823
1862
|
collisionPadding: 8,
|
|
1824
1863
|
children: [
|
|
1825
1864
|
content,
|
|
1826
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ jsx19(Tooltip.Arrow, { className: "kds-tooltip-arrow", width: 10, height: 5 })
|
|
1827
1866
|
]
|
|
1828
1867
|
}
|
|
1829
1868
|
) }) })
|
|
@@ -1831,82 +1870,133 @@ function KdsTooltip({
|
|
|
1831
1870
|
}
|
|
1832
1871
|
|
|
1833
1872
|
// src/components/core/KdsAccordion/KdsAccordion.tsx
|
|
1834
|
-
import { forwardRef as
|
|
1835
|
-
import { jsx as
|
|
1836
|
-
var KdsAccordion =
|
|
1837
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1873
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
1874
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1875
|
+
var KdsAccordion = forwardRef18(
|
|
1876
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx20("details", { ref, className: clsx("kds-accordion", className), ...props, children })
|
|
1838
1877
|
);
|
|
1839
1878
|
KdsAccordion.displayName = "KdsAccordion";
|
|
1840
|
-
var KdsAccordionSummary =
|
|
1841
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1879
|
+
var KdsAccordionSummary = forwardRef18(
|
|
1880
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsxs15("summary", { ref, className: clsx("kds-accordion-summary", className), ...props, children: [
|
|
1842
1881
|
children,
|
|
1843
|
-
/* @__PURE__ */
|
|
1882
|
+
/* @__PURE__ */ jsx20("i", { className: "material-symbols-outlined", children: "expand_more" })
|
|
1844
1883
|
] })
|
|
1845
1884
|
);
|
|
1846
1885
|
KdsAccordionSummary.displayName = "KdsAccordionSummary";
|
|
1847
|
-
var KdsAccordionDetails =
|
|
1848
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
1886
|
+
var KdsAccordionDetails = forwardRef18(
|
|
1887
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx20("div", { ref, className: clsx("kds-accordion-details", className), ...props, children })
|
|
1849
1888
|
);
|
|
1850
1889
|
KdsAccordionDetails.displayName = "KdsAccordionDetails";
|
|
1851
1890
|
|
|
1852
1891
|
// src/components/core/KdsDivider/KdsDivider.tsx
|
|
1853
|
-
import { forwardRef as
|
|
1854
|
-
import { jsx as
|
|
1855
|
-
var KdsDivider =
|
|
1856
|
-
({ dashed, className, ...props }, ref) => /* @__PURE__ */
|
|
1892
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
1893
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1894
|
+
var KdsDivider = forwardRef19(
|
|
1895
|
+
({ dashed, className, ...props }, ref) => /* @__PURE__ */ jsx21("hr", { ref, className: clsx(dashed ? "kds-hr-dashed" : "kds-hr", className), ...props })
|
|
1857
1896
|
);
|
|
1858
1897
|
KdsDivider.displayName = "KdsDivider";
|
|
1859
1898
|
|
|
1899
|
+
// src/components/core/KdsDocumentFrame/KdsDocumentFrame.tsx
|
|
1900
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
1901
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1902
|
+
var KdsDocumentFrame = forwardRef20(
|
|
1903
|
+
({ src, title, scale = 1, className, style, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1904
|
+
"div",
|
|
1905
|
+
{
|
|
1906
|
+
ref,
|
|
1907
|
+
className: clsx("kds-document-frame", className),
|
|
1908
|
+
style: { "--kds-document-frame-scale": scale, ...style },
|
|
1909
|
+
...props,
|
|
1910
|
+
children: /* @__PURE__ */ jsx22("iframe", { src, title })
|
|
1911
|
+
}
|
|
1912
|
+
)
|
|
1913
|
+
);
|
|
1914
|
+
KdsDocumentFrame.displayName = "KdsDocumentFrame";
|
|
1915
|
+
|
|
1860
1916
|
// src/components/core/KdsSectionNote/KdsSectionNote.tsx
|
|
1861
|
-
import { forwardRef as
|
|
1862
|
-
import { jsx as
|
|
1863
|
-
var KdsSectionNote =
|
|
1864
|
-
({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */
|
|
1865
|
-
/* @__PURE__ */
|
|
1866
|
-
/* @__PURE__ */
|
|
1917
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
1918
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1919
|
+
var KdsSectionNote = forwardRef21(
|
|
1920
|
+
({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ jsxs16("p", { ref, className: clsx("kds-section-note", className), ...props, children: [
|
|
1921
|
+
/* @__PURE__ */ jsx23("i", { className: "material-symbols-outlined", children: icon }),
|
|
1922
|
+
/* @__PURE__ */ jsx23("span", { children })
|
|
1867
1923
|
] })
|
|
1868
1924
|
);
|
|
1869
1925
|
KdsSectionNote.displayName = "KdsSectionNote";
|
|
1870
1926
|
|
|
1871
1927
|
// src/components/core/KdsStatusBlock/KdsStatusBlock.tsx
|
|
1872
|
-
import { forwardRef as
|
|
1873
|
-
import { jsx as
|
|
1874
|
-
var KdsStatusBlock =
|
|
1875
|
-
({ status, icon, title, description, inline, className, ...props }, ref) =>
|
|
1876
|
-
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1928
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1929
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1930
|
+
var KdsStatusBlock = forwardRef22(
|
|
1931
|
+
({ status, icon, title, description, inline, className, ...props }, ref) => {
|
|
1932
|
+
const descriptionBelowRow = Boolean(inline && description);
|
|
1933
|
+
const descriptionNode = description ? /* @__PURE__ */ jsx24("p", { className: "kds-status-block-description", children: description }) : null;
|
|
1934
|
+
return /* @__PURE__ */ jsxs17(
|
|
1935
|
+
"div",
|
|
1936
|
+
{
|
|
1937
|
+
ref,
|
|
1938
|
+
className: clsx(
|
|
1939
|
+
"kds-status-block",
|
|
1940
|
+
inline && "inline",
|
|
1941
|
+
descriptionBelowRow && "kds-status-block--described",
|
|
1942
|
+
className
|
|
1943
|
+
),
|
|
1944
|
+
"data-status": status,
|
|
1945
|
+
...props,
|
|
1946
|
+
children: [
|
|
1947
|
+
/* @__PURE__ */ jsx24("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ jsx24("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
1948
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1949
|
+
/* @__PURE__ */ jsx24("h2", { className: "kds-status-block-title", children: title }),
|
|
1950
|
+
!descriptionBelowRow && descriptionNode
|
|
1951
|
+
] }),
|
|
1952
|
+
descriptionBelowRow && descriptionNode
|
|
1953
|
+
]
|
|
1954
|
+
}
|
|
1955
|
+
);
|
|
1956
|
+
}
|
|
1882
1957
|
);
|
|
1883
1958
|
KdsStatusBlock.displayName = "KdsStatusBlock";
|
|
1884
1959
|
|
|
1885
1960
|
// src/components/core/KdsStepper/KdsStepper.tsx
|
|
1886
|
-
import { forwardRef as
|
|
1887
|
-
import { jsx as
|
|
1888
|
-
var KdsStepper =
|
|
1889
|
-
({ steps, current,
|
|
1961
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
1962
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1963
|
+
var KdsStepper = forwardRef23(
|
|
1964
|
+
({ steps, current, numbered, color = "info", currentLabelOnly, className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1890
1965
|
"div",
|
|
1891
1966
|
{
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1967
|
+
ref,
|
|
1968
|
+
className: clsx(
|
|
1969
|
+
"kds-stepper",
|
|
1970
|
+
numbered && "kds-stepper--numbered",
|
|
1971
|
+
color === "primary" && "kds-stepper--primary",
|
|
1972
|
+
currentLabelOnly && "kds-stepper--current-label",
|
|
1973
|
+
className
|
|
1974
|
+
),
|
|
1975
|
+
...props,
|
|
1976
|
+
children: steps.map((label, i) => /* @__PURE__ */ jsxs18(
|
|
1977
|
+
"div",
|
|
1978
|
+
{
|
|
1979
|
+
className: clsx("kds-step", i < current && "completed", i === current && "current"),
|
|
1980
|
+
"aria-current": i === current ? "step" : void 0,
|
|
1981
|
+
children: [
|
|
1982
|
+
/* @__PURE__ */ jsx25("div", { className: "kds-step-indicator", children: numbered ? i + 1 : null }),
|
|
1983
|
+
/* @__PURE__ */ jsx25("div", { className: "kds-step-label", children: label })
|
|
1984
|
+
]
|
|
1985
|
+
},
|
|
1986
|
+
`${i}-${label}`
|
|
1987
|
+
))
|
|
1988
|
+
}
|
|
1989
|
+
)
|
|
1900
1990
|
);
|
|
1901
1991
|
KdsStepper.displayName = "KdsStepper";
|
|
1902
1992
|
|
|
1903
1993
|
// src/components/core/KdsCopyRow/KdsCopyRow.tsx
|
|
1904
|
-
import { forwardRef as
|
|
1905
|
-
import { jsx as
|
|
1906
|
-
var KdsCopyRow =
|
|
1994
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
1995
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1996
|
+
var KdsCopyRow = forwardRef24(
|
|
1907
1997
|
({ label, value, copiedText = "Copiado", className, ...props }, ref) => {
|
|
1908
1998
|
const { copied, copy } = useCopyToClipboard();
|
|
1909
|
-
return /* @__PURE__ */
|
|
1999
|
+
return /* @__PURE__ */ jsxs19(
|
|
1910
2000
|
"button",
|
|
1911
2001
|
{
|
|
1912
2002
|
ref,
|
|
@@ -1917,13 +2007,13 @@ var KdsCopyRow = forwardRef22(
|
|
|
1917
2007
|
"aria-label": `Copiar ${label}: ${value}`,
|
|
1918
2008
|
...props,
|
|
1919
2009
|
children: [
|
|
1920
|
-
/* @__PURE__ */
|
|
1921
|
-
/* @__PURE__ */
|
|
1922
|
-
/* @__PURE__ */
|
|
1923
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ jsx26("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "content_copy" }),
|
|
2011
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
2012
|
+
/* @__PURE__ */ jsx26("span", { className: "kds-copy-row-label", children: label }),
|
|
2013
|
+
/* @__PURE__ */ jsx26("span", { className: "kds-copy-row-value", children: value })
|
|
1924
2014
|
] }),
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
/* @__PURE__ */
|
|
2015
|
+
/* @__PURE__ */ jsxs19("span", { className: "kds-copy-toast", "aria-hidden": "true", children: [
|
|
2016
|
+
/* @__PURE__ */ jsx26("i", { className: "material-symbols-outlined", children: "check_circle" }),
|
|
1927
2017
|
" ",
|
|
1928
2018
|
copiedText
|
|
1929
2019
|
] })
|
|
@@ -1935,8 +2025,8 @@ var KdsCopyRow = forwardRef22(
|
|
|
1935
2025
|
KdsCopyRow.displayName = "KdsCopyRow";
|
|
1936
2026
|
|
|
1937
2027
|
// src/components/core/KdsCopyableTable/KdsCopyableTable.tsx
|
|
1938
|
-
import { forwardRef as
|
|
1939
|
-
import { Fragment as Fragment2, jsx as
|
|
2028
|
+
import { forwardRef as forwardRef25, useState as useState4, useRef as useRef2, useCallback as useCallback3 } from "react";
|
|
2029
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1940
2030
|
async function copyToClipboard(text) {
|
|
1941
2031
|
try {
|
|
1942
2032
|
if (navigator.clipboard?.writeText) {
|
|
@@ -1968,18 +2058,18 @@ function GridVariant({
|
|
|
1968
2058
|
forwardedRef,
|
|
1969
2059
|
rest
|
|
1970
2060
|
}) {
|
|
1971
|
-
return /* @__PURE__ */
|
|
2061
|
+
return /* @__PURE__ */ jsx27(
|
|
1972
2062
|
"div",
|
|
1973
2063
|
{
|
|
1974
2064
|
ref: forwardedRef,
|
|
1975
2065
|
className: clsx("kds-copyable-table", "kds-copyable-table--grid", className),
|
|
1976
2066
|
...rest,
|
|
1977
|
-
children: gridRows.map((cells, rowIndex) => /* @__PURE__ */
|
|
2067
|
+
children: gridRows.map((cells, rowIndex) => /* @__PURE__ */ jsx27(
|
|
1978
2068
|
"div",
|
|
1979
2069
|
{
|
|
1980
2070
|
className: "kds-copyable-table-row kds-copyable-table-row--grid",
|
|
1981
2071
|
"data-testid": "kds-grid-row",
|
|
1982
|
-
children: cells.map((text, cellIndex) => /* @__PURE__ */
|
|
2072
|
+
children: cells.map((text, cellIndex) => /* @__PURE__ */ jsx27(
|
|
1983
2073
|
"span",
|
|
1984
2074
|
{
|
|
1985
2075
|
className: clsx("kds-grid-cell", disabled && "kds-grid-cell--disabled"),
|
|
@@ -2066,8 +2156,8 @@ function CopyableVariant({
|
|
|
2066
2156
|
setTimeout(() => setAllCopied(false), 2e3);
|
|
2067
2157
|
}
|
|
2068
2158
|
};
|
|
2069
|
-
return /* @__PURE__ */
|
|
2070
|
-
/* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ jsxs20(Fragment2, { children: [
|
|
2160
|
+
/* @__PURE__ */ jsx27("div", { ref: forwardedRef, className: clsx("kds-copyable-table", className), ...rest, children: rows.map((row, i) => /* @__PURE__ */ jsxs20(
|
|
2071
2161
|
"div",
|
|
2072
2162
|
{
|
|
2073
2163
|
className: clsx(
|
|
@@ -2086,13 +2176,13 @@ function CopyableVariant({
|
|
|
2086
2176
|
},
|
|
2087
2177
|
"aria-label": `Copiar ${row.label}: ${row.value}`,
|
|
2088
2178
|
children: [
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ jsx27("span", { className: "kds-key", children: row.label }),
|
|
2180
|
+
/* @__PURE__ */ jsx27("span", { className: "kds-value", children: row.value })
|
|
2091
2181
|
]
|
|
2092
2182
|
},
|
|
2093
2183
|
`${row.label}-${i}`
|
|
2094
2184
|
)) }),
|
|
2095
|
-
showCopyAll && /* @__PURE__ */
|
|
2185
|
+
showCopyAll && /* @__PURE__ */ jsxs20(
|
|
2096
2186
|
"button",
|
|
2097
2187
|
{
|
|
2098
2188
|
type: "button",
|
|
@@ -2106,14 +2196,14 @@ function CopyableVariant({
|
|
|
2106
2196
|
onClick: handleCopyAll,
|
|
2107
2197
|
"aria-label": allCopied ? copiedAllLabel : copyAllLabel,
|
|
2108
2198
|
children: [
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
/* @__PURE__ */
|
|
2199
|
+
/* @__PURE__ */ jsx27("span", { className: "kds-icon", children: /* @__PURE__ */ jsx27("i", { className: "material-symbols-outlined", children: allCopied ? "check" : "content_copy" }) }),
|
|
2200
|
+
/* @__PURE__ */ jsx27("span", { children: allCopied ? copiedAllLabel : copyAllLabel })
|
|
2111
2201
|
]
|
|
2112
2202
|
}
|
|
2113
2203
|
)
|
|
2114
2204
|
] });
|
|
2115
2205
|
}
|
|
2116
|
-
var KdsCopyableTable =
|
|
2206
|
+
var KdsCopyableTable = forwardRef25(
|
|
2117
2207
|
({
|
|
2118
2208
|
rows = [],
|
|
2119
2209
|
variant = "copyable",
|
|
@@ -2126,7 +2216,7 @@ var KdsCopyableTable = forwardRef23(
|
|
|
2126
2216
|
...props
|
|
2127
2217
|
}, ref) => {
|
|
2128
2218
|
if (variant === "grid") {
|
|
2129
|
-
return /* @__PURE__ */
|
|
2219
|
+
return /* @__PURE__ */ jsx27(
|
|
2130
2220
|
GridVariant,
|
|
2131
2221
|
{
|
|
2132
2222
|
gridRows,
|
|
@@ -2137,7 +2227,7 @@ var KdsCopyableTable = forwardRef23(
|
|
|
2137
2227
|
}
|
|
2138
2228
|
);
|
|
2139
2229
|
}
|
|
2140
|
-
return /* @__PURE__ */
|
|
2230
|
+
return /* @__PURE__ */ jsx27(
|
|
2141
2231
|
CopyableVariant,
|
|
2142
2232
|
{
|
|
2143
2233
|
rows,
|
|
@@ -2154,35 +2244,35 @@ var KdsCopyableTable = forwardRef23(
|
|
|
2154
2244
|
KdsCopyableTable.displayName = "KdsCopyableTable";
|
|
2155
2245
|
|
|
2156
2246
|
// src/components/core/KdsExpandPanel/KdsExpandPanel.tsx
|
|
2157
|
-
import { forwardRef as
|
|
2158
|
-
import { jsx as
|
|
2159
|
-
var KdsExpandPanel =
|
|
2247
|
+
import { forwardRef as forwardRef26, useState as useState5 } from "react";
|
|
2248
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2249
|
+
var KdsExpandPanel = forwardRef26(
|
|
2160
2250
|
({ label, defaultExpanded = false, children, className, ...props }, ref) => {
|
|
2161
2251
|
const [expanded, setExpanded] = useState5(defaultExpanded);
|
|
2162
|
-
return /* @__PURE__ */
|
|
2163
|
-
/* @__PURE__ */
|
|
2252
|
+
return /* @__PURE__ */ jsxs21("div", { ref, className, ...props, children: [
|
|
2253
|
+
/* @__PURE__ */ jsxs21(
|
|
2164
2254
|
"button",
|
|
2165
2255
|
{
|
|
2166
2256
|
className: "kds-expand-toggle",
|
|
2167
2257
|
onClick: () => setExpanded((v) => !v),
|
|
2168
2258
|
"aria-expanded": expanded,
|
|
2169
2259
|
children: [
|
|
2170
|
-
/* @__PURE__ */
|
|
2171
|
-
/* @__PURE__ */
|
|
2260
|
+
/* @__PURE__ */ jsx28("span", { children: label }),
|
|
2261
|
+
/* @__PURE__ */ jsx28("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
|
|
2172
2262
|
]
|
|
2173
2263
|
}
|
|
2174
2264
|
),
|
|
2175
|
-
/* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ jsx28("div", { className: clsx("kds-expand-panel", expanded && "open"), children })
|
|
2176
2266
|
] });
|
|
2177
2267
|
}
|
|
2178
2268
|
);
|
|
2179
2269
|
KdsExpandPanel.displayName = "KdsExpandPanel";
|
|
2180
2270
|
|
|
2181
2271
|
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
2182
|
-
import { forwardRef as
|
|
2272
|
+
import { forwardRef as forwardRef27, useEffect as useEffect3, useRef as useRef3 } from "react";
|
|
2183
2273
|
|
|
2184
2274
|
// src/components/core/hooks/useCountdown.ts
|
|
2185
|
-
import { useState as useState6, useEffect as
|
|
2275
|
+
import { useState as useState6, useEffect as useEffect2 } from "react";
|
|
2186
2276
|
function calcRemaining(deadline) {
|
|
2187
2277
|
const diff = Math.max(0, new Date(deadline).getTime() - Date.now());
|
|
2188
2278
|
const totalSeconds = Math.floor(diff / 1e3);
|
|
@@ -2196,7 +2286,7 @@ function calcRemaining(deadline) {
|
|
|
2196
2286
|
}
|
|
2197
2287
|
function useCountdown(deadline) {
|
|
2198
2288
|
const [state, setState] = useState6(() => calcRemaining(deadline));
|
|
2199
|
-
|
|
2289
|
+
useEffect2(() => {
|
|
2200
2290
|
const tick = () => setState(calcRemaining(deadline));
|
|
2201
2291
|
const id = setInterval(tick, 1e3);
|
|
2202
2292
|
return () => clearInterval(id);
|
|
@@ -2205,13 +2295,13 @@ function useCountdown(deadline) {
|
|
|
2205
2295
|
}
|
|
2206
2296
|
|
|
2207
2297
|
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
2208
|
-
import { jsx as
|
|
2209
|
-
var KdsCountdown =
|
|
2298
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2299
|
+
var KdsCountdown = forwardRef27(
|
|
2210
2300
|
({ deadline, label, onExpire, className, ...props }, ref) => {
|
|
2211
2301
|
const { hours, minutes, seconds, expired, urgent } = useCountdown(deadline);
|
|
2212
2302
|
const onExpireRef = useRef3(onExpire);
|
|
2213
2303
|
onExpireRef.current = onExpire;
|
|
2214
|
-
|
|
2304
|
+
useEffect3(() => {
|
|
2215
2305
|
if (expired) {
|
|
2216
2306
|
onExpireRef.current?.();
|
|
2217
2307
|
}
|
|
@@ -2220,9 +2310,9 @@ var KdsCountdown = forwardRef25(
|
|
|
2220
2310
|
return null;
|
|
2221
2311
|
}
|
|
2222
2312
|
const pad = (n) => String(n).padStart(2, "0");
|
|
2223
|
-
return /* @__PURE__ */
|
|
2224
|
-
label && /* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2313
|
+
return /* @__PURE__ */ jsxs22("div", { ref, className: clsx("kds-countdown", urgent && "urgent", className), ...props, children: [
|
|
2314
|
+
label && /* @__PURE__ */ jsx29("span", { className: "kds-countdown-label", children: label }),
|
|
2315
|
+
/* @__PURE__ */ jsxs22("span", { className: "kds-countdown-value", children: [
|
|
2226
2316
|
pad(hours),
|
|
2227
2317
|
":",
|
|
2228
2318
|
pad(minutes),
|
|
@@ -2235,18 +2325,18 @@ var KdsCountdown = forwardRef25(
|
|
|
2235
2325
|
KdsCountdown.displayName = "KdsCountdown";
|
|
2236
2326
|
|
|
2237
2327
|
// src/components/core/KdsSegmentedTabs/KdsSegmentedTabs.tsx
|
|
2238
|
-
import { forwardRef as
|
|
2239
|
-
import { jsx as
|
|
2240
|
-
var KdsSegmentedTabs =
|
|
2241
|
-
(props, ref) => /* @__PURE__ */
|
|
2328
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
2329
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2330
|
+
var KdsSegmentedTabs = forwardRef28(
|
|
2331
|
+
(props, ref) => /* @__PURE__ */ jsx30(KdsTabs, { ref, ...props })
|
|
2242
2332
|
);
|
|
2243
2333
|
KdsSegmentedTabs.displayName = "KdsSegmentedTabs";
|
|
2244
2334
|
|
|
2245
2335
|
// src/components/core/KdsFab/KdsFab.tsx
|
|
2246
|
-
import { forwardRef as
|
|
2247
|
-
import { jsx as
|
|
2248
|
-
var KdsFab =
|
|
2249
|
-
({ icon, position = "top-right", hidden = false, className, ...props }, ref) => /* @__PURE__ */
|
|
2336
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
2337
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2338
|
+
var KdsFab = forwardRef29(
|
|
2339
|
+
({ icon, position = "top-right", hidden = false, className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2250
2340
|
"button",
|
|
2251
2341
|
{
|
|
2252
2342
|
ref,
|
|
@@ -2260,17 +2350,17 @@ var KdsFab = forwardRef27(
|
|
|
2260
2350
|
"aria-hidden": hidden || void 0,
|
|
2261
2351
|
tabIndex: hidden ? -1 : void 0,
|
|
2262
2352
|
...props,
|
|
2263
|
-
children: /* @__PURE__ */
|
|
2353
|
+
children: /* @__PURE__ */ jsx31("i", { className: "material-symbols-outlined", children: icon })
|
|
2264
2354
|
}
|
|
2265
2355
|
)
|
|
2266
2356
|
);
|
|
2267
2357
|
KdsFab.displayName = "KdsFab";
|
|
2268
2358
|
|
|
2269
2359
|
// src/components/core/KdsEmptyState/KdsEmptyState.tsx
|
|
2270
|
-
import { forwardRef as
|
|
2271
|
-
import { jsx as
|
|
2272
|
-
var KdsEmptyState =
|
|
2273
|
-
({ icon = "hide_source", title, description, className, ...props }, ref) => /* @__PURE__ */
|
|
2360
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
2361
|
+
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2362
|
+
var KdsEmptyState = forwardRef30(
|
|
2363
|
+
({ icon = "hide_source", title, description, className, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
2274
2364
|
"div",
|
|
2275
2365
|
{
|
|
2276
2366
|
ref,
|
|
@@ -2278,10 +2368,10 @@ var KdsEmptyState = forwardRef28(
|
|
|
2278
2368
|
className: clsx("kds-empty-state", className),
|
|
2279
2369
|
...props,
|
|
2280
2370
|
children: [
|
|
2281
|
-
/* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
description && /* @__PURE__ */
|
|
2371
|
+
/* @__PURE__ */ jsx32("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: icon }),
|
|
2372
|
+
/* @__PURE__ */ jsxs23("div", { className: "kds-empty-state-text", children: [
|
|
2373
|
+
/* @__PURE__ */ jsx32(KdsTypography, { variant: "body", color: "primary", children: title }),
|
|
2374
|
+
description && /* @__PURE__ */ jsx32(KdsTypography, { variant: "body", color: "secondary", children: description })
|
|
2285
2375
|
] })
|
|
2286
2376
|
]
|
|
2287
2377
|
}
|
|
@@ -2290,12 +2380,12 @@ var KdsEmptyState = forwardRef28(
|
|
|
2290
2380
|
KdsEmptyState.displayName = "KdsEmptyState";
|
|
2291
2381
|
|
|
2292
2382
|
// src/components/domain/KdsBankRow/KdsBankRow.tsx
|
|
2293
|
-
import { forwardRef as
|
|
2294
|
-
import { jsx as
|
|
2295
|
-
var KdsBankRow =
|
|
2383
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
2384
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2385
|
+
var KdsBankRow = forwardRef31(
|
|
2296
2386
|
({ name, logoUrl, selected, hideLogo, className, ...props }, ref) => {
|
|
2297
2387
|
const nameStr = typeof name === "string" ? name : "";
|
|
2298
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ jsxs24(
|
|
2299
2389
|
"button",
|
|
2300
2390
|
{
|
|
2301
2391
|
ref,
|
|
@@ -2303,9 +2393,9 @@ var KdsBankRow = forwardRef29(
|
|
|
2303
2393
|
className: clsx("kds-bank-row", selected && "selected", className),
|
|
2304
2394
|
...props,
|
|
2305
2395
|
children: [
|
|
2306
|
-
!hideLogo && /* @__PURE__ */
|
|
2307
|
-
/* @__PURE__ */
|
|
2308
|
-
/* @__PURE__ */
|
|
2396
|
+
!hideLogo && /* @__PURE__ */ jsx33("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ jsx33("img", { src: logoUrl, alt: nameStr }) : /* @__PURE__ */ jsx33("span", { className: "initials", children: nameStr.charAt(0) }) }),
|
|
2397
|
+
/* @__PURE__ */ jsx33("span", { className: "kds-bank-row-name", children: name }),
|
|
2398
|
+
/* @__PURE__ */ jsx33("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
|
|
2309
2399
|
]
|
|
2310
2400
|
}
|
|
2311
2401
|
);
|
|
@@ -2314,32 +2404,32 @@ var KdsBankRow = forwardRef29(
|
|
|
2314
2404
|
KdsBankRow.displayName = "KdsBankRow";
|
|
2315
2405
|
|
|
2316
2406
|
// src/components/domain/KdsBankList/KdsBankList.tsx
|
|
2317
|
-
import { forwardRef as
|
|
2318
|
-
import { jsx as
|
|
2319
|
-
var KdsBankList =
|
|
2320
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
2407
|
+
import { forwardRef as forwardRef32 } from "react";
|
|
2408
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2409
|
+
var KdsBankList = forwardRef32(
|
|
2410
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx34("div", { ref, className: clsx("kds-bank-list", className), role: "list", ...props, children })
|
|
2321
2411
|
);
|
|
2322
2412
|
KdsBankList.displayName = "KdsBankList";
|
|
2323
2413
|
|
|
2324
2414
|
// src/components/domain/KdsBankModal/KdsBankModal.tsx
|
|
2325
|
-
import { forwardRef as
|
|
2415
|
+
import { forwardRef as forwardRef33, useState as useState7 } from "react";
|
|
2326
2416
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
2327
|
-
import { jsx as
|
|
2328
|
-
var KdsBankModal =
|
|
2417
|
+
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2418
|
+
var KdsBankModal = forwardRef33(
|
|
2329
2419
|
({ open, onClose, title = "Selecciona tu banco", searchPlaceholder = "Buscar banco...", onSearch, children, className, container }, ref) => {
|
|
2330
2420
|
const [query, setQuery] = useState7("");
|
|
2331
2421
|
const handleSearch = (value) => {
|
|
2332
2422
|
setQuery(value);
|
|
2333
2423
|
onSearch?.(value);
|
|
2334
2424
|
};
|
|
2335
|
-
return /* @__PURE__ */
|
|
2425
|
+
return /* @__PURE__ */ jsx35(Dialog.Root, { open, onOpenChange: (o) => {
|
|
2336
2426
|
if (!o) onClose();
|
|
2337
|
-
}, children: /* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2340
|
-
/* @__PURE__ */
|
|
2427
|
+
}, children: /* @__PURE__ */ jsx35(Dialog.Portal, { container, children: /* @__PURE__ */ jsx35(Dialog.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ jsxs25(Dialog.Content, { ref, className: clsx("kds-bank-modal", className), children: [
|
|
2428
|
+
/* @__PURE__ */ jsxs25("div", { className: "kds-bank-modal-header", children: [
|
|
2429
|
+
/* @__PURE__ */ jsx35(Dialog.Title, { asChild: true, children: /* @__PURE__ */ jsx35("h3", { children: title }) }),
|
|
2430
|
+
/* @__PURE__ */ jsx35(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx35("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ jsx35("i", { className: "material-symbols-outlined", children: "close" }) }) })
|
|
2341
2431
|
] }),
|
|
2342
|
-
/* @__PURE__ */
|
|
2432
|
+
/* @__PURE__ */ jsx35("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ jsx35(
|
|
2343
2433
|
KdsSearchField,
|
|
2344
2434
|
{
|
|
2345
2435
|
placeholder: searchPlaceholder,
|
|
@@ -2347,82 +2437,639 @@ var KdsBankModal = forwardRef31(
|
|
|
2347
2437
|
onChange: (e) => handleSearch(e.target.value)
|
|
2348
2438
|
}
|
|
2349
2439
|
) }),
|
|
2350
|
-
/* @__PURE__ */
|
|
2440
|
+
/* @__PURE__ */ jsx35("div", { className: "kds-bank-modal-body", children })
|
|
2351
2441
|
] }) }) }) });
|
|
2352
2442
|
}
|
|
2353
2443
|
);
|
|
2354
2444
|
KdsBankModal.displayName = "KdsBankModal";
|
|
2355
2445
|
|
|
2446
|
+
// src/components/domain/KdsContract/KdsContract.tsx
|
|
2447
|
+
import { forwardRef as forwardRef34, useCallback as useCallback4, useEffect as useEffect4, useId, useRef as useRef4, useState as useState8 } from "react";
|
|
2448
|
+
import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2449
|
+
var END_TOLERANCE_PX = 8;
|
|
2450
|
+
var KdsContract = forwardRef34(
|
|
2451
|
+
({
|
|
2452
|
+
children,
|
|
2453
|
+
contentLabel = "Contrato",
|
|
2454
|
+
acceptLabel = "Declaro que le\xED y acepto el contrato",
|
|
2455
|
+
hint = "Despl\xE1zate hasta el final del contrato para poder aceptarlo.",
|
|
2456
|
+
name,
|
|
2457
|
+
accepted,
|
|
2458
|
+
onAcceptedChange,
|
|
2459
|
+
onReadComplete,
|
|
2460
|
+
className,
|
|
2461
|
+
...props
|
|
2462
|
+
}, ref) => {
|
|
2463
|
+
const hintId = useId();
|
|
2464
|
+
const contentRef = useRef4(null);
|
|
2465
|
+
const [read, setRead] = useState8(false);
|
|
2466
|
+
const onReadCompleteRef = useRef4(onReadComplete);
|
|
2467
|
+
onReadCompleteRef.current = onReadComplete;
|
|
2468
|
+
const check = useCallback4(() => {
|
|
2469
|
+
const el = contentRef.current;
|
|
2470
|
+
if (!el || el.clientHeight === 0) return;
|
|
2471
|
+
if (el.scrollTop + el.clientHeight >= el.scrollHeight - END_TOLERANCE_PX) {
|
|
2472
|
+
setRead(true);
|
|
2473
|
+
}
|
|
2474
|
+
}, []);
|
|
2475
|
+
useEffect4(() => {
|
|
2476
|
+
check();
|
|
2477
|
+
const el = contentRef.current;
|
|
2478
|
+
if (!el || typeof ResizeObserver === "undefined") return void 0;
|
|
2479
|
+
const observer = new ResizeObserver(check);
|
|
2480
|
+
observer.observe(el);
|
|
2481
|
+
return () => observer.disconnect();
|
|
2482
|
+
}, [check]);
|
|
2483
|
+
useEffect4(() => {
|
|
2484
|
+
if (read) onReadCompleteRef.current?.();
|
|
2485
|
+
}, [read]);
|
|
2486
|
+
return /* @__PURE__ */ jsxs26("div", { ref, className: clsx("kds-contract", read && "kds-contract--read", className), ...props, children: [
|
|
2487
|
+
/* @__PURE__ */ jsx36(
|
|
2488
|
+
"div",
|
|
2489
|
+
{
|
|
2490
|
+
ref: contentRef,
|
|
2491
|
+
className: "kds-contract-content",
|
|
2492
|
+
role: "region",
|
|
2493
|
+
"aria-label": contentLabel,
|
|
2494
|
+
tabIndex: 0,
|
|
2495
|
+
onScroll: read ? void 0 : check,
|
|
2496
|
+
children
|
|
2497
|
+
}
|
|
2498
|
+
),
|
|
2499
|
+
/* @__PURE__ */ jsxs26("label", { className: "checkbox kds-contract-accept", children: [
|
|
2500
|
+
/* @__PURE__ */ jsx36(
|
|
2501
|
+
"input",
|
|
2502
|
+
{
|
|
2503
|
+
type: "checkbox",
|
|
2504
|
+
name,
|
|
2505
|
+
checked: accepted,
|
|
2506
|
+
disabled: !read,
|
|
2507
|
+
"aria-describedby": read ? void 0 : hintId,
|
|
2508
|
+
onChange: (e) => onAcceptedChange?.(e.target.checked)
|
|
2509
|
+
}
|
|
2510
|
+
),
|
|
2511
|
+
/* @__PURE__ */ jsx36("span", { children: acceptLabel })
|
|
2512
|
+
] }),
|
|
2513
|
+
!read && /* @__PURE__ */ jsx36("div", { className: "kds-contract-hint", id: hintId, children: hint })
|
|
2514
|
+
] });
|
|
2515
|
+
}
|
|
2516
|
+
);
|
|
2517
|
+
KdsContract.displayName = "KdsContract";
|
|
2518
|
+
|
|
2519
|
+
// src/components/domain/KdsFeedbackCard/KdsFeedbackCard.tsx
|
|
2520
|
+
import { forwardRef as forwardRef35, useEffect as useEffect5, useId as useId2, useRef as useRef5 } from "react";
|
|
2521
|
+
import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2522
|
+
var KdsFeedbackCard = forwardRef35(
|
|
2523
|
+
({
|
|
2524
|
+
title,
|
|
2525
|
+
description,
|
|
2526
|
+
icon = "auto_awesome",
|
|
2527
|
+
children,
|
|
2528
|
+
canSubmit,
|
|
2529
|
+
onSubmit,
|
|
2530
|
+
submitLabel = "Enviar",
|
|
2531
|
+
submitted = false,
|
|
2532
|
+
thanksTitle = "\xA1Gracias por contarnos!",
|
|
2533
|
+
thanksDescription = "Tu respuesta nos ayuda a llegar a m\xE1s negocios como el tuyo.",
|
|
2534
|
+
className,
|
|
2535
|
+
...props
|
|
2536
|
+
}, ref) => {
|
|
2537
|
+
const titleId = useId2();
|
|
2538
|
+
const titleRef = useRef5(null);
|
|
2539
|
+
const wasSubmitted = useRef5(submitted);
|
|
2540
|
+
useEffect5(() => {
|
|
2541
|
+
if (submitted && !wasSubmitted.current) titleRef.current?.focus();
|
|
2542
|
+
wasSubmitted.current = submitted;
|
|
2543
|
+
}, [submitted]);
|
|
2544
|
+
return /* @__PURE__ */ jsxs27(
|
|
2545
|
+
"section",
|
|
2546
|
+
{
|
|
2547
|
+
ref,
|
|
2548
|
+
className: clsx("kds-feedback-card", submitted && "kds-feedback-card--submitted", className),
|
|
2549
|
+
"aria-labelledby": titleId,
|
|
2550
|
+
"aria-live": "polite",
|
|
2551
|
+
...props,
|
|
2552
|
+
children: [
|
|
2553
|
+
/* @__PURE__ */ jsx37("span", { className: "kds-feedback-card-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx37("i", { className: "material-symbols-outlined", children: submitted ? "check" : icon }) }),
|
|
2554
|
+
/* @__PURE__ */ jsxs27("div", { className: "kds-feedback-card-body", children: [
|
|
2555
|
+
/* @__PURE__ */ jsxs27("div", { className: "kds-feedback-card-text", children: [
|
|
2556
|
+
/* @__PURE__ */ jsx37(
|
|
2557
|
+
"div",
|
|
2558
|
+
{
|
|
2559
|
+
ref: titleRef,
|
|
2560
|
+
className: "kds-feedback-card-title",
|
|
2561
|
+
id: titleId,
|
|
2562
|
+
tabIndex: submitted ? -1 : void 0,
|
|
2563
|
+
children: submitted ? thanksTitle : title
|
|
2564
|
+
}
|
|
2565
|
+
),
|
|
2566
|
+
(submitted ? thanksDescription : description) && /* @__PURE__ */ jsx37("div", { className: "kds-feedback-card-description", children: submitted ? thanksDescription : description })
|
|
2567
|
+
] }),
|
|
2568
|
+
!submitted && /* @__PURE__ */ jsxs27(Fragment3, { children: [
|
|
2569
|
+
children,
|
|
2570
|
+
/* @__PURE__ */ jsx37(KdsButton, { variant: "outlined", disabled: !canSubmit, onClick: onSubmit, children: submitLabel })
|
|
2571
|
+
] })
|
|
2572
|
+
] })
|
|
2573
|
+
]
|
|
2574
|
+
}
|
|
2575
|
+
);
|
|
2576
|
+
}
|
|
2577
|
+
);
|
|
2578
|
+
KdsFeedbackCard.displayName = "KdsFeedbackCard";
|
|
2579
|
+
|
|
2580
|
+
// src/components/domain/KdsConsentCard/KdsConsentCard.tsx
|
|
2581
|
+
import { forwardRef as forwardRef36, useId as useId3 } from "react";
|
|
2582
|
+
import { Fragment as Fragment4, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2583
|
+
var KdsConsentCard = forwardRef36(
|
|
2584
|
+
({
|
|
2585
|
+
requester,
|
|
2586
|
+
resource,
|
|
2587
|
+
heading,
|
|
2588
|
+
subtitle,
|
|
2589
|
+
logo,
|
|
2590
|
+
sections,
|
|
2591
|
+
onAccept,
|
|
2592
|
+
onReject,
|
|
2593
|
+
loading = false,
|
|
2594
|
+
acceptLabel = "Autorizar",
|
|
2595
|
+
rejectLabel = "Rechazar",
|
|
2596
|
+
loadingLabel = "Autorizando",
|
|
2597
|
+
className,
|
|
2598
|
+
...props
|
|
2599
|
+
}, ref) => {
|
|
2600
|
+
const titleId = useId3();
|
|
2601
|
+
return /* @__PURE__ */ jsxs28(
|
|
2602
|
+
"section",
|
|
2603
|
+
{
|
|
2604
|
+
ref,
|
|
2605
|
+
className: clsx("kds-card-elevated", "kds-consent-card", className),
|
|
2606
|
+
"aria-labelledby": titleId,
|
|
2607
|
+
...props,
|
|
2608
|
+
children: [
|
|
2609
|
+
/* @__PURE__ */ jsxs28("div", { className: "kds-consent-card-header", children: [
|
|
2610
|
+
logo && /* @__PURE__ */ jsx38("div", { className: "kds-consent-card-logo", children: logo }),
|
|
2611
|
+
/* @__PURE__ */ jsx38("div", { className: "kds-consent-card-title", role: "heading", "aria-level": 2, id: titleId, children: heading ?? /* @__PURE__ */ jsxs28(Fragment4, { children: [
|
|
2612
|
+
/* @__PURE__ */ jsx38("strong", { children: requester }),
|
|
2613
|
+
" solicita acceso a ",
|
|
2614
|
+
/* @__PURE__ */ jsx38("strong", { children: resource })
|
|
2615
|
+
] }) }),
|
|
2616
|
+
subtitle && /* @__PURE__ */ jsx38("div", { className: "kds-consent-card-subtitle", children: subtitle })
|
|
2617
|
+
] }),
|
|
2618
|
+
/* @__PURE__ */ jsxs28("div", { className: "kds-consent-card-body", children: [
|
|
2619
|
+
sections.map((section, i) => {
|
|
2620
|
+
const sectionId = `${titleId}-s${i}`;
|
|
2621
|
+
return /* @__PURE__ */ jsxs28(
|
|
2622
|
+
"div",
|
|
2623
|
+
{
|
|
2624
|
+
className: "kds-consent-card-section",
|
|
2625
|
+
role: "group",
|
|
2626
|
+
"aria-labelledby": sectionId,
|
|
2627
|
+
children: [
|
|
2628
|
+
/* @__PURE__ */ jsx38(
|
|
2629
|
+
"div",
|
|
2630
|
+
{
|
|
2631
|
+
className: "kds-consent-card-section-title",
|
|
2632
|
+
role: "heading",
|
|
2633
|
+
"aria-level": 3,
|
|
2634
|
+
id: sectionId,
|
|
2635
|
+
children: section.title
|
|
2636
|
+
}
|
|
2637
|
+
),
|
|
2638
|
+
/* @__PURE__ */ jsx38("ul", { className: "kds-consent-card-items", children: section.items.map((item, j) => /* @__PURE__ */ jsxs28("li", { className: "kds-consent-card-item", children: [
|
|
2639
|
+
item.icon && /* @__PURE__ */ jsx38("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: item.icon }),
|
|
2640
|
+
/* @__PURE__ */ jsx38("span", { children: item.text })
|
|
2641
|
+
] }, j)) })
|
|
2642
|
+
]
|
|
2643
|
+
},
|
|
2644
|
+
section.title
|
|
2645
|
+
);
|
|
2646
|
+
}),
|
|
2647
|
+
/* @__PURE__ */ jsxs28("div", { className: "kds-consent-card-actions", children: [
|
|
2648
|
+
/* @__PURE__ */ jsx38(KdsButton, { variant: "primary", fullWidth: true, loading, onClick: onAccept, children: loading ? loadingLabel : acceptLabel }),
|
|
2649
|
+
/* @__PURE__ */ jsx38(KdsButton, { variant: "outlined", fullWidth: true, disabled: loading, onClick: onReject, children: rejectLabel })
|
|
2650
|
+
] })
|
|
2651
|
+
] })
|
|
2652
|
+
]
|
|
2653
|
+
}
|
|
2654
|
+
);
|
|
2655
|
+
}
|
|
2656
|
+
);
|
|
2657
|
+
KdsConsentCard.displayName = "KdsConsentCard";
|
|
2658
|
+
|
|
2659
|
+
// src/components/domain/KdsSidebar/KdsSidebar.tsx
|
|
2660
|
+
import { forwardRef as forwardRef37, useEffect as useEffect6, useId as useId4, useRef as useRef6, useState as useState9 } from "react";
|
|
2661
|
+
import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2662
|
+
var KdsSidebar = forwardRef37(
|
|
2663
|
+
({
|
|
2664
|
+
header,
|
|
2665
|
+
items,
|
|
2666
|
+
navLabel = "Men\xFA de la cuenta",
|
|
2667
|
+
open = false,
|
|
2668
|
+
onClose,
|
|
2669
|
+
mobileTitle = "Men\xFA",
|
|
2670
|
+
closeLabel = "Cerrar men\xFA",
|
|
2671
|
+
className,
|
|
2672
|
+
...props
|
|
2673
|
+
}, ref) => {
|
|
2674
|
+
const [menuOpen, setMenuOpen] = useState9(false);
|
|
2675
|
+
const asideRef = useRef6(null);
|
|
2676
|
+
const headerRef = useRef6(null);
|
|
2677
|
+
const toggleRef = useRef6(null);
|
|
2678
|
+
const closeRef = useRef6(null);
|
|
2679
|
+
const menuId = useId4();
|
|
2680
|
+
const onCloseRef = useRef6(onClose);
|
|
2681
|
+
onCloseRef.current = onClose;
|
|
2682
|
+
const setAsideRef = (el) => {
|
|
2683
|
+
asideRef.current = el;
|
|
2684
|
+
if (typeof ref === "function") ref(el);
|
|
2685
|
+
else if (ref) ref.current = el;
|
|
2686
|
+
};
|
|
2687
|
+
useEffect6(() => {
|
|
2688
|
+
if (!open) return void 0;
|
|
2689
|
+
const opener = document.activeElement;
|
|
2690
|
+
closeRef.current?.focus();
|
|
2691
|
+
const onKey = (e) => {
|
|
2692
|
+
if (e.key === "Escape") onCloseRef.current?.();
|
|
2693
|
+
};
|
|
2694
|
+
document.addEventListener("keydown", onKey);
|
|
2695
|
+
return () => {
|
|
2696
|
+
document.removeEventListener("keydown", onKey);
|
|
2697
|
+
if (opener && opener !== document.body && opener.isConnected) opener.focus();
|
|
2698
|
+
};
|
|
2699
|
+
}, [open]);
|
|
2700
|
+
useEffect6(() => {
|
|
2701
|
+
const el = asideRef.current;
|
|
2702
|
+
if (!el || typeof window.matchMedia !== "function") return void 0;
|
|
2703
|
+
const mobile = window.matchMedia("(max-width: 768px)");
|
|
2704
|
+
const sync = () => el.toggleAttribute("inert", mobile.matches && !open);
|
|
2705
|
+
sync();
|
|
2706
|
+
mobile.addEventListener("change", sync);
|
|
2707
|
+
return () => mobile.removeEventListener("change", sync);
|
|
2708
|
+
}, [open]);
|
|
2709
|
+
useEffect6(() => {
|
|
2710
|
+
if (!menuOpen) return void 0;
|
|
2711
|
+
const onDocClick = (e) => {
|
|
2712
|
+
if (!headerRef.current?.contains(e.target)) setMenuOpen(false);
|
|
2713
|
+
};
|
|
2714
|
+
document.addEventListener("click", onDocClick);
|
|
2715
|
+
return () => document.removeEventListener("click", onDocClick);
|
|
2716
|
+
}, [menuOpen]);
|
|
2717
|
+
const hasMenu = header.menu !== void 0;
|
|
2718
|
+
const onHeaderKeyDown = (e) => {
|
|
2719
|
+
if (e.key === "Escape" && menuOpen) {
|
|
2720
|
+
e.stopPropagation();
|
|
2721
|
+
setMenuOpen(false);
|
|
2722
|
+
toggleRef.current?.focus();
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
const headerContent = /* @__PURE__ */ jsxs29(Fragment5, { children: [
|
|
2726
|
+
header.icon ? /* @__PURE__ */ jsx39("i", { className: "material-symbols-outlined kds-sidebar-icon", "aria-hidden": "true", children: header.icon }) : header.avatar && /* @__PURE__ */ jsx39("div", { className: "kds-sidebar-avatar", "aria-hidden": "true", children: header.avatar }),
|
|
2727
|
+
/* @__PURE__ */ jsxs29("div", { className: "kds-sidebar-header-text", children: [
|
|
2728
|
+
/* @__PURE__ */ jsx39("div", { className: "kds-sidebar-title", children: header.title }),
|
|
2729
|
+
header.subtitle && /* @__PURE__ */ jsx39("div", { className: "kds-sidebar-subtitle", children: header.subtitle })
|
|
2730
|
+
] })
|
|
2731
|
+
] });
|
|
2732
|
+
return /* @__PURE__ */ jsxs29(
|
|
2733
|
+
"aside",
|
|
2734
|
+
{
|
|
2735
|
+
ref: setAsideRef,
|
|
2736
|
+
className: clsx("kds-sidebar", open && "kds-sidebar-open", className),
|
|
2737
|
+
...props,
|
|
2738
|
+
children: [
|
|
2739
|
+
/* @__PURE__ */ jsxs29("div", { className: "kds-sidebar-mobile-header", children: [
|
|
2740
|
+
/* @__PURE__ */ jsx39("span", { children: mobileTitle }),
|
|
2741
|
+
/* @__PURE__ */ jsx39(
|
|
2742
|
+
"button",
|
|
2743
|
+
{
|
|
2744
|
+
ref: closeRef,
|
|
2745
|
+
type: "button",
|
|
2746
|
+
className: "kds-sidebar-close-btn",
|
|
2747
|
+
"aria-label": closeLabel,
|
|
2748
|
+
onClick: () => onClose?.(),
|
|
2749
|
+
children: /* @__PURE__ */ jsx39("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "close" })
|
|
2750
|
+
}
|
|
2751
|
+
)
|
|
2752
|
+
] }),
|
|
2753
|
+
/* @__PURE__ */ jsx39("div", { ref: headerRef, className: "kds-sidebar-header", onKeyDown: onHeaderKeyDown, children: hasMenu ? /* @__PURE__ */ jsxs29(Fragment5, { children: [
|
|
2754
|
+
/* @__PURE__ */ jsxs29(
|
|
2755
|
+
"button",
|
|
2756
|
+
{
|
|
2757
|
+
ref: toggleRef,
|
|
2758
|
+
type: "button",
|
|
2759
|
+
className: "kds-sidebar-header-toggle",
|
|
2760
|
+
"aria-haspopup": "true",
|
|
2761
|
+
"aria-expanded": menuOpen,
|
|
2762
|
+
"aria-controls": menuId,
|
|
2763
|
+
onClick: () => setMenuOpen((v) => !v),
|
|
2764
|
+
children: [
|
|
2765
|
+
headerContent,
|
|
2766
|
+
/* @__PURE__ */ jsx39("i", { className: "material-symbols-outlined kds-sidebar-dropdown-icon", "aria-hidden": "true", children: "expand_more" })
|
|
2767
|
+
]
|
|
2768
|
+
}
|
|
2769
|
+
),
|
|
2770
|
+
/* @__PURE__ */ jsx39(
|
|
2771
|
+
"div",
|
|
2772
|
+
{
|
|
2773
|
+
id: menuId,
|
|
2774
|
+
className: clsx(
|
|
2775
|
+
"kds-sidebar-header-dropdown surface elevate border small-round",
|
|
2776
|
+
menuOpen && "kds-dropdown-open"
|
|
2777
|
+
),
|
|
2778
|
+
children: header.menu
|
|
2779
|
+
}
|
|
2780
|
+
)
|
|
2781
|
+
] }) : headerContent }),
|
|
2782
|
+
/* @__PURE__ */ jsx39("nav", { className: "kds-sidebar-nav", "aria-label": navLabel, children: items.map((item, i) => /* @__PURE__ */ jsxs29(
|
|
2783
|
+
"a",
|
|
2784
|
+
{
|
|
2785
|
+
href: item.href,
|
|
2786
|
+
className: clsx("kds-sidebar-nav-item", item.active && "active"),
|
|
2787
|
+
"aria-current": item.active ? "page" : void 0,
|
|
2788
|
+
...item.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
2789
|
+
children: [
|
|
2790
|
+
item.icon && /* @__PURE__ */ jsx39("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: item.icon }),
|
|
2791
|
+
/* @__PURE__ */ jsx39("span", { children: item.label })
|
|
2792
|
+
]
|
|
2793
|
+
},
|
|
2794
|
+
`${i}-${item.href}`
|
|
2795
|
+
)) })
|
|
2796
|
+
]
|
|
2797
|
+
}
|
|
2798
|
+
);
|
|
2799
|
+
}
|
|
2800
|
+
);
|
|
2801
|
+
KdsSidebar.displayName = "KdsSidebar";
|
|
2802
|
+
|
|
2803
|
+
// src/components/domain/KdsNavbar/KdsNavbar.tsx
|
|
2804
|
+
import { forwardRef as forwardRef38 } from "react";
|
|
2805
|
+
import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2806
|
+
var KdsNavbar = forwardRef38(
|
|
2807
|
+
({
|
|
2808
|
+
brand,
|
|
2809
|
+
brandHref = "/",
|
|
2810
|
+
variant = "primary",
|
|
2811
|
+
onMenuClick,
|
|
2812
|
+
menuOpen,
|
|
2813
|
+
menuControls,
|
|
2814
|
+
menuLabel = "Men\xFA",
|
|
2815
|
+
children,
|
|
2816
|
+
className,
|
|
2817
|
+
...props
|
|
2818
|
+
}, ref) => /* @__PURE__ */ jsx40(
|
|
2819
|
+
"nav",
|
|
2820
|
+
{
|
|
2821
|
+
ref,
|
|
2822
|
+
className: clsx(
|
|
2823
|
+
variant === "primary" ? "primary no-margin" : "no-margin surface secondary-nav-border",
|
|
2824
|
+
className
|
|
2825
|
+
),
|
|
2826
|
+
...props,
|
|
2827
|
+
children: /* @__PURE__ */ jsxs30("div", { className: "kds-container-center", children: [
|
|
2828
|
+
onMenuClick && /* @__PURE__ */ jsx40(
|
|
2829
|
+
"button",
|
|
2830
|
+
{
|
|
2831
|
+
type: "button",
|
|
2832
|
+
className: "kds-hamburger-btn",
|
|
2833
|
+
"aria-label": menuLabel,
|
|
2834
|
+
"aria-expanded": menuOpen,
|
|
2835
|
+
"aria-controls": menuControls,
|
|
2836
|
+
onClick: onMenuClick,
|
|
2837
|
+
children: /* @__PURE__ */ jsx40("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "menu" })
|
|
2838
|
+
}
|
|
2839
|
+
),
|
|
2840
|
+
/* @__PURE__ */ jsx40("a", { href: brandHref, className: "kds-navbar-brand", children: brand }),
|
|
2841
|
+
/* @__PURE__ */ jsx40("div", { className: "max" }),
|
|
2842
|
+
children
|
|
2843
|
+
] })
|
|
2844
|
+
}
|
|
2845
|
+
)
|
|
2846
|
+
);
|
|
2847
|
+
KdsNavbar.displayName = "KdsNavbar";
|
|
2848
|
+
|
|
2849
|
+
// src/components/domain/KdsFooter/KdsFooter.tsx
|
|
2850
|
+
import { forwardRef as forwardRef39 } from "react";
|
|
2851
|
+
import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2852
|
+
var KdsFooter = forwardRef39(
|
|
2853
|
+
({ columns, children, className, ...props }, ref) => /* @__PURE__ */ jsx41("footer", { ref, className: clsx("primary", className), ...props, children: /* @__PURE__ */ jsxs31("div", { className: "kds-container-center", children: [
|
|
2854
|
+
/* @__PURE__ */ jsx41("div", { className: "kds-grid", children: columns.map((column) => /* @__PURE__ */ jsxs31("div", { className: "kds-col-sm-12 kds-col-md-6 kds-col-lg-2", children: [
|
|
2855
|
+
/* @__PURE__ */ jsx41("h6", { className: "kds-text-center", children: column.title }),
|
|
2856
|
+
/* @__PURE__ */ jsx41("nav", { className: "kds-footer-nav", "aria-label": column.title, children: column.links.map((link, i) => /* @__PURE__ */ jsx41(
|
|
2857
|
+
"a",
|
|
2858
|
+
{
|
|
2859
|
+
href: link.href,
|
|
2860
|
+
...link.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
2861
|
+
children: link.label
|
|
2862
|
+
},
|
|
2863
|
+
`${i}-${link.href}`
|
|
2864
|
+
)) })
|
|
2865
|
+
] }, column.title)) }),
|
|
2866
|
+
children
|
|
2867
|
+
] }) })
|
|
2868
|
+
);
|
|
2869
|
+
KdsFooter.displayName = "KdsFooter";
|
|
2870
|
+
|
|
2356
2871
|
// src/components/domain/KdsQrRow/KdsQrRow.tsx
|
|
2357
|
-
import { forwardRef as
|
|
2358
|
-
import { jsx as
|
|
2359
|
-
var KdsQrRow =
|
|
2360
|
-
({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */
|
|
2361
|
-
/* @__PURE__ */
|
|
2362
|
-
/* @__PURE__ */
|
|
2363
|
-
/* @__PURE__ */
|
|
2364
|
-
description && /* @__PURE__ */
|
|
2872
|
+
import { forwardRef as forwardRef40 } from "react";
|
|
2873
|
+
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2874
|
+
var KdsQrRow = forwardRef40(
|
|
2875
|
+
({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ jsxs32("button", { ref, type: "button", className: clsx("kds-qr-row", className), ...props, children: [
|
|
2876
|
+
/* @__PURE__ */ jsx42("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx42("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2877
|
+
/* @__PURE__ */ jsxs32("span", { className: "kds-qr-text", children: [
|
|
2878
|
+
/* @__PURE__ */ jsx42("span", { className: "kds-qr-title", children: name }),
|
|
2879
|
+
description && /* @__PURE__ */ jsx42("span", { className: "kds-qr-subtitle", children: description })
|
|
2365
2880
|
] }),
|
|
2366
|
-
badge && /* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
2881
|
+
badge && /* @__PURE__ */ jsx42("span", { className: "kds-qr-badge", children: badge }),
|
|
2882
|
+
/* @__PURE__ */ jsx42("i", { className: "material-symbols-outlined", children: "chevron_right" })
|
|
2368
2883
|
] })
|
|
2369
2884
|
);
|
|
2370
2885
|
KdsQrRow.displayName = "KdsQrRow";
|
|
2371
2886
|
|
|
2372
2887
|
// src/components/domain/KdsCardSelector/KdsCardSelector.tsx
|
|
2373
|
-
import { forwardRef as
|
|
2374
|
-
import { jsx as
|
|
2375
|
-
var KdsCardSelector =
|
|
2376
|
-
({
|
|
2377
|
-
|
|
2888
|
+
import { forwardRef as forwardRef41, useId as useId5 } from "react";
|
|
2889
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2890
|
+
var KdsCardSelector = forwardRef41(
|
|
2891
|
+
({
|
|
2892
|
+
icon,
|
|
2893
|
+
title,
|
|
2894
|
+
description,
|
|
2895
|
+
selected,
|
|
2896
|
+
radio,
|
|
2897
|
+
name,
|
|
2898
|
+
value,
|
|
2899
|
+
checked,
|
|
2900
|
+
onCheckedChange,
|
|
2901
|
+
children,
|
|
2902
|
+
className,
|
|
2903
|
+
disabled,
|
|
2904
|
+
type,
|
|
2905
|
+
...props
|
|
2906
|
+
}, ref) => {
|
|
2907
|
+
const radioId = useId5();
|
|
2908
|
+
const descriptionId = `${radioId}-description`;
|
|
2909
|
+
const iconNode = icon && /* @__PURE__ */ jsx43("span", { className: "kds-card-selector-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("i", { className: "material-symbols-outlined", children: icon }) });
|
|
2910
|
+
if (radio && name !== void 0 && value !== void 0) {
|
|
2911
|
+
return /* @__PURE__ */ jsxs33(
|
|
2912
|
+
"div",
|
|
2913
|
+
{
|
|
2914
|
+
ref,
|
|
2915
|
+
className: clsx("kds-card-selector", "kds-card-selector--radio", className),
|
|
2916
|
+
...props,
|
|
2917
|
+
children: [
|
|
2918
|
+
/* @__PURE__ */ jsx43(
|
|
2919
|
+
"input",
|
|
2920
|
+
{
|
|
2921
|
+
type: "radio",
|
|
2922
|
+
className: "kds-card-selector-radio",
|
|
2923
|
+
id: radioId,
|
|
2924
|
+
name,
|
|
2925
|
+
value,
|
|
2926
|
+
checked,
|
|
2927
|
+
disabled,
|
|
2928
|
+
onChange: () => onCheckedChange?.(value),
|
|
2929
|
+
"aria-describedby": description ? descriptionId : void 0
|
|
2930
|
+
}
|
|
2931
|
+
),
|
|
2932
|
+
iconNode,
|
|
2933
|
+
/* @__PURE__ */ jsx43("label", { htmlFor: radioId, className: "kds-card-selector-title", children: title }),
|
|
2934
|
+
description && /* @__PURE__ */ jsx43("span", { className: "kds-card-selector-description", id: descriptionId, children: description }),
|
|
2935
|
+
children && /* @__PURE__ */ jsx43("div", { className: "kds-card-selector-details", children })
|
|
2936
|
+
]
|
|
2937
|
+
}
|
|
2938
|
+
);
|
|
2939
|
+
}
|
|
2940
|
+
return /* @__PURE__ */ jsxs33(
|
|
2941
|
+
"button",
|
|
2942
|
+
{
|
|
2943
|
+
ref,
|
|
2944
|
+
type: type ?? "button",
|
|
2945
|
+
className: clsx("kds-card-selector", selected && "selected", className),
|
|
2946
|
+
disabled,
|
|
2947
|
+
name,
|
|
2948
|
+
value,
|
|
2949
|
+
...props,
|
|
2950
|
+
children: [
|
|
2951
|
+
iconNode,
|
|
2952
|
+
/* @__PURE__ */ jsx43("span", { className: "kds-card-selector-title", children: title }),
|
|
2953
|
+
description && /* @__PURE__ */ jsx43("span", { className: "kds-card-selector-description", children: description }),
|
|
2954
|
+
children && /* @__PURE__ */ jsx43("span", { className: "kds-card-selector-details", children })
|
|
2955
|
+
]
|
|
2956
|
+
}
|
|
2957
|
+
);
|
|
2958
|
+
}
|
|
2959
|
+
);
|
|
2960
|
+
KdsCardSelector.displayName = "KdsCardSelector";
|
|
2961
|
+
var KdsCardSelectorGroup = forwardRef41(
|
|
2962
|
+
({ label, className, children, ...props }, ref) => /* @__PURE__ */ jsx43(
|
|
2963
|
+
"div",
|
|
2378
2964
|
{
|
|
2379
2965
|
ref,
|
|
2380
|
-
|
|
2381
|
-
|
|
2966
|
+
role: "radiogroup",
|
|
2967
|
+
"aria-label": label,
|
|
2968
|
+
className: clsx("kds-card-selector-group", className),
|
|
2382
2969
|
...props,
|
|
2383
|
-
children
|
|
2384
|
-
icon && /* @__PURE__ */ jsx35("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ jsx35("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2385
|
-
/* @__PURE__ */ jsx35("span", { className: "kds-card-selector-title", children: title }),
|
|
2386
|
-
description && /* @__PURE__ */ jsx35("span", { className: "kds-card-selector-description", children: description })
|
|
2387
|
-
]
|
|
2970
|
+
children
|
|
2388
2971
|
}
|
|
2389
2972
|
)
|
|
2390
2973
|
);
|
|
2391
|
-
|
|
2974
|
+
KdsCardSelectorGroup.displayName = "KdsCardSelectorGroup";
|
|
2392
2975
|
|
|
2393
2976
|
// src/components/domain/KdsCardPlan/KdsCardPlan.tsx
|
|
2394
|
-
import { forwardRef as
|
|
2395
|
-
import { jsx as
|
|
2396
|
-
var KdsCardPlan =
|
|
2397
|
-
({
|
|
2977
|
+
import { forwardRef as forwardRef42, useId as useId6 } from "react";
|
|
2978
|
+
import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2979
|
+
var KdsCardPlan = forwardRef42(
|
|
2980
|
+
({
|
|
2981
|
+
title,
|
|
2982
|
+
price,
|
|
2983
|
+
period,
|
|
2984
|
+
features,
|
|
2985
|
+
recommended,
|
|
2986
|
+
badgeText,
|
|
2987
|
+
action,
|
|
2988
|
+
description,
|
|
2989
|
+
checkFeatures,
|
|
2990
|
+
name,
|
|
2991
|
+
value,
|
|
2992
|
+
selected,
|
|
2993
|
+
onSelectedChange,
|
|
2994
|
+
className,
|
|
2995
|
+
...props
|
|
2996
|
+
}, ref) => {
|
|
2997
|
+
const radioId = useId6();
|
|
2998
|
+
const priceId = `${radioId}-price`;
|
|
2999
|
+
const badgeId = `${radioId}-badge`;
|
|
3000
|
+
const selectable = name !== void 0 && value !== void 0;
|
|
3001
|
+
return /* @__PURE__ */ jsxs34(
|
|
3002
|
+
"div",
|
|
3003
|
+
{
|
|
3004
|
+
ref,
|
|
3005
|
+
className: clsx(
|
|
3006
|
+
"kds-card-plan",
|
|
3007
|
+
recommended && "recommended",
|
|
3008
|
+
selectable && "kds-card-plan--selectable",
|
|
3009
|
+
className
|
|
3010
|
+
),
|
|
3011
|
+
...props,
|
|
3012
|
+
children: [
|
|
3013
|
+
selectable && /* @__PURE__ */ jsx44(
|
|
3014
|
+
"input",
|
|
3015
|
+
{
|
|
3016
|
+
type: "radio",
|
|
3017
|
+
className: "kds-card-plan-radio",
|
|
3018
|
+
id: radioId,
|
|
3019
|
+
name,
|
|
3020
|
+
value,
|
|
3021
|
+
checked: selected,
|
|
3022
|
+
onChange: () => onSelectedChange?.(value),
|
|
3023
|
+
"aria-describedby": badgeText ? `${priceId} ${badgeId}` : priceId
|
|
3024
|
+
}
|
|
3025
|
+
),
|
|
3026
|
+
/* @__PURE__ */ jsx44("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ jsx44("h3", { children: selectable ? /* @__PURE__ */ jsx44("label", { htmlFor: radioId, children: title }) : title }) }),
|
|
3027
|
+
/* @__PURE__ */ jsxs34("div", { className: "kds-card-plan-price", id: selectable ? priceId : void 0, children: [
|
|
3028
|
+
/* @__PURE__ */ jsx44("span", { className: "kds-price", children: price }),
|
|
3029
|
+
period && /* @__PURE__ */ jsxs34("span", { className: "kds-price-period", children: [
|
|
3030
|
+
"/",
|
|
3031
|
+
period
|
|
3032
|
+
] })
|
|
3033
|
+
] }),
|
|
3034
|
+
description && /* @__PURE__ */ jsx44("div", { className: "kds-card-plan-description", children: description }),
|
|
3035
|
+
badgeText && /* @__PURE__ */ jsx44("span", { className: "kds-card-plan-badge", id: selectable ? badgeId : void 0, children: badgeText }),
|
|
3036
|
+
features && features.length > 0 && /* @__PURE__ */ jsx44(
|
|
3037
|
+
"ul",
|
|
3038
|
+
{
|
|
3039
|
+
className: clsx("kds-card-plan-features", checkFeatures && "kds-card-plan-features--check"),
|
|
3040
|
+
children: features.map((f, i) => /* @__PURE__ */ jsxs34("li", { children: [
|
|
3041
|
+
checkFeatures && /* @__PURE__ */ jsx44("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "check" }),
|
|
3042
|
+
f
|
|
3043
|
+
] }, i))
|
|
3044
|
+
}
|
|
3045
|
+
),
|
|
3046
|
+
action
|
|
3047
|
+
]
|
|
3048
|
+
}
|
|
3049
|
+
);
|
|
3050
|
+
}
|
|
3051
|
+
);
|
|
3052
|
+
KdsCardPlan.displayName = "KdsCardPlan";
|
|
3053
|
+
var KdsCardPlanGroup = forwardRef42(
|
|
3054
|
+
({ label, className, children, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
2398
3055
|
"div",
|
|
2399
3056
|
{
|
|
2400
3057
|
ref,
|
|
2401
|
-
|
|
3058
|
+
role: "radiogroup",
|
|
3059
|
+
"aria-label": label,
|
|
3060
|
+
className: clsx("kds-card-plan-group", className),
|
|
2402
3061
|
...props,
|
|
2403
|
-
children
|
|
2404
|
-
/* @__PURE__ */ jsx36("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ jsx36("h3", { children: title }) }),
|
|
2405
|
-
/* @__PURE__ */ jsxs27("div", { className: "kds-card-plan-price", children: [
|
|
2406
|
-
/* @__PURE__ */ jsx36("span", { className: "kds-price", children: price }),
|
|
2407
|
-
period && /* @__PURE__ */ jsxs27("span", { className: "kds-price-period", children: [
|
|
2408
|
-
"/",
|
|
2409
|
-
period
|
|
2410
|
-
] })
|
|
2411
|
-
] }),
|
|
2412
|
-
badgeText && /* @__PURE__ */ jsx36("span", { className: "kds-card-plan-badge", children: badgeText }),
|
|
2413
|
-
features && features.length > 0 && /* @__PURE__ */ jsx36("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ jsx36("li", { children: f }, i)) }),
|
|
2414
|
-
action
|
|
2415
|
-
]
|
|
3062
|
+
children
|
|
2416
3063
|
}
|
|
2417
3064
|
)
|
|
2418
3065
|
);
|
|
2419
|
-
|
|
3066
|
+
KdsCardPlanGroup.displayName = "KdsCardPlanGroup";
|
|
2420
3067
|
|
|
2421
3068
|
// src/components/domain/KdsInvoiceSticky/KdsInvoiceSticky.tsx
|
|
2422
|
-
import { forwardRef as
|
|
2423
|
-
import { jsx as
|
|
2424
|
-
var KdsInvoiceSticky =
|
|
2425
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
3069
|
+
import { forwardRef as forwardRef43 } from "react";
|
|
3070
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3071
|
+
var KdsInvoiceSticky = forwardRef43(
|
|
3072
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
2426
3073
|
"article",
|
|
2427
3074
|
{
|
|
2428
3075
|
ref,
|
|
@@ -2434,11 +3081,40 @@ var KdsInvoiceSticky = forwardRef35(
|
|
|
2434
3081
|
);
|
|
2435
3082
|
KdsInvoiceSticky.displayName = "KdsInvoiceSticky";
|
|
2436
3083
|
|
|
3084
|
+
// src/components/domain/KdsInvoiceHeaderSkeleton/KdsInvoiceHeaderSkeleton.tsx
|
|
3085
|
+
import { forwardRef as forwardRef44 } from "react";
|
|
3086
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3087
|
+
var Text = ({ children }) => /* @__PURE__ */ jsx46("span", { className: "kds-skeleton kds-skeleton--text", children });
|
|
3088
|
+
var KdsInvoiceHeaderSkeleton = forwardRef44(
|
|
3089
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxs35(KdsInvoiceSticky, { ref, className: clsx("kds-invoice-skeleton", className), "aria-hidden": "true", ...props, children: [
|
|
3090
|
+
/* @__PURE__ */ jsxs35("header", { className: "kds-invoice-header", children: [
|
|
3091
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
3092
|
+
/* @__PURE__ */ jsx46("p", { className: "kds-invoice-amount", children: /* @__PURE__ */ jsx46(Text, { children: "$00.000" }) }),
|
|
3093
|
+
/* @__PURE__ */ jsxs35("p", { className: "kds-invoice-code", children: [
|
|
3094
|
+
/* @__PURE__ */ jsx46("span", { children: /* @__PURE__ */ jsx46(Text, { children: "C\xF3digo" }) }),
|
|
3095
|
+
/* @__PURE__ */ jsx46("span", { className: "kds-invoice-code-value kds-invoice-code-value--lowercase", children: /* @__PURE__ */ jsx46(Text, { children: "xxxx-xxxx-xxxx" }) })
|
|
3096
|
+
] })
|
|
3097
|
+
] }),
|
|
3098
|
+
/* @__PURE__ */ jsx46("div", { className: "kds-invoice-merchant kds-skeleton" })
|
|
3099
|
+
] }),
|
|
3100
|
+
/* @__PURE__ */ jsxs35("div", { className: "kds-invoice-collapsible", children: [
|
|
3101
|
+
/* @__PURE__ */ jsx46("div", { className: "kds-invoice-summary", children: /* @__PURE__ */ jsxs35("dl", { className: "kds-kv", children: [
|
|
3102
|
+
/* @__PURE__ */ jsx46("dt", { children: /* @__PURE__ */ jsx46(Text, { children: "Pago a" }) }),
|
|
3103
|
+
/* @__PURE__ */ jsx46("dd", { children: /* @__PURE__ */ jsx46(Text, { children: "Comercio de ejemplo SpA" }) }),
|
|
3104
|
+
/* @__PURE__ */ jsx46("dt", { children: /* @__PURE__ */ jsx46(Text, { children: "Asunto" }) }),
|
|
3105
|
+
/* @__PURE__ */ jsx46("dd", { children: /* @__PURE__ */ jsx46(Text, { children: "Orden de compra" }) })
|
|
3106
|
+
] }) }),
|
|
3107
|
+
/* @__PURE__ */ jsx46("div", { className: "kds-expand-toggle", children: /* @__PURE__ */ jsx46("span", { children: /* @__PURE__ */ jsx46(Text, { children: "Detalle del cobro" }) }) })
|
|
3108
|
+
] })
|
|
3109
|
+
] })
|
|
3110
|
+
);
|
|
3111
|
+
KdsInvoiceHeaderSkeleton.displayName = "KdsInvoiceHeaderSkeleton";
|
|
3112
|
+
|
|
2437
3113
|
// src/components/domain/KdsBottomSheet/KdsBottomSheet.tsx
|
|
2438
|
-
import { forwardRef as
|
|
3114
|
+
import { forwardRef as forwardRef45 } from "react";
|
|
2439
3115
|
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
2440
|
-
import { jsx as
|
|
2441
|
-
var KdsBottomSheet =
|
|
3116
|
+
import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3117
|
+
var KdsBottomSheet = forwardRef45(
|
|
2442
3118
|
({
|
|
2443
3119
|
open,
|
|
2444
3120
|
onClose,
|
|
@@ -2450,55 +3126,81 @@ var KdsBottomSheet = forwardRef36(
|
|
|
2450
3126
|
showCloseButton = false,
|
|
2451
3127
|
container,
|
|
2452
3128
|
className,
|
|
3129
|
+
size = "auto",
|
|
3130
|
+
dismissible = true,
|
|
3131
|
+
variant = "sheet",
|
|
3132
|
+
align = "start",
|
|
3133
|
+
icon,
|
|
3134
|
+
hint,
|
|
2453
3135
|
...props
|
|
2454
|
-
}, ref) => /* @__PURE__ */
|
|
3136
|
+
}, ref) => /* @__PURE__ */ jsx47(
|
|
2455
3137
|
Dialog2.Root,
|
|
2456
3138
|
{
|
|
2457
3139
|
open,
|
|
2458
3140
|
onOpenChange: (o) => {
|
|
2459
3141
|
if (!o) onClose();
|
|
2460
3142
|
},
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2462
|
-
Dialog2.
|
|
3143
|
+
children: /* @__PURE__ */ jsx47(Dialog2.Portal, { container, children: /* @__PURE__ */ jsx47("div", { className: "kds-theme-root", style: { display: "contents" }, children: /* @__PURE__ */ jsx47(
|
|
3144
|
+
Dialog2.Overlay,
|
|
2463
3145
|
{
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
"
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
3146
|
+
className: clsx("kds-bottom-sheet-scrim", "open", variant === "dialog" && "kds-bottom-sheet-scrim--dialog"),
|
|
3147
|
+
children: /* @__PURE__ */ jsxs36(
|
|
3148
|
+
Dialog2.Content,
|
|
3149
|
+
{
|
|
3150
|
+
ref,
|
|
3151
|
+
className: clsx(
|
|
3152
|
+
"kds-bottom-sheet",
|
|
3153
|
+
size === "full" && "kds-bottom-sheet-full",
|
|
3154
|
+
variant === "dialog" && "kds-bottom-sheet--dialog",
|
|
3155
|
+
variant === "dialog" && align === "center" && "kds-bottom-sheet--center",
|
|
3156
|
+
className
|
|
3157
|
+
),
|
|
3158
|
+
onPointerDownOutside: (e) => {
|
|
3159
|
+
const target = e.target;
|
|
3160
|
+
if (!dismissible || target.closest(".kds-bottom-sheet")) e.preventDefault();
|
|
3161
|
+
},
|
|
3162
|
+
onEscapeKeyDown: (e) => {
|
|
3163
|
+
if (!dismissible) e.preventDefault();
|
|
3164
|
+
},
|
|
3165
|
+
onInteractOutside: (e) => {
|
|
3166
|
+
if (!dismissible) e.preventDefault();
|
|
3167
|
+
},
|
|
3168
|
+
...props,
|
|
3169
|
+
children: [
|
|
3170
|
+
showGrabber && dismissible && /* @__PURE__ */ jsx47("div", { className: "kds-bottom-sheet-grabber", "aria-hidden": "true" }),
|
|
3171
|
+
showCloseButton && dismissible && /* @__PURE__ */ jsx47(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx47(
|
|
3172
|
+
"button",
|
|
3173
|
+
{
|
|
3174
|
+
type: "button",
|
|
3175
|
+
className: "kds-bottom-sheet-close",
|
|
3176
|
+
"aria-label": "Cerrar",
|
|
3177
|
+
children: /* @__PURE__ */ jsx47("i", { className: "material-symbols-outlined", children: "close" })
|
|
3178
|
+
}
|
|
3179
|
+
) }),
|
|
3180
|
+
icon && /* @__PURE__ */ jsx47("div", { className: "kds-bottom-sheet-icon", children: icon }),
|
|
3181
|
+
title && /* @__PURE__ */ jsx47(Dialog2.Title, { className: "kds-bottom-sheet-title", children: title }),
|
|
3182
|
+
description && /* @__PURE__ */ jsx47(Dialog2.Description, { className: "kds-bottom-sheet-description", children: description }),
|
|
3183
|
+
/* @__PURE__ */ jsx47("div", { className: "kds-bottom-sheet-body", children }),
|
|
3184
|
+
hint && /* @__PURE__ */ jsx47("p", { className: "kds-bottom-sheet-hint", children: hint }),
|
|
3185
|
+
actions && /* @__PURE__ */ jsx47("div", { className: "kds-bottom-sheet-actions", children: actions })
|
|
3186
|
+
]
|
|
3187
|
+
}
|
|
3188
|
+
)
|
|
2487
3189
|
}
|
|
2488
|
-
) }) })
|
|
3190
|
+
) }) })
|
|
2489
3191
|
}
|
|
2490
3192
|
)
|
|
2491
3193
|
);
|
|
2492
3194
|
KdsBottomSheet.displayName = "KdsBottomSheet";
|
|
2493
3195
|
|
|
2494
3196
|
// src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
|
|
2495
|
-
import { forwardRef as
|
|
3197
|
+
import { forwardRef as forwardRef47 } from "react";
|
|
2496
3198
|
|
|
2497
3199
|
// src/components/domain/KdsSecureFooter/KhipuWordmark.tsx
|
|
2498
|
-
import { forwardRef as
|
|
2499
|
-
import { jsx as
|
|
2500
|
-
var KhipuWordmark =
|
|
2501
|
-
({ className = "khipu-mark", ...props }, ref) => /* @__PURE__ */
|
|
3200
|
+
import { forwardRef as forwardRef46 } from "react";
|
|
3201
|
+
import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3202
|
+
var KhipuWordmark = forwardRef46(
|
|
3203
|
+
({ className = "khipu-mark", ...props }, ref) => /* @__PURE__ */ jsxs37(
|
|
2502
3204
|
"svg",
|
|
2503
3205
|
{
|
|
2504
3206
|
ref,
|
|
@@ -2509,14 +3211,14 @@ var KhipuWordmark = forwardRef37(
|
|
|
2509
3211
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2510
3212
|
...props,
|
|
2511
3213
|
children: [
|
|
2512
|
-
/* @__PURE__ */
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
/* @__PURE__ */
|
|
2516
|
-
/* @__PURE__ */
|
|
2517
|
-
/* @__PURE__ */
|
|
2518
|
-
/* @__PURE__ */
|
|
2519
|
-
/* @__PURE__ */
|
|
3214
|
+
/* @__PURE__ */ jsx48("path", { d: "M16.6417 11.8339C16.7273 11.9196 16.8272 11.9624 16.9472 11.9624H18.9628C19.0798 11.9624 19.1826 11.9196 19.2682 11.8339C19.3539 11.7483 19.3967 11.6483 19.3967 11.5284V7.12891C19.3967 6.50081 19.3111 5.95551 19.1398 5.49586C18.9685 5.03621 18.7315 4.65937 18.4289 4.3596C18.1234 4.05983 17.758 3.83999 17.3326 3.69439C16.9043 3.55164 16.4361 3.47741 15.9251 3.47741C15.4226 3.47741 14.9801 3.58019 14.5975 3.7886C14.2121 3.99702 13.9295 4.214 13.7496 4.43668V1.03071C13.7496 0.913654 13.7068 0.810874 13.6211 0.728079C13.5355 0.642434 13.4355 0.599609 13.3185 0.599609H11.2943C11.1773 0.599609 11.0745 0.642434 10.9888 0.728079C10.9032 0.813729 10.8604 0.913654 10.8604 1.03071V11.5284C10.8604 11.6455 10.9032 11.7483 10.9888 11.8339C11.0745 11.9196 11.1744 11.9624 11.2943 11.9624H13.3099C13.427 11.9624 13.5298 11.9196 13.6126 11.8339C13.6982 11.7483 13.741 11.6483 13.741 11.5284V7.48006C13.741 7.02041 13.8495 6.65216 14.0693 6.37521C14.2892 6.09826 14.6375 5.95836 15.1171 5.95836C15.5968 5.95836 15.9479 6.09826 16.1735 6.37521C16.3961 6.65216 16.5103 7.02041 16.5103 7.48006V11.5284C16.5132 11.6483 16.556 11.7483 16.6417 11.8339Z", fill: "#8347AD" }),
|
|
3215
|
+
/* @__PURE__ */ jsx48("path", { d: "M23.6189 3.64014H21.6005C21.4834 3.64014 21.3806 3.68296 21.295 3.76861C21.2093 3.85426 21.1665 3.95418 21.1665 4.07124V11.5284C21.1665 11.6454 21.2093 11.7482 21.295 11.8339C21.3806 11.9195 21.4806 11.9623 21.6005 11.9623H23.6161C23.7331 11.9623 23.8359 11.9195 23.9187 11.8339C24.0044 11.7482 24.0472 11.6483 24.0472 11.5284V4.07124C24.0472 3.95418 24.0044 3.85141 23.9187 3.76861C23.8359 3.68296 23.736 3.64014 23.6189 3.64014Z", fill: "#8347AD" }),
|
|
3216
|
+
/* @__PURE__ */ jsx48("path", { d: "M34.1881 10.0723C34.3851 9.61264 34.4936 9.07019 34.5164 8.43924C34.5278 8.27934 34.5335 8.06239 34.5335 7.79114C34.5335 7.51994 34.5278 7.30294 34.5164 7.14309C34.4936 6.51499 34.3851 5.96969 34.1881 5.51004C33.9911 5.05039 33.7313 4.67068 33.4115 4.36519C33.0918 4.05971 32.7178 3.83702 32.2924 3.69427C31.8642 3.55152 31.4131 3.47729 30.9334 3.47729C30.5823 3.47729 30.2854 3.50584 30.0455 3.5658C29.8057 3.62575 29.603 3.69998 29.4374 3.78848C29.2718 3.87984 29.1348 3.98263 29.0206 4.09968C28.9093 4.21674 28.8036 4.32808 28.7094 4.43657V4.06828C28.7094 3.95122 28.6666 3.84844 28.5809 3.7628C28.4953 3.67715 28.3954 3.63432 28.2783 3.63432H26.3426C26.2256 3.63432 26.1228 3.67715 26.0372 3.7628C25.9515 3.84844 25.9087 3.94837 25.9087 4.06828V14.566C25.9087 14.683 25.9515 14.7858 26.0372 14.8715C26.1228 14.9571 26.2227 14.9999 26.3426 14.9999H28.3583C28.4753 14.9999 28.5781 14.9571 28.6637 14.8715C28.7494 14.7858 28.7922 14.6859 28.7922 14.566V11.1629C28.8664 11.2599 28.9635 11.3627 29.0806 11.474C29.1976 11.5854 29.3432 11.691 29.5117 11.7852C29.683 11.8823 29.8857 11.9622 30.1198 12.0251C30.3539 12.0879 30.6251 12.1221 30.9363 12.1221C31.4159 12.1221 31.8699 12.0479 32.2953 11.8994C32.7206 11.751 33.0946 11.5226 33.4144 11.22C33.7313 10.9145 33.9911 10.5319 34.1881 10.0723ZM31.65 8.24794C31.6186 8.62194 31.4959 8.94739 31.2817 9.22434C31.0676 9.50129 30.7107 9.64119 30.2083 9.64119C29.9742 9.64119 29.7715 9.60404 29.6002 9.52984C29.4289 9.45559 29.289 9.35569 29.1748 9.23289C29.0634 9.11014 28.9749 8.97309 28.9121 8.82464C28.8493 8.67619 28.8065 8.52204 28.7836 8.35929C28.7608 8.19939 28.7522 8.01384 28.7522 7.79974C28.7522 7.58559 28.7637 7.40004 28.7836 7.24014C28.8036 7.08029 28.8465 6.92609 28.9121 6.77479C28.9749 6.62634 29.0634 6.48929 29.1748 6.36654C29.2861 6.24374 29.4289 6.14384 29.6002 6.06959C29.7715 5.99539 29.9742 5.95824 30.2083 5.95824C30.7107 5.95824 31.0676 6.09814 31.2817 6.37509C31.4959 6.65204 31.6186 6.97749 31.65 7.35149C31.6843 7.65124 31.6843 7.95104 31.65 8.24794Z", fill: "#8347AD" }),
|
|
3217
|
+
/* @__PURE__ */ jsx48("path", { d: "M41.7481 11.8339C41.8337 11.9195 41.9337 11.9623 42.0536 11.9623H43.9093C44.0264 11.9623 44.1291 11.9195 44.2119 11.8339C44.2976 11.7482 44.3404 11.6483 44.3404 11.5284V4.07124C44.3404 3.95418 44.2976 3.85141 44.2119 3.76861C44.1263 3.68296 44.0264 3.64014 43.9093 3.64014H41.8937C41.7766 3.64014 41.6739 3.68296 41.5882 3.76861C41.5026 3.85426 41.4597 3.95418 41.4597 4.07124V8.1196C41.4597 8.57925 41.3598 8.94755 41.1628 9.22445C40.9658 9.5014 40.6318 9.6413 40.1636 9.6413C39.6954 9.6413 39.3585 9.5014 39.1558 9.22445C38.9531 8.94755 38.8503 8.57925 38.8503 8.1196V4.07124C38.8503 3.95418 38.8075 3.85141 38.7218 3.76861C38.6362 3.68296 38.5363 3.64014 38.4163 3.64014H36.4007C36.2837 3.64014 36.1809 3.68296 36.0953 3.76861C36.0096 3.85426 35.9668 3.95418 35.9668 4.07124V8.47075C35.9668 9.7298 36.2723 10.6519 36.8861 11.24C37.4999 11.8282 38.325 12.1194 39.3585 12.1194C39.6897 12.1194 39.9752 12.0908 40.215 12.0309C40.4548 11.9709 40.6661 11.8967 40.8459 11.8082C41.0286 11.7168 41.18 11.6169 41.3027 11.5027C41.4255 11.3914 41.5283 11.2772 41.6139 11.1601V11.5284C41.6196 11.6483 41.6624 11.7482 41.7481 11.8339Z", fill: "#8347AD" }),
|
|
3218
|
+
/* @__PURE__ */ jsx48("path", { d: "M22.5569 2.78074C21.7889 2.78074 21.1665 2.1555 21.1665 1.39037C21.1665 0.622385 21.7918 0 22.5569 0C23.3249 0 23.9473 0.62524 23.9473 1.39037C23.9501 2.1555 23.3249 2.78074 22.5569 2.78074Z", fill: "#3CB4E5" }),
|
|
3219
|
+
/* @__PURE__ */ jsx48("path", { d: "M3.1374 7.43996V4.78198L2.34372 5.77836C2.22095 5.93256 2.21524 6.14951 2.32944 6.31226L3.1374 7.43996Z", fill: "#743CEB" }),
|
|
3220
|
+
/* @__PURE__ */ jsx48("path", { d: "M2.96345 0.722369C2.88351 0.642434 2.78074 0.599609 2.66368 0.599609H0.40826C0.299771 0.599609 0.205557 0.639579 0.122763 0.722369C0.0428246 0.802309 0 0.905089 0 1.02214V11.557C0 11.6655 0.0399696 11.7597 0.122763 11.8425C0.202703 11.9224 0.299771 11.9652 0.40826 11.9652H2.66368C2.78359 11.9652 2.88351 11.9253 2.96345 11.8425C3.04339 11.7625 3.08622 11.6655 3.08622 11.557V8.41081L2.83783 8.08246L2.83212 8.07676L2.82642 8.06821L1.81576 6.65216C1.55024 6.28101 1.56166 5.76996 1.84716 5.41306L2.84069 4.16261L3.08622 3.84285V1.01929C3.08622 0.902234 3.04625 0.802309 2.96345 0.722369Z", fill: "#8347AD" }),
|
|
3221
|
+
/* @__PURE__ */ jsx48("path", { d: "M9.60962 11.9625C9.70667 11.9625 9.78947 11.9282 9.85227 11.8568C9.91797 11.7855 9.94937 11.7084 9.94937 11.6227C9.94937 11.5371 9.92652 11.4714 9.88367 11.4286L5.89242 6.0384L9.59247 1.13642C9.63532 1.08217 9.65812 1.01651 9.65812 0.942284C9.65812 0.856634 9.62387 0.776694 9.55252 0.708174C9.50967 0.665349 9.45832 0.633944 9.40407 0.616814C9.37267 0.608249 9.33552 0.602539 9.30127 0.602539H6.73752C6.56337 0.602539 6.42632 0.636799 6.32352 0.708174C6.22077 0.779549 6.14082 0.850924 6.08942 0.928009L3.32868 4.54525L2.32944 5.80145C2.27234 5.8728 2.24094 5.95845 2.24094 6.04695C2.23808 6.13545 2.26378 6.2211 2.31802 6.2982L2.83477 7.0205L3.32868 7.70855L6.29787 11.6199C6.32927 11.6627 6.39492 11.7312 6.49197 11.8226C6.55192 11.8797 6.63472 11.9197 6.73752 11.9425C6.80032 11.9568 6.86882 11.9625 6.94592 11.9625H9.60962Z", fill: "#3CB4E5" })
|
|
2520
3222
|
]
|
|
2521
3223
|
}
|
|
2522
3224
|
)
|
|
@@ -2524,17 +3226,17 @@ var KhipuWordmark = forwardRef37(
|
|
|
2524
3226
|
KhipuWordmark.displayName = "KhipuWordmark";
|
|
2525
3227
|
|
|
2526
3228
|
// src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
|
|
2527
|
-
import { Fragment as
|
|
2528
|
-
var KdsSecureFooter =
|
|
2529
|
-
({ variant = "default", showLogo = true, psp, children, className, ...props }, ref) => /* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
/* @__PURE__ */
|
|
3229
|
+
import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3230
|
+
var KdsSecureFooter = forwardRef47(
|
|
3231
|
+
({ variant = "default", showLogo = true, psp, children, className, ...props }, ref) => /* @__PURE__ */ jsxs38("footer", { ref, className: clsx("kds-secure-footer", variant === "inside" && "inside", className), ...props, children: [
|
|
3232
|
+
/* @__PURE__ */ jsxs38("svg", { className: "kds-secure-footer-lock", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
3233
|
+
/* @__PURE__ */ jsx49("rect", { x: "4.5", y: "10.5", width: "15", height: "10", rx: "2.25" }),
|
|
3234
|
+
/* @__PURE__ */ jsx49("path", { d: "M8 10.5V7a4 4 0 0 1 8 0v3.5" })
|
|
2533
3235
|
] }),
|
|
2534
|
-
children || /* @__PURE__ */
|
|
2535
|
-
showLogo && /* @__PURE__ */
|
|
2536
|
-
psp && /* @__PURE__ */
|
|
2537
|
-
/* @__PURE__ */
|
|
3236
|
+
children || /* @__PURE__ */ jsx49("span", { children: "Pago seguro procesado por" }),
|
|
3237
|
+
showLogo && /* @__PURE__ */ jsx49(KhipuWordmark, {}),
|
|
3238
|
+
psp && /* @__PURE__ */ jsxs38(Fragment6, { children: [
|
|
3239
|
+
/* @__PURE__ */ jsx49("span", { className: "kds-secure-footer-sep", "aria-hidden": "true" }),
|
|
2538
3240
|
psp
|
|
2539
3241
|
] })
|
|
2540
3242
|
] })
|
|
@@ -2542,44 +3244,44 @@ var KdsSecureFooter = forwardRef38(
|
|
|
2542
3244
|
KdsSecureFooter.displayName = "KdsSecureFooter";
|
|
2543
3245
|
|
|
2544
3246
|
// src/components/domain/KdsRecapList/KdsRecapList.tsx
|
|
2545
|
-
import { forwardRef as
|
|
2546
|
-
import { jsx as
|
|
2547
|
-
var KdsRecapList =
|
|
2548
|
-
({ items, className, ...props }, ref) => /* @__PURE__ */
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
/* @__PURE__ */
|
|
3247
|
+
import { forwardRef as forwardRef48 } from "react";
|
|
3248
|
+
import { jsx as jsx50, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3249
|
+
var KdsRecapList = forwardRef48(
|
|
3250
|
+
({ items, className, ...props }, ref) => /* @__PURE__ */ jsx50("ul", { ref, className: clsx("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ jsxs39("li", { children: [
|
|
3251
|
+
/* @__PURE__ */ jsx50("span", { className: "kds-key", children: item.label }),
|
|
3252
|
+
/* @__PURE__ */ jsx50("span", { className: clsx("kds-value", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
|
|
2551
3253
|
] }, i)) })
|
|
2552
3254
|
);
|
|
2553
3255
|
KdsRecapList.displayName = "KdsRecapList";
|
|
2554
3256
|
|
|
2555
3257
|
// src/components/domain/KdsMontoRow/KdsMontoRow.tsx
|
|
2556
|
-
import { forwardRef as
|
|
2557
|
-
import { jsx as
|
|
2558
|
-
var KdsMontoRow =
|
|
2559
|
-
({ title, value, deadline, className, ...props }, ref) => /* @__PURE__ */
|
|
2560
|
-
/* @__PURE__ */
|
|
2561
|
-
/* @__PURE__ */
|
|
2562
|
-
deadline && /* @__PURE__ */
|
|
3258
|
+
import { forwardRef as forwardRef49 } from "react";
|
|
3259
|
+
import { jsx as jsx51, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
3260
|
+
var KdsMontoRow = forwardRef49(
|
|
3261
|
+
({ title, value, deadline, className, ...props }, ref) => /* @__PURE__ */ jsxs40("div", { ref, className: clsx("kds-monto-row", className), ...props, children: [
|
|
3262
|
+
/* @__PURE__ */ jsxs40("div", { children: [
|
|
3263
|
+
/* @__PURE__ */ jsx51("div", { className: "kds-monto-row-title", children: title }),
|
|
3264
|
+
deadline && /* @__PURE__ */ jsx51("div", { className: "kds-monto-row-deadline", children: deadline })
|
|
2563
3265
|
] }),
|
|
2564
|
-
/* @__PURE__ */
|
|
3266
|
+
/* @__PURE__ */ jsx51("div", { className: "kds-monto-row-value", children: value })
|
|
2565
3267
|
] })
|
|
2566
3268
|
);
|
|
2567
3269
|
KdsMontoRow.displayName = "KdsMontoRow";
|
|
2568
3270
|
|
|
2569
3271
|
// src/components/domain/KdsMerchantTile/KdsMerchantTile.tsx
|
|
2570
|
-
import { forwardRef as
|
|
2571
|
-
import { jsx as
|
|
2572
|
-
var KdsMerchantTile =
|
|
3272
|
+
import { forwardRef as forwardRef50 } from "react";
|
|
3273
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3274
|
+
var KdsMerchantTile = forwardRef50(
|
|
2573
3275
|
({ name, logoUrl, initials, compact, className, ...props }, ref) => {
|
|
2574
3276
|
const displayInitials = (initials ?? name.slice(0, 2)).toUpperCase();
|
|
2575
|
-
return /* @__PURE__ */
|
|
3277
|
+
return /* @__PURE__ */ jsx52(
|
|
2576
3278
|
"div",
|
|
2577
3279
|
{
|
|
2578
3280
|
ref,
|
|
2579
3281
|
className: clsx("kds-merchant-tile", logoUrl && "logo", compact && "compact", className),
|
|
2580
3282
|
"aria-label": name,
|
|
2581
3283
|
...props,
|
|
2582
|
-
children: logoUrl ? /* @__PURE__ */
|
|
3284
|
+
children: logoUrl ? /* @__PURE__ */ jsx52("img", { src: logoUrl, alt: name }) : displayInitials
|
|
2583
3285
|
}
|
|
2584
3286
|
);
|
|
2585
3287
|
}
|
|
@@ -2587,10 +3289,10 @@ var KdsMerchantTile = forwardRef41(
|
|
|
2587
3289
|
KdsMerchantTile.displayName = "KdsMerchantTile";
|
|
2588
3290
|
|
|
2589
3291
|
// src/components/domain/KdsInvoiceMerchant/KdsInvoiceMerchant.tsx
|
|
2590
|
-
import { forwardRef as
|
|
3292
|
+
import { forwardRef as forwardRef51, useState as useState11 } from "react";
|
|
2591
3293
|
|
|
2592
3294
|
// src/components/domain/KdsInvoiceMerchant/useLogoBackdrop.ts
|
|
2593
|
-
import { useEffect as
|
|
3295
|
+
import { useEffect as useEffect7, useState as useState10 } from "react";
|
|
2594
3296
|
|
|
2595
3297
|
// src/components/domain/KdsInvoiceMerchant/logoLuminance.ts
|
|
2596
3298
|
var LIGHT_LOGO_LUMINANCE_THRESHOLD = 0.72;
|
|
@@ -2639,8 +3341,8 @@ function pickLogoBackdrop(luminance) {
|
|
|
2639
3341
|
|
|
2640
3342
|
// src/components/domain/KdsInvoiceMerchant/useLogoBackdrop.ts
|
|
2641
3343
|
function useLogoBackdrop(logoUrl) {
|
|
2642
|
-
const [backdrop, setBackdrop] =
|
|
2643
|
-
|
|
3344
|
+
const [backdrop, setBackdrop] = useState10("light");
|
|
3345
|
+
useEffect7(() => {
|
|
2644
3346
|
let cancelled = false;
|
|
2645
3347
|
setBackdrop("light");
|
|
2646
3348
|
if (!logoUrl) {
|
|
@@ -2659,13 +3361,13 @@ function useLogoBackdrop(logoUrl) {
|
|
|
2659
3361
|
}
|
|
2660
3362
|
|
|
2661
3363
|
// src/components/domain/KdsInvoiceMerchant/KdsInvoiceMerchant.tsx
|
|
2662
|
-
import { jsx as
|
|
2663
|
-
var KdsInvoiceMerchant =
|
|
3364
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
3365
|
+
var KdsInvoiceMerchant = forwardRef51(
|
|
2664
3366
|
({ logoUrl, brandColor, className, style, ...props }, ref) => {
|
|
2665
|
-
const [failed, setFailed] =
|
|
3367
|
+
const [failed, setFailed] = useState11(false);
|
|
2666
3368
|
const showLogo = !!logoUrl && !failed;
|
|
2667
3369
|
const backdrop = useLogoBackdrop(showLogo ? logoUrl : void 0);
|
|
2668
|
-
return /* @__PURE__ */
|
|
3370
|
+
return /* @__PURE__ */ jsx53(
|
|
2669
3371
|
"div",
|
|
2670
3372
|
{
|
|
2671
3373
|
ref,
|
|
@@ -2678,7 +3380,7 @@ var KdsInvoiceMerchant = forwardRef42(
|
|
|
2678
3380
|
"aria-hidden": "true",
|
|
2679
3381
|
style: !showLogo && brandColor ? { background: brandColor, ...style } : style,
|
|
2680
3382
|
...props,
|
|
2681
|
-
children: showLogo ? /* @__PURE__ */
|
|
3383
|
+
children: showLogo ? /* @__PURE__ */ jsx53("img", { src: logoUrl, alt: "", onError: () => setFailed(true) }) : /* @__PURE__ */ jsx53("i", { className: "material-symbols-outlined", children: "storefront" })
|
|
2682
3384
|
}
|
|
2683
3385
|
);
|
|
2684
3386
|
}
|
|
@@ -2686,9 +3388,9 @@ var KdsInvoiceMerchant = forwardRef42(
|
|
|
2686
3388
|
KdsInvoiceMerchant.displayName = "KdsInvoiceMerchant";
|
|
2687
3389
|
|
|
2688
3390
|
// src/components/domain/KdsPaymentTotal/KdsPaymentTotal.tsx
|
|
2689
|
-
import { forwardRef as
|
|
2690
|
-
import { jsx as
|
|
2691
|
-
var KdsPaymentTotal =
|
|
3391
|
+
import { forwardRef as forwardRef52 } from "react";
|
|
3392
|
+
import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
3393
|
+
var KdsPaymentTotal = forwardRef52(
|
|
2692
3394
|
({
|
|
2693
3395
|
variant = "default",
|
|
2694
3396
|
tone = "brand",
|
|
@@ -2706,7 +3408,7 @@ var KdsPaymentTotal = forwardRef43(
|
|
|
2706
3408
|
const { integer, fraction } = formatAmount(amount, decimals, locale);
|
|
2707
3409
|
const isEmail = variant === "email";
|
|
2708
3410
|
const isInfoTone = tone === "info";
|
|
2709
|
-
return /* @__PURE__ */
|
|
3411
|
+
return /* @__PURE__ */ jsxs41(
|
|
2710
3412
|
"div",
|
|
2711
3413
|
{
|
|
2712
3414
|
ref,
|
|
@@ -2719,14 +3421,14 @@ var KdsPaymentTotal = forwardRef43(
|
|
|
2719
3421
|
),
|
|
2720
3422
|
...props,
|
|
2721
3423
|
children: [
|
|
2722
|
-
!isEmail && title != null && /* @__PURE__ */
|
|
2723
|
-
!isEmail && titleMobile != null && /* @__PURE__ */
|
|
2724
|
-
label != null && /* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
3424
|
+
!isEmail && title != null && /* @__PURE__ */ jsx54("h5", { className: "kds-payment-total-title", children: title }),
|
|
3425
|
+
!isEmail && titleMobile != null && /* @__PURE__ */ jsx54("h5", { className: "kds-payment-total-title-mobile", children: titleMobile }),
|
|
3426
|
+
label != null && /* @__PURE__ */ jsx54("h6", { className: "kds-payment-label", children: label }),
|
|
3427
|
+
/* @__PURE__ */ jsxs41("h5", { className: "kds-payment-amount", children: [
|
|
2726
3428
|
currency,
|
|
2727
3429
|
" ",
|
|
2728
3430
|
integer,
|
|
2729
|
-
fraction !== null && /* @__PURE__ */
|
|
3431
|
+
fraction !== null && /* @__PURE__ */ jsx54("sup", { className: "kds-payment-total-decimal-sup", children: fraction })
|
|
2730
3432
|
] })
|
|
2731
3433
|
]
|
|
2732
3434
|
}
|
|
@@ -2762,10 +3464,10 @@ function formatAmount(amount, decimals, locale) {
|
|
|
2762
3464
|
}
|
|
2763
3465
|
|
|
2764
3466
|
// src/components/domain/KdsBillAttachment/KdsBillAttachment.tsx
|
|
2765
|
-
import { forwardRef as
|
|
2766
|
-
import { jsx as
|
|
2767
|
-
var KdsBillAttachment =
|
|
2768
|
-
({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */
|
|
3467
|
+
import { forwardRef as forwardRef53 } from "react";
|
|
3468
|
+
import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
3469
|
+
var KdsBillAttachment = forwardRef53(
|
|
3470
|
+
({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */ jsxs42(
|
|
2769
3471
|
"a",
|
|
2770
3472
|
{
|
|
2771
3473
|
ref,
|
|
@@ -2775,15 +3477,15 @@ var KdsBillAttachment = forwardRef44(
|
|
|
2775
3477
|
className: clsx("kds-bill-attachment", className),
|
|
2776
3478
|
...props,
|
|
2777
3479
|
children: [
|
|
2778
|
-
/* @__PURE__ */
|
|
2779
|
-
/* @__PURE__ */
|
|
3480
|
+
/* @__PURE__ */ jsx55("i", { className: "material-symbols-outlined", children: icon }),
|
|
3481
|
+
/* @__PURE__ */ jsx55("span", { children: filename })
|
|
2780
3482
|
]
|
|
2781
3483
|
}
|
|
2782
3484
|
)
|
|
2783
3485
|
);
|
|
2784
3486
|
KdsBillAttachment.displayName = "KdsBillAttachment";
|
|
2785
|
-
var KdsBillAttachments =
|
|
2786
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
3487
|
+
var KdsBillAttachments = forwardRef53(
|
|
3488
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx55("div", { ref, className: clsx("kds-bill-attachments", className), ...props, children })
|
|
2787
3489
|
);
|
|
2788
3490
|
KdsBillAttachments.displayName = "KdsBillAttachments";
|
|
2789
3491
|
|
|
@@ -2882,12 +3584,12 @@ var guideToFirstInvalidFieldOnBlur = (form) => {
|
|
|
2882
3584
|
};
|
|
2883
3585
|
|
|
2884
3586
|
// src/components/core/hooks/useStickyInvoiceCollapse.ts
|
|
2885
|
-
import { useEffect as
|
|
3587
|
+
import { useEffect as useEffect8, useRef as useRef7 } from "react";
|
|
2886
3588
|
function useStickyInvoiceCollapse(options = {}) {
|
|
2887
3589
|
const { onCollapseStart, collapseEnd = 20, mobileBreakpoint = 768 } = options;
|
|
2888
|
-
const onCollapseStartRef =
|
|
3590
|
+
const onCollapseStartRef = useRef7(onCollapseStart);
|
|
2889
3591
|
onCollapseStartRef.current = onCollapseStart;
|
|
2890
|
-
|
|
3592
|
+
useEffect8(() => {
|
|
2891
3593
|
let viewportOffset = 0;
|
|
2892
3594
|
let ticking = false;
|
|
2893
3595
|
let wasCollapsing = false;
|
|
@@ -2960,16 +3662,16 @@ function useStickyInvoiceCollapse(options = {}) {
|
|
|
2960
3662
|
}
|
|
2961
3663
|
|
|
2962
3664
|
// src/components/core/hooks/useExpandToggle.ts
|
|
2963
|
-
import { useCallback as
|
|
3665
|
+
import { useCallback as useCallback5, useId as useId7, useLayoutEffect, useRef as useRef8, useState as useState12 } from "react";
|
|
2964
3666
|
function useExpandToggle(options = {}) {
|
|
2965
3667
|
const { defaultOpen = false, open: controlledOpen, onOpenChange, id } = options;
|
|
2966
|
-
const generatedId =
|
|
3668
|
+
const generatedId = useId7();
|
|
2967
3669
|
const panelId = id ?? `kds-expand-${generatedId}`;
|
|
2968
3670
|
const isControlled = controlledOpen !== void 0;
|
|
2969
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
3671
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState12(defaultOpen);
|
|
2970
3672
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
2971
|
-
const panelRef =
|
|
2972
|
-
const setPanelRef =
|
|
3673
|
+
const panelRef = useRef8(null);
|
|
3674
|
+
const setPanelRef = useCallback5((node) => {
|
|
2973
3675
|
panelRef.current = node;
|
|
2974
3676
|
}, []);
|
|
2975
3677
|
useLayoutEffect(() => {
|
|
@@ -2977,7 +3679,7 @@ function useExpandToggle(options = {}) {
|
|
|
2977
3679
|
if (!panel) return;
|
|
2978
3680
|
panel.style.maxHeight = open ? `${panel.scrollHeight}px` : "";
|
|
2979
3681
|
}, [open]);
|
|
2980
|
-
const setOpen =
|
|
3682
|
+
const setOpen = useCallback5(
|
|
2981
3683
|
(next) => {
|
|
2982
3684
|
if (!isControlled) {
|
|
2983
3685
|
setUncontrolledOpen(next);
|
|
@@ -2986,8 +3688,8 @@ function useExpandToggle(options = {}) {
|
|
|
2986
3688
|
},
|
|
2987
3689
|
[isControlled, onOpenChange]
|
|
2988
3690
|
);
|
|
2989
|
-
const toggle =
|
|
2990
|
-
const getToggleProps =
|
|
3691
|
+
const toggle = useCallback5(() => setOpen(!open), [open, setOpen]);
|
|
3692
|
+
const getToggleProps = useCallback5(
|
|
2991
3693
|
() => ({
|
|
2992
3694
|
type: "button",
|
|
2993
3695
|
"aria-expanded": open,
|
|
@@ -2996,11 +3698,10 @@ function useExpandToggle(options = {}) {
|
|
|
2996
3698
|
}),
|
|
2997
3699
|
[open, panelId, toggle]
|
|
2998
3700
|
);
|
|
2999
|
-
const getPanelProps =
|
|
3701
|
+
const getPanelProps = useCallback5(
|
|
3000
3702
|
(baseClassName = "kds-expand-panel") => ({
|
|
3001
3703
|
id: panelId,
|
|
3002
3704
|
className: open ? `${baseClassName} open` : baseClassName,
|
|
3003
|
-
hidden: !open,
|
|
3004
3705
|
ref: setPanelRef
|
|
3005
3706
|
}),
|
|
3006
3707
|
[open, panelId, setPanelRef]
|
|
@@ -3009,11 +3710,11 @@ function useExpandToggle(options = {}) {
|
|
|
3009
3710
|
}
|
|
3010
3711
|
|
|
3011
3712
|
// src/components/core/hooks/useHideOnScroll.ts
|
|
3012
|
-
import { useEffect as
|
|
3713
|
+
import { useEffect as useEffect9, useState as useState13 } from "react";
|
|
3013
3714
|
function useHideOnScroll(options = {}) {
|
|
3014
3715
|
const { threshold = 8, topOffset = 0 } = options;
|
|
3015
|
-
const [hidden, setHidden] =
|
|
3016
|
-
|
|
3716
|
+
const [hidden, setHidden] = useState13(false);
|
|
3717
|
+
useEffect9(() => {
|
|
3017
3718
|
let viewportOffset = 0;
|
|
3018
3719
|
let lastY = 0;
|
|
3019
3720
|
let ticking = false;
|
|
@@ -3056,12 +3757,12 @@ function useHideOnScroll(options = {}) {
|
|
|
3056
3757
|
}
|
|
3057
3758
|
|
|
3058
3759
|
// src/components/core/hooks/useMediaQuery.ts
|
|
3059
|
-
import { useEffect as
|
|
3760
|
+
import { useEffect as useEffect10, useState as useState14 } from "react";
|
|
3060
3761
|
function useMediaQuery(query) {
|
|
3061
|
-
const [matches, setMatches] =
|
|
3762
|
+
const [matches, setMatches] = useState14(
|
|
3062
3763
|
() => typeof window !== "undefined" ? window.matchMedia(query).matches : false
|
|
3063
3764
|
);
|
|
3064
|
-
|
|
3765
|
+
useEffect10(() => {
|
|
3065
3766
|
if (typeof window === "undefined") return;
|
|
3066
3767
|
const mql = window.matchMedia(query);
|
|
3067
3768
|
setMatches(mql.matches);
|
|
@@ -3072,6 +3773,7 @@ function useMediaQuery(query) {
|
|
|
3072
3773
|
return matches;
|
|
3073
3774
|
}
|
|
3074
3775
|
export {
|
|
3776
|
+
KDS_VERSION,
|
|
3075
3777
|
KdsAccordion,
|
|
3076
3778
|
KdsAccordionDetails,
|
|
3077
3779
|
KdsAccordionSummary,
|
|
@@ -3088,23 +3790,33 @@ export {
|
|
|
3088
3790
|
KdsCardFooter,
|
|
3089
3791
|
KdsCardHeader,
|
|
3090
3792
|
KdsCardPlan,
|
|
3793
|
+
KdsCardPlanGroup,
|
|
3091
3794
|
KdsCardSelector,
|
|
3795
|
+
KdsCardSelectorGroup,
|
|
3092
3796
|
KdsCheckbox,
|
|
3093
3797
|
KdsChip,
|
|
3798
|
+
KdsConsentCard,
|
|
3799
|
+
KdsContract,
|
|
3094
3800
|
KdsCopyButton,
|
|
3095
3801
|
KdsCopyRow,
|
|
3096
3802
|
KdsCopyableTable,
|
|
3097
3803
|
KdsCountdown,
|
|
3098
3804
|
KdsDivider,
|
|
3805
|
+
KdsDocumentFrame,
|
|
3099
3806
|
KdsEmptyState,
|
|
3100
3807
|
KdsExpandPanel,
|
|
3101
3808
|
KdsFab,
|
|
3809
|
+
KdsFeedbackCard,
|
|
3810
|
+
KdsFooter,
|
|
3811
|
+
KdsInvoiceHeaderSkeleton,
|
|
3102
3812
|
KdsInvoiceMerchant,
|
|
3103
3813
|
KdsInvoiceSticky,
|
|
3104
3814
|
KdsLinearProgress,
|
|
3105
3815
|
KdsMerchantTile,
|
|
3106
3816
|
KdsMontoRow,
|
|
3817
|
+
KdsNavbar,
|
|
3107
3818
|
KdsPaymentTotal,
|
|
3819
|
+
KdsProgressChecklist,
|
|
3108
3820
|
KdsQrRow,
|
|
3109
3821
|
KdsRadioGroup,
|
|
3110
3822
|
KdsRecapList,
|
|
@@ -3114,6 +3826,7 @@ export {
|
|
|
3114
3826
|
KdsSecureLoader,
|
|
3115
3827
|
KdsSegmentedTabs,
|
|
3116
3828
|
KdsSelect,
|
|
3829
|
+
KdsSidebar,
|
|
3117
3830
|
KdsSnackbar,
|
|
3118
3831
|
KdsSpinner,
|
|
3119
3832
|
KdsStatusBlock,
|