@tpc-mare/mare-ui-components-react 0.1.12 → 0.1.14

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.
Files changed (55) hide show
  1. package/dist/accordion/index.js +1 -1
  2. package/dist/banner/index.js +1 -1
  3. package/dist/checkbox/index.js +1 -1
  4. package/dist/combobox/index.js +1 -1
  5. package/dist/counter/Counter.d.ts +2 -0
  6. package/dist/counter/Counter.types.d.ts +23 -0
  7. package/dist/counter/index.d.ts +2 -0
  8. package/dist/counter/index.js +4 -0
  9. package/dist/date-picker/index.js +1 -1
  10. package/dist/dialog/index.js +1 -1
  11. package/dist/drawer/index.js +1 -1
  12. package/dist/image-slider/index.js +1 -1
  13. package/dist/index/index.d.ts +4 -0
  14. package/dist/index/index.js +72 -68
  15. package/dist/message/Message.d.ts +2 -0
  16. package/dist/message/Message.types.d.ts +17 -0
  17. package/dist/message/index.d.ts +2 -0
  18. package/dist/message/index.js +4 -0
  19. package/dist/paginator/index.js +1 -1
  20. package/dist/panel-menu/index.js +1 -1
  21. package/dist/password/index.js +1 -1
  22. package/dist/search-field/index.js +1 -1
  23. package/dist/select-field/index.js +1 -1
  24. package/dist/shared/{Accordion-Dhs7EeM6.js → Accordion-BLQ1mWZZ.js} +1 -1
  25. package/dist/shared/{Banner-B41NQS5P.js → Banner-DXftmx9P.js} +1 -1
  26. package/dist/shared/{Checkbox-B7vM1mxP.js → Checkbox-BXnSN2vK.js} +10 -9
  27. package/dist/shared/{Combobox-oSS0Rlbv.js → Combobox-SkrEe5He.js} +44 -41
  28. package/dist/shared/Counter-D4Al7Yme.js +94 -0
  29. package/dist/shared/{DatePicker-GYH3uorm.js → DatePicker-CwAISvNc.js} +140 -137
  30. package/dist/shared/{DialogHeader-CZ5OrC8_.js → DialogHeader-RzfQm-pi.js} +14 -14
  31. package/dist/shared/{DrawerFooter-OFrTFvy2.js → DrawerFooter-BxOEFQ-W.js} +3 -3
  32. package/dist/shared/IconCheck-DzZA6b2U.js +5 -0
  33. package/dist/shared/IconChevronDown-ev2ML7Ex.js +5 -0
  34. package/dist/shared/IconChevronRight-DEIDRsvg.js +7 -0
  35. package/dist/shared/IconMinus-fS_GL0Et.js +5 -0
  36. package/dist/shared/IconSearch-CgM6jEUh.js +5 -0
  37. package/dist/shared/IconX-CpPADKjZ.js +5 -0
  38. package/dist/shared/{ImageSlider-CdBVmAYC.js → ImageSlider-Bgb1kNQ4.js} +1 -1
  39. package/dist/shared/Message-BjC8CCSI.js +70 -0
  40. package/dist/shared/{Paginator-BndcA6Ax.js → Paginator-Bp2nghqW.js} +48 -46
  41. package/dist/shared/{PanelMenu-Bz-fg6px.js → PanelMenu-BpjNM7O_.js} +2 -2
  42. package/dist/shared/Password-BMKy8dAy.js +95 -0
  43. package/dist/shared/SearchField-DjJHDaR4.js +64 -0
  44. package/dist/shared/{SelectField-CGbdf8C2.js → SelectField-CvKaukCG.js} +27 -25
  45. package/dist/shared/{Stepper-BpKdB3ip.js → Stepper-By8M5bs0.js} +13 -12
  46. package/dist/shared/{TagChip-BNszVayi.js → TagChip-Bs7srjIL.js} +1 -1
  47. package/dist/shared/createReactComponent-Cb6Pzf10.js +48 -0
  48. package/dist/stepper/index.js +1 -1
  49. package/dist/styles.css +1 -1
  50. package/dist/tag-chip/index.js +1 -1
  51. package/package.json +2 -1
  52. package/dist/shared/Password-cqTK9OlT.js +0 -94
  53. package/dist/shared/SearchField-CgZV2Am-.js +0 -63
  54. package/dist/shared/icons-BFOFrum4.js +0 -55
  55. package/dist/shared/icons.d.ts +0 -15
@@ -1,18 +1,18 @@
1
1
  import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
- import { Dialog as a } from "@ark-ui/react/dialog";
2
+ import { Dialog as l } from "@ark-ui/react/dialog";
3
3
  import { l as h, i as o, n as d, s as u } from "./DialogFooter-DyltZzK-.js";
4
4
  import { B as r } from "./Button-AfMqNCme.js";
5
- import { C as p } from "./icons-BFOFrum4.js";
6
- function N({
7
- title: l,
5
+ import { I as p } from "./IconX-CpPADKjZ.js";
6
+ function y({
7
+ title: e,
8
8
  leftIcon: i = /* @__PURE__ */ s(p, {}),
9
- rightIcon: e,
9
+ rightIcon: a,
10
10
  onLeftIconClick: n,
11
11
  onRightIconClick: m,
12
12
  border: c = !1
13
13
  }) {
14
14
  return /* @__PURE__ */ t("div", { className: u(c), children: [
15
- i ? /* @__PURE__ */ s("div", { className: h, children: /* @__PURE__ */ s(a.CloseTrigger, { asChild: !0, children: /* @__PURE__ */ s(
15
+ i ? /* @__PURE__ */ s("div", { className: h, children: /* @__PURE__ */ s(l.CloseTrigger, { asChild: !0, children: /* @__PURE__ */ s(
16
16
  r,
17
17
  {
18
18
  severity: "ghost",
@@ -22,36 +22,36 @@ function N({
22
22
  onClick: n
23
23
  }
24
24
  ) }) }) : null,
25
- l ? /* @__PURE__ */ s(
26
- a.Title,
25
+ e ? /* @__PURE__ */ s(
26
+ l.Title,
27
27
  {
28
28
  className: o({
29
29
  hasLeftIcon: !!i,
30
- hasRightIcon: !!e
30
+ hasRightIcon: !!a
31
31
  }),
32
- children: l
32
+ children: e
33
33
  }
34
34
  ) : /* @__PURE__ */ s(
35
35
  "span",
36
36
  {
37
37
  className: o({
38
38
  hasLeftIcon: !!i,
39
- hasRightIcon: !!e
39
+ hasRightIcon: !!a
40
40
  })
41
41
  }
42
42
  ),
43
- e ? /* @__PURE__ */ s("div", { className: d, children: /* @__PURE__ */ s(
43
+ a ? /* @__PURE__ */ s("div", { className: d, children: /* @__PURE__ */ s(
44
44
  r,
45
45
  {
46
46
  severity: "ghost",
47
47
  iconOnly: !0,
48
48
  size: "xsmall",
49
- icon: e,
49
+ icon: a,
50
50
  onClick: m
51
51
  }
52
52
  ) }) : null
53
53
  ] });
54
54
  }
55
55
  export {
56
- N as D
56
+ y as D
57
57
  };
@@ -2,7 +2,7 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
2
  import { Dialog as t } from "@ark-ui/react/dialog";
3
3
  import { Portal as g } from "@ark-ui/react/portal";
4
4
  import { B as d } from "./Button-AfMqNCme.js";
5
- import { C as y } from "./icons-BFOFrum4.js";
5
+ import { I as y } from "./IconX-CpPADKjZ.js";
6
6
  const _ = (e) => {
7
7
  switch (e) {
8
8
  case "left":
@@ -63,7 +63,7 @@ const _ = (e) => {
63
63
  mare:px-6 mare:pb-4 mare:sm:pb-6
64
64
  ${e ? "mare:pt-3 mare:sm:pt-6 mare:border-t mare:border-t-default" : "mare:pt-0"}
65
65
  `;
66
- function X({
66
+ function T({
67
67
  open: e,
68
68
  onOpenChange: a,
69
69
  position: m = "left",
@@ -166,7 +166,7 @@ function E({
166
166
  return /* @__PURE__ */ r("div", { className: R(e), children: a });
167
167
  }
168
168
  export {
169
- X as D,
169
+ T as D,
170
170
  E as a,
171
171
  Y as b
172
172
  };
@@ -0,0 +1,5 @@
1
+ import { c } from "./createReactComponent-Cb6Pzf10.js";
2
+ const e = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], t = c("outline", "check", "Check", e);
3
+ export {
4
+ t as I
5
+ };
@@ -0,0 +1,5 @@
1
+ import { c as o } from "./createReactComponent-Cb6Pzf10.js";
2
+ const n = [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]], t = o("outline", "chevron-down", "ChevronDown", n);
3
+ export {
4
+ t as I
5
+ };
@@ -0,0 +1,7 @@
1
+ import { c as o } from "./createReactComponent-Cb6Pzf10.js";
2
+ const e = [["path", { d: "M15 6l-6 6l6 6", key: "svg-0" }]], c = o("outline", "chevron-left", "ChevronLeft", e);
3
+ const t = [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]], h = o("outline", "chevron-right", "ChevronRight", t);
4
+ export {
5
+ c as I,
6
+ h as a
7
+ };
@@ -0,0 +1,5 @@
1
+ import { c as o } from "./createReactComponent-Cb6Pzf10.js";
2
+ const n = [["path", { d: "M5 12l14 0", key: "svg-0" }]], e = o("outline", "minus", "Minus", n);
3
+ export {
4
+ e as I
5
+ };
@@ -0,0 +1,5 @@
1
+ import { c as e } from "./createReactComponent-Cb6Pzf10.js";
2
+ const a = [["path", { d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg-0" }], ["path", { d: "M21 21l-6 -6", key: "svg-1" }]], c = e("outline", "search", "Search", a);
3
+ export {
4
+ c as I
5
+ };
@@ -0,0 +1,5 @@
1
+ import { c as o } from "./createReactComponent-Cb6Pzf10.js";
2
+ const t = [["path", { d: "M18 6l-12 12", key: "svg-0" }], ["path", { d: "M6 6l12 12", key: "svg-1" }]], c = o("outline", "x", "X", t);
3
+ export {
4
+ c as I
5
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import { Children as i } from "react";
3
3
  import { CarouselRoot as c, CarouselControl as u, CarouselPrevTrigger as d, CarouselItemGroup as h, CarouselItem as p, CarouselNextTrigger as f, CarouselIndicatorGroup as b, CarouselIndicator as g } from "@ark-ui/react/carousel";
4
- import { d as C, e as w } from "./icons-BFOFrum4.js";
4
+ import { I as C, a as w } from "./IconChevronRight-DEIDRsvg.js";
5
5
  const y = "mare:group mare:relative mare:overflow-hidden mare:rounded-container-m", N = "mare:relative mare:flex mare:items-stretch", x = `
6
6
  mare:flex mare:flex-1 mare:min-w-0
7
7
  mare:[scrollbar-width:none] mare:[&::-webkit-scrollbar]:hidden
@@ -0,0 +1,70 @@
1
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ import { B as o } from "./Button-AfMqNCme.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,57 +1,59 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { useRef as P, useState as w, useEffect as R } from "react";
1
+ import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
+ import { useRef as P, useState as R, useEffect as k } from "react";
3
3
  import { Pagination as c } from "@ark-ui/react/pagination";
4
4
  import { B as h } from "./Button-AfMqNCme.js";
5
- import { S as j } from "./SelectField-CGbdf8C2.js";
6
- import { f as N, d as k, e as W, g as I } from "./icons-BFOFrum4.js";
7
- const O = (a) => `
5
+ import { S as N } from "./SelectField-CvKaukCG.js";
6
+ import { c as b } from "./createReactComponent-Cb6Pzf10.js";
7
+ import { I as M, a as j } from "./IconChevronRight-DEIDRsvg.js";
8
+ const I = [["path", { d: "M11 7l-5 5l5 5", key: "svg-0" }], ["path", { d: "M17 7l-5 5l5 5", key: "svg-1" }]], W = b("outline", "chevrons-left", "ChevronsLeft", I);
9
+ const O = [["path", { d: "M7 7l5 5l-5 5", key: "svg-0" }], ["path", { d: "M13 7l5 5l-5 5", key: "svg-1" }]], T = b("outline", "chevrons-right", "ChevronsRight", O), _ = (a) => `
8
10
  mare:w-full mare:flex mare:flex-wrap mare:items-center mare:gap-2
9
11
  ${a ? "mare:justify-between" : "mare:justify-center"}
10
- `, T = "mare:flex mare:items-center mare:gap-2 mare:min-w-50", M = "mare:text-default mare:tpc-typography-body-s", q = "mare:max-w-20", A = "mare:flex mare:items-center mare:justify-center mare:gap-2 mare:min-w-3xs", B = "mare:flex mare:items-center mare:justify-center mare:gap-2", E = `
12
+ `, q = "mare:flex mare:items-center mare:gap-2 mare:min-w-50", A = "mare:text-default mare:tpc-typography-body-s", B = "mare:max-w-20", E = "mare:flex mare:items-center mare:justify-center mare:gap-2 mare:min-w-3xs", L = "mare:flex mare:items-center mare:justify-center mare:gap-2", V = `
11
13
  mare:shrink-0 mare:size-10 mare:flex mare:items-center mare:justify-center mare:truncate
12
14
  mare:rounded-full mare:tpc-typography-label-s mare:text-default mare:cursor-pointer
13
15
  mare:bg-transparent mare:border-none mare:hover:bg-hover
14
16
  mare:ark-selected:bg-accent-weak! mare:ark-selected:text-accent! mare:ark-selected:hover:bg-accent-weak!
15
- `, b = (a, n) => {
16
- let i = (a + 2) * 40 + (a + 1) * 8;
17
- return n && (i += 96), i;
18
- }, V = ({
17
+ `, C = (a, n) => {
18
+ let s = (a + 2) * 40 + (a + 1) * 8;
19
+ return n && (s += 96), s;
20
+ }, $ = ({
19
21
  requestedPageLinkSize: a,
20
22
  containerWidth: n,
21
- rowsPerPageWidth: i,
23
+ rowsPerPageWidth: s,
22
24
  showFirstLastLinks: o
23
25
  }) => {
24
26
  if (!n) return a;
25
- let s = a, l = b(s, o) + i;
26
- for (; l > n && s > 1; )
27
- s -= 1, l = b(s, o) + i;
28
- return s;
29
- }, L = (a, n, i) => {
27
+ let i = a, l = C(i, o) + s;
28
+ for (; l > n && i > 1; )
29
+ i -= 1, l = C(i, o) + s;
30
+ return i;
31
+ }, D = (a, n, s) => {
30
32
  if (n <= 0) return [];
31
- const o = Math.min(i, n), s = Math.max(1, Math.min(a - Math.floor((o - 1) / 2), n - o + 1));
32
- return Array.from({ length: o }, (l, g) => s + g);
33
+ const o = Math.min(s, n), i = Math.max(1, Math.min(a - Math.floor((o - 1) / 2), n - o + 1));
34
+ return Array.from({ length: o }, (l, g) => i + g);
33
35
  };
34
- function J({
36
+ function X({
35
37
  count: a,
36
38
  page: n,
37
- defaultPage: i,
39
+ defaultPage: s,
38
40
  onPageChange: o,
39
- pageSize: s,
41
+ pageSize: i,
40
42
  defaultPageSize: l,
41
43
  onPageSizeChange: g,
42
- pageLinkSize: u = 5,
44
+ pageLinkSize: d = 5,
43
45
  showFirstLastLinks: m = !0,
44
46
  rowsPerPageOptions: f,
45
- rowsPerPageOptionsLabel: C = "Rows per page"
47
+ rowsPerPageOptionsLabel: S = "Rows per page"
46
48
  }) {
47
- const p = !!f?.length, v = P(null), y = P(null), [S, z] = w(u);
48
- return R(() => {
49
+ const p = !!f?.length, v = P(null), y = P(null), [z, w] = R(d);
50
+ return k(() => {
49
51
  const r = v.current;
50
52
  if (!r) return;
51
53
  const t = () => {
52
- z(
53
- V({
54
- requestedPageLinkSize: u,
54
+ w(
55
+ $({
56
+ requestedPageLinkSize: d,
55
57
  containerWidth: r.clientWidth,
56
58
  rowsPerPageWidth: y.current?.clientWidth ?? 0,
57
59
  showFirstLastLinks: m
@@ -63,28 +65,28 @@ function J({
63
65
  return x.observe(r), () => {
64
66
  x.disconnect();
65
67
  };
66
- }, [u, m]), /* @__PURE__ */ d(
68
+ }, [d, m]), /* @__PURE__ */ u(
67
69
  c.Root,
68
70
  {
69
71
  ref: v,
70
- className: O(p),
72
+ className: _(p),
71
73
  count: a,
72
74
  page: n,
73
- defaultPage: i,
74
- pageSize: s,
75
+ defaultPage: s,
76
+ pageSize: i,
75
77
  defaultPageSize: l,
76
78
  onPageChange: (r) => o?.(r.page),
77
79
  onPageSizeChange: (r) => g?.(r.pageSize),
78
80
  children: [
79
- p && /* @__PURE__ */ d(
81
+ p && /* @__PURE__ */ u(
80
82
  "div",
81
83
  {
82
84
  ref: y,
83
- className: T,
85
+ className: q,
84
86
  children: [
85
- /* @__PURE__ */ e("span", { className: M, children: C }),
86
- /* @__PURE__ */ e("span", { className: q, children: /* @__PURE__ */ e(c.Context, { children: (r) => /* @__PURE__ */ e(
87
- j,
87
+ /* @__PURE__ */ e("span", { className: A, children: S }),
88
+ /* @__PURE__ */ e("span", { className: B, children: /* @__PURE__ */ e(c.Context, { children: (r) => /* @__PURE__ */ e(
89
+ N,
88
90
  {
89
91
  value: String(r.pageSize),
90
92
  onValueChange: (t) => {
@@ -103,14 +105,14 @@ function J({
103
105
  ]
104
106
  }
105
107
  ),
106
- /* @__PURE__ */ d("div", { className: A, children: [
108
+ /* @__PURE__ */ u("div", { className: E, children: [
107
109
  m && /* @__PURE__ */ e(c.FirstTrigger, { asChild: !0, children: /* @__PURE__ */ e(
108
110
  h,
109
111
  {
110
112
  severity: "ghost",
111
113
  size: "small",
112
114
  iconOnly: !0,
113
- icon: /* @__PURE__ */ e(N, {})
115
+ icon: /* @__PURE__ */ e(W, {})
114
116
  }
115
117
  ) }),
116
118
  /* @__PURE__ */ e(c.PrevTrigger, { asChild: !0, children: /* @__PURE__ */ e(
@@ -119,19 +121,19 @@ function J({
119
121
  severity: "ghost",
120
122
  size: "small",
121
123
  iconOnly: !0,
122
- icon: /* @__PURE__ */ e(k, {})
124
+ icon: /* @__PURE__ */ e(M, {})
123
125
  }
124
126
  ) }),
125
- /* @__PURE__ */ e("div", { className: B, children: /* @__PURE__ */ e(c.Context, { children: (r) => L(
127
+ /* @__PURE__ */ e("div", { className: L, children: /* @__PURE__ */ e(c.Context, { children: (r) => D(
126
128
  r.page,
127
129
  r.totalPages,
128
- S
130
+ z
129
131
  ).map((t) => /* @__PURE__ */ e(
130
132
  c.Item,
131
133
  {
132
134
  type: "page",
133
135
  value: t,
134
- className: E,
136
+ className: V,
135
137
  children: t
136
138
  },
137
139
  t
@@ -142,7 +144,7 @@ function J({
142
144
  severity: "ghost",
143
145
  size: "small",
144
146
  iconOnly: !0,
145
- icon: /* @__PURE__ */ e(W, {})
147
+ icon: /* @__PURE__ */ e(j, {})
146
148
  }
147
149
  ) }),
148
150
  m && /* @__PURE__ */ e(c.LastTrigger, { asChild: !0, children: /* @__PURE__ */ e(
@@ -151,7 +153,7 @@ function J({
151
153
  severity: "ghost",
152
154
  size: "small",
153
155
  iconOnly: !0,
154
- icon: /* @__PURE__ */ e(I, {})
156
+ icon: /* @__PURE__ */ e(T, {})
155
157
  }
156
158
  ) })
157
159
  ] })
@@ -160,5 +162,5 @@ function J({
160
162
  );
161
163
  }
162
164
  export {
163
- J as P
165
+ X as P
164
166
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, jsxs as s, Fragment as u } from "react/jsx-runtime";
2
2
  import { useMemo as x } from "react";
3
3
  import { createTreeCollection as f, TreeView as n } from "@ark-ui/react/tree-view";
4
- import { a as b } from "./icons-BFOFrum4.js";
4
+ import { I as b } from "./IconChevronDown-ev2ML7Ex.js";
5
5
  const g = "mare:flex mare:flex-col mare:gap-1", v = "mare:flex mare:flex-col mare:gap-1", k = `
6
6
  mare:group mare:flex mare:items-center mare:gap-2 mare:min-h-10 mare:px-3 mare:py-2
7
7
  mare:rounded-menu-item mare:cursor-pointer mare:select-none mare:outline-none
@@ -44,7 +44,7 @@ function p({
44
44
  children: /* @__PURE__ */ s(n.Branch, { className: v, children: [
45
45
  /* @__PURE__ */ s(n.BranchControl, { className: k, children: [
46
46
  /* @__PURE__ */ a(n.BranchText, { className: N, children: i(e, m) }),
47
- /* @__PURE__ */ a(n.BranchIndicator, { className: y, children: /* @__PURE__ */ a(b, {}) })
47
+ /* @__PURE__ */ a(n.BranchIndicator, { className: y, children: /* @__PURE__ */ a(b, { size: "1em" }) })
48
48
  ] }),
49
49
  /* @__PURE__ */ a(n.BranchContent, { className: C, children: e.items.map((o, r) => /* @__PURE__ */ a(
50
50
  p,
@@ -0,0 +1,95 @@
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
+ };
@@ -0,0 +1,64 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { a as C, I as t } from "./IconField-Dh6j6SL1.js";
3
+ import { P as x } from "./ProgressSpinner-B-lrS-tu.js";
4
+ import { I as v } from "./IconSearch-CgM6jEUh.js";
5
+ import { I as F } from "./IconX-CpPADKjZ.js";
6
+ const L = (o) => !!o.value && o.clearable, P = (o) => o.loading && !o.disabled;
7
+ function N({
8
+ value: o = "",
9
+ onValueChange: s,
10
+ loading: e = !1,
11
+ clearable: c = !1,
12
+ disabled: n = !1,
13
+ leftIcon: l = /* @__PURE__ */ i(v, {}),
14
+ clearIcon: u = /* @__PURE__ */ i(F, {}),
15
+ rightIcon: r,
16
+ onClear: h,
17
+ ...I
18
+ }) {
19
+ const a = L({ value: o, clearable: c }), m = P({ loading: e, disabled: n }), S = !!r || c || e, p = /* @__PURE__ */ i(
20
+ C,
21
+ {
22
+ ...I,
23
+ value: o,
24
+ onValueChange: s,
25
+ disabled: n,
26
+ rounded: !0
27
+ }
28
+ );
29
+ if (!S)
30
+ return /* @__PURE__ */ i(
31
+ t,
32
+ {
33
+ icon: l,
34
+ position: "left",
35
+ disabled: n,
36
+ children: p
37
+ }
38
+ );
39
+ const d = r || (m ? /* @__PURE__ */ i(x, { className: "mare:size-5" }) : a ? u : null), f = !r && !m && a;
40
+ return /* @__PURE__ */ i(
41
+ t,
42
+ {
43
+ icon: l,
44
+ position: "left",
45
+ disabled: n,
46
+ children: /* @__PURE__ */ i(
47
+ t,
48
+ {
49
+ icon: d,
50
+ position: "right",
51
+ disabled: n,
52
+ onIconClick: f ? () => {
53
+ s?.(""), h?.();
54
+ } : void 0,
55
+ iconLabel: f ? "Clear" : void 0,
56
+ children: p
57
+ }
58
+ )
59
+ }
60
+ );
61
+ }
62
+ export {
63
+ N as S
64
+ };