@khipu/design-system 0.2.0-alpha.50 → 0.2.0-alpha.51
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 +35 -1
- package/dist/beercss/khipu-beercss.min.css +1 -1
- package/dist/beercss/khipu-beercss.scoped.css +35 -1
- package/dist/beercss/khipu-beercss.scoped.min.css +1 -1
- package/dist/beercss/metadata.json +5 -5
- package/dist/index.d.mts +33 -4
- package/dist/index.d.ts +33 -4
- package/dist/index.js +181 -112
- package/dist/index.mjs +181 -112
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khipu/design-system/beercss",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.51",
|
|
4
4
|
"description": "Khipu BeerCSS bundle with Material Design 3 and Khipu customizations",
|
|
5
|
-
"buildDate": "2026-06-
|
|
5
|
+
"buildDate": "2026-06-16T22:54:45.434Z",
|
|
6
6
|
"includes": {
|
|
7
7
|
"beercss": "4.0.1",
|
|
8
8
|
"khipu-tokens": "latest",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scopeClass": ".kds-theme-root",
|
|
21
21
|
"cdn": {
|
|
22
|
-
"css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.
|
|
23
|
-
"cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.
|
|
24
|
-
"js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.
|
|
22
|
+
"css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.51/dist/beercss/khipu-beercss.min.css",
|
|
23
|
+
"cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.51/dist/beercss/khipu-beercss.scoped.min.css",
|
|
24
|
+
"js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.51/dist/beercss/khipu-beercss.min.js"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -2621,8 +2621,11 @@ declare const KdsTextField: React__default.ForwardRefExoticComponent<KdsTextFiel
|
|
|
2621
2621
|
*/
|
|
2622
2622
|
|
|
2623
2623
|
interface KdsCheckboxProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
2624
|
-
/**
|
|
2625
|
-
|
|
2624
|
+
/**
|
|
2625
|
+
* Contenido del label mostrado al lado del sprite. Opcional (puede usar aria-label).
|
|
2626
|
+
* Acepta texto o nodos (p. ej. un enlace embebido en "Acepto los términos…").
|
|
2627
|
+
*/
|
|
2628
|
+
label?: React__default.ReactNode;
|
|
2626
2629
|
}
|
|
2627
2630
|
declare const KdsCheckbox: React__default.ForwardRefExoticComponent<KdsCheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
2628
2631
|
|
|
@@ -2889,7 +2892,8 @@ declare const KdsTabPanel: React__default.ForwardRefExoticComponent<KdsTabPanelP
|
|
|
2889
2892
|
|
|
2890
2893
|
interface KdsRadioOption {
|
|
2891
2894
|
value: string;
|
|
2892
|
-
label:
|
|
2895
|
+
/** Texto o nodo del label de la opción (permite contenido rico: montos, enlaces, tablas). */
|
|
2896
|
+
label: React__default.ReactNode;
|
|
2893
2897
|
disabled?: boolean;
|
|
2894
2898
|
}
|
|
2895
2899
|
interface KdsRadioGroupProps extends Omit<React__default.FieldsetHTMLAttributes<HTMLFieldSetElement>, 'onChange'> {
|
|
@@ -3166,6 +3170,11 @@ declare const KdsCopyRow: React__default.ForwardRefExoticComponent<KdsCopyRowPro
|
|
|
3166
3170
|
* Tabla compacta con filas que se copian individualmente al click, y un
|
|
3167
3171
|
* botón "Copiar todos los datos" que cambia el color de todas las filas al copy.
|
|
3168
3172
|
*
|
|
3173
|
+
* Variante `'grid'` (aditiva): grilla read-only de N celdas de texto por fila,
|
|
3174
|
+
* sin copy ni botón "Copiar todo". Las celdas reparten el ancho equitativamente.
|
|
3175
|
+
* Útil para mostrar datos dentro de opciones de radio. Soporta `disabled`
|
|
3176
|
+
* (atenúa el color del texto).
|
|
3177
|
+
*
|
|
3169
3178
|
* Contrato HTML (matchea el CSS .kds-copyable-table del DS):
|
|
3170
3179
|
* ```html
|
|
3171
3180
|
* <div class="kds-copyable-table" id="destination-copy-list">
|
|
@@ -3197,7 +3206,27 @@ interface KdsCopyableTableRow {
|
|
|
3197
3206
|
copy?: string;
|
|
3198
3207
|
}
|
|
3199
3208
|
interface KdsCopyableTableProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3200
|
-
|
|
3209
|
+
/**
|
|
3210
|
+
* Filas key/value copiables (modo `'copyable'`). Opcional: default `[]`.
|
|
3211
|
+
* En modo `'grid'` no se usa; usá `gridRows` en su lugar.
|
|
3212
|
+
*/
|
|
3213
|
+
rows?: KdsCopyableTableRow[];
|
|
3214
|
+
/**
|
|
3215
|
+
* Variante de la tabla.
|
|
3216
|
+
* - `'copyable'` (default): filas key/value que se copian individualmente al click.
|
|
3217
|
+
* - `'grid'`: grilla read-only de N celdas de texto por fila, sin copy ni botón
|
|
3218
|
+
* "Copiar todo". Útil para mostrar datos dentro de opciones de radio.
|
|
3219
|
+
*/
|
|
3220
|
+
variant?: 'copyable' | 'grid';
|
|
3221
|
+
/**
|
|
3222
|
+
* Datos de la grilla en modo `'grid'`: cada fila es un array de textos de celda.
|
|
3223
|
+
* Las celdas se reparten el ancho equitativamente. Ignorado en modo `'copyable'`.
|
|
3224
|
+
*/
|
|
3225
|
+
gridRows?: string[][];
|
|
3226
|
+
/**
|
|
3227
|
+
* Atenúa el color del texto de la grilla (modo `'grid'`). Sin efecto en `'copyable'`.
|
|
3228
|
+
*/
|
|
3229
|
+
disabled?: boolean;
|
|
3201
3230
|
/** Texto del botón "Copiar todo". Default: "Copiar todos los datos". */
|
|
3202
3231
|
copyAllLabel?: string;
|
|
3203
3232
|
/** Texto cuando se copió todo. Default: "Datos copiados". */
|
package/dist/index.d.ts
CHANGED
|
@@ -2621,8 +2621,11 @@ declare const KdsTextField: React__default.ForwardRefExoticComponent<KdsTextFiel
|
|
|
2621
2621
|
*/
|
|
2622
2622
|
|
|
2623
2623
|
interface KdsCheckboxProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
2624
|
-
/**
|
|
2625
|
-
|
|
2624
|
+
/**
|
|
2625
|
+
* Contenido del label mostrado al lado del sprite. Opcional (puede usar aria-label).
|
|
2626
|
+
* Acepta texto o nodos (p. ej. un enlace embebido en "Acepto los términos…").
|
|
2627
|
+
*/
|
|
2628
|
+
label?: React__default.ReactNode;
|
|
2626
2629
|
}
|
|
2627
2630
|
declare const KdsCheckbox: React__default.ForwardRefExoticComponent<KdsCheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
2628
2631
|
|
|
@@ -2889,7 +2892,8 @@ declare const KdsTabPanel: React__default.ForwardRefExoticComponent<KdsTabPanelP
|
|
|
2889
2892
|
|
|
2890
2893
|
interface KdsRadioOption {
|
|
2891
2894
|
value: string;
|
|
2892
|
-
label:
|
|
2895
|
+
/** Texto o nodo del label de la opción (permite contenido rico: montos, enlaces, tablas). */
|
|
2896
|
+
label: React__default.ReactNode;
|
|
2893
2897
|
disabled?: boolean;
|
|
2894
2898
|
}
|
|
2895
2899
|
interface KdsRadioGroupProps extends Omit<React__default.FieldsetHTMLAttributes<HTMLFieldSetElement>, 'onChange'> {
|
|
@@ -3166,6 +3170,11 @@ declare const KdsCopyRow: React__default.ForwardRefExoticComponent<KdsCopyRowPro
|
|
|
3166
3170
|
* Tabla compacta con filas que se copian individualmente al click, y un
|
|
3167
3171
|
* botón "Copiar todos los datos" que cambia el color de todas las filas al copy.
|
|
3168
3172
|
*
|
|
3173
|
+
* Variante `'grid'` (aditiva): grilla read-only de N celdas de texto por fila,
|
|
3174
|
+
* sin copy ni botón "Copiar todo". Las celdas reparten el ancho equitativamente.
|
|
3175
|
+
* Útil para mostrar datos dentro de opciones de radio. Soporta `disabled`
|
|
3176
|
+
* (atenúa el color del texto).
|
|
3177
|
+
*
|
|
3169
3178
|
* Contrato HTML (matchea el CSS .kds-copyable-table del DS):
|
|
3170
3179
|
* ```html
|
|
3171
3180
|
* <div class="kds-copyable-table" id="destination-copy-list">
|
|
@@ -3197,7 +3206,27 @@ interface KdsCopyableTableRow {
|
|
|
3197
3206
|
copy?: string;
|
|
3198
3207
|
}
|
|
3199
3208
|
interface KdsCopyableTableProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3200
|
-
|
|
3209
|
+
/**
|
|
3210
|
+
* Filas key/value copiables (modo `'copyable'`). Opcional: default `[]`.
|
|
3211
|
+
* En modo `'grid'` no se usa; usá `gridRows` en su lugar.
|
|
3212
|
+
*/
|
|
3213
|
+
rows?: KdsCopyableTableRow[];
|
|
3214
|
+
/**
|
|
3215
|
+
* Variante de la tabla.
|
|
3216
|
+
* - `'copyable'` (default): filas key/value que se copian individualmente al click.
|
|
3217
|
+
* - `'grid'`: grilla read-only de N celdas de texto por fila, sin copy ni botón
|
|
3218
|
+
* "Copiar todo". Útil para mostrar datos dentro de opciones de radio.
|
|
3219
|
+
*/
|
|
3220
|
+
variant?: 'copyable' | 'grid';
|
|
3221
|
+
/**
|
|
3222
|
+
* Datos de la grilla en modo `'grid'`: cada fila es un array de textos de celda.
|
|
3223
|
+
* Las celdas se reparten el ancho equitativamente. Ignorado en modo `'copyable'`.
|
|
3224
|
+
*/
|
|
3225
|
+
gridRows?: string[][];
|
|
3226
|
+
/**
|
|
3227
|
+
* Atenúa el color del texto de la grilla (modo `'grid'`). Sin efecto en `'copyable'`.
|
|
3228
|
+
*/
|
|
3229
|
+
disabled?: boolean;
|
|
3201
3230
|
/** Texto del botón "Copiar todo". Default: "Copiar todos los datos". */
|
|
3202
3231
|
copyAllLabel?: string;
|
|
3203
3232
|
/** Texto cuando se copió todo. Default: "Datos copiados". */
|
package/dist/index.js
CHANGED
|
@@ -1922,125 +1922,194 @@ async function copyToClipboard(text) {
|
|
|
1922
1922
|
}
|
|
1923
1923
|
}
|
|
1924
1924
|
var TRANSITION_MS = 300;
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1925
|
+
function GridVariant({
|
|
1926
|
+
gridRows,
|
|
1927
|
+
disabled,
|
|
1928
|
+
className,
|
|
1929
|
+
forwardedRef,
|
|
1930
|
+
rest
|
|
1931
|
+
}) {
|
|
1932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1933
|
+
"div",
|
|
1934
|
+
{
|
|
1935
|
+
ref: forwardedRef,
|
|
1936
|
+
className: (0, import_clsx.clsx)("kds-copyable-table", "kds-copyable-table--grid", className),
|
|
1937
|
+
...rest,
|
|
1938
|
+
children: gridRows.map((cells, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1939
|
+
"div",
|
|
1940
|
+
{
|
|
1941
|
+
className: "kds-copyable-table-row kds-copyable-table-row--grid",
|
|
1942
|
+
"data-testid": "kds-grid-row",
|
|
1943
|
+
children: cells.map((text, cellIndex) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1944
|
+
"span",
|
|
1945
|
+
{
|
|
1946
|
+
className: (0, import_clsx.clsx)("kds-grid-cell", disabled && "kds-grid-cell--disabled"),
|
|
1947
|
+
children: text
|
|
1948
|
+
},
|
|
1949
|
+
cellIndex
|
|
1950
|
+
))
|
|
1951
|
+
},
|
|
1952
|
+
rowIndex
|
|
1953
|
+
))
|
|
1954
|
+
}
|
|
1955
|
+
);
|
|
1956
|
+
}
|
|
1957
|
+
function CopyableVariant({
|
|
1958
|
+
rows,
|
|
1959
|
+
copyAllLabel = "Copiar todos los datos",
|
|
1960
|
+
copiedAllLabel = "Datos copiados",
|
|
1961
|
+
showCopyAll = true,
|
|
1962
|
+
className,
|
|
1963
|
+
forwardedRef,
|
|
1964
|
+
rest
|
|
1965
|
+
}) {
|
|
1966
|
+
const copiedTimers = (0, import_react25.useRef)(/* @__PURE__ */ new Map());
|
|
1967
|
+
const settlingTimers = (0, import_react25.useRef)(/* @__PURE__ */ new Map());
|
|
1968
|
+
const [copiedRows, setCopiedRows] = (0, import_react25.useState)(/* @__PURE__ */ new Set());
|
|
1969
|
+
const [settlingRows, setSettlingRows] = (0, import_react25.useState)(/* @__PURE__ */ new Set());
|
|
1970
|
+
const [allCopied, setAllCopied] = (0, import_react25.useState)(false);
|
|
1971
|
+
const markCopied = (0, import_react25.useCallback)((indexes, duration = 1500) => {
|
|
1972
|
+
setCopiedRows((prev) => {
|
|
1973
|
+
const next = new Set(prev);
|
|
1974
|
+
indexes.forEach((i) => next.add(i));
|
|
1975
|
+
return next;
|
|
1976
|
+
});
|
|
1977
|
+
indexes.forEach((i) => {
|
|
1978
|
+
const st = settlingTimers.current.get(i);
|
|
1979
|
+
if (st) {
|
|
1980
|
+
clearTimeout(st);
|
|
1981
|
+
settlingTimers.current.delete(i);
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1984
|
+
setSettlingRows((prev) => {
|
|
1985
|
+
const next = new Set(prev);
|
|
1986
|
+
indexes.forEach((i) => next.delete(i));
|
|
1987
|
+
return next;
|
|
1988
|
+
});
|
|
1989
|
+
indexes.forEach((i) => {
|
|
1990
|
+
const existing = copiedTimers.current.get(i);
|
|
1991
|
+
if (existing) clearTimeout(existing);
|
|
1992
|
+
const t = setTimeout(() => {
|
|
1993
|
+
setCopiedRows((prev) => {
|
|
1994
|
+
const next = new Set(prev);
|
|
1995
|
+
next.delete(i);
|
|
1996
|
+
return next;
|
|
1997
|
+
});
|
|
1998
|
+
setSettlingRows((prev) => {
|
|
1999
|
+
const next = new Set(prev);
|
|
2000
|
+
next.add(i);
|
|
2001
|
+
return next;
|
|
2002
|
+
});
|
|
2003
|
+
copiedTimers.current.delete(i);
|
|
2004
|
+
const settlingT = setTimeout(() => {
|
|
1966
2005
|
setSettlingRows((prev) => {
|
|
1967
2006
|
const next = new Set(prev);
|
|
1968
|
-
next.
|
|
2007
|
+
next.delete(i);
|
|
1969
2008
|
return next;
|
|
1970
2009
|
});
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
"
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
tabIndex: 0,
|
|
2009
|
-
onClick: () => handleRowCopy(row, i),
|
|
2010
|
-
onKeyDown: (e) => {
|
|
2011
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
2012
|
-
e.preventDefault();
|
|
2013
|
-
handleRowCopy(row, i);
|
|
2014
|
-
}
|
|
2015
|
-
},
|
|
2016
|
-
"aria-label": `Copiar ${row.label}: ${row.value}`,
|
|
2017
|
-
children: [
|
|
2018
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-key", children: row.label }),
|
|
2019
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-value", children: row.value })
|
|
2020
|
-
]
|
|
2010
|
+
settlingTimers.current.delete(i);
|
|
2011
|
+
}, TRANSITION_MS);
|
|
2012
|
+
settlingTimers.current.set(i, settlingT);
|
|
2013
|
+
}, duration);
|
|
2014
|
+
copiedTimers.current.set(i, t);
|
|
2015
|
+
});
|
|
2016
|
+
}, []);
|
|
2017
|
+
const handleRowCopy = async (row, index) => {
|
|
2018
|
+
const ok = await copyToClipboard(row.copy ?? row.value);
|
|
2019
|
+
if (ok) markCopied([index]);
|
|
2020
|
+
};
|
|
2021
|
+
const handleCopyAll = async () => {
|
|
2022
|
+
const text = rows.map((r) => `${r.label}: ${r.value}`).join("\n");
|
|
2023
|
+
const ok = await copyToClipboard(text);
|
|
2024
|
+
if (ok) {
|
|
2025
|
+
markCopied(rows.map((_, i) => i));
|
|
2026
|
+
setAllCopied(true);
|
|
2027
|
+
setTimeout(() => setAllCopied(false), 2e3);
|
|
2028
|
+
}
|
|
2029
|
+
};
|
|
2030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
2031
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: forwardedRef, className: (0, import_clsx.clsx)("kds-copyable-table", className), ...rest, children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2032
|
+
"div",
|
|
2033
|
+
{
|
|
2034
|
+
className: (0, import_clsx.clsx)(
|
|
2035
|
+
"kds-copyable-table-row",
|
|
2036
|
+
copiedRows.has(i) && "copied",
|
|
2037
|
+
settlingRows.has(i) && "settling"
|
|
2038
|
+
),
|
|
2039
|
+
role: "button",
|
|
2040
|
+
tabIndex: 0,
|
|
2041
|
+
onClick: () => handleRowCopy(row, i),
|
|
2042
|
+
onKeyDown: (e) => {
|
|
2043
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2044
|
+
e.preventDefault();
|
|
2045
|
+
handleRowCopy(row, i);
|
|
2046
|
+
}
|
|
2021
2047
|
},
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2048
|
+
"aria-label": `Copiar ${row.label}: ${row.value}`,
|
|
2049
|
+
children: [
|
|
2050
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-key", children: row.label }),
|
|
2051
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-value", children: row.value })
|
|
2052
|
+
]
|
|
2053
|
+
},
|
|
2054
|
+
`${row.label}-${i}`
|
|
2055
|
+
)) }),
|
|
2056
|
+
showCopyAll && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2057
|
+
"button",
|
|
2058
|
+
{
|
|
2059
|
+
type: "button",
|
|
2060
|
+
className: (0, import_clsx.clsx)(
|
|
2061
|
+
"kds-btn",
|
|
2062
|
+
"kds-btn-outlined",
|
|
2063
|
+
"kds-btn-block",
|
|
2064
|
+
"kds-copy-all-btn",
|
|
2065
|
+
allCopied && "copied"
|
|
2066
|
+
),
|
|
2067
|
+
onClick: handleCopyAll,
|
|
2068
|
+
"aria-label": allCopied ? copiedAllLabel : copyAllLabel,
|
|
2069
|
+
children: [
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("i", { className: "material-symbols-outlined", children: allCopied ? "check" : "content_copy" }) }),
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: allCopied ? copiedAllLabel : copyAllLabel })
|
|
2072
|
+
]
|
|
2073
|
+
}
|
|
2074
|
+
)
|
|
2075
|
+
] });
|
|
2076
|
+
}
|
|
2077
|
+
var KdsCopyableTable = (0, import_react25.forwardRef)(
|
|
2078
|
+
({
|
|
2079
|
+
rows = [],
|
|
2080
|
+
variant = "copyable",
|
|
2081
|
+
gridRows = [],
|
|
2082
|
+
disabled = false,
|
|
2083
|
+
copyAllLabel,
|
|
2084
|
+
copiedAllLabel,
|
|
2085
|
+
showCopyAll,
|
|
2086
|
+
className,
|
|
2087
|
+
...props
|
|
2088
|
+
}, ref) => {
|
|
2089
|
+
if (variant === "grid") {
|
|
2090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2091
|
+
GridVariant,
|
|
2026
2092
|
{
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
"kds-copy-all-btn",
|
|
2033
|
-
allCopied && "copied"
|
|
2034
|
-
),
|
|
2035
|
-
onClick: handleCopyAll,
|
|
2036
|
-
"aria-label": allCopied ? copiedAllLabel : copyAllLabel,
|
|
2037
|
-
children: [
|
|
2038
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "kds-icon", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("i", { className: "material-symbols-outlined", children: allCopied ? "check" : "content_copy" }) }),
|
|
2039
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: allCopied ? copiedAllLabel : copyAllLabel })
|
|
2040
|
-
]
|
|
2093
|
+
gridRows,
|
|
2094
|
+
disabled,
|
|
2095
|
+
className,
|
|
2096
|
+
forwardedRef: ref,
|
|
2097
|
+
rest: props
|
|
2041
2098
|
}
|
|
2042
|
-
)
|
|
2043
|
-
|
|
2099
|
+
);
|
|
2100
|
+
}
|
|
2101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2102
|
+
CopyableVariant,
|
|
2103
|
+
{
|
|
2104
|
+
rows,
|
|
2105
|
+
copyAllLabel,
|
|
2106
|
+
copiedAllLabel,
|
|
2107
|
+
showCopyAll,
|
|
2108
|
+
className,
|
|
2109
|
+
forwardedRef: ref,
|
|
2110
|
+
rest: props
|
|
2111
|
+
}
|
|
2112
|
+
);
|
|
2044
2113
|
}
|
|
2045
2114
|
);
|
|
2046
2115
|
KdsCopyableTable.displayName = "KdsCopyableTable";
|