@selectwin/kit 0.1.150 → 0.1.152
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 +2 -0
- package/dist/SelectMoneyField.d.ts +2 -2
- package/dist/index.js +20 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectCopyRow.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ type SelectCopyRowOwnProps = {
|
|
|
10
10
|
onCopy?: (value: string) => void;
|
|
11
11
|
/** Texto corrido (uma mensagem): aparece inteiro, numa caixa, com o botão "Copiar". */
|
|
12
12
|
prose?: boolean;
|
|
13
|
+
/** Onde cortar quando não cabe: no fim (padrão) ou no começo — para link e id, cuja parte que distingue é o fim. */
|
|
14
|
+
truncate?: 'end' | 'start';
|
|
13
15
|
};
|
|
14
16
|
export type SelectCopyRowProps = SelectCopyRowOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectCopyRowOwnProps>;
|
|
15
17
|
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>>;
|
|
@@ -11,8 +11,8 @@ type SelectMoneyFieldOwnProps = {
|
|
|
11
11
|
placeholder?: string;
|
|
12
12
|
name?: string;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
-
/** Control density. Default `md`; use `sm` in dense surfaces and modal/card forms. */
|
|
15
|
-
size?: 'sm' | 'md';
|
|
14
|
+
/** Control density. Default `md`; use `sm` in dense surfaces and modal/card forms; `lg` when the amount IS the task. */
|
|
15
|
+
size?: 'sm' | 'md' | 'lg';
|
|
16
16
|
};
|
|
17
17
|
export type SelectMoneyFieldProps = SelectMoneyFieldOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectMoneyFieldOwnProps>;
|
|
18
18
|
export declare const SelectMoneyField: import('react').ForwardRefExoticComponent<SelectMoneyFieldOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectMoneyFieldOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/index.js
CHANGED
|
@@ -2937,7 +2937,7 @@ var Mn = r(function({ label: e, value: t, onChange: n, info: r, hint: i, error:
|
|
|
2937
2937
|
return /* @__PURE__ */ g("div", {
|
|
2938
2938
|
ref: v,
|
|
2939
2939
|
..._,
|
|
2940
|
-
className: `select-field${p === "sm" ? " select-field--sm" : ""}${m ? " " + m : ""}`,
|
|
2940
|
+
className: `select-field${p === "sm" ? " select-field--sm" : p === "lg" ? " select-field--lg" : ""}${m ? " " + m : ""}`,
|
|
2941
2941
|
children: [
|
|
2942
2942
|
e && /* @__PURE__ */ h(Sn, {
|
|
2943
2943
|
htmlFor: y,
|
|
@@ -7606,16 +7606,16 @@ var vo = r(function({ children: e, align: t = "start", disclosure: n, className:
|
|
|
7606
7606
|
})
|
|
7607
7607
|
]
|
|
7608
7608
|
});
|
|
7609
|
-
}), xo = r(function({ label: e, value: t, href: n, onCopy: r, prose: i = !1,
|
|
7610
|
-
let [
|
|
7609
|
+
}), xo = r(function({ label: e, value: t, href: n, onCopy: r, prose: i = !1, truncate: a = "end", className: o, ...s }, c) {
|
|
7610
|
+
let [l, u] = f(!1), d = ca(n), p = () => {
|
|
7611
7611
|
navigator.clipboard.writeText(t).then(() => {
|
|
7612
|
-
|
|
7612
|
+
u(!0), setTimeout(() => u(!1), 1200), r == null || r(t);
|
|
7613
7613
|
});
|
|
7614
7614
|
};
|
|
7615
7615
|
return /* @__PURE__ */ g("div", {
|
|
7616
|
-
ref:
|
|
7617
|
-
...
|
|
7618
|
-
className: `select-copyrow${i ? " select-copyrow--prose" : ""}${a ? " " +
|
|
7616
|
+
ref: c,
|
|
7617
|
+
...s,
|
|
7618
|
+
className: `select-copyrow${i ? " select-copyrow--prose" : ""}${a === "start" && !i ? " select-copyrow--truncate-start" : ""}${o ? " " + o : ""}`,
|
|
7619
7619
|
children: [e && /* @__PURE__ */ h("span", {
|
|
7620
7620
|
className: "select-copyrow__label",
|
|
7621
7621
|
children: e
|
|
@@ -7623,12 +7623,16 @@ var vo = r(function({ children: e, align: t = "start", disclosure: n, className:
|
|
|
7623
7623
|
className: "select-copyrow__value",
|
|
7624
7624
|
children: [/* @__PURE__ */ h("span", {
|
|
7625
7625
|
className: "select-copyrow__text",
|
|
7626
|
-
|
|
7626
|
+
title: a === "start" && !i ? t : void 0,
|
|
7627
|
+
children: a === "start" && !i ? /* @__PURE__ */ h("bdi", {
|
|
7628
|
+
dir: "ltr",
|
|
7629
|
+
children: t
|
|
7630
|
+
}) : t
|
|
7627
7631
|
}), /* @__PURE__ */ g("div", {
|
|
7628
7632
|
className: "select-copyrow__actions",
|
|
7629
|
-
children: [
|
|
7633
|
+
children: [d && /* @__PURE__ */ h("a", {
|
|
7630
7634
|
className: "select-iconbtn select-iconbtn--sm",
|
|
7631
|
-
href:
|
|
7635
|
+
href: d,
|
|
7632
7636
|
target: "_blank",
|
|
7633
7637
|
rel: "noreferrer",
|
|
7634
7638
|
"aria-label": "Abrir",
|
|
@@ -7638,14 +7642,14 @@ var vo = r(function({ children: e, align: t = "start", disclosure: n, className:
|
|
|
7638
7642
|
variant: "secondary",
|
|
7639
7643
|
size: "sm",
|
|
7640
7644
|
inline: !0,
|
|
7641
|
-
icon: h(
|
|
7642
|
-
onClick:
|
|
7643
|
-
children:
|
|
7645
|
+
icon: h(l ? Ve : J, {}),
|
|
7646
|
+
onClick: p,
|
|
7647
|
+
children: l ? "Copiado" : "Copiar"
|
|
7644
7648
|
}) : /* @__PURE__ */ h(Y, {
|
|
7645
7649
|
size: "sm",
|
|
7646
|
-
icon: h(
|
|
7647
|
-
label:
|
|
7648
|
-
onClick:
|
|
7650
|
+
icon: h(l ? Ve : J, {}),
|
|
7651
|
+
label: l ? "Copiado" : "Copiar",
|
|
7652
|
+
onClick: p
|
|
7649
7653
|
})]
|
|
7650
7654
|
})]
|
|
7651
7655
|
})]
|