@tpc-mare/mare-ui-components-react 0.1.26 → 0.1.29
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/avatar/index.js +1 -1
- package/dist/badge/index.js +1 -1
- package/dist/banner/index.js +1 -1
- package/dist/button/index.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/confirm-dialog/index.js +1 -1
- package/dist/counter/index.js +1 -1
- package/dist/date-picker/index.js +1 -1
- package/dist/dialog/index.js +2 -2
- package/dist/divider/index.js +1 -1
- package/dist/drawer/index.js +1 -1
- package/dist/expandable-counter/index.js +1 -1
- package/dist/filter-chip/index.js +1 -1
- package/dist/filter-chip-dropdown-multiple/index.js +1 -1
- package/dist/filter-chip-dropdown-single/index.js +1 -1
- package/dist/floating-action-button/index.js +1 -1
- package/dist/image-item/index.js +1 -1
- package/dist/index/index.js +41 -41
- package/dist/input-number/index.js +1 -1
- package/dist/input-otp/index.js +1 -1
- package/dist/input-text/IconField.d.ts +3 -1
- package/dist/input-text/index.js +2 -2
- package/dist/keyboard-commands/index.d.ts +5 -0
- package/dist/keyboard-commands/index.js +825 -0
- package/dist/keyboard-commands/useKeyboardCommands.d.ts +27 -0
- package/dist/keyboard-commands/useKeyboardNavGrid.d.ts +19 -0
- package/dist/keyboard-commands/useKeyboardNavList.d.ts +17 -0
- package/dist/keyboard-commands/useKeyboardScope.d.ts +20 -0
- package/dist/message/index.js +1 -1
- package/dist/multi-select/index.js +1 -1
- package/dist/overlay-badge/index.js +1 -1
- package/dist/paginator/index.js +1 -1
- package/dist/password/index.js +1 -1
- package/dist/radio-group/index.js +1 -1
- package/dist/search-field/index.js +1 -1
- package/dist/segmented-control/index.js +1 -1
- package/dist/select-field/index.js +1 -1
- package/dist/shared/{Avatar-D3QlO3Tz.js → Avatar-BpJDY1wm.js} +24 -22
- package/dist/shared/{Badge-WC6my4Aw.js → Badge-CGotZzok.js} +16 -9
- package/dist/shared/Banner-D4na_bM8.js +60 -0
- package/dist/shared/{Button-DwJ5RTfQ.js → Button-C2ULmKj3.js} +64 -57
- package/dist/shared/{Checkbox-BXnSN2vK.js → Checkbox-DCq3_MWz.js} +35 -33
- package/dist/shared/{Combobox-CcmWgRYZ.js → Combobox-DrkeDMW0.js} +48 -47
- package/dist/shared/{ConfirmDialog-DLHY-c70.js → ConfirmDialog-CjrWhDx8.js} +33 -27
- package/dist/shared/{Counter-DjIoe4h3.js → Counter-0siKQRKc.js} +42 -41
- package/dist/shared/{DatePicker-CwAISvNc.js → DatePicker-DhIWE0V_.js} +246 -240
- package/dist/shared/{DialogFooter-DyltZzK-.js → DialogFooter-CDlh11Gy.js} +34 -32
- package/dist/shared/{DialogHeader-M5Bfyxos.js → DialogHeader-PMBgMjsb.js} +2 -2
- package/dist/shared/{Divider-UgKI7dtK.js → Divider-CSQOHeMo.js} +16 -14
- package/dist/shared/{DrawerFooter-B9-Vrgd3.js → DrawerFooter-Bb-X7keE.js} +62 -54
- package/dist/shared/{ExpandableCounter-DZxbdqRa.js → ExpandableCounter-pPJIrd6L.js} +2 -2
- package/dist/shared/{FilterChip-eECL3oO7.js → FilterChip-TpKF-4vP.js} +21 -20
- package/dist/shared/{FilterChipDropdownMultiple-D2eMYXyS.js → FilterChipDropdownMultiple-2mr_Z57i.js} +43 -42
- package/dist/shared/{FilterChipDropdownSingle-C7ahD-_3.js → FilterChipDropdownSingle-CLmWzX9q.js} +39 -38
- package/dist/shared/FloatingActionButton-BWB5Taeg.js +28 -0
- package/dist/shared/{HelperText-CVWWvLCI.js → HelperText-zmUym82m.js} +1 -1
- package/dist/shared/IconField-CqKydKep.js +81 -0
- package/dist/shared/ImageItem-CL2VGEha.js +19 -0
- package/dist/shared/InputNumber-nxus9h5s.js +64 -0
- package/dist/shared/{InputOtp-CUXXVP2E.js → InputOtp-BxBc6Vhs.js} +16 -15
- package/dist/shared/InputText.types-KhlkzHMw-BtRY371_.js +4 -0
- package/dist/shared/Message-CQUdM9rR.js +81 -0
- package/dist/shared/{MultiSelect-Dowp0_FX.js → MultiSelect-DlaYWcPo.js} +60 -59
- package/dist/shared/{OverlayBadge-DLskqll7.js → OverlayBadge-Dkosm3Il.js} +1 -1
- package/dist/shared/{Paginator-DxZdCXSC.js → Paginator-QTDpAJ-N.js} +2 -2
- package/dist/shared/Password-D4PRaleH.js +97 -0
- package/dist/shared/{RadioGroup-lw27DCoV.js → RadioGroup-B8CXU8-l.js} +44 -38
- package/dist/shared/{SearchField-DjJHDaR4.js → SearchField-DIsFhJ22.js} +1 -1
- package/dist/shared/{SegmentedControl-Ct5ZLXpN.js → SegmentedControl-BfE3jNM6.js} +35 -33
- package/dist/shared/{SelectField-B-g52vHx.js → SelectField-CcnbnPEi.js} +30 -29
- package/dist/shared/Skeleton-DpWtYSz4.js +30 -0
- package/dist/shared/{Slider-CXFkperZ.js → Slider-Cl9PyH2q.js} +28 -22
- package/dist/shared/Snackbar-3BxmqK8x.js +105 -0
- package/dist/shared/{Stepper-By8M5bs0.js → Stepper-DrKKSn_j.js} +42 -37
- package/dist/shared/{Switch-DNCn0xjb.js → Switch-B5DSQLFL.js} +31 -29
- package/dist/shared/{Tabs-BqIorZYD.js → Tabs-DuufYBV2.js} +19 -17
- package/dist/shared/{Tag-BtbmgIwL.js → Tag-uIK_GPrs.js} +24 -15
- package/dist/shared/{TagChip-Bs7srjIL.js → TagChip-CP3aX2_G.js} +28 -26
- package/dist/shared/Textarea-DHJIWBRM.js +42 -0
- package/dist/shared/{field-layout-D34MpDMB.js → field-layout-o6bDLvVU.js} +6 -6
- package/dist/shared/index-ByQ37VXf.js +6 -0
- package/dist/skeleton/index.js +1 -1
- package/dist/slider/index.js +1 -1
- package/dist/snackbar/index.js +1 -1
- package/dist/stepper/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/tag-chip/index.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/utilities-standalone.css +1 -1
- package/package.json +1 -1
- package/dist/shared/Banner-C4wLe6N0.js +0 -52
- package/dist/shared/FloatingActionButton-D4FK6uSs.js +0 -19
- package/dist/shared/IconField-Dh6j6SL1.js +0 -78
- package/dist/shared/ImageItem-BBy5fOl3.js +0 -17
- package/dist/shared/InputNumber-D48wsE-o.js +0 -62
- package/dist/shared/Message-BNsFuQU1.js +0 -70
- package/dist/shared/Password-BMKy8dAy.js +0 -95
- package/dist/shared/Skeleton-CAjoF-T2.js +0 -29
- package/dist/shared/Snackbar-CjTqCOaV.js +0 -100
- package/dist/shared/Textarea-iJhYTZos.js +0 -40
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpc-mare/mare-ui-components-react",
|
|
3
3
|
"description": "Mare components for React (headless base, MIT). Framework-agnostic design system, React adapter.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.29",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "The Palace Company",
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { B as d } from "./Button-DwJ5RTfQ.js";
|
|
3
|
-
import { I as o } from "./IconX-CpPADKjZ.js";
|
|
4
|
-
const c = `
|
|
5
|
-
mare:w-full mare:max-w-md mare:rounded-tpc-container-s mare:p-4
|
|
6
|
-
mare:flex mare:items-start mare:justify-between mare:gap-4
|
|
7
|
-
mare:data-severity-neutral:bg-alternative
|
|
8
|
-
mare:data-severity-brand:bg-accent-weak
|
|
9
|
-
mare:data-severity-positive:bg-positive-weak
|
|
10
|
-
mare:data-severity-warning:bg-warning-weak
|
|
11
|
-
mare:data-severity-danger:bg-danger-weak
|
|
12
|
-
`, p = "mare:flex mare:grow mare:items-start mare:gap-4", g = "mare:flex mare:shrink-0 mare:items-center mare:justify-center mare:text-default mare:[&>svg]:size-6", f = "mare:flex mare:grow mare:flex-col mare:gap-2", v = "mare:tpc-typography-label-m mare:text-default", y = (e) => `mare:tpc-typography-body-s ${e ? "mare:text-disabled" : "mare:text-default"}`, x = (e, r) => r ? "disabled" : e;
|
|
13
|
-
function h({
|
|
14
|
-
severity: e = "neutral",
|
|
15
|
-
title: r,
|
|
16
|
-
icon: m,
|
|
17
|
-
disabled: s = !1,
|
|
18
|
-
closable: l = !1,
|
|
19
|
-
onClose: n,
|
|
20
|
-
children: i
|
|
21
|
-
}) {
|
|
22
|
-
return /* @__PURE__ */ t(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
className: c,
|
|
26
|
-
"data-severity": x(e, s),
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ t("div", { className: p, children: [
|
|
29
|
-
m && /* @__PURE__ */ a("span", { className: g, children: m }),
|
|
30
|
-
/* @__PURE__ */ t("div", { className: f, children: [
|
|
31
|
-
r && /* @__PURE__ */ a("p", { className: v, children: r }),
|
|
32
|
-
i && /* @__PURE__ */ a("div", { className: y(s), children: i })
|
|
33
|
-
] })
|
|
34
|
-
] }),
|
|
35
|
-
l && /* @__PURE__ */ a(
|
|
36
|
-
d,
|
|
37
|
-
{
|
|
38
|
-
severity: "ghost",
|
|
39
|
-
iconOnly: !0,
|
|
40
|
-
size: "xsmall",
|
|
41
|
-
icon: /* @__PURE__ */ a(o, {}),
|
|
42
|
-
onClick: n,
|
|
43
|
-
"aria-label": "Close"
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
h as B
|
|
52
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { B as n } from "./Button-DwJ5RTfQ.js";
|
|
3
|
-
function e({
|
|
4
|
-
severity: r = "primary",
|
|
5
|
-
...t
|
|
6
|
-
}) {
|
|
7
|
-
return /* @__PURE__ */ o(
|
|
8
|
-
n,
|
|
9
|
-
{
|
|
10
|
-
...t,
|
|
11
|
-
severity: r,
|
|
12
|
-
raised: !0,
|
|
13
|
-
rounded: !0
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
e as F
|
|
19
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { useFieldContext as b, FieldInput as v, FieldRoot as L } from "@ark-ui/react/field";
|
|
3
|
-
import { u as d, d as x, m as S, f as g, F as y } from "./field-layout-D34MpDMB.js";
|
|
4
|
-
function j({
|
|
5
|
-
value: s = "",
|
|
6
|
-
onValueChange: a,
|
|
7
|
-
size: n = "medium",
|
|
8
|
-
rounded: l = !1,
|
|
9
|
-
invalid: r = !1,
|
|
10
|
-
disabled: i = !1,
|
|
11
|
-
placeholder: o,
|
|
12
|
-
...c
|
|
13
|
-
}) {
|
|
14
|
-
const e = d(), m = !b(), f = x({
|
|
15
|
-
size: n,
|
|
16
|
-
rounded: l,
|
|
17
|
-
hasFloatLabel: e?.hasFloatLabel ?? !1,
|
|
18
|
-
iconSide: e?.iconSide ?? null
|
|
19
|
-
}), h = e?.hasFloatLabel ? " " : o, u = /* @__PURE__ */ t(
|
|
20
|
-
v,
|
|
21
|
-
{
|
|
22
|
-
...c,
|
|
23
|
-
className: f,
|
|
24
|
-
placeholder: h,
|
|
25
|
-
value: s,
|
|
26
|
-
onChange: (F) => a?.(F.target.value)
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
return m ? /* @__PURE__ */ t(
|
|
30
|
-
L,
|
|
31
|
-
{
|
|
32
|
-
invalid: r,
|
|
33
|
-
disabled: i,
|
|
34
|
-
className: "mare:w-full",
|
|
35
|
-
children: u
|
|
36
|
-
}
|
|
37
|
-
) : u;
|
|
38
|
-
}
|
|
39
|
-
function w({
|
|
40
|
-
icon: s,
|
|
41
|
-
position: a = "left",
|
|
42
|
-
disabled: n = !1,
|
|
43
|
-
onIconClick: l,
|
|
44
|
-
iconLabel: r,
|
|
45
|
-
children: i
|
|
46
|
-
}) {
|
|
47
|
-
const o = d(), c = {
|
|
48
|
-
hasFloatLabel: o?.hasFloatLabel ?? !1,
|
|
49
|
-
iconSide: S(o?.iconSide ?? null, a)
|
|
50
|
-
}, e = g(a, {
|
|
51
|
-
disabled: n,
|
|
52
|
-
interactive: !!l
|
|
53
|
-
});
|
|
54
|
-
return /* @__PURE__ */ t(y.Provider, { value: c, children: /* @__PURE__ */ p(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
className: `mare:relative mare:w-full mare:group ${a === "left" ? "mare-icon-left" : "mare-icon-right"}`,
|
|
58
|
-
children: [
|
|
59
|
-
i,
|
|
60
|
-
l ? /* @__PURE__ */ t(
|
|
61
|
-
"button",
|
|
62
|
-
{
|
|
63
|
-
type: "button",
|
|
64
|
-
disabled: n,
|
|
65
|
-
onClick: l,
|
|
66
|
-
"aria-label": r,
|
|
67
|
-
className: e,
|
|
68
|
-
children: s
|
|
69
|
-
}
|
|
70
|
-
) : /* @__PURE__ */ t("span", { className: e, children: s })
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
) });
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
w as I,
|
|
77
|
-
j as a
|
|
78
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
const r = {
|
|
3
|
-
"4:3": "mare:aspect-[4/3]",
|
|
4
|
-
"1:1": "mare:aspect-square",
|
|
5
|
-
"5:4": "mare:aspect-[5/4]",
|
|
6
|
-
"3:2": "mare:aspect-[3/2]",
|
|
7
|
-
free: "mare:aspect-auto"
|
|
8
|
-
}, t = (e) => `
|
|
9
|
-
mare:w-full mare:[&_img]:h-full mare:[&_img]:w-full mare:[&_img]:object-cover
|
|
10
|
-
${r[e]}
|
|
11
|
-
`;
|
|
12
|
-
function c({ ratio: e = "4:3", children: a }) {
|
|
13
|
-
return /* @__PURE__ */ m("div", { className: t(e), children: a });
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
c as I
|
|
17
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { NumberInput as t } from "@ark-ui/react/number-input";
|
|
3
|
-
import { useFieldContext as C } from "@ark-ui/react/field";
|
|
4
|
-
import { u as g, d as y } from "./field-layout-D34MpDMB.js";
|
|
5
|
-
function R({
|
|
6
|
-
value: l = null,
|
|
7
|
-
onValueChange: n,
|
|
8
|
-
size: u = "medium",
|
|
9
|
-
rounded: s = !1,
|
|
10
|
-
invalid: r,
|
|
11
|
-
disabled: i,
|
|
12
|
-
readOnly: m,
|
|
13
|
-
step: c = 1,
|
|
14
|
-
clampValueOnBlur: d = !0,
|
|
15
|
-
placeholder: f,
|
|
16
|
-
id: p,
|
|
17
|
-
name: h,
|
|
18
|
-
min: b,
|
|
19
|
-
max: v,
|
|
20
|
-
formatOptions: F,
|
|
21
|
-
locale: N,
|
|
22
|
-
allowMouseWheel: I
|
|
23
|
-
}) {
|
|
24
|
-
const e = g(), L = !C(), S = y({
|
|
25
|
-
size: u,
|
|
26
|
-
rounded: s,
|
|
27
|
-
hasFloatLabel: e?.hasFloatLabel ?? !1,
|
|
28
|
-
iconSide: e?.iconSide ?? null
|
|
29
|
-
}), x = e?.hasFloatLabel ? " " : f;
|
|
30
|
-
return /* @__PURE__ */ o(
|
|
31
|
-
t.Root,
|
|
32
|
-
{
|
|
33
|
-
value: l == null ? "" : String(l),
|
|
34
|
-
min: b,
|
|
35
|
-
max: v,
|
|
36
|
-
step: c,
|
|
37
|
-
formatOptions: F,
|
|
38
|
-
locale: N,
|
|
39
|
-
allowMouseWheel: I,
|
|
40
|
-
clampValueOnBlur: d,
|
|
41
|
-
disabled: i,
|
|
42
|
-
readOnly: m,
|
|
43
|
-
name: h,
|
|
44
|
-
invalid: L ? r : void 0,
|
|
45
|
-
className: "mare:w-full",
|
|
46
|
-
onValueChange: (a) => n?.(
|
|
47
|
-
a.value === "" ? null : a.valueAsNumber
|
|
48
|
-
),
|
|
49
|
-
children: /* @__PURE__ */ o(
|
|
50
|
-
t.Input,
|
|
51
|
-
{
|
|
52
|
-
id: p,
|
|
53
|
-
className: S,
|
|
54
|
-
placeholder: x
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
export {
|
|
61
|
-
R as I
|
|
62
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { B as o } from "./Button-DwJ5RTfQ.js";
|
|
3
|
-
import { I as p } from "./IconX-CpPADKjZ.js";
|
|
4
|
-
const c = (e) => e === "filled" ? `mare:w-full mare:max-w-md mare:rounded-tpc-container-s mare:p-4
|
|
5
|
-
mare:flex mare:items-start mare:justify-between mare:gap-4
|
|
6
|
-
mare:data-severity-neutral:bg-alternative
|
|
7
|
-
mare:data-severity-brand:bg-accent-weak
|
|
8
|
-
mare:data-severity-positive:bg-positive-weak
|
|
9
|
-
mare:data-severity-warning:bg-warning-weak
|
|
10
|
-
mare:data-severity-danger:bg-danger-weak` : "mare:w-full mare:flex mare:items-start mare:justify-between mare:gap-4", g = "mare:flex mare:grow mare:items-start mare:gap-4", x = "mare:shrink-0 mare:text-default mare:[&>svg]:size-3.5", f = "mare:flex mare:grow mare:flex-col mare:gap-2", y = "mare:tpc-typography-label-m mare:text-default", u = {
|
|
11
|
-
neutral: "mare:text-weak",
|
|
12
|
-
brand: "mare:text-accent",
|
|
13
|
-
positive: "mare:text-positive",
|
|
14
|
-
warning: "mare:text-warning",
|
|
15
|
-
danger: "mare:text-danger"
|
|
16
|
-
}, w = (e, a, m) => {
|
|
17
|
-
const r = e === "simple" ? "mare:tpc-typography-body-xs" : "mare:tpc-typography-body-s";
|
|
18
|
-
return m ? `${r} mare:text-disabled` : e === "simple" ? `${r} ${u[a]}` : `${r} mare:text-default`;
|
|
19
|
-
}, v = (e, a) => a ? "disabled" : e;
|
|
20
|
-
function N({
|
|
21
|
-
severity: e = "neutral",
|
|
22
|
-
variant: a = "simple",
|
|
23
|
-
title: m,
|
|
24
|
-
icon: r,
|
|
25
|
-
disabled: i = !1,
|
|
26
|
-
closable: n = !1,
|
|
27
|
-
onClose: d,
|
|
28
|
-
children: l
|
|
29
|
-
}) {
|
|
30
|
-
return /* @__PURE__ */ s(
|
|
31
|
-
"div",
|
|
32
|
-
{
|
|
33
|
-
className: c(a),
|
|
34
|
-
"data-severity": v(e, i),
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ s("div", { className: g, children: [
|
|
37
|
-
r && /* @__PURE__ */ t("span", { className: x, children: r }),
|
|
38
|
-
/* @__PURE__ */ s("div", { className: f, children: [
|
|
39
|
-
m && /* @__PURE__ */ t("p", { className: y, children: m }),
|
|
40
|
-
l && /* @__PURE__ */ t(
|
|
41
|
-
"div",
|
|
42
|
-
{
|
|
43
|
-
className: w(
|
|
44
|
-
a,
|
|
45
|
-
e,
|
|
46
|
-
i
|
|
47
|
-
),
|
|
48
|
-
children: l
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
] })
|
|
52
|
-
] }),
|
|
53
|
-
n && /* @__PURE__ */ t(
|
|
54
|
-
o,
|
|
55
|
-
{
|
|
56
|
-
severity: "ghost",
|
|
57
|
-
iconOnly: !0,
|
|
58
|
-
size: "xsmall",
|
|
59
|
-
icon: /* @__PURE__ */ t(p, {}),
|
|
60
|
-
onClick: d,
|
|
61
|
-
"aria-label": "Close"
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
N as M
|
|
70
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e, Fragment as M } from "react/jsx-runtime";
|
|
2
|
-
import { PasswordInput as l } from "@ark-ui/react/password-input";
|
|
3
|
-
import { useFieldContext as R } from "@ark-ui/react/field";
|
|
4
|
-
import { u as $, m as A, d as Z, f as j } from "./field-layout-D34MpDMB.js";
|
|
5
|
-
import { c as h } from "./createReactComponent-Cb6Pzf10.js";
|
|
6
|
-
const O = [["path", { d: "M10.585 10.587a2 2 0 0 0 2.829 2.828", key: "svg-0" }], ["path", { d: "M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87", key: "svg-1" }], ["path", { d: "M3 3l18 18", key: "svg-2" }]], D = h("outline", "eye-off", "EyeOff", O);
|
|
7
|
-
const T = [["path", { d: "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0", key: "svg-0" }], ["path", { d: "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6", key: "svg-1" }]], V = h("outline", "eye", "Eye", T), W = "mare:relative mare:w-full mare:group", q = "mare:relative mare:w-full", B = `
|
|
8
|
-
mare:hidden mare:group-focus-within:flex mare:flex-col mare:gap-2
|
|
9
|
-
mare:absolute mare:top-full mare:left-0 mare:mt-2 mare:z-50 mare:w-full
|
|
10
|
-
mare:p-4 mare:rounded-input mare:border mare:border-default mare:bg-raised
|
|
11
|
-
mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
|
|
12
|
-
`, G = "mare:tpc-typography-label-s mare:text-default", H = "mare:border-t mare:border-default", J = "mare:flex mare:flex-col mare:gap-2", K = "mare:h-1 mare:w-full mare:bg-neutral-weak mare:rounded-md mare:overflow-hidden", Q = {
|
|
13
|
-
weak: "mare:w-1/3 mare:bg-danger",
|
|
14
|
-
medium: "mare:w-2/3 mare:bg-warning",
|
|
15
|
-
strong: "mare:w-full mare:bg-positive"
|
|
16
|
-
}, U = (a) => `mare:h-full mare:rounded-md mare:transition-[width] mare:duration-500 mare:ease-in-out ${a ? Q[a] : "mare:w-0"}`, X = "mare:tpc-typography-body-s mare:text-default", Y = "mare:flex mare:flex-col mare:gap-1 mare:my-0 mare:pl-0 mare:list-none", ee = "mare:tpc-typography-body-s mare:text-default", ae = "^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})", re = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})", le = (a, s = ae, m = re) => a ? new RegExp(m).test(a) ? "strong" : new RegExp(s).test(a) ? "medium" : "weak" : null;
|
|
17
|
-
function ne({
|
|
18
|
-
value: a = "",
|
|
19
|
-
onValueChange: s,
|
|
20
|
-
size: m = "medium",
|
|
21
|
-
rounded: g = !1,
|
|
22
|
-
invalid: b = !1,
|
|
23
|
-
disabled: v = !1,
|
|
24
|
-
toggleMask: o = !0,
|
|
25
|
-
showIcon: w = /* @__PURE__ */ e(V, {}),
|
|
26
|
-
hideIcon: y = /* @__PURE__ */ e(D, {}),
|
|
27
|
-
feedback: n = !0,
|
|
28
|
-
header: d,
|
|
29
|
-
footer: c,
|
|
30
|
-
promptLabel: x = "Please enter a password",
|
|
31
|
-
weakLabel: N = "Weak",
|
|
32
|
-
mediumLabel: _ = "Medium",
|
|
33
|
-
strongLabel: k = "Strong",
|
|
34
|
-
mediumRegex: I,
|
|
35
|
-
strongRegex: E,
|
|
36
|
-
...u
|
|
37
|
-
}) {
|
|
38
|
-
const t = $(), f = R(), F = b || (f?.invalid ?? !1), p = v || (f?.disabled ?? !1), P = o ? A(t?.iconSide ?? null, "right") : t?.iconSide ?? null, S = Z({
|
|
39
|
-
size: m,
|
|
40
|
-
rounded: g,
|
|
41
|
-
hasFloatLabel: t?.hasFloatLabel ?? !1,
|
|
42
|
-
iconSide: P
|
|
43
|
-
}), C = t?.hasFloatLabel ? " " : u.placeholder, i = n ? le(a, I, E) : null, L = i ? { weak: N, medium: _, strong: k }[i] : x;
|
|
44
|
-
return /* @__PURE__ */ r(
|
|
45
|
-
l.Root,
|
|
46
|
-
{
|
|
47
|
-
className: W,
|
|
48
|
-
invalid: F,
|
|
49
|
-
disabled: p,
|
|
50
|
-
visible: o ? void 0 : !1,
|
|
51
|
-
children: [
|
|
52
|
-
/* @__PURE__ */ r(l.Control, { className: q, children: [
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
-
l.Input,
|
|
55
|
-
{
|
|
56
|
-
...u,
|
|
57
|
-
placeholder: C,
|
|
58
|
-
value: a,
|
|
59
|
-
onChange: (z) => s?.(z.target.value),
|
|
60
|
-
className: S
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
o && /* @__PURE__ */ e(
|
|
64
|
-
l.VisibilityTrigger,
|
|
65
|
-
{
|
|
66
|
-
className: j("right", {
|
|
67
|
-
disabled: p,
|
|
68
|
-
interactive: !0
|
|
69
|
-
}),
|
|
70
|
-
children: /* @__PURE__ */ e(l.Indicator, { fallback: w, children: y })
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
] }),
|
|
74
|
-
n && /* @__PURE__ */ r("div", { className: B, children: [
|
|
75
|
-
d && /* @__PURE__ */ e("div", { className: G, children: d }),
|
|
76
|
-
/* @__PURE__ */ r("div", { className: J, children: [
|
|
77
|
-
/* @__PURE__ */ e("div", { className: K, children: /* @__PURE__ */ e("div", { className: U(i) }) }),
|
|
78
|
-
/* @__PURE__ */ e("span", { className: X, children: L })
|
|
79
|
-
] }),
|
|
80
|
-
c && /* @__PURE__ */ r(M, { children: [
|
|
81
|
-
/* @__PURE__ */ e("div", { className: H }),
|
|
82
|
-
/* @__PURE__ */ e("ul", { className: Y, children: c })
|
|
83
|
-
] })
|
|
84
|
-
] })
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
function de({ children: a }) {
|
|
90
|
-
return /* @__PURE__ */ e("li", { className: ee, children: a });
|
|
91
|
-
}
|
|
92
|
-
export {
|
|
93
|
-
ne as P,
|
|
94
|
-
de as a
|
|
95
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
const i = (e) => `
|
|
3
|
-
mare:overflow-hidden mare:animate-pulse mare:bg-neutral-weak
|
|
4
|
-
${e === "circle" ? "mare:rounded-full" : "mare:rounded-tpc-container-s"}
|
|
5
|
-
`, t = (e) => e === void 0 ? void 0 : typeof e == "number" ? `${e}px` : e;
|
|
6
|
-
function c({
|
|
7
|
-
shape: e = "rectangle",
|
|
8
|
-
width: a = "100%",
|
|
9
|
-
height: o = "1rem",
|
|
10
|
-
size: r,
|
|
11
|
-
...n
|
|
12
|
-
}) {
|
|
13
|
-
const d = {
|
|
14
|
-
width: t(r ?? a),
|
|
15
|
-
height: t(r ?? o)
|
|
16
|
-
};
|
|
17
|
-
return /* @__PURE__ */ m(
|
|
18
|
-
"div",
|
|
19
|
-
{
|
|
20
|
-
className: i(e),
|
|
21
|
-
"data-shape": e,
|
|
22
|
-
style: d,
|
|
23
|
-
...n
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
c as S
|
|
29
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { Portal as g } from "@ark-ui/react/portal";
|
|
3
|
-
import { Toaster as y, Toast as m, createToaster as u } from "@ark-ui/react/toast";
|
|
4
|
-
import { B as b } from "./Button-DwJ5RTfQ.js";
|
|
5
|
-
const h = `
|
|
6
|
-
mare:group mare:w-full mare:min-w-[20rem] mare:max-w-[429px]
|
|
7
|
-
mare:relative mare:overflow-hidden mare:rounded-tpc-snackbar
|
|
8
|
-
mare:flex mare:items-center mare:gap-3 mare:p-3 mare:pr-4 mare:min-h-13
|
|
9
|
-
mare:shadow-[0px_10px_15px_-3px_rgba(0,0,0,0.10),0px_4px_6px_-2px_rgba(0,0,0,0.05)]
|
|
10
|
-
mare:outline-none
|
|
11
|
-
mare:[translate:var(--x)_var(--y)] mare:[scale:var(--scale)]
|
|
12
|
-
mare:[z-index:var(--z-index)] mare:[height:var(--height)]
|
|
13
|
-
mare:[opacity:var(--opacity)] mare:[will-change:translate,opacity,scale]
|
|
14
|
-
mare:[transition:translate_400ms,scale_400ms,opacity_400ms,height_400ms]
|
|
15
|
-
mare:ark-closed:[transition:translate_400ms,scale_400ms,opacity_200ms]
|
|
16
|
-
mare:ark-type-contrast:bg-inverse mare:ark-type-contrast:text-on-inverse
|
|
17
|
-
mare:ark-type-secondary:bg-raised mare:ark-type-secondary:text-default mare:ark-type-secondary:border mare:ark-type-secondary:border-default
|
|
18
|
-
mare:ark-type-error:bg-danger mare:ark-type-error:text-on-danger
|
|
19
|
-
`, k = `
|
|
20
|
-
mare:flex mare:max-w-13 mare:min-w-6 mare:aspect-square mare:shrink-0
|
|
21
|
-
mare:items-center mare:justify-center mare:rounded-tpc-container-s
|
|
22
|
-
`, x = (a) => `
|
|
23
|
-
mare:tpc-typography-body-s ${a ? "" : "mare:ps-1"}
|
|
24
|
-
`, f = "mare:ml-auto mare:shrink-0", _ = `
|
|
25
|
-
mare:absolute mare:bottom-0 mare:left-0 mare:h-1 mare:w-0
|
|
26
|
-
mare:[background-color:currentColor]
|
|
27
|
-
mare:[animation:mare-snackbar-progress_var(--mare-snackbar-life)_linear_forwards]
|
|
28
|
-
`, v = {
|
|
29
|
-
"top-left": "top-start",
|
|
30
|
-
"top-center": "top",
|
|
31
|
-
"top-right": "top-end",
|
|
32
|
-
"bottom-left": "bottom-start",
|
|
33
|
-
"bottom-center": "bottom",
|
|
34
|
-
"bottom-right": "bottom-end"
|
|
35
|
-
}, w = (a) => v[a], i = 3e3, c = (a) => Math.max(a ?? i, i), l = /* @__PURE__ */ new WeakMap(), B = {
|
|
36
|
-
error: [1, 2],
|
|
37
|
-
secondary: [3, 6],
|
|
38
|
-
contrast: [6, 8]
|
|
39
|
-
}, T = (a, t) => {
|
|
40
|
-
const [s, e] = B[a];
|
|
41
|
-
return t ? s : e;
|
|
42
|
-
};
|
|
43
|
-
function I(a = {}) {
|
|
44
|
-
const t = u({
|
|
45
|
-
placement: w(a.placement ?? "bottom-center")
|
|
46
|
-
}), s = {
|
|
47
|
-
show(e) {
|
|
48
|
-
const r = e.severity ?? "contrast";
|
|
49
|
-
return t.create({
|
|
50
|
-
description: e.detail,
|
|
51
|
-
type: r,
|
|
52
|
-
priority: T(r, !!e.action),
|
|
53
|
-
duration: c(e.life),
|
|
54
|
-
action: e.action,
|
|
55
|
-
meta: { leading: e.leading, progressBar: e.progressBar }
|
|
56
|
-
});
|
|
57
|
-
},
|
|
58
|
-
dismiss(e) {
|
|
59
|
-
t.dismiss(e);
|
|
60
|
-
},
|
|
61
|
-
update(e, r) {
|
|
62
|
-
const n = t.getVisibleToasts().find((d) => d.id === e);
|
|
63
|
-
t.update(e, {
|
|
64
|
-
description: r.detail ?? n?.description,
|
|
65
|
-
type: r.severity ?? n?.type,
|
|
66
|
-
duration: r.life != null ? c(r.life) : n?.duration,
|
|
67
|
-
action: r.action ?? n?.action,
|
|
68
|
-
meta: {
|
|
69
|
-
leading: r.leading ?? n?.meta?.leading,
|
|
70
|
-
progressBar: r.progressBar ?? n?.meta?.progressBar
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
return l.set(s, t), s;
|
|
76
|
-
}
|
|
77
|
-
function j({ controller: a, portalContainer: t }) {
|
|
78
|
-
const s = l.get(a);
|
|
79
|
-
if (!s)
|
|
80
|
-
throw new Error("Snackbar: controller was not created by createSnackbar().");
|
|
81
|
-
return /* @__PURE__ */ o(g, { container: t, children: /* @__PURE__ */ o(y, { toaster: s, children: (e) => {
|
|
82
|
-
const r = e.meta?.leading, n = !!e.meta?.progressBar;
|
|
83
|
-
return /* @__PURE__ */ p(m.Root, { className: h, children: [
|
|
84
|
-
r ? /* @__PURE__ */ o("div", { className: k, children: r }) : null,
|
|
85
|
-
/* @__PURE__ */ o(m.Description, { className: x(!!r), children: e.description }),
|
|
86
|
-
e.action ? /* @__PURE__ */ o("div", { className: f, children: /* @__PURE__ */ o(m.ActionTrigger, { asChild: !0, children: /* @__PURE__ */ o(b, { severity: "ghost", link: !0, size: "xsmall", children: e.action.label }) }) }) : null,
|
|
87
|
-
n ? /* @__PURE__ */ o(
|
|
88
|
-
"div",
|
|
89
|
-
{
|
|
90
|
-
className: _,
|
|
91
|
-
style: { "--mare-snackbar-life": `${e.duration}ms` }
|
|
92
|
-
}
|
|
93
|
-
) : null
|
|
94
|
-
] }, e.id);
|
|
95
|
-
} }) });
|
|
96
|
-
}
|
|
97
|
-
export {
|
|
98
|
-
j as S,
|
|
99
|
-
I as c
|
|
100
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useFieldContext as x, FieldTextarea as F, FieldRoot as p } from "@ark-ui/react/field";
|
|
3
|
-
import { u as L, a as b } from "./field-layout-D34MpDMB.js";
|
|
4
|
-
function v({
|
|
5
|
-
value: l = "",
|
|
6
|
-
onValueChange: o,
|
|
7
|
-
size: s = "medium",
|
|
8
|
-
invalid: r = !1,
|
|
9
|
-
disabled: n = !1,
|
|
10
|
-
autoresize: i = !1,
|
|
11
|
-
placeholder: c,
|
|
12
|
-
...f
|
|
13
|
-
}) {
|
|
14
|
-
const e = L(), u = !x(), m = b({
|
|
15
|
-
size: s,
|
|
16
|
-
hasFloatLabel: e?.hasFloatLabel ?? !1
|
|
17
|
-
}), d = e?.hasFloatLabel ? " " : c, a = /* @__PURE__ */ t(
|
|
18
|
-
F,
|
|
19
|
-
{
|
|
20
|
-
...f,
|
|
21
|
-
autoresize: i,
|
|
22
|
-
className: m,
|
|
23
|
-
placeholder: d,
|
|
24
|
-
value: l,
|
|
25
|
-
onChange: (h) => o?.(h.target.value)
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
return u ? /* @__PURE__ */ t(
|
|
29
|
-
p,
|
|
30
|
-
{
|
|
31
|
-
invalid: r,
|
|
32
|
-
disabled: n,
|
|
33
|
-
className: "mare:w-full",
|
|
34
|
-
children: a
|
|
35
|
-
}
|
|
36
|
-
) : a;
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
v as T
|
|
40
|
-
};
|