@tpc-mare/mare-ui-components-react 0.1.2 → 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.
- package/dist/avatar/Avatar.d.ts +2 -0
- package/dist/avatar/Avatar.types.d.ts +26 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +4 -0
- package/dist/drawer/Drawer.d.ts +2 -0
- package/dist/drawer/Drawer.types.d.ts +53 -0
- package/dist/drawer/DrawerFooter.d.ts +2 -0
- package/dist/drawer/DrawerHeader.d.ts +2 -0
- package/dist/drawer/index.d.ts +4 -0
- package/dist/drawer/index.js +6 -0
- package/dist/index/index.d.ts +8 -0
- package/dist/index/index.js +42 -31
- package/dist/input-number/index.js +1 -1
- package/dist/input-text/IconField.d.ts +10 -1
- package/dist/input-text/field-layout.d.ts +7 -1
- package/dist/input-text/index.js +8 -7
- package/dist/menu/Menu.d.ts +2 -0
- package/dist/menu/Menu.types.d.ts +19 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +4 -0
- package/dist/search-field/SearchField.d.ts +2 -0
- package/dist/search-field/SearchField.types.d.ts +26 -0
- package/dist/search-field/index.d.ts +2 -0
- package/dist/search-field/index.js +4 -0
- package/dist/shared/Avatar-D3QlO3Tz.js +59 -0
- package/dist/shared/DrawerFooter-DvUgumx0.js +172 -0
- package/dist/shared/HelperText-CVWWvLCI.js +46 -0
- package/dist/shared/IconField-Dh6j6SL1.js +78 -0
- package/dist/shared/{InputNumber-D1KL6s55.js → InputNumber-D48wsE-o.js} +1 -1
- package/dist/shared/Menu-Cv9dU1iA.js +104 -0
- package/dist/shared/SearchField-CgDz_s1O.js +63 -0
- package/dist/shared/{Textarea-0XAczkH1.js → Textarea-iJhYTZos.js} +1 -1
- package/dist/shared/{field-layout-BXKpp5E_.js → field-layout-D34MpDMB.js} +16 -12
- package/dist/styles.css +1 -1
- package/dist/textarea/index.js +1 -1
- package/package.json +13 -13
- package/dist/shared/HelperText-D656H0Lf.js +0 -103
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.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "The Palace Company",
|
|
@@ -35,12 +35,6 @@
|
|
|
35
35
|
"import": "./dist/*/index.js"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build": "vite build",
|
|
40
|
-
"build-storybook": "storybook build",
|
|
41
|
-
"dev": "vite build --watch",
|
|
42
|
-
"storybook": "storybook dev -p 6100"
|
|
43
|
-
},
|
|
44
38
|
"peerDependencies": {
|
|
45
39
|
"@ark-ui/react": "^5.0.0",
|
|
46
40
|
"react": ">=18.0.0",
|
|
@@ -53,10 +47,6 @@
|
|
|
53
47
|
"@ark-ui/react": "^5.37.2",
|
|
54
48
|
"@storybook/react-vite": "^10.5.3",
|
|
55
49
|
"@tailwindcss/vite": "^4.1.17",
|
|
56
|
-
"@tpc-development/mare-ui-components-core": "workspace:^",
|
|
57
|
-
"@tpc-development/mare-ui-core-styles": "workspace:^",
|
|
58
|
-
"@tpc-development/mare-ui-storybook-addon": "workspace:^",
|
|
59
|
-
"@tpc-development/mare-ui-tokens": "workspace:^",
|
|
60
50
|
"@types/react": "^18.3.12",
|
|
61
51
|
"@types/react-dom": "^18.3.1",
|
|
62
52
|
"@vitejs/plugin-react-swc": "^4.3.1",
|
|
@@ -64,10 +54,20 @@
|
|
|
64
54
|
"react-dom": "^18.3.1",
|
|
65
55
|
"typescript": "^5.9.3",
|
|
66
56
|
"vite": "^7.2.4",
|
|
67
|
-
"vite-plugin-dts": "^4.5.4"
|
|
57
|
+
"vite-plugin-dts": "^4.5.4",
|
|
58
|
+
"@tpc-development/mare-ui-components-core": "^0.0.1",
|
|
59
|
+
"@tpc-development/mare-ui-core-styles": "^4.0.0-beta.4",
|
|
60
|
+
"@tpc-development/mare-ui-storybook-addon": "^3.228.155-beta.0",
|
|
61
|
+
"@tpc-development/mare-ui-tokens": "^4.0.0-beta.4"
|
|
68
62
|
},
|
|
69
63
|
"publishConfig": {
|
|
70
64
|
"access": "public",
|
|
71
65
|
"registry": "https://registry.npmjs.org/"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "vite build",
|
|
69
|
+
"build-storybook": "storybook build",
|
|
70
|
+
"dev": "vite build --watch",
|
|
71
|
+
"storybook": "storybook dev -p 6100"
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|
|
@@ -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
|
-
};
|