@tpc-mare/mare-ui-components-react 0.1.11 → 0.1.13
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/accordion/index.js +1 -1
- package/dist/banner/index.js +1 -1
- package/dist/breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/breadcrumbs/Breadcrumbs.types.d.ts +11 -0
- package/dist/breadcrumbs/index.d.ts +2 -0
- package/dist/breadcrumbs/index.js +4 -0
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/counter/Counter.d.ts +2 -0
- package/dist/counter/Counter.types.d.ts +23 -0
- package/dist/counter/index.d.ts +2 -0
- package/dist/counter/index.js +4 -0
- package/dist/date-picker/index.js +1 -1
- package/dist/dialog/index.js +1 -1
- package/dist/drawer/index.js +1 -1
- package/dist/image-slider/index.js +1 -1
- package/dist/index/index.d.ts +4 -0
- package/dist/index/index.js +67 -63
- package/dist/paginator/index.js +1 -1
- package/dist/panel-menu/index.js +1 -1
- package/dist/password/index.js +1 -1
- package/dist/search-field/index.js +1 -1
- package/dist/select-field/index.js +1 -1
- package/dist/shared/{Accordion-Dhs7EeM6.js → Accordion-BLQ1mWZZ.js} +1 -1
- package/dist/shared/{Banner-B41NQS5P.js → Banner-DXftmx9P.js} +1 -1
- package/dist/shared/Breadcrumbs-Cqr3Jitd.js +77 -0
- package/dist/shared/{Checkbox-B7vM1mxP.js → Checkbox-BXnSN2vK.js} +10 -9
- package/dist/shared/{Combobox-oSS0Rlbv.js → Combobox-SkrEe5He.js} +44 -41
- package/dist/shared/Counter-D4Al7Yme.js +94 -0
- package/dist/shared/{DatePicker-GYH3uorm.js → DatePicker-CwAISvNc.js} +140 -137
- package/dist/shared/{DialogHeader-CZ5OrC8_.js → DialogHeader-RzfQm-pi.js} +14 -14
- package/dist/shared/{DrawerFooter-OFrTFvy2.js → DrawerFooter-BxOEFQ-W.js} +3 -3
- package/dist/shared/IconCheck-DzZA6b2U.js +5 -0
- package/dist/shared/IconChevronDown-ev2ML7Ex.js +5 -0
- package/dist/shared/IconChevronRight-DEIDRsvg.js +7 -0
- package/dist/shared/IconMinus-fS_GL0Et.js +5 -0
- package/dist/shared/IconSearch-CgM6jEUh.js +5 -0
- package/dist/shared/IconX-CpPADKjZ.js +5 -0
- package/dist/shared/{ImageSlider-CdBVmAYC.js → ImageSlider-Bgb1kNQ4.js} +1 -1
- package/dist/shared/{Paginator-BndcA6Ax.js → Paginator-Bp2nghqW.js} +48 -46
- package/dist/shared/{PanelMenu-Bz-fg6px.js → PanelMenu-BpjNM7O_.js} +2 -2
- package/dist/shared/Password-BMKy8dAy.js +95 -0
- package/dist/shared/SearchField-DjJHDaR4.js +64 -0
- package/dist/shared/{SelectField-CGbdf8C2.js → SelectField-CvKaukCG.js} +27 -25
- package/dist/shared/{Stepper-BpKdB3ip.js → Stepper-By8M5bs0.js} +13 -12
- package/dist/shared/{TagChip-BNszVayi.js → TagChip-Bs7srjIL.js} +1 -1
- package/dist/shared/createReactComponent-Cb6Pzf10.js +48 -0
- package/dist/stepper/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tag-chip/index.js +1 -1
- package/package.json +2 -1
- package/dist/shared/Password-cqTK9OlT.js +0 -94
- package/dist/shared/SearchField-CgZV2Am-.js +0 -63
- package/dist/shared/icons-BFOFrum4.js +0 -55
- package/dist/shared/icons.d.ts +0 -15
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { PasswordInput as l } from "@ark-ui/react/password-input";
|
|
3
|
-
import { useFieldContext as A } from "@ark-ui/react/field";
|
|
4
|
-
import { E as R, h as Z } from "./icons-BFOFrum4.js";
|
|
5
|
-
import { u as $, m as j, d as D, f as O } from "./field-layout-D34MpDMB.js";
|
|
6
|
-
const T = "mare:relative mare:w-full mare:group", V = "mare:relative mare:w-full", W = `
|
|
7
|
-
mare:hidden mare:group-focus-within:flex mare:flex-col mare:gap-2
|
|
8
|
-
mare:absolute mare:top-full mare:left-0 mare:mt-2 mare:z-50 mare:w-full
|
|
9
|
-
mare:p-4 mare:rounded-input mare:border mare:border-default mare:bg-raised
|
|
10
|
-
mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
|
|
11
|
-
`, q = "mare:tpc-typography-label-s mare:text-default", B = "mare:border-t mare:border-default", G = "mare:flex mare:flex-col mare:gap-2", H = "mare:h-1 mare:w-full mare:bg-neutral-weak mare:rounded-md mare:overflow-hidden", J = {
|
|
12
|
-
weak: "mare:w-1/3 mare:bg-danger",
|
|
13
|
-
medium: "mare:w-2/3 mare:bg-warning",
|
|
14
|
-
strong: "mare:w-full mare:bg-positive"
|
|
15
|
-
}, K = (a) => `mare:h-full mare:rounded-md mare:transition-[width] mare:duration-500 mare:ease-in-out ${a ? J[a] : "mare:w-0"}`, Q = "mare:tpc-typography-body-s mare:text-default", U = "mare:flex mare:flex-col mare:gap-1 mare:my-0 mare:pl-0 mare:list-none", X = "mare:tpc-typography-body-s mare:text-default", Y = "^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})", M = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})", ee = (a, s = Y, t = M) => a ? new RegExp(t).test(a) ? "strong" : new RegExp(s).test(a) ? "medium" : "weak" : null;
|
|
16
|
-
function te({
|
|
17
|
-
value: a = "",
|
|
18
|
-
onValueChange: s,
|
|
19
|
-
size: t = "medium",
|
|
20
|
-
rounded: h = !1,
|
|
21
|
-
invalid: g = !1,
|
|
22
|
-
disabled: b = !1,
|
|
23
|
-
toggleMask: i = !0,
|
|
24
|
-
showIcon: w = /* @__PURE__ */ e(R, {}),
|
|
25
|
-
hideIcon: v = /* @__PURE__ */ e(Z, {}),
|
|
26
|
-
feedback: d = !0,
|
|
27
|
-
header: n,
|
|
28
|
-
footer: c,
|
|
29
|
-
promptLabel: x = "Please enter a password",
|
|
30
|
-
weakLabel: y = "Weak",
|
|
31
|
-
mediumLabel: N = "Medium",
|
|
32
|
-
strongLabel: I = "Strong",
|
|
33
|
-
mediumRegex: F,
|
|
34
|
-
strongRegex: E,
|
|
35
|
-
...u
|
|
36
|
-
}) {
|
|
37
|
-
const m = $(), f = A(), P = g || (f?.invalid ?? !1), p = b || (f?.disabled ?? !1), S = i ? j(m?.iconSide ?? null, "right") : m?.iconSide ?? null, L = D({
|
|
38
|
-
size: t,
|
|
39
|
-
rounded: h,
|
|
40
|
-
hasFloatLabel: m?.hasFloatLabel ?? !1,
|
|
41
|
-
iconSide: S
|
|
42
|
-
}), _ = m?.hasFloatLabel ? " " : u.placeholder, o = d ? ee(a, F, E) : null, z = o ? { weak: y, medium: N, strong: I }[o] : x;
|
|
43
|
-
return /* @__PURE__ */ r(
|
|
44
|
-
l.Root,
|
|
45
|
-
{
|
|
46
|
-
className: T,
|
|
47
|
-
invalid: P,
|
|
48
|
-
disabled: p,
|
|
49
|
-
visible: i ? void 0 : !1,
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ r(l.Control, { className: V, children: [
|
|
52
|
-
/* @__PURE__ */ e(
|
|
53
|
-
l.Input,
|
|
54
|
-
{
|
|
55
|
-
...u,
|
|
56
|
-
placeholder: _,
|
|
57
|
-
value: a,
|
|
58
|
-
onChange: (C) => s?.(C.target.value),
|
|
59
|
-
className: L
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
i && /* @__PURE__ */ e(
|
|
63
|
-
l.VisibilityTrigger,
|
|
64
|
-
{
|
|
65
|
-
className: O("right", {
|
|
66
|
-
disabled: p,
|
|
67
|
-
interactive: !0
|
|
68
|
-
}),
|
|
69
|
-
children: /* @__PURE__ */ e(l.Indicator, { fallback: w, children: v })
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
] }),
|
|
73
|
-
d && /* @__PURE__ */ r("div", { className: W, children: [
|
|
74
|
-
n && /* @__PURE__ */ e("div", { className: q, children: n }),
|
|
75
|
-
/* @__PURE__ */ r("div", { className: G, children: [
|
|
76
|
-
/* @__PURE__ */ e("div", { className: H, children: /* @__PURE__ */ e("div", { className: K(o) }) }),
|
|
77
|
-
/* @__PURE__ */ e("span", { className: Q, children: z })
|
|
78
|
-
] }),
|
|
79
|
-
c && /* @__PURE__ */ r(k, { children: [
|
|
80
|
-
/* @__PURE__ */ e("div", { className: B }),
|
|
81
|
-
/* @__PURE__ */ e("ul", { className: U, children: c })
|
|
82
|
-
] })
|
|
83
|
-
] })
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
function ie({ children: a }) {
|
|
89
|
-
return /* @__PURE__ */ e("li", { className: X, children: a });
|
|
90
|
-
}
|
|
91
|
-
export {
|
|
92
|
-
te as P,
|
|
93
|
-
ie as a
|
|
94
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { a as x, I as t } from "./IconField-Dh6j6SL1.js";
|
|
3
|
-
import { P as I } from "./ProgressSpinner-B-lrS-tu.js";
|
|
4
|
-
import { S as v, c as F } from "./icons-BFOFrum4.js";
|
|
5
|
-
const L = (o) => !!o.value && o.clearable, P = (o) => o.loading && !o.disabled;
|
|
6
|
-
function B({
|
|
7
|
-
value: o = "",
|
|
8
|
-
onValueChange: s,
|
|
9
|
-
loading: e = !1,
|
|
10
|
-
clearable: c = !1,
|
|
11
|
-
disabled: i = !1,
|
|
12
|
-
leftIcon: l = /* @__PURE__ */ n(v, {}),
|
|
13
|
-
clearIcon: u = /* @__PURE__ */ n(F, {}),
|
|
14
|
-
rightIcon: r,
|
|
15
|
-
onClear: S,
|
|
16
|
-
...h
|
|
17
|
-
}) {
|
|
18
|
-
const a = L({ value: o, clearable: c }), p = P({ loading: e, disabled: i }), C = !!r || c || e, f = /* @__PURE__ */ n(
|
|
19
|
-
x,
|
|
20
|
-
{
|
|
21
|
-
...h,
|
|
22
|
-
value: o,
|
|
23
|
-
onValueChange: s,
|
|
24
|
-
disabled: i,
|
|
25
|
-
rounded: !0
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
if (!C)
|
|
29
|
-
return /* @__PURE__ */ n(
|
|
30
|
-
t,
|
|
31
|
-
{
|
|
32
|
-
icon: l,
|
|
33
|
-
position: "left",
|
|
34
|
-
disabled: i,
|
|
35
|
-
children: f
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
const d = r || (p ? /* @__PURE__ */ n(I, { className: "mare:size-5" }) : a ? u : null), m = !r && !p && a;
|
|
39
|
-
return /* @__PURE__ */ n(
|
|
40
|
-
t,
|
|
41
|
-
{
|
|
42
|
-
icon: l,
|
|
43
|
-
position: "left",
|
|
44
|
-
disabled: i,
|
|
45
|
-
children: /* @__PURE__ */ n(
|
|
46
|
-
t,
|
|
47
|
-
{
|
|
48
|
-
icon: d,
|
|
49
|
-
position: "right",
|
|
50
|
-
disabled: i,
|
|
51
|
-
onIconClick: m ? () => {
|
|
52
|
-
s?.(""), S?.();
|
|
53
|
-
} : void 0,
|
|
54
|
-
iconLabel: m ? "Clear" : void 0,
|
|
55
|
-
children: f
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
B as S
|
|
63
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
const o = (c) => function(t) {
|
|
3
|
-
return /* @__PURE__ */ s(
|
|
4
|
-
"svg",
|
|
5
|
-
{
|
|
6
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
-
viewBox: "0 0 24 24",
|
|
8
|
-
fill: "none",
|
|
9
|
-
stroke: "currentColor",
|
|
10
|
-
strokeWidth: "2",
|
|
11
|
-
strokeLinecap: "round",
|
|
12
|
-
strokeLinejoin: "round",
|
|
13
|
-
"aria-hidden": "true",
|
|
14
|
-
width: "1em",
|
|
15
|
-
height: "1em",
|
|
16
|
-
...t,
|
|
17
|
-
children: c.map((n) => /* @__PURE__ */ s(
|
|
18
|
-
"path",
|
|
19
|
-
{
|
|
20
|
-
d: n
|
|
21
|
-
},
|
|
22
|
-
n
|
|
23
|
-
))
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
}, M = o(["M6 9l6 6 6-6"]), h = o(["M15 18l-6-6 6-6"]), l = o(["M9 18l6-6-6-6"]), i = o(["M11 17l-5-5 5-5", "M18 17l-5-5 5-5"]), I = o(["M6 17l5-5-5-5", "M13 17l5-5-5-5"]), v = o(["M5 12l5 5L20 7"]), C = o([
|
|
27
|
-
"M8 2v4M16 2v4",
|
|
28
|
-
"M3 8h18",
|
|
29
|
-
"M4 4h16a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z"
|
|
30
|
-
]), e = o(["M6 6l12 12", "M18 6L6 18"]), d = e, f = o([
|
|
31
|
-
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z",
|
|
32
|
-
"M15 12a3 3 0 1 1-6 0 3 3 0 1 1 6 0z"
|
|
33
|
-
]), g = o([
|
|
34
|
-
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z",
|
|
35
|
-
"M15 12a3 3 0 1 1-6 0 3 3 0 1 1 6 0z",
|
|
36
|
-
"M3 3l18 18"
|
|
37
|
-
]), u = o(["M5 12h14"]), w = o([
|
|
38
|
-
"M10 3a7 7 0 1 0 0 14 7 7 0 0 0 0-14z",
|
|
39
|
-
"M20 20l-5-5"
|
|
40
|
-
]);
|
|
41
|
-
export {
|
|
42
|
-
d as C,
|
|
43
|
-
f as E,
|
|
44
|
-
u as M,
|
|
45
|
-
w as S,
|
|
46
|
-
M as a,
|
|
47
|
-
v as b,
|
|
48
|
-
e as c,
|
|
49
|
-
h as d,
|
|
50
|
-
l as e,
|
|
51
|
-
i as f,
|
|
52
|
-
I as g,
|
|
53
|
-
g as h,
|
|
54
|
-
C as i
|
|
55
|
-
};
|
package/dist/shared/icons.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SVGProps } from 'react';
|
|
2
|
-
export declare const ChevronDownIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
3
|
-
export declare const ChevronUpIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
4
|
-
export declare const ChevronLeftIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
5
|
-
export declare const ChevronRightIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
6
|
-
export declare const ChevronsLeftIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
7
|
-
export declare const ChevronsRightIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
8
|
-
export declare const CheckIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
9
|
-
export declare const CalendarIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
10
|
-
export declare const ClearIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
11
|
-
export declare const CloseIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
12
|
-
export declare const EyeIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
13
|
-
export declare const EyeOffIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
14
|
-
export declare const MinusIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
15
|
-
export declare const SearchIcon: (properties: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|