@arkyn/components 3.0.1-beta.189 → 3.0.1-beta.192
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/components/button/index.d.ts +1 -1
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/iconButton/index.d.ts +1 -1
- package/dist/components/iconButton/index.d.ts.map +1 -1
- package/dist/components/phoneInput/phoneInputMask/index.d.ts.map +1 -1
- package/dist/index.js +11 -8
- package/dist/modules/components/phoneInput/phoneInputMask/index.js +11 -8
- package/dist/modules/style.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
24
24
|
* Color scheme applied to the button.
|
|
25
25
|
* @default "primary"
|
|
26
26
|
*/
|
|
27
|
-
scheme?: "primary" | "success" | "warning" | "danger" | "info";
|
|
27
|
+
scheme?: "primary" | "secondary" | "success" | "warning" | "danger" | "info";
|
|
28
28
|
/** Lucide icon rendered to the left of the label. */
|
|
29
29
|
leftIcon?: LucideIcon;
|
|
30
30
|
/** Lucide icon rendered to the right of the label. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,cAAc,CAAC;AAEtB,KAAK,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC5D,sFAAsF;IACtF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;IACtD;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,cAAc,CAAC;AAEtB,KAAK,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC5D,sFAAsF;IACtF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;IACtD;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC7E,qDAAqD;IACrD,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,sDAAsD;IACtD,SAAS,CAAC,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,+BAqCjC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -26,7 +26,7 @@ type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"
|
|
|
26
26
|
* Color scheme applied to the button.
|
|
27
27
|
* @default "primary"
|
|
28
28
|
*/
|
|
29
|
-
scheme?: "primary" | "success" | "warning" | "danger" | "info";
|
|
29
|
+
scheme?: "primary" | "secondary" | "success" | "warning" | "danger" | "info";
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* IconButton — compact button that renders a single icon without a text label.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/iconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,cAAc,CAAC;AAEtB,KAAK,eAAe,GAAG,IAAI,CAC1B,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,YAAY,CACzB,GAAG;IACH,kEAAkE;IAClE,IAAI,EAAE,UAAU,CAAC;IACjB,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;IACtD;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/iconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,cAAc,CAAC;AAEtB,KAAK,eAAe,GAAG,IAAI,CAC1B,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG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AAE,MAAM,KAAK,IAAI,CAAC;IAC9B,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AASF,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/phoneInput/phoneInputMask/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,aAAa,CAAC;AAErB,KAAK,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,cAAc,EAAE,WAAW,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AASF,QAAA,MAAM,cAAc,kHAgFnB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3082,20 +3082,22 @@ var or = nr(rr.NINE).length, sr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3082
3082
|
ref: t,
|
|
3083
3083
|
...e
|
|
3084
3084
|
})), cr = r((e, t) => {
|
|
3085
|
-
let { onFocus: n, readonly: r, onBlur: i, size: a, onChange: s, value: c, currentCountry:
|
|
3085
|
+
let { onFocus: n, readonly: r, onBlur: i, size: a, onChange: s, value: c, currentCountry: u, disabled: d, id: f } = e, m = l(!0), h = l(s);
|
|
3086
|
+
h.current = s;
|
|
3087
|
+
let g = typeof u.mask == "string" ? u.mask : u.mask[0];
|
|
3086
3088
|
o(() => {
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
]);
|
|
3089
|
+
if (m.current) {
|
|
3090
|
+
m.current = !1;
|
|
3091
|
+
return;
|
|
3092
|
+
}
|
|
3093
|
+
h.current(g);
|
|
3094
|
+
}, [g]);
|
|
3093
3095
|
let _ = `phoneInputMask ${a}`;
|
|
3094
3096
|
function v(e) {
|
|
3095
3097
|
let t = nr(e.target.value), n = ar(t);
|
|
3096
3098
|
t.length > or || (t = ir(t, rr[n]), e.target.value = t, s(t));
|
|
3097
3099
|
}
|
|
3098
|
-
return
|
|
3100
|
+
return u.code === "+55" ? /* @__PURE__ */ p("input", {
|
|
3099
3101
|
id: f,
|
|
3100
3102
|
value: c,
|
|
3101
3103
|
onChange: v,
|
|
@@ -3103,6 +3105,7 @@ var or = nr(rr.NINE).length, sr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3103
3105
|
onFocus: n,
|
|
3104
3106
|
onBlur: i,
|
|
3105
3107
|
disabled: d,
|
|
3108
|
+
readOnly: r,
|
|
3106
3109
|
ref: t
|
|
3107
3110
|
}) : /* @__PURE__ */ p(X, {
|
|
3108
3111
|
id: f,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MAX_LENGTH as e, TYPES as t, applyMask as n, clear as r, getMask as i } from "../../../utils/phoneInputUtilities.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { forwardRef as a, useEffect as o,
|
|
3
|
+
import { forwardRef as a, useEffect as o, useRef as s } from "react";
|
|
4
4
|
import { jsx as c } from "react/jsx-runtime";
|
|
5
5
|
import { InputMask as l } from "@react-input/mask";
|
|
6
6
|
//#region src/components/phoneInput/phoneInputMask/index.tsx
|
|
@@ -8,14 +8,16 @@ var u = a((e, t) => /* @__PURE__ */ c("input", {
|
|
|
8
8
|
ref: t,
|
|
9
9
|
...e
|
|
10
10
|
})), d = a((a, d) => {
|
|
11
|
-
let { onFocus: f, readonly: p, onBlur: m, size: h, onChange: g, value: _, currentCountry: v, disabled: y, id: b } = a,
|
|
11
|
+
let { onFocus: f, readonly: p, onBlur: m, size: h, onChange: g, value: _, currentCountry: v, disabled: y, id: b } = a, x = s(!0), S = s(g);
|
|
12
|
+
S.current = g;
|
|
13
|
+
let C = typeof v.mask == "string" ? v.mask : v.mask[0];
|
|
12
14
|
o(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
]);
|
|
15
|
+
if (x.current) {
|
|
16
|
+
x.current = !1;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
S.current(C);
|
|
20
|
+
}, [C]);
|
|
19
21
|
let w = `phoneInputMask ${h}`;
|
|
20
22
|
function T(a) {
|
|
21
23
|
let o = r(a.target.value), s = i(o);
|
|
@@ -29,6 +31,7 @@ var u = a((e, t) => /* @__PURE__ */ c("input", {
|
|
|
29
31
|
onFocus: f,
|
|
30
32
|
onBlur: m,
|
|
31
33
|
disabled: y,
|
|
34
|
+
readOnly: p,
|
|
32
35
|
ref: d
|
|
33
36
|
}) : /* @__PURE__ */ c(l, {
|
|
34
37
|
id: b,
|