@khipu/design-system 0.3.5-alpha.3 → 0.3.5-alpha.31
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 +426 -43
- package/dist/beercss/khipu-beercss.js +5 -61
- 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 +425 -43
- package/dist/beercss/khipu-beercss.scoped.min.css +1 -1
- package/dist/beercss/metadata.json +5 -5
- package/dist/index.d.mts +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +339 -321
- package/dist/index.mjs +285 -270
- 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.31";
|
|
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
|
|
@@ -1520,7 +1466,7 @@ var KdsTypography = forwardRef11(
|
|
|
1520
1466
|
KdsTypography.displayName = "KdsTypography";
|
|
1521
1467
|
|
|
1522
1468
|
// src/components/core/KdsTabs/KdsTabs.tsx
|
|
1523
|
-
import
|
|
1469
|
+
import React12, { forwardRef as forwardRef12, Children, useMemo } from "react";
|
|
1524
1470
|
|
|
1525
1471
|
// src/components/core/hooks/useTabsKeyboard.ts
|
|
1526
1472
|
import { useCallback as useCallback2 } from "react";
|
|
@@ -1568,8 +1514,8 @@ var KdsTabs = forwardRef12(
|
|
|
1568
1514
|
onKeyDown,
|
|
1569
1515
|
...props,
|
|
1570
1516
|
children: Children.map(children, (child, i) => {
|
|
1571
|
-
if (!
|
|
1572
|
-
return
|
|
1517
|
+
if (!React12.isValidElement(child)) return child;
|
|
1518
|
+
return React12.cloneElement(child, {
|
|
1573
1519
|
_active: i === activeIndex,
|
|
1574
1520
|
_onClick: () => onChange(i)
|
|
1575
1521
|
});
|
|
@@ -1730,12 +1676,12 @@ KdsChip.displayName = "KdsChip";
|
|
|
1730
1676
|
import { forwardRef as forwardRef16 } from "react";
|
|
1731
1677
|
|
|
1732
1678
|
// src/components/core/hooks/useAutoHide.ts
|
|
1733
|
-
import { useState as useState3, useEffect
|
|
1679
|
+
import { useState as useState3, useEffect, useRef } from "react";
|
|
1734
1680
|
function useAutoHide(durationMs, onHide) {
|
|
1735
1681
|
const [visible, setVisible] = useState3(true);
|
|
1736
1682
|
const onHideRef = useRef(onHide);
|
|
1737
1683
|
onHideRef.current = onHide;
|
|
1738
|
-
|
|
1684
|
+
useEffect(() => {
|
|
1739
1685
|
if (durationMs <= 0) return;
|
|
1740
1686
|
const timer = setTimeout(() => {
|
|
1741
1687
|
setVisible(false);
|
|
@@ -1857,42 +1803,78 @@ var KdsDivider = forwardRef18(
|
|
|
1857
1803
|
);
|
|
1858
1804
|
KdsDivider.displayName = "KdsDivider";
|
|
1859
1805
|
|
|
1860
|
-
// src/components/core/
|
|
1806
|
+
// src/components/core/KdsDocumentFrame/KdsDocumentFrame.tsx
|
|
1861
1807
|
import { forwardRef as forwardRef19 } from "react";
|
|
1862
|
-
import { jsx as jsx21
|
|
1863
|
-
var
|
|
1808
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1809
|
+
var KdsDocumentFrame = forwardRef19(
|
|
1810
|
+
({ src, title, scale = 1, className, style, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1811
|
+
"div",
|
|
1812
|
+
{
|
|
1813
|
+
ref,
|
|
1814
|
+
className: clsx("kds-document-frame", className),
|
|
1815
|
+
style: { "--kds-document-frame-scale": scale, ...style },
|
|
1816
|
+
...props,
|
|
1817
|
+
children: /* @__PURE__ */ jsx21("iframe", { src, title })
|
|
1818
|
+
}
|
|
1819
|
+
)
|
|
1820
|
+
);
|
|
1821
|
+
KdsDocumentFrame.displayName = "KdsDocumentFrame";
|
|
1822
|
+
|
|
1823
|
+
// src/components/core/KdsSectionNote/KdsSectionNote.tsx
|
|
1824
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
1825
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1826
|
+
var KdsSectionNote = forwardRef20(
|
|
1864
1827
|
({ icon = "info", children, className, ...props }, ref) => /* @__PURE__ */ jsxs15("p", { ref, className: clsx("kds-section-note", className), ...props, children: [
|
|
1865
|
-
/* @__PURE__ */
|
|
1866
|
-
/* @__PURE__ */
|
|
1828
|
+
/* @__PURE__ */ jsx22("i", { className: "material-symbols-outlined", children: icon }),
|
|
1829
|
+
/* @__PURE__ */ jsx22("span", { children })
|
|
1867
1830
|
] })
|
|
1868
1831
|
);
|
|
1869
1832
|
KdsSectionNote.displayName = "KdsSectionNote";
|
|
1870
1833
|
|
|
1871
1834
|
// 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
|
-
|
|
1835
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
1836
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1837
|
+
var KdsStatusBlock = forwardRef21(
|
|
1838
|
+
({ status, icon, title, description, inline, className, ...props }, ref) => {
|
|
1839
|
+
const descriptionBelowRow = Boolean(inline && description);
|
|
1840
|
+
const descriptionNode = description ? /* @__PURE__ */ jsx23("p", { className: "kds-status-block-description", children: description }) : null;
|
|
1841
|
+
return /* @__PURE__ */ jsxs16(
|
|
1842
|
+
"div",
|
|
1843
|
+
{
|
|
1844
|
+
ref,
|
|
1845
|
+
className: clsx(
|
|
1846
|
+
"kds-status-block",
|
|
1847
|
+
inline && "inline",
|
|
1848
|
+
descriptionBelowRow && "kds-status-block--described",
|
|
1849
|
+
className
|
|
1850
|
+
),
|
|
1851
|
+
"data-status": status,
|
|
1852
|
+
...props,
|
|
1853
|
+
children: [
|
|
1854
|
+
/* @__PURE__ */ jsx23("div", { className: "kds-status-block-icon", children: icon && /* @__PURE__ */ jsx23("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
1855
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1856
|
+
/* @__PURE__ */ jsx23("h2", { className: "kds-status-block-title", children: title }),
|
|
1857
|
+
!descriptionBelowRow && descriptionNode
|
|
1858
|
+
] }),
|
|
1859
|
+
descriptionBelowRow && descriptionNode
|
|
1860
|
+
]
|
|
1861
|
+
}
|
|
1862
|
+
);
|
|
1863
|
+
}
|
|
1882
1864
|
);
|
|
1883
1865
|
KdsStatusBlock.displayName = "KdsStatusBlock";
|
|
1884
1866
|
|
|
1885
1867
|
// src/components/core/KdsStepper/KdsStepper.tsx
|
|
1886
|
-
import { forwardRef as
|
|
1887
|
-
import { jsx as
|
|
1888
|
-
var KdsStepper =
|
|
1889
|
-
({ steps, current, className, ...props }, ref) => /* @__PURE__ */
|
|
1868
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1869
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1870
|
+
var KdsStepper = forwardRef22(
|
|
1871
|
+
({ steps, current, className, ...props }, ref) => /* @__PURE__ */ jsx24("div", { ref, className: clsx("kds-stepper", className), ...props, children: steps.map((label, i) => /* @__PURE__ */ jsxs17(
|
|
1890
1872
|
"div",
|
|
1891
1873
|
{
|
|
1892
1874
|
className: clsx("kds-step", i < current && "completed", i === current && "current"),
|
|
1893
1875
|
children: [
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1876
|
+
/* @__PURE__ */ jsx24("div", { className: "kds-step-indicator" }),
|
|
1877
|
+
/* @__PURE__ */ jsx24("div", { className: "kds-step-label", children: label })
|
|
1896
1878
|
]
|
|
1897
1879
|
},
|
|
1898
1880
|
`${i}-${label}`
|
|
@@ -1901,9 +1883,9 @@ var KdsStepper = forwardRef21(
|
|
|
1901
1883
|
KdsStepper.displayName = "KdsStepper";
|
|
1902
1884
|
|
|
1903
1885
|
// src/components/core/KdsCopyRow/KdsCopyRow.tsx
|
|
1904
|
-
import { forwardRef as
|
|
1905
|
-
import { jsx as
|
|
1906
|
-
var KdsCopyRow =
|
|
1886
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
1887
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1888
|
+
var KdsCopyRow = forwardRef23(
|
|
1907
1889
|
({ label, value, copiedText = "Copiado", className, ...props }, ref) => {
|
|
1908
1890
|
const { copied, copy } = useCopyToClipboard();
|
|
1909
1891
|
return /* @__PURE__ */ jsxs18(
|
|
@@ -1917,13 +1899,13 @@ var KdsCopyRow = forwardRef22(
|
|
|
1917
1899
|
"aria-label": `Copiar ${label}: ${value}`,
|
|
1918
1900
|
...props,
|
|
1919
1901
|
children: [
|
|
1920
|
-
/* @__PURE__ */
|
|
1902
|
+
/* @__PURE__ */ jsx25("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: "content_copy" }),
|
|
1921
1903
|
/* @__PURE__ */ jsxs18("div", { children: [
|
|
1922
|
-
/* @__PURE__ */
|
|
1923
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ jsx25("span", { className: "kds-copy-row-label", children: label }),
|
|
1905
|
+
/* @__PURE__ */ jsx25("span", { className: "kds-copy-row-value", children: value })
|
|
1924
1906
|
] }),
|
|
1925
1907
|
/* @__PURE__ */ jsxs18("span", { className: "kds-copy-toast", "aria-hidden": "true", children: [
|
|
1926
|
-
/* @__PURE__ */
|
|
1908
|
+
/* @__PURE__ */ jsx25("i", { className: "material-symbols-outlined", children: "check_circle" }),
|
|
1927
1909
|
" ",
|
|
1928
1910
|
copiedText
|
|
1929
1911
|
] })
|
|
@@ -1935,8 +1917,8 @@ var KdsCopyRow = forwardRef22(
|
|
|
1935
1917
|
KdsCopyRow.displayName = "KdsCopyRow";
|
|
1936
1918
|
|
|
1937
1919
|
// src/components/core/KdsCopyableTable/KdsCopyableTable.tsx
|
|
1938
|
-
import { forwardRef as
|
|
1939
|
-
import { Fragment as Fragment2, jsx as
|
|
1920
|
+
import { forwardRef as forwardRef24, useState as useState4, useRef as useRef2, useCallback as useCallback3 } from "react";
|
|
1921
|
+
import { Fragment as Fragment2, jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1940
1922
|
async function copyToClipboard(text) {
|
|
1941
1923
|
try {
|
|
1942
1924
|
if (navigator.clipboard?.writeText) {
|
|
@@ -1968,18 +1950,18 @@ function GridVariant({
|
|
|
1968
1950
|
forwardedRef,
|
|
1969
1951
|
rest
|
|
1970
1952
|
}) {
|
|
1971
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ jsx26(
|
|
1972
1954
|
"div",
|
|
1973
1955
|
{
|
|
1974
1956
|
ref: forwardedRef,
|
|
1975
1957
|
className: clsx("kds-copyable-table", "kds-copyable-table--grid", className),
|
|
1976
1958
|
...rest,
|
|
1977
|
-
children: gridRows.map((cells, rowIndex) => /* @__PURE__ */
|
|
1959
|
+
children: gridRows.map((cells, rowIndex) => /* @__PURE__ */ jsx26(
|
|
1978
1960
|
"div",
|
|
1979
1961
|
{
|
|
1980
1962
|
className: "kds-copyable-table-row kds-copyable-table-row--grid",
|
|
1981
1963
|
"data-testid": "kds-grid-row",
|
|
1982
|
-
children: cells.map((text, cellIndex) => /* @__PURE__ */
|
|
1964
|
+
children: cells.map((text, cellIndex) => /* @__PURE__ */ jsx26(
|
|
1983
1965
|
"span",
|
|
1984
1966
|
{
|
|
1985
1967
|
className: clsx("kds-grid-cell", disabled && "kds-grid-cell--disabled"),
|
|
@@ -2067,7 +2049,7 @@ function CopyableVariant({
|
|
|
2067
2049
|
}
|
|
2068
2050
|
};
|
|
2069
2051
|
return /* @__PURE__ */ jsxs19(Fragment2, { children: [
|
|
2070
|
-
/* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ jsx26("div", { ref: forwardedRef, className: clsx("kds-copyable-table", className), ...rest, children: rows.map((row, i) => /* @__PURE__ */ jsxs19(
|
|
2071
2053
|
"div",
|
|
2072
2054
|
{
|
|
2073
2055
|
className: clsx(
|
|
@@ -2086,8 +2068,8 @@ function CopyableVariant({
|
|
|
2086
2068
|
},
|
|
2087
2069
|
"aria-label": `Copiar ${row.label}: ${row.value}`,
|
|
2088
2070
|
children: [
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ jsx26("span", { className: "kds-key", children: row.label }),
|
|
2072
|
+
/* @__PURE__ */ jsx26("span", { className: "kds-value", children: row.value })
|
|
2091
2073
|
]
|
|
2092
2074
|
},
|
|
2093
2075
|
`${row.label}-${i}`
|
|
@@ -2106,14 +2088,14 @@ function CopyableVariant({
|
|
|
2106
2088
|
onClick: handleCopyAll,
|
|
2107
2089
|
"aria-label": allCopied ? copiedAllLabel : copyAllLabel,
|
|
2108
2090
|
children: [
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
/* @__PURE__ */
|
|
2091
|
+
/* @__PURE__ */ jsx26("span", { className: "kds-icon", children: /* @__PURE__ */ jsx26("i", { className: "material-symbols-outlined", children: allCopied ? "check" : "content_copy" }) }),
|
|
2092
|
+
/* @__PURE__ */ jsx26("span", { children: allCopied ? copiedAllLabel : copyAllLabel })
|
|
2111
2093
|
]
|
|
2112
2094
|
}
|
|
2113
2095
|
)
|
|
2114
2096
|
] });
|
|
2115
2097
|
}
|
|
2116
|
-
var KdsCopyableTable =
|
|
2098
|
+
var KdsCopyableTable = forwardRef24(
|
|
2117
2099
|
({
|
|
2118
2100
|
rows = [],
|
|
2119
2101
|
variant = "copyable",
|
|
@@ -2126,7 +2108,7 @@ var KdsCopyableTable = forwardRef23(
|
|
|
2126
2108
|
...props
|
|
2127
2109
|
}, ref) => {
|
|
2128
2110
|
if (variant === "grid") {
|
|
2129
|
-
return /* @__PURE__ */
|
|
2111
|
+
return /* @__PURE__ */ jsx26(
|
|
2130
2112
|
GridVariant,
|
|
2131
2113
|
{
|
|
2132
2114
|
gridRows,
|
|
@@ -2137,7 +2119,7 @@ var KdsCopyableTable = forwardRef23(
|
|
|
2137
2119
|
}
|
|
2138
2120
|
);
|
|
2139
2121
|
}
|
|
2140
|
-
return /* @__PURE__ */
|
|
2122
|
+
return /* @__PURE__ */ jsx26(
|
|
2141
2123
|
CopyableVariant,
|
|
2142
2124
|
{
|
|
2143
2125
|
rows,
|
|
@@ -2154,9 +2136,9 @@ var KdsCopyableTable = forwardRef23(
|
|
|
2154
2136
|
KdsCopyableTable.displayName = "KdsCopyableTable";
|
|
2155
2137
|
|
|
2156
2138
|
// src/components/core/KdsExpandPanel/KdsExpandPanel.tsx
|
|
2157
|
-
import { forwardRef as
|
|
2158
|
-
import { jsx as
|
|
2159
|
-
var KdsExpandPanel =
|
|
2139
|
+
import { forwardRef as forwardRef25, useState as useState5 } from "react";
|
|
2140
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2141
|
+
var KdsExpandPanel = forwardRef25(
|
|
2160
2142
|
({ label, defaultExpanded = false, children, className, ...props }, ref) => {
|
|
2161
2143
|
const [expanded, setExpanded] = useState5(defaultExpanded);
|
|
2162
2144
|
return /* @__PURE__ */ jsxs20("div", { ref, className, ...props, children: [
|
|
@@ -2167,22 +2149,22 @@ var KdsExpandPanel = forwardRef24(
|
|
|
2167
2149
|
onClick: () => setExpanded((v) => !v),
|
|
2168
2150
|
"aria-expanded": expanded,
|
|
2169
2151
|
children: [
|
|
2170
|
-
/* @__PURE__ */
|
|
2171
|
-
/* @__PURE__ */
|
|
2152
|
+
/* @__PURE__ */ jsx27("span", { children: label }),
|
|
2153
|
+
/* @__PURE__ */ jsx27("i", { className: "material-symbols-outlined", children: expanded ? "expand_less" : "expand_more" })
|
|
2172
2154
|
]
|
|
2173
2155
|
}
|
|
2174
2156
|
),
|
|
2175
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ jsx27("div", { className: clsx("kds-expand-panel", expanded && "open"), hidden: !expanded, children })
|
|
2176
2158
|
] });
|
|
2177
2159
|
}
|
|
2178
2160
|
);
|
|
2179
2161
|
KdsExpandPanel.displayName = "KdsExpandPanel";
|
|
2180
2162
|
|
|
2181
2163
|
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
2182
|
-
import { forwardRef as
|
|
2164
|
+
import { forwardRef as forwardRef26, useEffect as useEffect3, useRef as useRef3 } from "react";
|
|
2183
2165
|
|
|
2184
2166
|
// src/components/core/hooks/useCountdown.ts
|
|
2185
|
-
import { useState as useState6, useEffect as
|
|
2167
|
+
import { useState as useState6, useEffect as useEffect2 } from "react";
|
|
2186
2168
|
function calcRemaining(deadline) {
|
|
2187
2169
|
const diff = Math.max(0, new Date(deadline).getTime() - Date.now());
|
|
2188
2170
|
const totalSeconds = Math.floor(diff / 1e3);
|
|
@@ -2196,7 +2178,7 @@ function calcRemaining(deadline) {
|
|
|
2196
2178
|
}
|
|
2197
2179
|
function useCountdown(deadline) {
|
|
2198
2180
|
const [state, setState] = useState6(() => calcRemaining(deadline));
|
|
2199
|
-
|
|
2181
|
+
useEffect2(() => {
|
|
2200
2182
|
const tick = () => setState(calcRemaining(deadline));
|
|
2201
2183
|
const id = setInterval(tick, 1e3);
|
|
2202
2184
|
return () => clearInterval(id);
|
|
@@ -2205,13 +2187,13 @@ function useCountdown(deadline) {
|
|
|
2205
2187
|
}
|
|
2206
2188
|
|
|
2207
2189
|
// src/components/core/KdsCountdown/KdsCountdown.tsx
|
|
2208
|
-
import { jsx as
|
|
2209
|
-
var KdsCountdown =
|
|
2190
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2191
|
+
var KdsCountdown = forwardRef26(
|
|
2210
2192
|
({ deadline, label, onExpire, className, ...props }, ref) => {
|
|
2211
2193
|
const { hours, minutes, seconds, expired, urgent } = useCountdown(deadline);
|
|
2212
2194
|
const onExpireRef = useRef3(onExpire);
|
|
2213
2195
|
onExpireRef.current = onExpire;
|
|
2214
|
-
|
|
2196
|
+
useEffect3(() => {
|
|
2215
2197
|
if (expired) {
|
|
2216
2198
|
onExpireRef.current?.();
|
|
2217
2199
|
}
|
|
@@ -2221,7 +2203,7 @@ var KdsCountdown = forwardRef25(
|
|
|
2221
2203
|
}
|
|
2222
2204
|
const pad = (n) => String(n).padStart(2, "0");
|
|
2223
2205
|
return /* @__PURE__ */ jsxs21("div", { ref, className: clsx("kds-countdown", urgent && "urgent", className), ...props, children: [
|
|
2224
|
-
label && /* @__PURE__ */
|
|
2206
|
+
label && /* @__PURE__ */ jsx28("span", { className: "kds-countdown-label", children: label }),
|
|
2225
2207
|
/* @__PURE__ */ jsxs21("span", { className: "kds-countdown-value", children: [
|
|
2226
2208
|
pad(hours),
|
|
2227
2209
|
":",
|
|
@@ -2235,18 +2217,18 @@ var KdsCountdown = forwardRef25(
|
|
|
2235
2217
|
KdsCountdown.displayName = "KdsCountdown";
|
|
2236
2218
|
|
|
2237
2219
|
// src/components/core/KdsSegmentedTabs/KdsSegmentedTabs.tsx
|
|
2238
|
-
import { forwardRef as
|
|
2239
|
-
import { jsx as
|
|
2240
|
-
var KdsSegmentedTabs =
|
|
2241
|
-
(props, ref) => /* @__PURE__ */
|
|
2220
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
2221
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2222
|
+
var KdsSegmentedTabs = forwardRef27(
|
|
2223
|
+
(props, ref) => /* @__PURE__ */ jsx29(KdsTabs, { ref, ...props })
|
|
2242
2224
|
);
|
|
2243
2225
|
KdsSegmentedTabs.displayName = "KdsSegmentedTabs";
|
|
2244
2226
|
|
|
2245
2227
|
// 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__ */
|
|
2228
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
2229
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2230
|
+
var KdsFab = forwardRef28(
|
|
2231
|
+
({ icon, position = "top-right", hidden = false, className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
2250
2232
|
"button",
|
|
2251
2233
|
{
|
|
2252
2234
|
ref,
|
|
@@ -2260,16 +2242,16 @@ var KdsFab = forwardRef27(
|
|
|
2260
2242
|
"aria-hidden": hidden || void 0,
|
|
2261
2243
|
tabIndex: hidden ? -1 : void 0,
|
|
2262
2244
|
...props,
|
|
2263
|
-
children: /* @__PURE__ */
|
|
2245
|
+
children: /* @__PURE__ */ jsx30("i", { className: "material-symbols-outlined", children: icon })
|
|
2264
2246
|
}
|
|
2265
2247
|
)
|
|
2266
2248
|
);
|
|
2267
2249
|
KdsFab.displayName = "KdsFab";
|
|
2268
2250
|
|
|
2269
2251
|
// src/components/core/KdsEmptyState/KdsEmptyState.tsx
|
|
2270
|
-
import { forwardRef as
|
|
2271
|
-
import { jsx as
|
|
2272
|
-
var KdsEmptyState =
|
|
2252
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
2253
|
+
import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2254
|
+
var KdsEmptyState = forwardRef29(
|
|
2273
2255
|
({ icon = "hide_source", title, description, className, ...props }, ref) => /* @__PURE__ */ jsxs22(
|
|
2274
2256
|
"div",
|
|
2275
2257
|
{
|
|
@@ -2278,10 +2260,10 @@ var KdsEmptyState = forwardRef28(
|
|
|
2278
2260
|
className: clsx("kds-empty-state", className),
|
|
2279
2261
|
...props,
|
|
2280
2262
|
children: [
|
|
2281
|
-
/* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ jsx31("i", { className: "material-symbols-outlined", "aria-hidden": "true", children: icon }),
|
|
2282
2264
|
/* @__PURE__ */ jsxs22("div", { className: "kds-empty-state-text", children: [
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
description && /* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ jsx31(KdsTypography, { variant: "body", color: "primary", children: title }),
|
|
2266
|
+
description && /* @__PURE__ */ jsx31(KdsTypography, { variant: "body", color: "secondary", children: description })
|
|
2285
2267
|
] })
|
|
2286
2268
|
]
|
|
2287
2269
|
}
|
|
@@ -2290,9 +2272,9 @@ var KdsEmptyState = forwardRef28(
|
|
|
2290
2272
|
KdsEmptyState.displayName = "KdsEmptyState";
|
|
2291
2273
|
|
|
2292
2274
|
// src/components/domain/KdsBankRow/KdsBankRow.tsx
|
|
2293
|
-
import { forwardRef as
|
|
2294
|
-
import { jsx as
|
|
2295
|
-
var KdsBankRow =
|
|
2275
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
2276
|
+
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2277
|
+
var KdsBankRow = forwardRef30(
|
|
2296
2278
|
({ name, logoUrl, selected, hideLogo, className, ...props }, ref) => {
|
|
2297
2279
|
const nameStr = typeof name === "string" ? name : "";
|
|
2298
2280
|
return /* @__PURE__ */ jsxs23(
|
|
@@ -2303,9 +2285,9 @@ var KdsBankRow = forwardRef29(
|
|
|
2303
2285
|
className: clsx("kds-bank-row", selected && "selected", className),
|
|
2304
2286
|
...props,
|
|
2305
2287
|
children: [
|
|
2306
|
-
!hideLogo && /* @__PURE__ */
|
|
2307
|
-
/* @__PURE__ */
|
|
2308
|
-
/* @__PURE__ */
|
|
2288
|
+
!hideLogo && /* @__PURE__ */ jsx32("span", { className: "kds-bank-row-logo", children: logoUrl ? /* @__PURE__ */ jsx32("img", { src: logoUrl, alt: nameStr }) : /* @__PURE__ */ jsx32("span", { className: "initials", children: nameStr.charAt(0) }) }),
|
|
2289
|
+
/* @__PURE__ */ jsx32("span", { className: "kds-bank-row-name", children: name }),
|
|
2290
|
+
/* @__PURE__ */ jsx32("i", { className: "material-symbols-outlined", children: selected ? "check_circle" : "chevron_right" })
|
|
2309
2291
|
]
|
|
2310
2292
|
}
|
|
2311
2293
|
);
|
|
@@ -2314,32 +2296,32 @@ var KdsBankRow = forwardRef29(
|
|
|
2314
2296
|
KdsBankRow.displayName = "KdsBankRow";
|
|
2315
2297
|
|
|
2316
2298
|
// src/components/domain/KdsBankList/KdsBankList.tsx
|
|
2317
|
-
import { forwardRef as
|
|
2318
|
-
import { jsx as
|
|
2319
|
-
var KdsBankList =
|
|
2320
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
2299
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
2300
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2301
|
+
var KdsBankList = forwardRef31(
|
|
2302
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx33("div", { ref, className: clsx("kds-bank-list", className), role: "list", ...props, children })
|
|
2321
2303
|
);
|
|
2322
2304
|
KdsBankList.displayName = "KdsBankList";
|
|
2323
2305
|
|
|
2324
2306
|
// src/components/domain/KdsBankModal/KdsBankModal.tsx
|
|
2325
|
-
import { forwardRef as
|
|
2307
|
+
import { forwardRef as forwardRef32, useState as useState7 } from "react";
|
|
2326
2308
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
2327
|
-
import { jsx as
|
|
2328
|
-
var KdsBankModal =
|
|
2309
|
+
import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2310
|
+
var KdsBankModal = forwardRef32(
|
|
2329
2311
|
({ open, onClose, title = "Selecciona tu banco", searchPlaceholder = "Buscar banco...", onSearch, children, className, container }, ref) => {
|
|
2330
2312
|
const [query, setQuery] = useState7("");
|
|
2331
2313
|
const handleSearch = (value) => {
|
|
2332
2314
|
setQuery(value);
|
|
2333
2315
|
onSearch?.(value);
|
|
2334
2316
|
};
|
|
2335
|
-
return /* @__PURE__ */
|
|
2317
|
+
return /* @__PURE__ */ jsx34(Dialog.Root, { open, onOpenChange: (o) => {
|
|
2336
2318
|
if (!o) onClose();
|
|
2337
|
-
}, children: /* @__PURE__ */
|
|
2319
|
+
}, children: /* @__PURE__ */ jsx34(Dialog.Portal, { container, children: /* @__PURE__ */ jsx34(Dialog.Overlay, { className: "kds-bank-modal-scrim open", children: /* @__PURE__ */ jsxs24(Dialog.Content, { ref, className: clsx("kds-bank-modal", className), children: [
|
|
2338
2320
|
/* @__PURE__ */ jsxs24("div", { className: "kds-bank-modal-header", children: [
|
|
2339
|
-
/* @__PURE__ */
|
|
2340
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ jsx34(Dialog.Title, { asChild: true, children: /* @__PURE__ */ jsx34("h3", { children: title }) }),
|
|
2322
|
+
/* @__PURE__ */ jsx34(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx34("button", { className: "kds-bank-modal-close", "aria-label": "Cerrar", children: /* @__PURE__ */ jsx34("i", { className: "material-symbols-outlined", children: "close" }) }) })
|
|
2341
2323
|
] }),
|
|
2342
|
-
/* @__PURE__ */
|
|
2324
|
+
/* @__PURE__ */ jsx34("div", { className: "kds-bank-modal-search", children: /* @__PURE__ */ jsx34(
|
|
2343
2325
|
KdsSearchField,
|
|
2344
2326
|
{
|
|
2345
2327
|
placeholder: searchPlaceholder,
|
|
@@ -2347,32 +2329,32 @@ var KdsBankModal = forwardRef31(
|
|
|
2347
2329
|
onChange: (e) => handleSearch(e.target.value)
|
|
2348
2330
|
}
|
|
2349
2331
|
) }),
|
|
2350
|
-
/* @__PURE__ */
|
|
2332
|
+
/* @__PURE__ */ jsx34("div", { className: "kds-bank-modal-body", children })
|
|
2351
2333
|
] }) }) }) });
|
|
2352
2334
|
}
|
|
2353
2335
|
);
|
|
2354
2336
|
KdsBankModal.displayName = "KdsBankModal";
|
|
2355
2337
|
|
|
2356
2338
|
// src/components/domain/KdsQrRow/KdsQrRow.tsx
|
|
2357
|
-
import { forwardRef as
|
|
2358
|
-
import { jsx as
|
|
2359
|
-
var KdsQrRow =
|
|
2339
|
+
import { forwardRef as forwardRef33 } from "react";
|
|
2340
|
+
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2341
|
+
var KdsQrRow = forwardRef33(
|
|
2360
2342
|
({ name, description, badge, icon = "qr_code_2", className, ...props }, ref) => /* @__PURE__ */ jsxs25("button", { ref, type: "button", className: clsx("kds-qr-row", className), ...props, children: [
|
|
2361
|
-
/* @__PURE__ */
|
|
2343
|
+
/* @__PURE__ */ jsx35("span", { className: "kds-qr-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx35("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2362
2344
|
/* @__PURE__ */ jsxs25("span", { className: "kds-qr-text", children: [
|
|
2363
|
-
/* @__PURE__ */
|
|
2364
|
-
description && /* @__PURE__ */
|
|
2345
|
+
/* @__PURE__ */ jsx35("span", { className: "kds-qr-title", children: name }),
|
|
2346
|
+
description && /* @__PURE__ */ jsx35("span", { className: "kds-qr-subtitle", children: description })
|
|
2365
2347
|
] }),
|
|
2366
|
-
badge && /* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
2348
|
+
badge && /* @__PURE__ */ jsx35("span", { className: "kds-qr-badge", children: badge }),
|
|
2349
|
+
/* @__PURE__ */ jsx35("i", { className: "material-symbols-outlined", children: "chevron_right" })
|
|
2368
2350
|
] })
|
|
2369
2351
|
);
|
|
2370
2352
|
KdsQrRow.displayName = "KdsQrRow";
|
|
2371
2353
|
|
|
2372
2354
|
// src/components/domain/KdsCardSelector/KdsCardSelector.tsx
|
|
2373
|
-
import { forwardRef as
|
|
2374
|
-
import { jsx as
|
|
2375
|
-
var KdsCardSelector =
|
|
2355
|
+
import { forwardRef as forwardRef34 } from "react";
|
|
2356
|
+
import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2357
|
+
var KdsCardSelector = forwardRef34(
|
|
2376
2358
|
({ icon, title, description, selected, className, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
2377
2359
|
"button",
|
|
2378
2360
|
{
|
|
@@ -2381,9 +2363,9 @@ var KdsCardSelector = forwardRef33(
|
|
|
2381
2363
|
className: clsx("kds-card-selector", selected && "selected", className),
|
|
2382
2364
|
...props,
|
|
2383
2365
|
children: [
|
|
2384
|
-
icon && /* @__PURE__ */
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
description && /* @__PURE__ */
|
|
2366
|
+
icon && /* @__PURE__ */ jsx36("span", { className: "kds-card-selector-icon", children: /* @__PURE__ */ jsx36("i", { className: "material-symbols-outlined", children: icon }) }),
|
|
2367
|
+
/* @__PURE__ */ jsx36("span", { className: "kds-card-selector-title", children: title }),
|
|
2368
|
+
description && /* @__PURE__ */ jsx36("span", { className: "kds-card-selector-description", children: description })
|
|
2387
2369
|
]
|
|
2388
2370
|
}
|
|
2389
2371
|
)
|
|
@@ -2391,9 +2373,9 @@ var KdsCardSelector = forwardRef33(
|
|
|
2391
2373
|
KdsCardSelector.displayName = "KdsCardSelector";
|
|
2392
2374
|
|
|
2393
2375
|
// src/components/domain/KdsCardPlan/KdsCardPlan.tsx
|
|
2394
|
-
import { forwardRef as
|
|
2395
|
-
import { jsx as
|
|
2396
|
-
var KdsCardPlan =
|
|
2376
|
+
import { forwardRef as forwardRef35 } from "react";
|
|
2377
|
+
import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2378
|
+
var KdsCardPlan = forwardRef35(
|
|
2397
2379
|
({ title, price, period, features, recommended, badgeText, action, className, ...props }, ref) => /* @__PURE__ */ jsxs27(
|
|
2398
2380
|
"div",
|
|
2399
2381
|
{
|
|
@@ -2401,16 +2383,16 @@ var KdsCardPlan = forwardRef34(
|
|
|
2401
2383
|
className: clsx("kds-card-plan", recommended && "recommended", className),
|
|
2402
2384
|
...props,
|
|
2403
2385
|
children: [
|
|
2404
|
-
/* @__PURE__ */
|
|
2386
|
+
/* @__PURE__ */ jsx37("div", { className: "kds-card-plan-header", children: /* @__PURE__ */ jsx37("h3", { children: title }) }),
|
|
2405
2387
|
/* @__PURE__ */ jsxs27("div", { className: "kds-card-plan-price", children: [
|
|
2406
|
-
/* @__PURE__ */
|
|
2388
|
+
/* @__PURE__ */ jsx37("span", { className: "kds-price", children: price }),
|
|
2407
2389
|
period && /* @__PURE__ */ jsxs27("span", { className: "kds-price-period", children: [
|
|
2408
2390
|
"/",
|
|
2409
2391
|
period
|
|
2410
2392
|
] })
|
|
2411
2393
|
] }),
|
|
2412
|
-
badgeText && /* @__PURE__ */
|
|
2413
|
-
features && features.length > 0 && /* @__PURE__ */
|
|
2394
|
+
badgeText && /* @__PURE__ */ jsx37("span", { className: "kds-card-plan-badge", children: badgeText }),
|
|
2395
|
+
features && features.length > 0 && /* @__PURE__ */ jsx37("ul", { className: "kds-card-plan-features", children: features.map((f, i) => /* @__PURE__ */ jsx37("li", { children: f }, i)) }),
|
|
2414
2396
|
action
|
|
2415
2397
|
]
|
|
2416
2398
|
}
|
|
@@ -2419,10 +2401,10 @@ var KdsCardPlan = forwardRef34(
|
|
|
2419
2401
|
KdsCardPlan.displayName = "KdsCardPlan";
|
|
2420
2402
|
|
|
2421
2403
|
// src/components/domain/KdsInvoiceSticky/KdsInvoiceSticky.tsx
|
|
2422
|
-
import { forwardRef as
|
|
2423
|
-
import { jsx as
|
|
2424
|
-
var KdsInvoiceSticky =
|
|
2425
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
2404
|
+
import { forwardRef as forwardRef36 } from "react";
|
|
2405
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2406
|
+
var KdsInvoiceSticky = forwardRef36(
|
|
2407
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
2426
2408
|
"article",
|
|
2427
2409
|
{
|
|
2428
2410
|
ref,
|
|
@@ -2434,11 +2416,40 @@ var KdsInvoiceSticky = forwardRef35(
|
|
|
2434
2416
|
);
|
|
2435
2417
|
KdsInvoiceSticky.displayName = "KdsInvoiceSticky";
|
|
2436
2418
|
|
|
2419
|
+
// src/components/domain/KdsInvoiceHeaderSkeleton/KdsInvoiceHeaderSkeleton.tsx
|
|
2420
|
+
import { forwardRef as forwardRef37 } from "react";
|
|
2421
|
+
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2422
|
+
var Text = ({ children }) => /* @__PURE__ */ jsx39("span", { className: "kds-skeleton kds-skeleton--text", children });
|
|
2423
|
+
var KdsInvoiceHeaderSkeleton = forwardRef37(
|
|
2424
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxs28(KdsInvoiceSticky, { ref, className: clsx("kds-invoice-skeleton", className), "aria-hidden": "true", ...props, children: [
|
|
2425
|
+
/* @__PURE__ */ jsxs28("header", { className: "kds-invoice-header", children: [
|
|
2426
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
2427
|
+
/* @__PURE__ */ jsx39("p", { className: "kds-invoice-amount", children: /* @__PURE__ */ jsx39(Text, { children: "$00.000" }) }),
|
|
2428
|
+
/* @__PURE__ */ jsxs28("p", { className: "kds-invoice-code", children: [
|
|
2429
|
+
/* @__PURE__ */ jsx39("span", { children: /* @__PURE__ */ jsx39(Text, { children: "C\xF3digo" }) }),
|
|
2430
|
+
/* @__PURE__ */ jsx39("span", { className: "kds-invoice-code-value kds-invoice-code-value--lowercase", children: /* @__PURE__ */ jsx39(Text, { children: "xxxx-xxxx-xxxx" }) })
|
|
2431
|
+
] })
|
|
2432
|
+
] }),
|
|
2433
|
+
/* @__PURE__ */ jsx39("div", { className: "kds-invoice-merchant kds-skeleton" })
|
|
2434
|
+
] }),
|
|
2435
|
+
/* @__PURE__ */ jsxs28("div", { className: "kds-invoice-collapsible", children: [
|
|
2436
|
+
/* @__PURE__ */ jsx39("div", { className: "kds-invoice-summary", children: /* @__PURE__ */ jsxs28("dl", { className: "kds-kv", children: [
|
|
2437
|
+
/* @__PURE__ */ jsx39("dt", { children: /* @__PURE__ */ jsx39(Text, { children: "Pago a" }) }),
|
|
2438
|
+
/* @__PURE__ */ jsx39("dd", { children: /* @__PURE__ */ jsx39(Text, { children: "Comercio de ejemplo SpA" }) }),
|
|
2439
|
+
/* @__PURE__ */ jsx39("dt", { children: /* @__PURE__ */ jsx39(Text, { children: "Asunto" }) }),
|
|
2440
|
+
/* @__PURE__ */ jsx39("dd", { children: /* @__PURE__ */ jsx39(Text, { children: "Orden de compra" }) })
|
|
2441
|
+
] }) }),
|
|
2442
|
+
/* @__PURE__ */ jsx39("div", { className: "kds-expand-toggle", children: /* @__PURE__ */ jsx39("span", { children: /* @__PURE__ */ jsx39(Text, { children: "Detalle del cobro" }) }) })
|
|
2443
|
+
] })
|
|
2444
|
+
] })
|
|
2445
|
+
);
|
|
2446
|
+
KdsInvoiceHeaderSkeleton.displayName = "KdsInvoiceHeaderSkeleton";
|
|
2447
|
+
|
|
2437
2448
|
// src/components/domain/KdsBottomSheet/KdsBottomSheet.tsx
|
|
2438
|
-
import { forwardRef as
|
|
2449
|
+
import { forwardRef as forwardRef38 } from "react";
|
|
2439
2450
|
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
2440
|
-
import { jsx as
|
|
2441
|
-
var KdsBottomSheet =
|
|
2451
|
+
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2452
|
+
var KdsBottomSheet = forwardRef38(
|
|
2442
2453
|
({
|
|
2443
2454
|
open,
|
|
2444
2455
|
onClose,
|
|
@@ -2450,39 +2461,40 @@ var KdsBottomSheet = forwardRef36(
|
|
|
2450
2461
|
showCloseButton = false,
|
|
2451
2462
|
container,
|
|
2452
2463
|
className,
|
|
2464
|
+
size = "auto",
|
|
2453
2465
|
...props
|
|
2454
|
-
}, ref) => /* @__PURE__ */
|
|
2466
|
+
}, ref) => /* @__PURE__ */ jsx40(
|
|
2455
2467
|
Dialog2.Root,
|
|
2456
2468
|
{
|
|
2457
2469
|
open,
|
|
2458
2470
|
onOpenChange: (o) => {
|
|
2459
2471
|
if (!o) onClose();
|
|
2460
2472
|
},
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2473
|
+
children: /* @__PURE__ */ jsx40(Dialog2.Portal, { container, children: /* @__PURE__ */ jsx40("div", { className: "kds-theme-root", style: { display: "contents" }, children: /* @__PURE__ */ jsx40(Dialog2.Overlay, { className: "kds-bottom-sheet-scrim open", children: /* @__PURE__ */ jsxs29(
|
|
2462
2474
|
Dialog2.Content,
|
|
2463
2475
|
{
|
|
2464
2476
|
ref,
|
|
2465
|
-
className: clsx("kds-bottom-sheet", className),
|
|
2477
|
+
className: clsx("kds-bottom-sheet", size === "full" && "kds-bottom-sheet-full", className),
|
|
2466
2478
|
onPointerDownOutside: (e) => {
|
|
2467
2479
|
const target = e.target;
|
|
2468
2480
|
if (target.closest(".kds-bottom-sheet")) e.preventDefault();
|
|
2469
2481
|
},
|
|
2470
2482
|
...props,
|
|
2471
2483
|
children: [
|
|
2472
|
-
showGrabber && /* @__PURE__ */
|
|
2473
|
-
showCloseButton && /* @__PURE__ */
|
|
2484
|
+
showGrabber && /* @__PURE__ */ jsx40("div", { className: "kds-bottom-sheet-grabber", "aria-hidden": "true" }),
|
|
2485
|
+
showCloseButton && /* @__PURE__ */ jsx40(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx40(
|
|
2474
2486
|
"button",
|
|
2475
2487
|
{
|
|
2476
2488
|
type: "button",
|
|
2477
2489
|
className: "kds-bottom-sheet-close",
|
|
2478
2490
|
"aria-label": "Cerrar",
|
|
2479
|
-
children: /* @__PURE__ */
|
|
2491
|
+
children: /* @__PURE__ */ jsx40("i", { className: "material-symbols-outlined", children: "close" })
|
|
2480
2492
|
}
|
|
2481
2493
|
) }),
|
|
2482
|
-
title && /* @__PURE__ */
|
|
2483
|
-
description && /* @__PURE__ */
|
|
2484
|
-
/* @__PURE__ */
|
|
2485
|
-
actions && /* @__PURE__ */
|
|
2494
|
+
title && /* @__PURE__ */ jsx40(Dialog2.Title, { className: "kds-bottom-sheet-title", children: title }),
|
|
2495
|
+
description && /* @__PURE__ */ jsx40(Dialog2.Description, { className: "kds-bottom-sheet-description", children: description }),
|
|
2496
|
+
/* @__PURE__ */ jsx40("div", { className: "kds-bottom-sheet-body", children }),
|
|
2497
|
+
actions && /* @__PURE__ */ jsx40("div", { className: "kds-bottom-sheet-actions", children: actions })
|
|
2486
2498
|
]
|
|
2487
2499
|
}
|
|
2488
2500
|
) }) }) })
|
|
@@ -2492,13 +2504,13 @@ var KdsBottomSheet = forwardRef36(
|
|
|
2492
2504
|
KdsBottomSheet.displayName = "KdsBottomSheet";
|
|
2493
2505
|
|
|
2494
2506
|
// src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
|
|
2495
|
-
import { forwardRef as
|
|
2507
|
+
import { forwardRef as forwardRef40 } from "react";
|
|
2496
2508
|
|
|
2497
2509
|
// src/components/domain/KdsSecureFooter/KhipuWordmark.tsx
|
|
2498
|
-
import { forwardRef as
|
|
2499
|
-
import { jsx as
|
|
2500
|
-
var KhipuWordmark =
|
|
2501
|
-
({ className = "khipu-mark", ...props }, ref) => /* @__PURE__ */
|
|
2510
|
+
import { forwardRef as forwardRef39 } from "react";
|
|
2511
|
+
import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2512
|
+
var KhipuWordmark = forwardRef39(
|
|
2513
|
+
({ className = "khipu-mark", ...props }, ref) => /* @__PURE__ */ jsxs30(
|
|
2502
2514
|
"svg",
|
|
2503
2515
|
{
|
|
2504
2516
|
ref,
|
|
@@ -2509,14 +2521,14 @@ var KhipuWordmark = forwardRef37(
|
|
|
2509
2521
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2510
2522
|
...props,
|
|
2511
2523
|
children: [
|
|
2512
|
-
/* @__PURE__ */
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
/* @__PURE__ */
|
|
2516
|
-
/* @__PURE__ */
|
|
2517
|
-
/* @__PURE__ */
|
|
2518
|
-
/* @__PURE__ */
|
|
2519
|
-
/* @__PURE__ */
|
|
2524
|
+
/* @__PURE__ */ jsx41("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" }),
|
|
2525
|
+
/* @__PURE__ */ jsx41("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" }),
|
|
2526
|
+
/* @__PURE__ */ jsx41("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" }),
|
|
2527
|
+
/* @__PURE__ */ jsx41("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" }),
|
|
2528
|
+
/* @__PURE__ */ jsx41("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" }),
|
|
2529
|
+
/* @__PURE__ */ jsx41("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" }),
|
|
2530
|
+
/* @__PURE__ */ jsx41("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" }),
|
|
2531
|
+
/* @__PURE__ */ jsx41("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
2532
|
]
|
|
2521
2533
|
}
|
|
2522
2534
|
)
|
|
@@ -2524,17 +2536,17 @@ var KhipuWordmark = forwardRef37(
|
|
|
2524
2536
|
KhipuWordmark.displayName = "KhipuWordmark";
|
|
2525
2537
|
|
|
2526
2538
|
// src/components/domain/KdsSecureFooter/KdsSecureFooter.tsx
|
|
2527
|
-
import { Fragment as Fragment3, jsx as
|
|
2528
|
-
var KdsSecureFooter =
|
|
2529
|
-
({ variant = "default", showLogo = true, psp, children, className, ...props }, ref) => /* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
/* @__PURE__ */
|
|
2539
|
+
import { Fragment as Fragment3, jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2540
|
+
var KdsSecureFooter = forwardRef40(
|
|
2541
|
+
({ variant = "default", showLogo = true, psp, children, className, ...props }, ref) => /* @__PURE__ */ jsxs31("footer", { ref, className: clsx("kds-secure-footer", variant === "inside" && "inside", className), ...props, children: [
|
|
2542
|
+
/* @__PURE__ */ jsxs31("svg", { className: "kds-secure-footer-lock", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
2543
|
+
/* @__PURE__ */ jsx42("rect", { x: "4.5", y: "10.5", width: "15", height: "10", rx: "2.25" }),
|
|
2544
|
+
/* @__PURE__ */ jsx42("path", { d: "M8 10.5V7a4 4 0 0 1 8 0v3.5" })
|
|
2533
2545
|
] }),
|
|
2534
|
-
children || /* @__PURE__ */
|
|
2535
|
-
showLogo && /* @__PURE__ */
|
|
2536
|
-
psp && /* @__PURE__ */
|
|
2537
|
-
/* @__PURE__ */
|
|
2546
|
+
children || /* @__PURE__ */ jsx42("span", { children: "Pago seguro procesado por" }),
|
|
2547
|
+
showLogo && /* @__PURE__ */ jsx42(KhipuWordmark, {}),
|
|
2548
|
+
psp && /* @__PURE__ */ jsxs31(Fragment3, { children: [
|
|
2549
|
+
/* @__PURE__ */ jsx42("span", { className: "kds-secure-footer-sep", "aria-hidden": "true" }),
|
|
2538
2550
|
psp
|
|
2539
2551
|
] })
|
|
2540
2552
|
] })
|
|
@@ -2542,44 +2554,44 @@ var KdsSecureFooter = forwardRef38(
|
|
|
2542
2554
|
KdsSecureFooter.displayName = "KdsSecureFooter";
|
|
2543
2555
|
|
|
2544
2556
|
// 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__ */
|
|
2557
|
+
import { forwardRef as forwardRef41 } from "react";
|
|
2558
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2559
|
+
var KdsRecapList = forwardRef41(
|
|
2560
|
+
({ items, className, ...props }, ref) => /* @__PURE__ */ jsx43("ul", { ref, className: clsx("kds-recap-list", className), ...props, children: items.map((item, i) => /* @__PURE__ */ jsxs32("li", { children: [
|
|
2561
|
+
/* @__PURE__ */ jsx43("span", { className: "kds-key", children: item.label }),
|
|
2562
|
+
/* @__PURE__ */ jsx43("span", { className: clsx("kds-value", !item.value && item.placeholder && "placeholder"), children: item.value || item.placeholder || "-" })
|
|
2551
2563
|
] }, i)) })
|
|
2552
2564
|
);
|
|
2553
2565
|
KdsRecapList.displayName = "KdsRecapList";
|
|
2554
2566
|
|
|
2555
2567
|
// 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__ */
|
|
2568
|
+
import { forwardRef as forwardRef42 } from "react";
|
|
2569
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2570
|
+
var KdsMontoRow = forwardRef42(
|
|
2571
|
+
({ title, value, deadline, className, ...props }, ref) => /* @__PURE__ */ jsxs33("div", { ref, className: clsx("kds-monto-row", className), ...props, children: [
|
|
2572
|
+
/* @__PURE__ */ jsxs33("div", { children: [
|
|
2573
|
+
/* @__PURE__ */ jsx44("div", { className: "kds-monto-row-title", children: title }),
|
|
2574
|
+
deadline && /* @__PURE__ */ jsx44("div", { className: "kds-monto-row-deadline", children: deadline })
|
|
2563
2575
|
] }),
|
|
2564
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ jsx44("div", { className: "kds-monto-row-value", children: value })
|
|
2565
2577
|
] })
|
|
2566
2578
|
);
|
|
2567
2579
|
KdsMontoRow.displayName = "KdsMontoRow";
|
|
2568
2580
|
|
|
2569
2581
|
// src/components/domain/KdsMerchantTile/KdsMerchantTile.tsx
|
|
2570
|
-
import { forwardRef as
|
|
2571
|
-
import { jsx as
|
|
2572
|
-
var KdsMerchantTile =
|
|
2582
|
+
import { forwardRef as forwardRef43 } from "react";
|
|
2583
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2584
|
+
var KdsMerchantTile = forwardRef43(
|
|
2573
2585
|
({ name, logoUrl, initials, compact, className, ...props }, ref) => {
|
|
2574
2586
|
const displayInitials = (initials ?? name.slice(0, 2)).toUpperCase();
|
|
2575
|
-
return /* @__PURE__ */
|
|
2587
|
+
return /* @__PURE__ */ jsx45(
|
|
2576
2588
|
"div",
|
|
2577
2589
|
{
|
|
2578
2590
|
ref,
|
|
2579
2591
|
className: clsx("kds-merchant-tile", logoUrl && "logo", compact && "compact", className),
|
|
2580
2592
|
"aria-label": name,
|
|
2581
2593
|
...props,
|
|
2582
|
-
children: logoUrl ? /* @__PURE__ */
|
|
2594
|
+
children: logoUrl ? /* @__PURE__ */ jsx45("img", { src: logoUrl, alt: name }) : displayInitials
|
|
2583
2595
|
}
|
|
2584
2596
|
);
|
|
2585
2597
|
}
|
|
@@ -2587,10 +2599,10 @@ var KdsMerchantTile = forwardRef41(
|
|
|
2587
2599
|
KdsMerchantTile.displayName = "KdsMerchantTile";
|
|
2588
2600
|
|
|
2589
2601
|
// src/components/domain/KdsInvoiceMerchant/KdsInvoiceMerchant.tsx
|
|
2590
|
-
import { forwardRef as
|
|
2602
|
+
import { forwardRef as forwardRef44, useState as useState9 } from "react";
|
|
2591
2603
|
|
|
2592
2604
|
// src/components/domain/KdsInvoiceMerchant/useLogoBackdrop.ts
|
|
2593
|
-
import { useEffect as
|
|
2605
|
+
import { useEffect as useEffect4, useState as useState8 } from "react";
|
|
2594
2606
|
|
|
2595
2607
|
// src/components/domain/KdsInvoiceMerchant/logoLuminance.ts
|
|
2596
2608
|
var LIGHT_LOGO_LUMINANCE_THRESHOLD = 0.72;
|
|
@@ -2640,7 +2652,7 @@ function pickLogoBackdrop(luminance) {
|
|
|
2640
2652
|
// src/components/domain/KdsInvoiceMerchant/useLogoBackdrop.ts
|
|
2641
2653
|
function useLogoBackdrop(logoUrl) {
|
|
2642
2654
|
const [backdrop, setBackdrop] = useState8("light");
|
|
2643
|
-
|
|
2655
|
+
useEffect4(() => {
|
|
2644
2656
|
let cancelled = false;
|
|
2645
2657
|
setBackdrop("light");
|
|
2646
2658
|
if (!logoUrl) {
|
|
@@ -2659,13 +2671,13 @@ function useLogoBackdrop(logoUrl) {
|
|
|
2659
2671
|
}
|
|
2660
2672
|
|
|
2661
2673
|
// src/components/domain/KdsInvoiceMerchant/KdsInvoiceMerchant.tsx
|
|
2662
|
-
import { jsx as
|
|
2663
|
-
var KdsInvoiceMerchant =
|
|
2674
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2675
|
+
var KdsInvoiceMerchant = forwardRef44(
|
|
2664
2676
|
({ logoUrl, brandColor, className, style, ...props }, ref) => {
|
|
2665
2677
|
const [failed, setFailed] = useState9(false);
|
|
2666
2678
|
const showLogo = !!logoUrl && !failed;
|
|
2667
2679
|
const backdrop = useLogoBackdrop(showLogo ? logoUrl : void 0);
|
|
2668
|
-
return /* @__PURE__ */
|
|
2680
|
+
return /* @__PURE__ */ jsx46(
|
|
2669
2681
|
"div",
|
|
2670
2682
|
{
|
|
2671
2683
|
ref,
|
|
@@ -2678,7 +2690,7 @@ var KdsInvoiceMerchant = forwardRef42(
|
|
|
2678
2690
|
"aria-hidden": "true",
|
|
2679
2691
|
style: !showLogo && brandColor ? { background: brandColor, ...style } : style,
|
|
2680
2692
|
...props,
|
|
2681
|
-
children: showLogo ? /* @__PURE__ */
|
|
2693
|
+
children: showLogo ? /* @__PURE__ */ jsx46("img", { src: logoUrl, alt: "", onError: () => setFailed(true) }) : /* @__PURE__ */ jsx46("i", { className: "material-symbols-outlined", children: "storefront" })
|
|
2682
2694
|
}
|
|
2683
2695
|
);
|
|
2684
2696
|
}
|
|
@@ -2686,9 +2698,9 @@ var KdsInvoiceMerchant = forwardRef42(
|
|
|
2686
2698
|
KdsInvoiceMerchant.displayName = "KdsInvoiceMerchant";
|
|
2687
2699
|
|
|
2688
2700
|
// src/components/domain/KdsPaymentTotal/KdsPaymentTotal.tsx
|
|
2689
|
-
import { forwardRef as
|
|
2690
|
-
import { jsx as
|
|
2691
|
-
var KdsPaymentTotal =
|
|
2701
|
+
import { forwardRef as forwardRef45 } from "react";
|
|
2702
|
+
import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2703
|
+
var KdsPaymentTotal = forwardRef45(
|
|
2692
2704
|
({
|
|
2693
2705
|
variant = "default",
|
|
2694
2706
|
tone = "brand",
|
|
@@ -2706,7 +2718,7 @@ var KdsPaymentTotal = forwardRef43(
|
|
|
2706
2718
|
const { integer, fraction } = formatAmount(amount, decimals, locale);
|
|
2707
2719
|
const isEmail = variant === "email";
|
|
2708
2720
|
const isInfoTone = tone === "info";
|
|
2709
|
-
return /* @__PURE__ */
|
|
2721
|
+
return /* @__PURE__ */ jsxs34(
|
|
2710
2722
|
"div",
|
|
2711
2723
|
{
|
|
2712
2724
|
ref,
|
|
@@ -2719,14 +2731,14 @@ var KdsPaymentTotal = forwardRef43(
|
|
|
2719
2731
|
),
|
|
2720
2732
|
...props,
|
|
2721
2733
|
children: [
|
|
2722
|
-
!isEmail && title != null && /* @__PURE__ */
|
|
2723
|
-
!isEmail && titleMobile != null && /* @__PURE__ */
|
|
2724
|
-
label != null && /* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
2734
|
+
!isEmail && title != null && /* @__PURE__ */ jsx47("h5", { className: "kds-payment-total-title", children: title }),
|
|
2735
|
+
!isEmail && titleMobile != null && /* @__PURE__ */ jsx47("h5", { className: "kds-payment-total-title-mobile", children: titleMobile }),
|
|
2736
|
+
label != null && /* @__PURE__ */ jsx47("h6", { className: "kds-payment-label", children: label }),
|
|
2737
|
+
/* @__PURE__ */ jsxs34("h5", { className: "kds-payment-amount", children: [
|
|
2726
2738
|
currency,
|
|
2727
2739
|
" ",
|
|
2728
2740
|
integer,
|
|
2729
|
-
fraction !== null && /* @__PURE__ */
|
|
2741
|
+
fraction !== null && /* @__PURE__ */ jsx47("sup", { className: "kds-payment-total-decimal-sup", children: fraction })
|
|
2730
2742
|
] })
|
|
2731
2743
|
]
|
|
2732
2744
|
}
|
|
@@ -2762,10 +2774,10 @@ function formatAmount(amount, decimals, locale) {
|
|
|
2762
2774
|
}
|
|
2763
2775
|
|
|
2764
2776
|
// 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__ */
|
|
2777
|
+
import { forwardRef as forwardRef46 } from "react";
|
|
2778
|
+
import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2779
|
+
var KdsBillAttachment = forwardRef46(
|
|
2780
|
+
({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */ jsxs35(
|
|
2769
2781
|
"a",
|
|
2770
2782
|
{
|
|
2771
2783
|
ref,
|
|
@@ -2775,15 +2787,15 @@ var KdsBillAttachment = forwardRef44(
|
|
|
2775
2787
|
className: clsx("kds-bill-attachment", className),
|
|
2776
2788
|
...props,
|
|
2777
2789
|
children: [
|
|
2778
|
-
/* @__PURE__ */
|
|
2779
|
-
/* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ jsx48("i", { className: "material-symbols-outlined", children: icon }),
|
|
2791
|
+
/* @__PURE__ */ jsx48("span", { children: filename })
|
|
2780
2792
|
]
|
|
2781
2793
|
}
|
|
2782
2794
|
)
|
|
2783
2795
|
);
|
|
2784
2796
|
KdsBillAttachment.displayName = "KdsBillAttachment";
|
|
2785
|
-
var KdsBillAttachments =
|
|
2786
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
2797
|
+
var KdsBillAttachments = forwardRef46(
|
|
2798
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx48("div", { ref, className: clsx("kds-bill-attachments", className), ...props, children })
|
|
2787
2799
|
);
|
|
2788
2800
|
KdsBillAttachments.displayName = "KdsBillAttachments";
|
|
2789
2801
|
|
|
@@ -2882,12 +2894,12 @@ var guideToFirstInvalidFieldOnBlur = (form) => {
|
|
|
2882
2894
|
};
|
|
2883
2895
|
|
|
2884
2896
|
// src/components/core/hooks/useStickyInvoiceCollapse.ts
|
|
2885
|
-
import { useEffect as
|
|
2897
|
+
import { useEffect as useEffect5, useRef as useRef4 } from "react";
|
|
2886
2898
|
function useStickyInvoiceCollapse(options = {}) {
|
|
2887
2899
|
const { onCollapseStart, collapseEnd = 20, mobileBreakpoint = 768 } = options;
|
|
2888
2900
|
const onCollapseStartRef = useRef4(onCollapseStart);
|
|
2889
2901
|
onCollapseStartRef.current = onCollapseStart;
|
|
2890
|
-
|
|
2902
|
+
useEffect5(() => {
|
|
2891
2903
|
let viewportOffset = 0;
|
|
2892
2904
|
let ticking = false;
|
|
2893
2905
|
let wasCollapsing = false;
|
|
@@ -3009,11 +3021,11 @@ function useExpandToggle(options = {}) {
|
|
|
3009
3021
|
}
|
|
3010
3022
|
|
|
3011
3023
|
// src/components/core/hooks/useHideOnScroll.ts
|
|
3012
|
-
import { useEffect as
|
|
3024
|
+
import { useEffect as useEffect6, useState as useState11 } from "react";
|
|
3013
3025
|
function useHideOnScroll(options = {}) {
|
|
3014
3026
|
const { threshold = 8, topOffset = 0 } = options;
|
|
3015
3027
|
const [hidden, setHidden] = useState11(false);
|
|
3016
|
-
|
|
3028
|
+
useEffect6(() => {
|
|
3017
3029
|
let viewportOffset = 0;
|
|
3018
3030
|
let lastY = 0;
|
|
3019
3031
|
let ticking = false;
|
|
@@ -3056,12 +3068,12 @@ function useHideOnScroll(options = {}) {
|
|
|
3056
3068
|
}
|
|
3057
3069
|
|
|
3058
3070
|
// src/components/core/hooks/useMediaQuery.ts
|
|
3059
|
-
import { useEffect as
|
|
3071
|
+
import { useEffect as useEffect7, useState as useState12 } from "react";
|
|
3060
3072
|
function useMediaQuery(query) {
|
|
3061
3073
|
const [matches, setMatches] = useState12(
|
|
3062
3074
|
() => typeof window !== "undefined" ? window.matchMedia(query).matches : false
|
|
3063
3075
|
);
|
|
3064
|
-
|
|
3076
|
+
useEffect7(() => {
|
|
3065
3077
|
if (typeof window === "undefined") return;
|
|
3066
3078
|
const mql = window.matchMedia(query);
|
|
3067
3079
|
setMatches(mql.matches);
|
|
@@ -3072,6 +3084,7 @@ function useMediaQuery(query) {
|
|
|
3072
3084
|
return matches;
|
|
3073
3085
|
}
|
|
3074
3086
|
export {
|
|
3087
|
+
KDS_VERSION,
|
|
3075
3088
|
KdsAccordion,
|
|
3076
3089
|
KdsAccordionDetails,
|
|
3077
3090
|
KdsAccordionSummary,
|
|
@@ -3096,9 +3109,11 @@ export {
|
|
|
3096
3109
|
KdsCopyableTable,
|
|
3097
3110
|
KdsCountdown,
|
|
3098
3111
|
KdsDivider,
|
|
3112
|
+
KdsDocumentFrame,
|
|
3099
3113
|
KdsEmptyState,
|
|
3100
3114
|
KdsExpandPanel,
|
|
3101
3115
|
KdsFab,
|
|
3116
|
+
KdsInvoiceHeaderSkeleton,
|
|
3102
3117
|
KdsInvoiceMerchant,
|
|
3103
3118
|
KdsInvoiceSticky,
|
|
3104
3119
|
KdsLinearProgress,
|