@selectwin/kit 0.1.200 → 0.1.201

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.
@@ -1,6 +1,6 @@
1
1
  export declare function SelectDocumentField({ label, value, onChange, hint, error, onBlur, required, name, }: {
2
2
  label?: string;
3
- /** Clean digits (no mask). */
3
+ /** O valor limpo, sem a máscara: os dígitos e, no CNPJ alfanumérico, as letras em maiúsculas. */
4
4
  value: string;
5
5
  onChange: (clean: string) => void;
6
6
  hint?: string;
@@ -8,7 +8,11 @@ function a({ label: a = "CPF/CNPJ", value: o, onChange: s, hint: c, error: l, on
8
8
  label: a,
9
9
  value: r(o),
10
10
  onChange: (e) => s(t(e)),
11
- inputMode: "numeric",
11
+ inputMode: "text",
12
+ inputProps: {
13
+ autoCapitalize: "characters",
14
+ spellCheck: !1
15
+ },
12
16
  autoComplete: "off",
13
17
  maxLength: 18,
14
18
  hint: l ? void 0 : c ?? (p || void 0),
@@ -1,88 +1,91 @@
1
- import { SelectMoney as e } from "./SelectMoney.js";
2
- import { forwardRef as t } from "react";
3
- import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ import { useSelectLocale as e, useSelectMessages as t } from "./SelectLocale.js";
2
+ import { SelectMoney as n } from "./SelectMoney.js";
3
+ import { forwardRef as r } from "react";
4
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
5
  //#region src/SelectFeeBreakdown.tsx
5
- var a = t(function({ grossCents: t, fees: a, netCents: o, grossLabel: s = "Valor bruto", netLabel: c = "Valor líquido", bar: l = !1, barLabel: u, className: d, ...f }, p) {
6
- let m = o ?? t - a.reduce((e, t) => e + t.cents, 0), h = Math.max(0, t - m), g = l && t > 0 && m >= 0, _ = t > 0 ? h / t * 100 : 0;
7
- return /* @__PURE__ */ i("div", {
8
- ref: p,
9
- ...f,
10
- className: `select-fees${g ? " select-fees--bar" : ""}${d ? " " + d : ""}`,
6
+ var s = r(function({ grossCents: r, fees: s, netCents: c, grossLabel: l, netLabel: u, bar: d = !1, barLabel: f, className: p, ...m }, h) {
7
+ let g = t().fees, _ = e(), v = l ?? g.gross, y = u ?? g.net, b = c ?? r - s.reduce((e, t) => e + t.cents, 0), x = Math.max(0, r - b), S = d && r > 0 && b >= 0, C = r > 0 ? x / r * 100 : 0;
8
+ return /* @__PURE__ */ o("div", {
9
+ ref: h,
10
+ ...m,
11
+ className: `select-fees${S ? " select-fees--bar" : ""}${p ? " " + p : ""}`,
11
12
  children: [
12
- g && /* @__PURE__ */ i("div", {
13
+ S && /* @__PURE__ */ o("div", {
13
14
  className: "select-fees__visual",
14
- children: [/* @__PURE__ */ i("div", {
15
+ children: [/* @__PURE__ */ o("div", {
15
16
  className: "select-fees__bar",
16
17
  "aria-hidden": "true",
17
- children: [/* @__PURE__ */ r("span", {
18
+ children: [/* @__PURE__ */ a("span", {
18
19
  className: "select-fees__barnet",
19
- style: { flexGrow: m },
20
- children: /* @__PURE__ */ r("span", {
20
+ style: { flexGrow: b },
21
+ children: /* @__PURE__ */ a("span", {
21
22
  className: "select-fees__barlabel",
22
- children: u ?? /* @__PURE__ */ i(n, { children: [
23
- c,
23
+ children: f ?? /* @__PURE__ */ o(i, { children: [
24
+ y,
24
25
  " · ",
25
- /* @__PURE__ */ r(e, { cents: m })
26
+ /* @__PURE__ */ a(n, { cents: b })
26
27
  ] })
27
28
  })
28
- }), h > 0 && /* @__PURE__ */ r("span", {
29
+ }), x > 0 && /* @__PURE__ */ a("span", {
29
30
  className: "select-fees__barfee",
30
- style: { flexGrow: h }
31
+ style: { flexGrow: x }
31
32
  })]
32
- }), /* @__PURE__ */ i("div", {
33
+ }), /* @__PURE__ */ o("div", {
33
34
  className: "select-fees__legend",
34
- children: [h > 0 && /* @__PURE__ */ i("span", {
35
+ children: [x > 0 && /* @__PURE__ */ o("span", {
35
36
  className: "select-fees__legenditem",
36
37
  children: [
37
- /* @__PURE__ */ r("span", {
38
+ /* @__PURE__ */ a("span", {
38
39
  className: "select-fees__dot select-fees__dot--fee",
39
40
  "aria-hidden": "true"
40
41
  }),
41
- "Taxas ",
42
- /* @__PURE__ */ r(e, { cents: h }),
42
+ g.fees,
43
+ " ",
44
+ /* @__PURE__ */ a(n, { cents: x }),
43
45
  " (",
44
- _.toLocaleString("pt-BR", {
46
+ C.toLocaleString(_ === "en" ? "en-US" : "pt-BR", {
45
47
  maximumFractionDigits: 1,
46
48
  minimumFractionDigits: 1
47
49
  }),
48
50
  "%)"
49
51
  ]
50
- }), /* @__PURE__ */ i("span", {
52
+ }), /* @__PURE__ */ o("span", {
51
53
  className: "select-fees__legenditem",
52
54
  children: [
53
- /* @__PURE__ */ r("span", {
55
+ /* @__PURE__ */ a("span", {
54
56
  className: "select-fees__dot select-fees__dot--net",
55
57
  "aria-hidden": "true"
56
58
  }),
57
- "Líquido ",
58
- /* @__PURE__ */ r(e, { cents: m })
59
+ g.netShort,
60
+ " ",
61
+ /* @__PURE__ */ a(n, { cents: b })
59
62
  ]
60
63
  })]
61
64
  })]
62
65
  }),
63
- /* @__PURE__ */ i("div", {
66
+ /* @__PURE__ */ o("div", {
64
67
  className: "select-fees__row",
65
- children: [/* @__PURE__ */ r("span", { children: s }), /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(e, { cents: t }) })]
68
+ children: [/* @__PURE__ */ a("span", { children: v }), /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(n, { cents: r }) })]
66
69
  }),
67
- a.map((t) => /* @__PURE__ */ i("div", {
70
+ s.map((e) => /* @__PURE__ */ o("div", {
68
71
  className: "select-fees__row",
69
- children: [/* @__PURE__ */ r("span", { children: t.label }), /* @__PURE__ */ i("span", {
72
+ children: [/* @__PURE__ */ a("span", { children: e.label }), /* @__PURE__ */ o("span", {
70
73
  className: "select-fees__neg",
71
- children: ["−\xA0", /* @__PURE__ */ r(e, { cents: t.cents })]
74
+ children: ["−\xA0", /* @__PURE__ */ a(n, { cents: e.cents })]
72
75
  })]
73
- }, t.label)),
74
- /* @__PURE__ */ r("div", { className: "select-fees__divider" }),
75
- /* @__PURE__ */ i("div", {
76
+ }, e.label)),
77
+ /* @__PURE__ */ a("div", { className: "select-fees__divider" }),
78
+ /* @__PURE__ */ o("div", {
76
79
  className: "select-fees__row select-fees__row--net",
77
- children: [/* @__PURE__ */ r("span", { children: c }), /* @__PURE__ */ r("span", {
80
+ children: [/* @__PURE__ */ a("span", { children: y }), /* @__PURE__ */ a("span", {
78
81
  className: "select-fees__netvalue",
79
- children: /* @__PURE__ */ r(e, { cents: m })
82
+ children: /* @__PURE__ */ a(n, { cents: b })
80
83
  })]
81
84
  })
82
85
  ]
83
86
  });
84
87
  });
85
88
  //#endregion
86
- export { a as SelectFeeBreakdown };
89
+ export { s as SelectFeeBreakdown };
87
90
 
88
91
  //# sourceMappingURL=SelectFeeBreakdown.js.map
@@ -75,6 +75,13 @@ export interface SelectKitMessages {
75
75
  sideNav: {
76
76
  pending: (hint: string) => string;
77
77
  };
78
+ /** 0.1.201: o SelectFeeBreakdown — os rótulos de sempre e a legenda da barra. */
79
+ fees: {
80
+ gross: string;
81
+ net: string;
82
+ fees: string;
83
+ netShort: string;
84
+ };
78
85
  }
79
86
  /** Os dicionários do kit, para quem quer conferir ou montar um texto do mesmo jeito. */
80
87
  export declare const selectKitMessages: Readonly<Record<SelectLocaleCode, SelectKitMessages>>;
@@ -80,7 +80,13 @@ var r = {
80
80
  progressLabel: "Progresso",
81
81
  progress: (e, t) => `${e} de ${t}`
82
82
  },
83
- sideNav: { pending: (e) => `${e} (com pendências)` }
83
+ sideNav: { pending: (e) => `${e} (com pendências)` },
84
+ fees: {
85
+ gross: "Valor bruto",
86
+ net: "Valor líquido",
87
+ fees: "Taxas",
88
+ netShort: "Líquido"
89
+ }
84
90
  },
85
91
  en: {
86
92
  common: {
@@ -161,7 +167,13 @@ var r = {
161
167
  progressLabel: "Progress",
162
168
  progress: (e, t) => `${e} of ${t}`
163
169
  },
164
- sideNav: { pending: (e) => `${e} (pending)` }
170
+ sideNav: { pending: (e) => `${e} (pending)` },
171
+ fees: {
172
+ gross: "Gross amount",
173
+ net: "Net amount",
174
+ fees: "Fees",
175
+ netShort: "Net"
176
+ }
165
177
  }
166
178
  }, i = e(null);
167
179
  function a({ locale: e, children: t }) {
@@ -1,28 +1,29 @@
1
1
  /* empty css */
2
2
  import { EyeIcon as e, EyeOffIcon as t } from "./icons.js";
3
- import { SelectIconButton as n } from "./SelectIconButton.js";
4
- import { centsToBRL as r } from "./internal/money.js";
5
- import { createContext as i, forwardRef as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useState as u, useSyncExternalStore as d } from "react";
6
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
3
+ import { useSelectLocale as n } from "./SelectLocale.js";
4
+ import { SelectIconButton as r } from "./SelectIconButton.js";
5
+ import { centsToBRL as i } from "./internal/money.js";
6
+ import { createContext as a, forwardRef as o, useCallback as s, useContext as c, useEffect as l, useMemo as u, useState as d, useSyncExternalStore as f } from "react";
7
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
7
8
  //#region src/SelectMoney.tsx
8
- var h = "sw:hide-money", g = {
9
+ var g = "sw:hide-money", _ = {
9
10
  hidden: !1,
10
11
  toggle: () => {},
11
12
  setHidden: () => {}
12
- }, _ = i(null);
13
- function v() {
13
+ }, v = a(null);
14
+ function y() {
14
15
  try {
15
- return localStorage.getItem(h) === "1";
16
+ return localStorage.getItem(g) === "1";
16
17
  } catch {
17
18
  return !1;
18
19
  }
19
20
  }
20
- function y(e) {
21
+ function b(e) {
21
22
  try {
22
- localStorage.setItem(h, e ? "1" : "0");
23
+ localStorage.setItem(g, e ? "1" : "0");
23
24
  } catch {}
24
25
  }
25
- function b() {
26
+ function x() {
26
27
  let e = 0, t = /* @__PURE__ */ new Set(), n = () => t.forEach((e) => e());
27
28
  return {
28
29
  mark() {
@@ -40,16 +41,16 @@ function b() {
40
41
  present: () => e > 0
41
42
  };
42
43
  }
43
- var x = i(null), S = () => () => {}, C = () => !1;
44
- function w({ children: e }) {
45
- let [t] = u(b), [n, r] = u(v), i = o((e) => {
46
- r(e), y(e);
47
- }, []), a = o(() => {
44
+ var S = a(null), C = () => () => {}, w = () => !1;
45
+ function T({ children: e }) {
46
+ let [t] = d(x), [n, r] = d(y), i = s((e) => {
47
+ r(e), b(e);
48
+ }, []), a = s(() => {
48
49
  r((e) => {
49
50
  let t = !e;
50
- return y(t), t;
51
+ return b(t), t;
51
52
  });
52
- }, []), s = l(() => ({
53
+ }, []), o = u(() => ({
53
54
  hidden: n,
54
55
  toggle: a,
55
56
  setHidden: i
@@ -58,28 +59,28 @@ function w({ children: e }) {
58
59
  a,
59
60
  i
60
61
  ]);
61
- return /* @__PURE__ */ p(x.Provider, {
62
+ return /* @__PURE__ */ m(S.Provider, {
62
63
  value: t,
63
- children: /* @__PURE__ */ p(_.Provider, {
64
- value: s,
64
+ children: /* @__PURE__ */ m(v.Provider, {
65
+ value: o,
65
66
  children: e
66
67
  })
67
68
  });
68
69
  }
69
- function T() {
70
- return s(_) ?? g;
70
+ function E() {
71
+ return c(v) ?? _;
71
72
  }
72
- function E(e = !0) {
73
- let t = s(x);
74
- c(() => e && t ? t.mark() : void 0, [t, e]);
73
+ function D(e = !0) {
74
+ let t = c(S);
75
+ l(() => e && t ? t.mark() : void 0, [t, e]);
75
76
  }
76
- function D() {
77
- let e = s(x);
78
- return d(e ? e.subscribe : S, e ? e.present : C, C);
77
+ function O() {
78
+ let e = c(S);
79
+ return f(e ? e.subscribe : C, e ? e.present : w, w);
79
80
  }
80
- var O = a(function({ children: e, label: t = "valor oculto", className: n, ...r }, i) {
81
- let { hidden: a } = T();
82
- return E(), /* @__PURE__ */ p("span", {
81
+ var k = o(function({ children: e, label: t = "valor oculto", className: n, ...r }, i) {
82
+ let { hidden: a } = E();
83
+ return D(), /* @__PURE__ */ m("span", {
83
84
  ref: i,
84
85
  ...r,
85
86
  className: `select-sensitive${a ? " select-sensitive--hidden" : ""}${n ? " " + n : ""}`,
@@ -87,50 +88,56 @@ var O = a(function({ children: e, label: t = "valor oculto", className: n, ...r
87
88
  children: e
88
89
  });
89
90
  });
90
- function k({ cents: e, sensitive: t = !0 }) {
91
- let n = r(e);
92
- return p(t ? O : f, { children: n });
91
+ function A({ cents: e, sensitive: t = !0 }) {
92
+ let r = i(e, n());
93
+ return m(t ? k : p, { children: r });
93
94
  }
94
- var A = new Intl.NumberFormat("pt-BR", {
95
- signDisplay: "exceptZero",
96
- minimumFractionDigits: 1,
97
- maximumFractionDigits: 1
98
- }), j = a(function({ value: e, invert: t = !1, caption: n, unit: r = "percent", className: i, ...a }, o) {
99
- if (e == null || !Number.isFinite(e)) return /* @__PURE__ */ m("span", {
100
- ref: o,
101
- ...a,
102
- className: `select-delta select-delta--muted${i ? " " + i : ""}`,
103
- children: ["—", n ? ` ${n}` : ""]
95
+ var j = /* @__PURE__ */ new Map();
96
+ function M(e) {
97
+ let t = j.get(e);
98
+ return t || (t = new Intl.NumberFormat(e === "en" ? "en-US" : "pt-BR", {
99
+ signDisplay: "exceptZero",
100
+ minimumFractionDigits: 1,
101
+ maximumFractionDigits: 1
102
+ }), j.set(e, t)), t;
103
+ }
104
+ var N = o(function({ value: e, invert: t = !1, caption: r, unit: i = "percent", className: a, ...o }, s) {
105
+ let c = n();
106
+ if (e == null || !Number.isFinite(e)) return /* @__PURE__ */ h("span", {
107
+ ref: s,
108
+ ...o,
109
+ className: `select-delta select-delta--muted${a ? " " + a : ""}`,
110
+ children: ["—", r ? ` ${r}` : ""]
104
111
  });
105
- let s = e === 0, c = e > 0, l = s ? null : t ? !c : c, u = l == null ? "muted" : l ? "up" : "down", d = s ? "" : c ? "▲" : "▼";
106
- return /* @__PURE__ */ m("span", {
107
- ref: o,
108
- ...a,
109
- className: `select-delta${i ? " " + i : ""}`,
110
- children: [/* @__PURE__ */ m("span", {
111
- className: `select-delta__value select-delta__value--${u}`,
112
+ let l = e === 0, u = e > 0, d = l ? null : t ? !u : u, f = d == null ? "muted" : d ? "up" : "down", p = l ? "" : u ? "▲" : "▼";
113
+ return /* @__PURE__ */ h("span", {
114
+ ref: s,
115
+ ...o,
116
+ className: `select-delta${a ? " " + a : ""}`,
117
+ children: [/* @__PURE__ */ h("span", {
118
+ className: `select-delta__value select-delta__value--${f}`,
112
119
  children: [
113
- d ? `${d} ` : "",
114
- A.format(e),
115
- r === "points" ? " p.p." : "%"
120
+ p ? `${p} ` : "",
121
+ M(c).format(e),
122
+ i === "points" ? c === "en" ? " pp" : " p.p." : "%"
116
123
  ]
117
- }), n != null && /* @__PURE__ */ p("span", {
124
+ }), r != null && /* @__PURE__ */ m("span", {
118
125
  className: "select-delta__caption",
119
- children: n
126
+ children: r
120
127
  })]
121
128
  });
122
129
  });
123
- function M() {
124
- let { hidden: r, toggle: i } = T();
125
- return /* @__PURE__ */ p(n, {
130
+ function P() {
131
+ let { hidden: n, toggle: i } = E();
132
+ return /* @__PURE__ */ m(r, {
126
133
  variant: "outline",
127
- icon: p(r ? t : e, {}),
128
- label: r ? "Mostrar valores" : "Ocultar valores",
129
- active: r,
134
+ icon: m(n ? t : e, {}),
135
+ label: n ? "Mostrar valores" : "Ocultar valores",
136
+ active: n,
130
137
  onClick: i
131
138
  });
132
139
  }
133
140
  //#endregion
134
- export { M as SelectHideMoneyToggle, j as SelectMetricDelta, k as SelectMoney, O as SelectSensitiveValue, w as SelectValueVisibilityProvider, D as useSelectHasSensitiveValues, E as useSelectSensitiveValueMark, T as useSelectValueVisibility };
141
+ export { P as SelectHideMoneyToggle, N as SelectMetricDelta, A as SelectMoney, k as SelectSensitiveValue, T as SelectValueVisibilityProvider, O as useSelectHasSensitiveValues, D as useSelectSensitiveValueMark, E as useSelectValueVisibility };
135
142
 
136
143
  //# sourceMappingURL=SelectMoney.js.map
@@ -1,9 +1,8 @@
1
- /**
2
- * Brazilian document (CPF/CNPJ) helpers. The masked value is for display only —
3
- * always send the CLEAN (digits-only) value to the backend (validation runs on
4
- * the digits; nothing upstream strips the mask for you).
5
- */
1
+ /** O valor limpo: só dígitos e letras, em maiúsculas (o CPF e o CNPJ numérico seguem só com dígitos). */
6
2
  export declare function cleanDocument(value: string | null | undefined): string;
7
3
  export declare function documentType(value: string | null | undefined): 'CPF' | 'CNPJ' | '';
8
- /** Masks for display: CPF 000.000.000-00, CNPJ 00.000.000/0000-00. */
4
+ /**
5
+ * Masks for display: CPF 000.000.000-00, CNPJ 00.000.000/0000-00 (o alfanumérico, AA.AAA.AAA/AAAA-00). Só com dígitos,
6
+ * até 11 é o CPF; com uma letra, só pode ser o CNPJ, e a máscara dele vem desde o primeiro caractere.
7
+ */
9
8
  export declare function formatDocument(value: string | null | undefined): string;
@@ -1,16 +1,17 @@
1
1
  //#region src/internal/document.ts
2
- function e(e) {
3
- return (e ?? "").replace(/\D/g, "");
2
+ var e = /^\d{11}$/, t = /^[0-9A-Z]{12}\d{2}$/;
3
+ function n(e) {
4
+ return (e ?? "").toUpperCase().replace(/[^0-9A-Z]/g, "");
4
5
  }
5
- function t(t) {
6
- let n = e(t);
7
- return n.length === 11 ? "CPF" : n.length === 14 ? "CNPJ" : "";
6
+ function r(r) {
7
+ let i = n(r);
8
+ return e.test(i) ? "CPF" : t.test(i) ? "CNPJ" : "";
8
9
  }
9
- function n(t) {
10
- let n = e(t).slice(0, 14);
11
- return n.length <= 11 ? n.replace(/^(\d{3})(\d)/, "$1.$2").replace(/^(\d{3})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1-$2") : n.replace(/^(\d{2})(\d)/, "$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1/$2").replace(/(\d{4})(\d)/, "$1-$2");
10
+ function i(e) {
11
+ let t = n(e).slice(0, 14);
12
+ return t.length <= 11 && /^\d*$/.test(t) ? t.replace(/^(\d{3})(\d)/, "$1.$2").replace(/^(\d{3})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1-$2") : t.replace(/^([0-9A-Z]{2})([0-9A-Z])/, "$1.$2").replace(/^([0-9A-Z]{2})\.([0-9A-Z]{3})([0-9A-Z])/, "$1.$2.$3").replace(/\.([0-9A-Z]{3})([0-9A-Z])/, ".$1/$2").replace(/([0-9A-Z]{4})([0-9A-Z])/, "$1-$2");
12
13
  }
13
14
  //#endregion
14
- export { e as cleanDocument, t as documentType, n as formatDocument };
15
+ export { n as cleanDocument, r as documentType, i as formatDocument };
15
16
 
16
17
  //# sourceMappingURL=document.js.map
@@ -1,8 +1,9 @@
1
+ import { SelectLocaleCode } from '../SelectLocale';
1
2
  /** Coerce a value to a finite number. The backend frequently returns money fields
2
3
  * as numeric STRINGS ("45998"), so coerce before any math/format —
3
4
  * otherwise every amount renders as R$ 0,00. */
4
5
  export declare function toNumber(value: unknown): number;
5
- /** Cents → "R$ 1.234,56". Accepts numeric strings; null/NaN → "R$ 0,00". */
6
- export declare function centsToBRL(cents: number | string | null | undefined): string;
7
- /** A reais value (already divided) → BRL string. */
8
- export declare function formatBRL(value: number): string;
6
+ /** Cents → "R$ 1.234,56" (ou "R$1,234.56" em inglês). Accepts numeric strings; null/NaN → "R$ 0,00". */
7
+ export declare function centsToBRL(cents: number | string | null | undefined, locale?: SelectLocaleCode): string;
8
+ /** A reais value (already divided) → BRL string, no idioma dado. */
9
+ export declare function formatBRL(value: number, locale?: SelectLocaleCode): string;
@@ -1,16 +1,20 @@
1
1
  //#region src/internal/money.ts
2
- var e = new Intl.NumberFormat("pt-BR", {
3
- style: "currency",
4
- currency: "BRL"
5
- });
6
- function t(e) {
2
+ var e = /* @__PURE__ */ new Map();
3
+ function t(t) {
4
+ let n = e.get(t);
5
+ return n || (n = new Intl.NumberFormat(t === "en" ? "en-US" : "pt-BR", {
6
+ style: "currency",
7
+ currency: "BRL"
8
+ }), e.set(t, n)), n;
9
+ }
10
+ function n(e) {
7
11
  let t = typeof e == "string" ? Number(e) : e;
8
12
  return typeof t == "number" && Number.isFinite(t) ? t : 0;
9
13
  }
10
- function n(n) {
11
- return e.format(t(n) / 100);
14
+ function r(e, r = "pt-BR") {
15
+ return t(r).format(n(e) / 100);
12
16
  }
13
17
  //#endregion
14
- export { n as centsToBRL, t as toNumber };
18
+ export { r as centsToBRL, n as toNumber };
15
19
 
16
20
  //# sourceMappingURL=money.js.map