@tpc-mare/mare-ui-components-react 0.1.12 → 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.
Files changed (50) 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 +2 -0
  14. package/dist/index/index.js +43 -41
  15. package/dist/paginator/index.js +1 -1
  16. package/dist/panel-menu/index.js +1 -1
  17. package/dist/password/index.js +1 -1
  18. package/dist/search-field/index.js +1 -1
  19. package/dist/select-field/index.js +1 -1
  20. package/dist/shared/{Accordion-Dhs7EeM6.js → Accordion-BLQ1mWZZ.js} +1 -1
  21. package/dist/shared/{Banner-B41NQS5P.js → Banner-DXftmx9P.js} +1 -1
  22. package/dist/shared/{Checkbox-B7vM1mxP.js → Checkbox-BXnSN2vK.js} +10 -9
  23. package/dist/shared/{Combobox-oSS0Rlbv.js → Combobox-SkrEe5He.js} +44 -41
  24. package/dist/shared/Counter-D4Al7Yme.js +94 -0
  25. package/dist/shared/{DatePicker-GYH3uorm.js → DatePicker-CwAISvNc.js} +140 -137
  26. package/dist/shared/{DialogHeader-CZ5OrC8_.js → DialogHeader-RzfQm-pi.js} +14 -14
  27. package/dist/shared/{DrawerFooter-OFrTFvy2.js → DrawerFooter-BxOEFQ-W.js} +3 -3
  28. package/dist/shared/IconCheck-DzZA6b2U.js +5 -0
  29. package/dist/shared/IconChevronDown-ev2ML7Ex.js +5 -0
  30. package/dist/shared/IconChevronRight-DEIDRsvg.js +7 -0
  31. package/dist/shared/IconMinus-fS_GL0Et.js +5 -0
  32. package/dist/shared/IconSearch-CgM6jEUh.js +5 -0
  33. package/dist/shared/IconX-CpPADKjZ.js +5 -0
  34. package/dist/shared/{ImageSlider-CdBVmAYC.js → ImageSlider-Bgb1kNQ4.js} +1 -1
  35. package/dist/shared/{Paginator-BndcA6Ax.js → Paginator-Bp2nghqW.js} +48 -46
  36. package/dist/shared/{PanelMenu-Bz-fg6px.js → PanelMenu-BpjNM7O_.js} +2 -2
  37. package/dist/shared/Password-BMKy8dAy.js +95 -0
  38. package/dist/shared/SearchField-DjJHDaR4.js +64 -0
  39. package/dist/shared/{SelectField-CGbdf8C2.js → SelectField-CvKaukCG.js} +27 -25
  40. package/dist/shared/{Stepper-BpKdB3ip.js → Stepper-By8M5bs0.js} +13 -12
  41. package/dist/shared/{TagChip-BNszVayi.js → TagChip-Bs7srjIL.js} +1 -1
  42. package/dist/shared/createReactComponent-Cb6Pzf10.js +48 -0
  43. package/dist/stepper/index.js +1 -1
  44. package/dist/styles.css +1 -1
  45. package/dist/tag-chip/index.js +1 -1
  46. package/package.json +2 -1
  47. package/dist/shared/Password-cqTK9OlT.js +0 -94
  48. package/dist/shared/SearchField-CgZV2Am-.js +0 -63
  49. package/dist/shared/icons-BFOFrum4.js +0 -55
  50. 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
@@ -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
+ };
@@ -1,38 +1,40 @@
1
1
  import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
2
  import { useMemo as w } from "react";
3
- import { createListCollection as S, SelectRoot as y, SelectLabel as v, SelectControl as N, SelectTrigger as I, SelectContext as C, SelectValueText as T, SelectClearTrigger as j, SelectIndicator as _, SelectPositioner as z, SelectContent as D, SelectItem as L, SelectItemText as V, SelectItemIndicator as $ } from "@ark-ui/react/select";
4
- import { c as F, a as M, b as P } from "./icons-BFOFrum4.js";
3
+ import { createListCollection as S, SelectRoot as y, SelectLabel as v, SelectControl as I, SelectTrigger as N, SelectContext as C, SelectValueText as T, SelectClearTrigger as z, SelectIndicator as j, SelectPositioner as _, SelectContent as D, SelectItem as L, SelectItemText as V, SelectItemIndicator as $ } from "@ark-ui/react/select";
4
+ import { I as F } from "./IconX-CpPADKjZ.js";
5
+ import { I as M } from "./IconChevronDown-ev2ML7Ex.js";
6
+ import { I as P } from "./IconCheck-DzZA6b2U.js";
5
7
  const R = {
6
8
  small: "mare:h-10",
7
9
  medium: "mare:h-12"
8
- }, q = {
10
+ }, X = {
9
11
  small: "mare:tpc-typography-body-s",
10
12
  medium: "mare:tpc-typography-body-m"
11
- }, A = (r) => `
13
+ }, q = (r) => `
12
14
  mare:group mare:w-full mare:flex mare:items-center mare:justify-between mare:gap-3
13
15
  ${R[r]}
14
16
  mare:px-3 mare:cursor-pointer
15
17
  mare:rounded-input mare:border mare:border-strong mare:bg-default
16
- mare:text-default ${q[r]}
18
+ mare:text-default ${X[r]}
17
19
  mare:ark-open:outline-solid mare:ark-open:outline-2 mare:ark-open:outline-accent mare:ark-open:-outline-offset-2
18
20
  mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default mare:ark-disabled:cursor-not-allowed
19
21
  mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
20
- `, l = "mare:flex-auto mare:text-left mare:truncate mare:data-[placeholder-shown]:text-weak", B = "mare:flex mare:items-center mare:shrink-0 mare:text-lg mare:transition-transform mare:ark-open:rotate-180 mare:text-default", E = "mare:flex mare:items-center mare:shrink-0 mare:text-base mare:cursor-pointer mare:text-default mare:hover:text-weak", G = "mare:flex mare:items-center mare:shrink-0 mare:text-weak mare:[&>svg]:size-5", H = `
22
+ `, l = "mare:flex-auto mare:text-left mare:truncate mare:data-[placeholder-shown]:text-weak", A = "mare:flex mare:items-center mare:shrink-0 mare:text-lg mare:transition-transform mare:ark-open:rotate-180 mare:text-default", B = "mare:flex mare:items-center mare:shrink-0 mare:text-base mare:cursor-pointer mare:text-default mare:hover:text-weak", E = "mare:flex mare:items-center mare:shrink-0 mare:text-weak mare:[&>svg]:size-5", G = `
21
23
  mare:flex mare:flex-col mare:gap-0.5 mare:p-1
22
24
  mare:rounded-input mare:border mare:border-default mare:bg-raised
23
25
  mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
24
26
  mare:max-h-72 mare:overflow-y-auto
25
27
  mare:min-w-[var(--reference-width)]
26
28
  mare:z-50
27
- `, J = `
29
+ `, H = `
28
30
  mare:group/option mare:flex mare:items-center mare:justify-between mare:gap-2
29
31
  mare:w-full mare:min-h-8 mare:py-2 mare:px-3 mare:cursor-pointer mare:rounded-menu-item
30
32
  mare:tpc-typography-body-s mare:text-default
31
33
  mare:ark-highlighted:bg-hover
32
34
  mare:ark-selected:bg-accent-weak mare:ark-selected:text-accent
33
35
  mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed
34
- `, K = "mare:flex mare:items-center mare:text-accent", Q = "mare:tpc-typography-label-s mare:text-default mare:mb-1.5 mare:block";
35
- function Z({
36
+ `, J = "mare:flex mare:items-center mare:text-accent", K = "mare:tpc-typography-label-s mare:text-default mare:mb-1.5 mare:block";
37
+ function ee({
36
38
  value: r = null,
37
39
  onValueChange: d,
38
40
  options: t,
@@ -41,13 +43,13 @@ function Z({
41
43
  disabled: p = !1,
42
44
  invalid: f = !1,
43
45
  clearable: h = !1,
44
- label: n,
45
- leadingIcon: s,
46
+ label: s,
47
+ leadingIcon: n,
46
48
  indicator: x,
47
49
  clearIcon: b,
48
50
  checkIcon: g,
49
- renderValue: c,
50
- renderOption: i
51
+ renderValue: i,
52
+ renderOption: c
51
53
  }) {
52
54
  const k = w(
53
55
  () => S({
@@ -67,10 +69,10 @@ function Z({
67
69
  invalid: f,
68
70
  onValueChange: (a) => d?.(a.value[0] ?? null),
69
71
  children: [
70
- n && /* @__PURE__ */ e(v, { className: Q, children: n }),
71
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ m(I, { className: A(u), children: [
72
- s && /* @__PURE__ */ e("span", { className: G, children: s }),
73
- c ? /* @__PURE__ */ e(C, { children: (a) => a.selectedItems.length > 0 ? /* @__PURE__ */ e("span", { className: l, children: c(
72
+ s && /* @__PURE__ */ e(v, { className: K, children: s }),
73
+ /* @__PURE__ */ e(I, { children: /* @__PURE__ */ m(N, { className: q(u), children: [
74
+ n && /* @__PURE__ */ e("span", { className: E, children: n }),
75
+ i ? /* @__PURE__ */ e(C, { children: (a) => a.selectedItems.length > 0 ? /* @__PURE__ */ e("span", { className: l, children: i(
74
76
  a.selectedItems[0]
75
77
  ) }) : /* @__PURE__ */ e(
76
78
  "span",
@@ -88,21 +90,21 @@ function Z({
88
90
  placeholder: o
89
91
  }
90
92
  ),
91
- h && /* @__PURE__ */ e(j, { className: E, children: b ?? /* @__PURE__ */ e(F, {}) }),
92
- /* @__PURE__ */ e(_, { className: B, children: x ?? /* @__PURE__ */ e(M, {}) })
93
+ h && /* @__PURE__ */ e(z, { className: B, children: b ?? /* @__PURE__ */ e(F, { size: "1em" }) }),
94
+ /* @__PURE__ */ e(j, { className: A, children: x ?? /* @__PURE__ */ e(M, { size: "1em" }) })
93
95
  ] }) }),
94
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { className: H, children: t.map((a) => /* @__PURE__ */ m(
96
+ /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(D, { className: G, children: t.map((a) => /* @__PURE__ */ m(
95
97
  L,
96
98
  {
97
99
  item: a,
98
- className: J,
100
+ className: H,
99
101
  children: [
100
- /* @__PURE__ */ e(V, { children: i ? i(a) : a.label }),
102
+ /* @__PURE__ */ e(V, { children: c ? c(a) : a.label }),
101
103
  /* @__PURE__ */ e(
102
104
  $,
103
105
  {
104
- className: K,
105
- children: g ?? /* @__PURE__ */ e(P, {})
106
+ className: J,
107
+ children: g ?? /* @__PURE__ */ e(P, { size: "1em" })
106
108
  }
107
109
  )
108
110
  ]
@@ -114,5 +116,5 @@ function Z({
114
116
  );
115
117
  }
116
118
  export {
117
- Z as S
119
+ ee as S
118
120
  };