@selectwin/kit 0.1.223 → 0.1.224
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/SelectCopyRow.d.ts +5 -0
- package/dist/SelectCopyRow.js +18 -18
- package/package.json +1 -1
package/dist/SelectCopyRow.d.ts
CHANGED
|
@@ -22,6 +22,11 @@ type SelectCopyRowOwnProps = {
|
|
|
22
22
|
*/
|
|
23
23
|
secret?: boolean;
|
|
24
24
|
secretName?: string;
|
|
25
|
+
/**
|
|
26
|
+
* 0.1.224: o texto MOSTRADO, quando é outro que o copiado: a chave do autenticador em grupos de 4 ("JBSW Y3DP …"),
|
|
27
|
+
* fácil de digitar à mão, e o copiar leva a chave sem os espaços (o `value`).
|
|
28
|
+
*/
|
|
29
|
+
display?: string;
|
|
25
30
|
};
|
|
26
31
|
export type SelectCopyRowProps = SelectCopyRowOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectCopyRowOwnProps>;
|
|
27
32
|
export declare const SelectCopyRow: import('react').ForwardRefExoticComponent<SelectCopyRowOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectCopyRowOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/SelectCopyRow.js
CHANGED
|
@@ -6,12 +6,12 @@ import { SelectCopyButton as o } from "./SelectCopyButton.js";
|
|
|
6
6
|
import { forwardRef as s, useState as c } from "react";
|
|
7
7
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
8
|
//#region src/SelectCopyRow.tsx
|
|
9
|
-
var f = s(function({ label: s, value: f, href: p, onCopy: m, prose: h = !1, truncate: g = "end", copyLabel: _, wrap: v = !1, secret: y = !1, secretName: b,
|
|
10
|
-
let
|
|
9
|
+
var f = s(function({ label: s, value: f, href: p, onCopy: m, prose: h = !1, truncate: g = "end", copyLabel: _, wrap: v = !1, secret: y = !1, secretName: b, display: x, className: S, ...C }, w) {
|
|
10
|
+
let T = i(), [E, D] = c(!1), O = e(p), k = b ?? s ?? T.copyable.secret, A = y && !E, j = g === "start" && !h && !v;
|
|
11
11
|
return /* @__PURE__ */ d("div", {
|
|
12
|
-
ref:
|
|
13
|
-
...
|
|
14
|
-
className: `select-copyrow${h ? " select-copyrow--prose" : ""}${
|
|
12
|
+
ref: w,
|
|
13
|
+
...C,
|
|
14
|
+
className: `select-copyrow${h ? " select-copyrow--prose" : ""}${j ? " select-copyrow--truncate-start" : ""}${v ? " select-copyrow--wrap" : ""}${S ? " " + S : ""}`,
|
|
15
15
|
children: [s && /* @__PURE__ */ u("span", {
|
|
16
16
|
className: "select-copyrow__label",
|
|
17
17
|
children: s
|
|
@@ -19,34 +19,34 @@ var f = s(function({ label: s, value: f, href: p, onCopy: m, prose: h = !1, trun
|
|
|
19
19
|
className: "select-copyrow__value",
|
|
20
20
|
children: [/* @__PURE__ */ u("span", {
|
|
21
21
|
className: "select-copyrow__text",
|
|
22
|
-
title:
|
|
23
|
-
children:
|
|
22
|
+
title: j && !A ? x ?? f : void 0,
|
|
23
|
+
children: A ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("span", {
|
|
24
24
|
"aria-hidden": "true",
|
|
25
25
|
children: "•".repeat(Math.min(32, f.length))
|
|
26
26
|
}), /* @__PURE__ */ u("span", {
|
|
27
27
|
className: "select-copybtn__status",
|
|
28
|
-
children:
|
|
29
|
-
})] }) :
|
|
28
|
+
children: T.copyable.concealed(k)
|
|
29
|
+
})] }) : j ? /* @__PURE__ */ u("bdi", {
|
|
30
30
|
dir: "ltr",
|
|
31
|
-
children: f
|
|
32
|
-
}) : f
|
|
31
|
+
children: x ?? f
|
|
32
|
+
}) : x ?? f
|
|
33
33
|
}), /* @__PURE__ */ d("div", {
|
|
34
34
|
className: "select-copyrow__actions",
|
|
35
35
|
children: [
|
|
36
|
-
|
|
36
|
+
O && /* @__PURE__ */ u("a", {
|
|
37
37
|
className: "select-iconbtn select-iconbtn--sm",
|
|
38
|
-
href:
|
|
38
|
+
href: O,
|
|
39
39
|
target: "_blank",
|
|
40
40
|
rel: "noreferrer",
|
|
41
|
-
"aria-label":
|
|
42
|
-
title:
|
|
41
|
+
"aria-label": T.common.open,
|
|
42
|
+
title: T.common.open,
|
|
43
43
|
children: /* @__PURE__ */ u(t, {})
|
|
44
44
|
}),
|
|
45
45
|
y && /* @__PURE__ */ u(a, {
|
|
46
46
|
size: "sm",
|
|
47
|
-
icon: u(
|
|
48
|
-
label:
|
|
49
|
-
onClick: () =>
|
|
47
|
+
icon: u(E ? r : n, {}),
|
|
48
|
+
label: E ? T.copyable.conceal(k) : T.copyable.reveal(k),
|
|
49
|
+
onClick: () => D((e) => !e)
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ u(o, {
|
|
52
52
|
value: f,
|
package/package.json
CHANGED