@tpc-mare/mare-ui-components-react 0.1.1 → 0.1.3

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 (37) 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/drawer/Drawer.d.ts +2 -0
  6. package/dist/drawer/Drawer.types.d.ts +53 -0
  7. package/dist/drawer/DrawerFooter.d.ts +2 -0
  8. package/dist/drawer/DrawerHeader.d.ts +2 -0
  9. package/dist/drawer/index.d.ts +4 -0
  10. package/dist/drawer/index.js +6 -0
  11. package/dist/index/index.d.ts +8 -0
  12. package/dist/index/index.js +42 -31
  13. package/dist/input-number/index.js +1 -1
  14. package/dist/input-text/IconField.d.ts +10 -1
  15. package/dist/input-text/field-layout.d.ts +7 -1
  16. package/dist/input-text/index.js +8 -7
  17. package/dist/menu/Menu.d.ts +2 -0
  18. package/dist/menu/Menu.types.d.ts +19 -0
  19. package/dist/menu/index.d.ts +2 -0
  20. package/dist/menu/index.js +4 -0
  21. package/dist/search-field/SearchField.d.ts +2 -0
  22. package/dist/search-field/SearchField.types.d.ts +26 -0
  23. package/dist/search-field/index.d.ts +2 -0
  24. package/dist/search-field/index.js +4 -0
  25. package/dist/shared/Avatar-D3QlO3Tz.js +59 -0
  26. package/dist/shared/DrawerFooter-DvUgumx0.js +172 -0
  27. package/dist/shared/HelperText-CVWWvLCI.js +46 -0
  28. package/dist/shared/IconField-Dh6j6SL1.js +78 -0
  29. package/dist/shared/{InputNumber-D1KL6s55.js → InputNumber-D48wsE-o.js} +1 -1
  30. package/dist/shared/Menu-Cv9dU1iA.js +104 -0
  31. package/dist/shared/SearchField-CgDz_s1O.js +63 -0
  32. package/dist/shared/{Textarea-0XAczkH1.js → Textarea-iJhYTZos.js} +1 -1
  33. package/dist/shared/{field-layout-BXKpp5E_.js → field-layout-D34MpDMB.js} +16 -12
  34. package/dist/styles.css +1 -1
  35. package/dist/textarea/index.js +1 -1
  36. package/package.json +13 -13
  37. package/dist/shared/HelperText-D656H0Lf.js +0 -103
@@ -1,103 +0,0 @@
1
- import { jsx as r, jsxs as c, Fragment as v } from "react/jsx-runtime";
2
- import { useFieldContext as s, FieldInput as L, FieldRoot as u, FieldLabel as N, FieldErrorText as w, FieldHelperText as C } from "@ark-ui/react/field";
3
- import { u as h, d as S, x as I, g as T, F as f, p, f as H, h as P } from "./field-layout-BXKpp5E_.js";
4
- function $({
5
- value: e = "",
6
- onValueChange: a,
7
- size: t = "medium",
8
- rounded: l = !1,
9
- invalid: n = !1,
10
- disabled: d = !1,
11
- placeholder: o,
12
- ...g
13
- }) {
14
- const i = h(), F = !s(), y = S({
15
- size: t,
16
- rounded: l,
17
- hasFloatLabel: i?.hasFloatLabel ?? !1,
18
- iconSide: i?.iconSide ?? null
19
- }), x = i?.hasFloatLabel ? " " : o, m = /* @__PURE__ */ r(
20
- L,
21
- {
22
- ...g,
23
- className: y,
24
- placeholder: x,
25
- value: e,
26
- onChange: (b) => a?.(b.target.value)
27
- }
28
- );
29
- return F ? /* @__PURE__ */ r(
30
- u,
31
- {
32
- invalid: n,
33
- disabled: d,
34
- className: "mare:w-full",
35
- children: m
36
- }
37
- ) : m;
38
- }
39
- function k({ value: e, max: a }) {
40
- const l = s()?.disabled ?? !1;
41
- return /* @__PURE__ */ c("span", { className: I(l), children: [
42
- e.length,
43
- "/",
44
- a
45
- ] });
46
- }
47
- function B({
48
- invalid: e = !1,
49
- disabled: a = !1,
50
- required: t = !1,
51
- children: l
52
- }) {
53
- return /* @__PURE__ */ r(
54
- u,
55
- {
56
- invalid: e,
57
- disabled: a,
58
- required: t,
59
- className: T,
60
- children: l
61
- }
62
- );
63
- }
64
- const j = "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";
65
- function R({ label: e, children: a }) {
66
- const t = { hasFloatLabel: !0, iconSide: null }, l = `${j} mare:group-has-[.mare-icon-left_svg]:left-10 mare:group-has-[textarea]:top-2 mare:group-has-[textarea]:translate-y-0`, n = /* @__PURE__ */ c(v, { children: [
67
- a,
68
- /* @__PURE__ */ r(N, { className: l, children: e })
69
- ] }), o = !s() ? /* @__PURE__ */ r(u, { className: p, children: n }) : /* @__PURE__ */ r("div", { className: p, children: n });
70
- return /* @__PURE__ */ r(f.Provider, { value: t, children: o });
71
- }
72
- function q({
73
- icon: e,
74
- position: a = "left",
75
- children: t
76
- }) {
77
- const n = {
78
- hasFloatLabel: h()?.hasFloatLabel ?? !1,
79
- iconSide: a
80
- };
81
- return /* @__PURE__ */ r(f.Provider, { value: n, children: /* @__PURE__ */ c(
82
- "div",
83
- {
84
- className: `mare:relative mare:w-full mare:group ${a === "left" ? "mare-icon-left" : "mare-icon-right"}`,
85
- children: [
86
- t,
87
- /* @__PURE__ */ r("span", { className: H(a), children: e })
88
- ]
89
- }
90
- ) });
91
- }
92
- function z({ children: e }) {
93
- const t = s()?.invalid ?? !1, l = P(t);
94
- return t ? /* @__PURE__ */ r(w, { className: l, children: e }) : /* @__PURE__ */ r(C, { className: l, children: e });
95
- }
96
- export {
97
- k as C,
98
- R as F,
99
- z as H,
100
- q as I,
101
- B as a,
102
- $ as b
103
- };