@tpc-mare/mare-ui-components-react 0.1.2 → 0.1.4

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 (47) hide show
  1. package/dist/avatar/Avatar.d.ts +2 -0
  2. package/dist/avatar/Avatar.types.d.ts +26 -0
  3. package/dist/avatar/index.d.ts +2 -0
  4. package/dist/avatar/index.js +4 -0
  5. package/dist/badge/Badge.d.ts +2 -0
  6. package/dist/badge/Badge.types.d.ts +11 -0
  7. package/dist/badge/index.d.ts +2 -0
  8. package/dist/badge/index.js +4 -0
  9. package/dist/drawer/Drawer.d.ts +2 -0
  10. package/dist/drawer/Drawer.types.d.ts +53 -0
  11. package/dist/drawer/DrawerFooter.d.ts +2 -0
  12. package/dist/drawer/DrawerHeader.d.ts +2 -0
  13. package/dist/drawer/index.d.ts +4 -0
  14. package/dist/drawer/index.js +6 -0
  15. package/dist/index/index.d.ts +12 -0
  16. package/dist/index/index.js +45 -30
  17. package/dist/input-number/index.js +1 -1
  18. package/dist/input-text/IconField.d.ts +10 -1
  19. package/dist/input-text/field-layout.d.ts +7 -1
  20. package/dist/input-text/index.js +8 -7
  21. package/dist/menu/Menu.d.ts +2 -0
  22. package/dist/menu/Menu.types.d.ts +19 -0
  23. package/dist/menu/index.d.ts +2 -0
  24. package/dist/menu/index.js +4 -0
  25. package/dist/search-field/SearchField.d.ts +2 -0
  26. package/dist/search-field/SearchField.types.d.ts +26 -0
  27. package/dist/search-field/index.d.ts +2 -0
  28. package/dist/search-field/index.js +4 -0
  29. package/dist/shared/Avatar-D3QlO3Tz.js +59 -0
  30. package/dist/shared/Badge-WC6my4Aw.js +35 -0
  31. package/dist/shared/DrawerFooter-DvUgumx0.js +172 -0
  32. package/dist/shared/HelperText-CVWWvLCI.js +46 -0
  33. package/dist/shared/IconField-Dh6j6SL1.js +78 -0
  34. package/dist/shared/{InputNumber-D1KL6s55.js → InputNumber-D48wsE-o.js} +1 -1
  35. package/dist/shared/Menu-Cv9dU1iA.js +104 -0
  36. package/dist/shared/SearchField-CgDz_s1O.js +63 -0
  37. package/dist/shared/Tag-BtbmgIwL.js +36 -0
  38. package/dist/shared/{Textarea-0XAczkH1.js → Textarea-iJhYTZos.js} +1 -1
  39. package/dist/shared/{field-layout-BXKpp5E_.js → field-layout-D34MpDMB.js} +16 -12
  40. package/dist/styles.css +1 -1
  41. package/dist/tag/Tag.d.ts +2 -0
  42. package/dist/tag/Tag.types.d.ts +11 -0
  43. package/dist/tag/index.d.ts +2 -0
  44. package/dist/tag/index.js +4 -0
  45. package/dist/textarea/index.js +1 -1
  46. package/package.json +1 -1
  47. package/dist/shared/HelperText-D656H0Lf.js +0 -103
@@ -0,0 +1,172 @@
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
+ import { Dialog as t } from "@ark-ui/react/dialog";
3
+ import { Portal as g } from "@ark-ui/react/portal";
4
+ import { B as d } from "./Button-AfMqNCme.js";
5
+ import { c as y } from "./icons-DeVfnVLm.js";
6
+ const _ = (e) => {
7
+ switch (e) {
8
+ case "left":
9
+ return "translateX(-100%)";
10
+ case "right":
11
+ return "translateX(100%)";
12
+ case "top":
13
+ return "translateY(-100%)";
14
+ case "bottom":
15
+ case "full":
16
+ return "translateY(100%)";
17
+ }
18
+ }, k = (e) => `
19
+ mare:fixed mare:inset-0 mare:z-40
20
+ ${e ?? "mare:bg-overlay"}
21
+ mare:ark-open:[animation:mare-dialog-backdrop-enter_300ms_ease-out]
22
+ mare:ark-closed:[animation:mare-dialog-backdrop-exit_200ms_ease-in]
23
+ `, v = {
24
+ left: "mare:justify-start",
25
+ right: "mare:justify-end",
26
+ top: "mare:flex-col mare:justify-start",
27
+ bottom: "mare:flex-col mare:justify-end",
28
+ full: ""
29
+ }, N = (e) => `
30
+ mare:fixed mare:inset-0 mare:z-50 mare:flex
31
+ ${v[e]}
32
+ `, $ = {
33
+ left: "mare:w-screen mare:md:w-120",
34
+ right: "mare:w-screen mare:md:w-120",
35
+ top: "mare:border-b mare:border-default",
36
+ bottom: "mare:border-t mare:border-default",
37
+ full: "mare:w-screen mare:h-screen mare:max-h-full"
38
+ }, j = (e) => `
39
+ mare:group/drawer mare:flex mare:flex-col
40
+ mare:bg-default mare:text-default
41
+ mare:outline-none
42
+ ${e.shadow ? "mare:shadow-[0px_10px_15px_-3px_rgba(0,0,0,0.10),0px_4px_6px_-2px_rgba(0,0,0,0.05)]" : ""}
43
+ ${$[e.position]}
44
+ mare:ark-open:[animation:mare-drawer-enter_300ms_ease-out]
45
+ mare:ark-closed:[animation:mare-drawer-exit_200ms_ease-in]
46
+ `, C = (e) => `
47
+ mare:grow mare:overflow-y-auto mare:px-6 mare:pb-6
48
+ ${e ? "mare:pt-6" : "mare:pt-0"}
49
+ `, O = (e) => `
50
+ mare:flex mare:w-full mare:items-center mare:justify-between mare:shrink-0
51
+ mare:px-6
52
+ ${e.compact ? "mare:h-auto mare:py-4" : "mare:h-14 mare:md:h-16"}
53
+ ${e.border ? "mare:border-b mare:border-default" : ""}
54
+ `, z = "mare:-ml-1.5", D = "mare:-mr-1.5", u = (e) => `
55
+ mare:grow mare:w-full mare:truncate mare:text-center
56
+ mare:tpc-typography-label-m mare:text-default
57
+ ${e.hasRightIcon ? "" : "mare:mr-6.5"}
58
+ ${e.hasLeftIcon ? "" : "mare:ml-6.5"}
59
+ `, R = (e) => `
60
+ mare:flex mare:flex-col-reverse mare:sm:flex-row mare:justify-end
61
+ mare:gap-3 mare:sm:gap-4 mare:w-full
62
+ mare:*:w-full mare:sm:*:flex-1
63
+ mare:px-6 mare:pb-4 mare:sm:pb-6
64
+ ${e ? "mare:pt-3 mare:sm:pt-6 mare:border-t mare:border-t-default" : "mare:pt-0"}
65
+ `;
66
+ function X({
67
+ open: e,
68
+ onOpenChange: a,
69
+ position: m = "left",
70
+ modal: l = !0,
71
+ closeOnEscape: s = !0,
72
+ dismissableMask: o = !0,
73
+ maskColor: n,
74
+ shadow: f = !0,
75
+ portalContainer: p,
76
+ header: c,
77
+ footer: x,
78
+ children: h,
79
+ "aria-label": b
80
+ }) {
81
+ return /* @__PURE__ */ r(
82
+ t.Root,
83
+ {
84
+ open: e,
85
+ onOpenChange: (w) => a?.(w.open),
86
+ modal: l,
87
+ closeOnEscape: s,
88
+ closeOnInteractOutside: o,
89
+ "aria-label": b,
90
+ lazyMount: !0,
91
+ unmountOnExit: !0,
92
+ children: /* @__PURE__ */ i(g, { container: p, children: [
93
+ /* @__PURE__ */ r(t.Backdrop, { className: k(n) }),
94
+ /* @__PURE__ */ r(t.Positioner, { className: N(m), children: /* @__PURE__ */ i(
95
+ t.Content,
96
+ {
97
+ className: j({ position: m, shadow: f }),
98
+ style: {
99
+ "--mare-drawer-from": _(m)
100
+ },
101
+ children: [
102
+ c,
103
+ /* @__PURE__ */ r("div", { className: C(!!c), children: h }),
104
+ x
105
+ ]
106
+ }
107
+ ) })
108
+ ] })
109
+ }
110
+ );
111
+ }
112
+ function Y({
113
+ title: e,
114
+ leftIcon: a = /* @__PURE__ */ r(y, {}),
115
+ rightIcon: m,
116
+ onLeftIconClick: l,
117
+ onRightIconClick: s,
118
+ border: o = !1,
119
+ compact: n = !1
120
+ }) {
121
+ return /* @__PURE__ */ i("div", { className: O({ border: o, compact: n }), children: [
122
+ a ? /* @__PURE__ */ r("div", { className: z, children: /* @__PURE__ */ r(t.CloseTrigger, { asChild: !0, children: /* @__PURE__ */ r(
123
+ d,
124
+ {
125
+ severity: "ghost",
126
+ iconOnly: !0,
127
+ size: "xsmall",
128
+ icon: a,
129
+ onClick: l
130
+ }
131
+ ) }) }) : null,
132
+ e ? /* @__PURE__ */ r(
133
+ t.Title,
134
+ {
135
+ className: u({
136
+ hasLeftIcon: !!a,
137
+ hasRightIcon: !!m
138
+ }),
139
+ children: e
140
+ }
141
+ ) : /* @__PURE__ */ r(
142
+ "span",
143
+ {
144
+ className: u({
145
+ hasLeftIcon: !!a,
146
+ hasRightIcon: !!m
147
+ })
148
+ }
149
+ ),
150
+ m ? /* @__PURE__ */ r("div", { className: D, children: /* @__PURE__ */ r(
151
+ d,
152
+ {
153
+ severity: "ghost",
154
+ iconOnly: !0,
155
+ size: "xsmall",
156
+ icon: m,
157
+ onClick: s
158
+ }
159
+ ) }) : null
160
+ ] });
161
+ }
162
+ function E({
163
+ border: e = !1,
164
+ children: a
165
+ }) {
166
+ return /* @__PURE__ */ r("div", { className: R(e), children: a });
167
+ }
168
+ export {
169
+ X as D,
170
+ E as a,
171
+ Y as b
172
+ };
@@ -0,0 +1,46 @@
1
+ import { jsxs as i, jsx as r, Fragment as m } from "react/jsx-runtime";
2
+ import { useFieldContext as s, FieldRoot as c, FieldLabel as d, FieldErrorText as u, FieldHelperText as h } from "@ark-ui/react/field";
3
+ import { x as f, g, F as x, p as l, h as y } from "./field-layout-D34MpDMB.js";
4
+ function L({ value: e, max: o }) {
5
+ const a = s()?.disabled ?? !1;
6
+ return /* @__PURE__ */ i("span", { className: f(a), children: [
7
+ e.length,
8
+ "/",
9
+ o
10
+ ] });
11
+ }
12
+ function N({
13
+ invalid: e = !1,
14
+ disabled: o = !1,
15
+ required: t = !1,
16
+ children: a
17
+ }) {
18
+ return /* @__PURE__ */ r(
19
+ c,
20
+ {
21
+ invalid: e,
22
+ disabled: o,
23
+ required: t,
24
+ className: g,
25
+ children: a
26
+ }
27
+ );
28
+ }
29
+ const F = "mare:pointer-events-none mare:absolute mare:left-3 mare:origin-[0] mare:transition-all mare:duration-150 mare:tpc-typography-body-m mare:text-weak mare:top-1/2 mare:-translate-y-1/2 mare:group-focus-within:top-2 mare:group-focus-within:translate-y-0 mare:group-focus-within:tpc-typography-body-xs mare:group-has-[:is(input,textarea):not(:placeholder-shown)]:top-2 mare:group-has-[:is(input,textarea):not(:placeholder-shown)]:translate-y-0 mare:group-has-[:is(input,textarea):not(:placeholder-shown)]:tpc-typography-body-xs";
30
+ function S({ label: e, children: o }) {
31
+ const t = { hasFloatLabel: !0, iconSide: null }, a = `${F} mare:group-has-[.mare-icon-left_svg]:left-10 mare:group-has-[textarea]:top-2 mare:group-has-[textarea]:translate-y-0`, n = /* @__PURE__ */ i(m, { children: [
32
+ o,
33
+ /* @__PURE__ */ r(d, { className: a, children: e })
34
+ ] }), p = !s() ? /* @__PURE__ */ r(c, { className: l, children: n }) : /* @__PURE__ */ r("div", { className: l, children: n });
35
+ return /* @__PURE__ */ r(x.Provider, { value: t, children: p });
36
+ }
37
+ function H({ children: e }) {
38
+ const t = s()?.invalid ?? !1, a = y(t);
39
+ return t ? /* @__PURE__ */ r(u, { className: a, children: e }) : /* @__PURE__ */ r(h, { className: a, children: e });
40
+ }
41
+ export {
42
+ L as C,
43
+ S as F,
44
+ H,
45
+ N as a
46
+ };
@@ -0,0 +1,78 @@
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,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { NumberInput as t } from "@ark-ui/react/number-input";
3
3
  import { useFieldContext as C } from "@ark-ui/react/field";
4
- import { u as g, d as y } from "./field-layout-BXKpp5E_.js";
4
+ import { u as g, d as y } from "./field-layout-D34MpDMB.js";
5
5
  function R({
6
6
  value: l = null,
7
7
  onValueChange: n,
@@ -0,0 +1,104 @@
1
+ import { jsxs as o, jsx as r, Fragment as u } from "react/jsx-runtime";
2
+ import { Menu as m } from "@ark-ui/react/menu";
3
+ import { Portal as p } from "@ark-ui/react/portal";
4
+ const h = `
5
+ mare:min-w-52 mare:flex mare:flex-col mare:gap-1 mare:p-2
6
+ mare:bg-raised mare:border mare:border-default mare:rounded-tpc-overlay
7
+ mare:shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1),0_2px_4px_-2px_rgba(0,0,0,0.1)]
8
+ mare:mt-2 mare:z-50 mare:outline-none
9
+ mare:ark-open:[animation:mare-menu-enter_120ms_cubic-bezier(0,0,0.2,1)]
10
+ mare:ark-closed:[animation:mare-menu-exit_100ms_linear]
11
+ `, b = (e) => `
12
+ mare:group mare:flex mare:items-center mare:gap-2 mare:h-10 mare:px-3
13
+ mare:rounded-menu-item mare:cursor-pointer mare:select-none mare:outline-none
14
+ mare:overflow-hidden mare:text-inherit mare:no-underline
15
+ mare:tpc-typography-body-s mare:text-default mare:transition-colors mare:duration-200
16
+ ${e.active ? "mare:bg-accent-weak" : "mare:ark-highlighted:bg-hover"}
17
+ mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed mare:ark-disabled:pointer-events-none
18
+ `, f = "mare:flex mare:items-center mare:shrink-0 mare:[&>svg]:size-5", x = `
19
+ mare:flex mare:items-center mare:h-8 mare:px-3 mare:py-1.5
20
+ mare:text-weak mare:tpc-typography-label-s
21
+ `, g = "mare:border-t mare:border-default mare:my-2";
22
+ function i(e, a) {
23
+ if (a) return a(e);
24
+ const n = e.icon;
25
+ return /* @__PURE__ */ o(u, { children: [
26
+ n ? /* @__PURE__ */ r("span", { className: f, children: n }) : null,
27
+ /* @__PURE__ */ r("span", { children: e.label })
28
+ ] });
29
+ }
30
+ function s({
31
+ item: e,
32
+ renderItem: a
33
+ }) {
34
+ const n = b({ active: e.active }), l = e.href;
35
+ return l ? /* @__PURE__ */ r(
36
+ m.Item,
37
+ {
38
+ value: e.value,
39
+ disabled: e.disabled,
40
+ className: n,
41
+ asChild: !0,
42
+ children: /* @__PURE__ */ r(
43
+ "a",
44
+ {
45
+ href: l,
46
+ target: e.target,
47
+ children: i(e, a)
48
+ }
49
+ )
50
+ }
51
+ ) : /* @__PURE__ */ r(
52
+ m.Item,
53
+ {
54
+ value: e.value,
55
+ disabled: e.disabled,
56
+ className: n,
57
+ children: i(e, a)
58
+ }
59
+ );
60
+ }
61
+ function v({
62
+ entry: e,
63
+ renderItem: a
64
+ }) {
65
+ return e.type === "separator" ? /* @__PURE__ */ r(m.Separator, { className: g }) : e.type === "group" ? /* @__PURE__ */ o(m.ItemGroup, { children: [
66
+ e.label ? /* @__PURE__ */ r(m.ItemGroupLabel, { className: x, children: e.label }) : null,
67
+ e.items.map((n) => /* @__PURE__ */ r(
68
+ s,
69
+ {
70
+ item: n,
71
+ renderItem: a
72
+ },
73
+ n.value
74
+ ))
75
+ ] }) : /* @__PURE__ */ r(
76
+ s,
77
+ {
78
+ item: e,
79
+ renderItem: a
80
+ }
81
+ );
82
+ }
83
+ function M({
84
+ trigger: e,
85
+ items: a,
86
+ onSelect: n,
87
+ renderItem: l,
88
+ portalContainer: d
89
+ }) {
90
+ return /* @__PURE__ */ o(m.Root, { onSelect: (t) => n?.(t.value), children: [
91
+ /* @__PURE__ */ r(m.Trigger, { asChild: !0, children: e }),
92
+ /* @__PURE__ */ r(p, { container: d, children: /* @__PURE__ */ r(m.Positioner, { children: /* @__PURE__ */ r(m.Content, { className: h, children: a.map((t, c) => /* @__PURE__ */ r(
93
+ v,
94
+ {
95
+ entry: t,
96
+ renderItem: l
97
+ },
98
+ t.type === "item" || !t.type ? t.value : c
99
+ )) }) }) })
100
+ ] });
101
+ }
102
+ export {
103
+ M
104
+ };
@@ -0,0 +1,63 @@
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, a as F } from "./icons-DeVfnVLm.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
+ };
@@ -0,0 +1,36 @@
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
+ const i = `
3
+ mare:inline-flex mare:items-center mare:justify-center mare:gap-0.5
4
+ mare:py-1 mare:px-1.5 mare:rounded-tag
5
+ mare:data-size-small:tpc-typography-label-xs mare:data-size-small:h-5.5
6
+ mare:data-size-medium:tpc-typography-label-xs mare:data-size-medium:h-6
7
+ mare:data-size-large:tpc-typography-label-s mare:data-size-large:h-8 mare:data-size-large:px-2.5
8
+ mare:data-severity-accent:bg-accent mare:data-severity-accent:text-on-accent
9
+ mare:data-severity-accent-weak:bg-accent-weak mare:data-severity-accent-weak:text-accent
10
+ mare:data-severity-neutral:bg-neutral-weak mare:data-severity-neutral:text-default
11
+ mare:data-severity-positive:bg-positive-weak mare:data-severity-positive:text-positive
12
+ mare:data-severity-warning:bg-warning-weak mare:data-severity-warning:text-warning
13
+ mare:data-severity-danger:bg-danger-weak mare:data-severity-danger:text-danger
14
+ `, n = "mare:flex mare:items-center mare:shrink-0 mare:[&>svg]:size-3.5", d = "mare:px-0.5";
15
+ function l({
16
+ severity: r = "accent",
17
+ size: s = "small",
18
+ icon: a,
19
+ children: e
20
+ }) {
21
+ return /* @__PURE__ */ m(
22
+ "span",
23
+ {
24
+ className: i,
25
+ "data-severity": r,
26
+ "data-size": s,
27
+ children: [
28
+ a && /* @__PURE__ */ t("span", { className: n, children: a }),
29
+ e && /* @__PURE__ */ t("span", { className: d, children: e })
30
+ ]
31
+ }
32
+ );
33
+ }
34
+ export {
35
+ l as T
36
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
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-BXKpp5E_.js";
3
+ import { u as L, a as b } from "./field-layout-D34MpDMB.js";
4
4
  function v({
5
5
  value: l = "",
6
6
  onValueChange: o,
@@ -18,8 +18,9 @@ const r = `
18
18
  small: "mare:h-12 mare:pt-4 mare:pb-0"
19
19
  }, n = {
20
20
  left: "mare:pl-10",
21
- right: "mare:pr-10"
22
- }, c = (e) => {
21
+ right: "mare:pr-10",
22
+ both: "mare:pl-10 mare:pr-10"
23
+ }, b = (e) => {
23
24
  const a = e.hasFloatLabel ? s[e.size] : i[e.size], t = e.rounded ? "mare:rounded-full" : "", m = e.iconSide ? n[e.iconSide] : "";
24
25
  return `${r} ${a} ${t} ${m}`;
25
26
  }, d = {
@@ -28,22 +29,25 @@ const r = `
28
29
  }, u = {
29
30
  medium: "mare:pt-6 mare:pb-3",
30
31
  small: "mare:pt-5 mare:pb-2.5"
31
- }, b = (e) => {
32
+ }, f = (e) => {
32
33
  const a = e.hasFloatLabel ? u[e.size] : d[e.size];
33
34
  return `${r} mare:resize-y ${a}`;
34
- }, g = "mare:relative mare:w-full mare:group", x = (e) => `
35
+ }, g = "mare:relative mare:w-full mare:group", h = (e, a = {}) => `
35
36
  mare:absolute mare:top-1/2 mare:-translate-y-1/2 mare:flex mare:items-center
36
- mare:justify-center mare:text-weak mare:[&>svg]:size-5 mare:pointer-events-none
37
+ mare:justify-center mare:[&>svg]:size-5
38
+ ${a.interactive ? "mare:bg-transparent mare:border-0 mare:p-0 mare:cursor-pointer mare:disabled:cursor-default" : "mare:pointer-events-none"}
39
+ ${a.disabled ? "mare:text-disabled" : "mare:text-weak"}
37
40
  ${e === "left" ? "mare:left-3" : "mare:right-3"}
38
- `, h = "mare:flex mare:flex-col mare:gap-2 mare:w-full", y = (e) => `mare:tpc-typography-label-s ${e ? "mare:text-danger" : "mare:text-default"}`, v = (e) => `mare:tpc-typography-body-xs mare:ml-auto mare:shrink-0 ${e ? "mare:text-disabled" : "mare:text-weak"}`, p = l(null), $ = () => o(p);
41
+ `, x = "mare:flex mare:flex-col mare:gap-2 mare:w-full", y = (e) => `mare:tpc-typography-label-s ${e ? "mare:text-danger" : "mare:text-default"}`, $ = (e) => `mare:tpc-typography-body-xs mare:ml-auto mare:shrink-0 ${e ? "mare:text-disabled" : "mare:text-weak"}`, p = l(null), v = () => o(p), z = (e, a) => !e || e === a ? a : "both";
39
42
  export {
40
43
  p as F,
41
- b as a,
42
- c as d,
43
- x as f,
44
- h as g,
44
+ f as a,
45
+ b as d,
46
+ h as f,
47
+ x as g,
45
48
  y as h,
49
+ z as m,
46
50
  g as p,
47
- $ as u,
48
- v as x
51
+ v as u,
52
+ $ as x
49
53
  };