@coinloger/dev-ui 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.
- package/dist/cjs/components/Badge/Badge.cjs +1 -1
- package/dist/cjs/components/Button/Button.cjs +1 -1
- package/dist/cjs/components/Card/Card.cjs +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/cjs/components/Container/Container.cjs +1 -1
- package/dist/cjs/components/Flex/Flex.cjs +1 -1
- package/dist/cjs/components/Flex/FlexItem.cjs +1 -1
- package/dist/cjs/components/Input/Input.cjs +1 -1
- package/dist/cjs/components/Modal/Modal.cjs +1 -1
- package/dist/cjs/components/Radio/Radio.cjs +1 -1
- package/dist/cjs/components/Select/Select.cjs +1 -1
- package/dist/cjs/components/Switch/Switch.cjs +1 -1
- package/dist/cjs/components/Table/Table.cjs +1 -1
- package/dist/cjs/components/Tabs/Tabs.cjs +1 -1
- package/dist/cjs/components/Typography/Heading.cjs +1 -1
- package/dist/cjs/components/Typography/Text.cjs +1 -1
- package/dist/cjs/theme.cjs +1 -1
- package/dist/esm/components/Badge/Badge.js +14 -22
- package/dist/esm/components/Button/Button.js +12 -24
- package/dist/esm/components/Card/Card.js +10 -18
- package/dist/esm/components/Checkbox/Checkbox.js +17 -33
- package/dist/esm/components/Container/Container.js +11 -18
- package/dist/esm/components/Flex/Flex.js +26 -44
- package/dist/esm/components/Flex/FlexItem.js +24 -38
- package/dist/esm/components/Input/Input.js +16 -46
- package/dist/esm/components/Modal/Modal.d.ts +0 -35
- package/dist/esm/components/Modal/Modal.js +60 -83
- package/dist/esm/components/Radio/Radio.js +16 -32
- package/dist/esm/components/Select/Select.d.ts +1 -17
- package/dist/esm/components/Select/Select.js +62 -79
- package/dist/esm/components/Switch/Switch.js +18 -34
- package/dist/esm/components/Table/Table.js +13 -22
- package/dist/esm/components/Tabs/Tabs.d.ts +0 -25
- package/dist/esm/components/Tabs/Tabs.js +45 -70
- package/dist/esm/components/Typography/Heading.js +15 -25
- package/dist/esm/components/Typography/Text.js +19 -32
- package/dist/esm/theme.d.ts +0 -5
- package/dist/esm/theme.js +11 -16
- package/package.json +15 -5
|
@@ -1,53 +1,37 @@
|
|
|
1
|
-
import { jsxs as m, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import * as e from "prop-types";
|
|
1
|
+
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l } from "react";
|
|
3
|
+
import { clsx as o } from "clsx";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
({ className:
|
|
5
|
+
const p = l(
|
|
6
|
+
({ className: c, label: s, error: u, disabled: t, size: r = "md", variant: a = "primary", ...e }, h) => /* @__PURE__ */ m(
|
|
8
7
|
"label",
|
|
9
8
|
{
|
|
10
|
-
className:
|
|
9
|
+
className: o(
|
|
11
10
|
"ui-switch-label",
|
|
12
|
-
`ui-switch-${
|
|
13
|
-
`ui-switch-${
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
`ui-switch-${r}`,
|
|
12
|
+
`ui-switch-${a}`,
|
|
13
|
+
t && "ui-switch-disabled",
|
|
14
|
+
c
|
|
16
15
|
),
|
|
17
16
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ i(
|
|
19
18
|
"input",
|
|
20
19
|
{
|
|
21
20
|
type: "checkbox",
|
|
22
21
|
className: "ui-switch-input",
|
|
23
|
-
disabled:
|
|
24
|
-
ref:
|
|
22
|
+
disabled: t,
|
|
23
|
+
ref: h,
|
|
25
24
|
role: "switch",
|
|
26
|
-
...
|
|
25
|
+
...e
|
|
27
26
|
}
|
|
28
27
|
),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
28
|
+
/* @__PURE__ */ i("span", { className: "ui-switch-track", children: /* @__PURE__ */ i("span", { className: "ui-switch-thumb" }) }),
|
|
29
|
+
s && /* @__PURE__ */ i("span", { className: "ui-switch-text", children: s })
|
|
31
30
|
]
|
|
32
31
|
}
|
|
33
32
|
)
|
|
34
33
|
);
|
|
35
|
-
|
|
36
|
-
a.propTypes = {
|
|
37
|
-
label: e.node,
|
|
38
|
-
error: e.bool,
|
|
39
|
-
size: e.oneOf(["sm", "md", "lg", "xl"]),
|
|
40
|
-
variant: e.oneOf(["primary", "success", "warning", "danger"]),
|
|
41
|
-
checked: e.bool,
|
|
42
|
-
defaultChecked: e.bool,
|
|
43
|
-
onChange: e.func,
|
|
44
|
-
name: e.string,
|
|
45
|
-
value: e.oneOfType([e.string, e.number]),
|
|
46
|
-
disabled: e.bool,
|
|
47
|
-
required: e.bool,
|
|
48
|
-
id: e.string,
|
|
49
|
-
className: e.string
|
|
50
|
-
};
|
|
34
|
+
p.displayName = "Switch";
|
|
51
35
|
export {
|
|
52
|
-
|
|
36
|
+
p as Switch
|
|
53
37
|
};
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import * as e from "prop-types";
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
4
3
|
/* empty css */
|
|
5
|
-
const
|
|
6
|
-
({ className:
|
|
7
|
-
const
|
|
4
|
+
const u = d(
|
|
5
|
+
({ className: a, bordered: r = !0, striped: t, hover: i, size: l = "md", children: s, ...o }, m) => {
|
|
6
|
+
const b = [
|
|
8
7
|
"ui-table",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
r && "ui-table-bordered",
|
|
9
|
+
t && "ui-table-striped",
|
|
10
|
+
i && "ui-table-hover",
|
|
11
|
+
l === "sm" && "ui-table-sm",
|
|
12
|
+
a
|
|
14
13
|
].filter(Boolean).join(" ");
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ e("div", { className: "ui-table-responsive", children: /* @__PURE__ */ e("table", { ref: m, className: b, ...o, children: s }) });
|
|
16
15
|
}
|
|
17
16
|
);
|
|
18
|
-
|
|
19
|
-
r.propTypes = {
|
|
20
|
-
bordered: e.bool,
|
|
21
|
-
striped: e.bool,
|
|
22
|
-
hover: e.bool,
|
|
23
|
-
size: e.oneOf(["sm", "md"]),
|
|
24
|
-
children: e.node,
|
|
25
|
-
className: e.string
|
|
26
|
-
};
|
|
17
|
+
u.displayName = "Table";
|
|
27
18
|
export {
|
|
28
|
-
|
|
19
|
+
u as Table
|
|
29
20
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode, MouseEventHandler } from 'react';
|
|
2
2
|
|
|
3
|
-
import * as PropTypes from 'prop-types';
|
|
4
3
|
/**
|
|
5
4
|
* Tabs Root properties.
|
|
6
5
|
*/
|
|
@@ -40,41 +39,17 @@ export interface TabsContentProps {
|
|
|
40
39
|
export declare const Tabs: {
|
|
41
40
|
({ defaultValue, value, onValueChange, children, className }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
42
41
|
displayName: string;
|
|
43
|
-
propTypes: {
|
|
44
|
-
defaultValue: PropTypes.Requireable<string>;
|
|
45
|
-
value: PropTypes.Requireable<string>;
|
|
46
|
-
onValueChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
48
|
-
className: PropTypes.Requireable<string>;
|
|
49
|
-
};
|
|
50
42
|
} & {
|
|
51
43
|
List: {
|
|
52
44
|
({ className, children, variant, ...props }: TabsListProps): import("react/jsx-runtime").JSX.Element;
|
|
53
45
|
displayName: string;
|
|
54
|
-
propTypes: {
|
|
55
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
56
|
-
variant: PropTypes.Requireable<string>;
|
|
57
|
-
className: PropTypes.Requireable<string>;
|
|
58
|
-
};
|
|
59
46
|
};
|
|
60
47
|
Trigger: {
|
|
61
48
|
({ value, className, children, onClick, ...props }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
62
49
|
displayName: string;
|
|
63
|
-
propTypes: {
|
|
64
|
-
value: PropTypes.Validator<string>;
|
|
65
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
66
|
-
className: PropTypes.Requireable<string>;
|
|
67
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
69
|
-
};
|
|
70
50
|
};
|
|
71
51
|
Content: {
|
|
72
52
|
({ value, className, children, ...props }: TabsContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
73
53
|
displayName: string;
|
|
74
|
-
propTypes: {
|
|
75
|
-
value: PropTypes.Validator<string>;
|
|
76
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
77
|
-
className: PropTypes.Requireable<string>;
|
|
78
|
-
};
|
|
79
54
|
};
|
|
80
55
|
};
|
|
@@ -1,92 +1,67 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import * as t from "prop-types";
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as x, useState as $, useId as N, useContext as m } from "react";
|
|
3
|
+
import { clsx as b } from "clsx";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
const [
|
|
8
|
-
|
|
5
|
+
const u = x(null), C = ({ defaultValue: t, value: s, onValueChange: a, children: o, className: n }) => {
|
|
6
|
+
const [e, i] = $(t || ""), r = s !== void 0, l = r ? s : e, d = N(), g = (T) => {
|
|
7
|
+
r || i(T), a?.(T);
|
|
9
8
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
},
|
|
9
|
+
return /* @__PURE__ */ c(u.Provider, { value: { value: l, onChange: g, baseId: d }, children: /* @__PURE__ */ c("div", { className: b("ui-tabs", n), children: o }) });
|
|
10
|
+
}, I = ({ className: t, children: s, variant: a = "line", ...o }) => /* @__PURE__ */ c(
|
|
12
11
|
"div",
|
|
13
12
|
{
|
|
14
13
|
role: "tablist",
|
|
15
|
-
className:
|
|
16
|
-
...
|
|
17
|
-
children:
|
|
14
|
+
className: b("ui-tabs-list", `ui-tabs-list-${a}`, t),
|
|
15
|
+
...o,
|
|
16
|
+
children: s
|
|
18
17
|
}
|
|
19
|
-
),
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
22
|
-
const
|
|
23
|
-
|
|
18
|
+
), p = ({ value: t, className: s, children: a, onClick: o, ...n }) => {
|
|
19
|
+
const e = m(u);
|
|
20
|
+
if (!e) throw new Error("TabsTrigger must be used within Tabs");
|
|
21
|
+
const i = e.value === t, r = `${e.baseId}-trigger-${t}`, l = `${e.baseId}-content-${t}`, d = (g) => {
|
|
22
|
+
e.onChange(t), o?.(g);
|
|
24
23
|
};
|
|
25
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ c(
|
|
26
25
|
"button",
|
|
27
26
|
{
|
|
28
27
|
type: "button",
|
|
29
28
|
role: "tab",
|
|
30
|
-
"aria-selected":
|
|
31
|
-
"aria-controls":
|
|
32
|
-
id:
|
|
33
|
-
tabIndex:
|
|
34
|
-
"data-state":
|
|
35
|
-
className:
|
|
36
|
-
onClick:
|
|
37
|
-
...
|
|
38
|
-
children:
|
|
29
|
+
"aria-selected": i,
|
|
30
|
+
"aria-controls": l,
|
|
31
|
+
id: r,
|
|
32
|
+
tabIndex: i ? 0 : -1,
|
|
33
|
+
"data-state": i ? "active" : "inactive",
|
|
34
|
+
className: b("ui-tabs-trigger", s),
|
|
35
|
+
onClick: d,
|
|
36
|
+
...n,
|
|
37
|
+
children: a
|
|
39
38
|
}
|
|
40
39
|
);
|
|
41
|
-
},
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
44
|
-
const
|
|
45
|
-
return
|
|
40
|
+
}, h = ({ value: t, className: s, children: a, ...o }) => {
|
|
41
|
+
const n = m(u);
|
|
42
|
+
if (!n) throw new Error("TabsContent must be used within Tabs");
|
|
43
|
+
const e = n.value === t, i = `${n.baseId}-trigger-${t}`, r = `${n.baseId}-content-${t}`;
|
|
44
|
+
return e ? /* @__PURE__ */ c(
|
|
46
45
|
"div",
|
|
47
46
|
{
|
|
48
47
|
role: "tabpanel",
|
|
49
|
-
id:
|
|
50
|
-
"aria-labelledby":
|
|
48
|
+
id: r,
|
|
49
|
+
"aria-labelledby": i,
|
|
51
50
|
tabIndex: 0,
|
|
52
|
-
className:
|
|
53
|
-
...
|
|
54
|
-
children:
|
|
51
|
+
className: b("ui-tabs-content", s),
|
|
52
|
+
...o,
|
|
53
|
+
children: a
|
|
55
54
|
}
|
|
56
55
|
) : null;
|
|
57
|
-
},
|
|
58
|
-
List:
|
|
59
|
-
Trigger:
|
|
60
|
-
Content:
|
|
56
|
+
}, L = Object.assign(C, {
|
|
57
|
+
List: I,
|
|
58
|
+
Trigger: p,
|
|
59
|
+
Content: h
|
|
61
60
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
m.propTypes = {
|
|
67
|
-
defaultValue: t.string,
|
|
68
|
-
value: t.string,
|
|
69
|
-
onValueChange: t.func,
|
|
70
|
-
children: t.node,
|
|
71
|
-
className: t.string
|
|
72
|
-
};
|
|
73
|
-
T.propTypes = {
|
|
74
|
-
children: t.node,
|
|
75
|
-
variant: t.oneOf(["line", "pills"]),
|
|
76
|
-
className: t.string
|
|
77
|
-
};
|
|
78
|
-
h.propTypes = {
|
|
79
|
-
value: t.string.isRequired,
|
|
80
|
-
children: t.node,
|
|
81
|
-
className: t.string,
|
|
82
|
-
onClick: t.func,
|
|
83
|
-
disabled: t.bool
|
|
84
|
-
};
|
|
85
|
-
C.propTypes = {
|
|
86
|
-
value: t.string.isRequired,
|
|
87
|
-
children: t.node,
|
|
88
|
-
className: t.string
|
|
89
|
-
};
|
|
61
|
+
C.displayName = "Tabs";
|
|
62
|
+
I.displayName = "TabsList";
|
|
63
|
+
p.displayName = "TabsTrigger";
|
|
64
|
+
h.displayName = "TabsContent";
|
|
90
65
|
export {
|
|
91
|
-
|
|
66
|
+
L as Tabs
|
|
92
67
|
};
|
|
@@ -1,39 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import * as e from "prop-types";
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import { clsx as s } from "clsx";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
({ className:
|
|
8
|
-
const c = `h${o}`,
|
|
9
|
-
return /* @__PURE__ */
|
|
5
|
+
const f = d(
|
|
6
|
+
({ className: i, children: r, level: o = 1, truncate: m, lines: t, style: a, ...e }, n) => {
|
|
7
|
+
const c = `h${o}`, p = t ? { ...a, "--ui-line-clamp": t } : a;
|
|
8
|
+
return /* @__PURE__ */ u(
|
|
10
9
|
c,
|
|
11
10
|
{
|
|
12
|
-
ref:
|
|
13
|
-
className:
|
|
11
|
+
ref: n,
|
|
12
|
+
className: s(
|
|
14
13
|
"ui-heading",
|
|
15
14
|
`ui-heading-h${o}`,
|
|
16
15
|
m && "ui-text-truncate",
|
|
17
16
|
t && "ui-text-clamp",
|
|
18
|
-
|
|
17
|
+
i
|
|
19
18
|
),
|
|
20
|
-
style:
|
|
21
|
-
...
|
|
22
|
-
children:
|
|
19
|
+
style: p,
|
|
20
|
+
...e,
|
|
21
|
+
children: r
|
|
23
22
|
}
|
|
24
23
|
);
|
|
25
24
|
}
|
|
26
25
|
);
|
|
27
|
-
|
|
28
|
-
i.propTypes = {
|
|
29
|
-
level: e.oneOf([1, 2, 3, 4, 5, 6]),
|
|
30
|
-
truncate: e.bool,
|
|
31
|
-
lines: e.number,
|
|
32
|
-
children: e.node,
|
|
33
|
-
className: e.string,
|
|
34
|
-
style: e.object,
|
|
35
|
-
id: e.string
|
|
36
|
-
};
|
|
26
|
+
f.displayName = "Heading";
|
|
37
27
|
export {
|
|
38
|
-
|
|
28
|
+
f as Heading
|
|
39
29
|
};
|
|
@@ -1,44 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import * as t from "prop-types";
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l } from "react";
|
|
3
|
+
import { clsx as n } from "clsx";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
({ className:
|
|
8
|
-
const
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
5
|
+
const d = l(
|
|
6
|
+
({ className: m, children: r, variant: i = "body", weight: e, muted: x, truncate: p, lines: t, as: u = "p", style: o, ...a }, c) => {
|
|
7
|
+
const s = t ? { ...o, "--ui-line-clamp": t } : o;
|
|
8
|
+
return /* @__PURE__ */ f(
|
|
9
|
+
u,
|
|
11
10
|
{
|
|
12
11
|
ref: c,
|
|
13
|
-
className:
|
|
12
|
+
className: n(
|
|
14
13
|
"ui-text",
|
|
15
|
-
`ui-text-${
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
`ui-text-${i}`,
|
|
15
|
+
e && `ui-text-weight-${e}`,
|
|
16
|
+
x && "ui-text-muted",
|
|
18
17
|
p && "ui-text-truncate",
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
t && "ui-text-clamp",
|
|
19
|
+
m
|
|
21
20
|
),
|
|
22
|
-
style:
|
|
23
|
-
...
|
|
24
|
-
children:
|
|
21
|
+
style: s,
|
|
22
|
+
...a,
|
|
23
|
+
children: r
|
|
25
24
|
}
|
|
26
25
|
);
|
|
27
26
|
}
|
|
28
27
|
);
|
|
29
|
-
|
|
30
|
-
r.propTypes = {
|
|
31
|
-
variant: t.oneOf(["body", "small", "caption", "lead"]),
|
|
32
|
-
weight: t.oneOf(["normal", "medium", "semibold", "bold"]),
|
|
33
|
-
muted: t.bool,
|
|
34
|
-
truncate: t.bool,
|
|
35
|
-
lines: t.number,
|
|
36
|
-
as: t.elementType,
|
|
37
|
-
children: t.node,
|
|
38
|
-
className: t.string,
|
|
39
|
-
style: t.object,
|
|
40
|
-
id: t.string
|
|
41
|
-
};
|
|
28
|
+
d.displayName = "Text";
|
|
42
29
|
export {
|
|
43
|
-
|
|
30
|
+
d as Text
|
|
44
31
|
};
|
package/dist/esm/theme.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ThemeConfig } from './types';
|
|
3
3
|
|
|
4
|
-
import * as PropTypes from 'prop-types';
|
|
5
4
|
export declare const ThemeProvider: {
|
|
6
5
|
({ theme, children }: {
|
|
7
6
|
theme: ThemeConfig;
|
|
8
7
|
children: React.ReactNode;
|
|
9
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
displayName: string;
|
|
11
|
-
propTypes: {
|
|
12
|
-
theme: PropTypes.Validator<object>;
|
|
13
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
14
|
-
};
|
|
15
10
|
};
|
package/dist/esm/theme.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
|
|
4
|
-
function e(o) {
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as p } from "react";
|
|
3
|
+
function u(o) {
|
|
5
4
|
return o && typeof o == "object" && !Array.isArray(o);
|
|
6
5
|
}
|
|
7
|
-
function
|
|
6
|
+
function y(o) {
|
|
8
7
|
const i = {}, s = (r, n) => {
|
|
9
8
|
Object.keys(r).forEach((a) => {
|
|
10
|
-
const c = r[a],
|
|
11
|
-
|
|
9
|
+
const c = r[a], t = `${n}-${a}`;
|
|
10
|
+
u(c) ? s(c, t) : i[`-${t}`] = c;
|
|
12
11
|
});
|
|
13
12
|
};
|
|
14
13
|
return o.colors && Object.keys(o.colors).forEach((r) => {
|
|
@@ -18,15 +17,11 @@ function d(o) {
|
|
|
18
17
|
n && s(n, `-ui-${r.toLowerCase()}`);
|
|
19
18
|
}), o.spacing && s(o.spacing, "-ui-spacing"), o.radius && s(o.radius, "-ui-radius"), o.shadows && s(o.shadows, "-ui-shadow"), o.typography && s(o.typography, "-ui-typography"), i;
|
|
20
19
|
}
|
|
21
|
-
const
|
|
22
|
-
const s =
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
};
|
|
25
|
-
f.displayName = "ThemeProvider";
|
|
26
|
-
f.propTypes = {
|
|
27
|
-
theme: t.object.isRequired,
|
|
28
|
-
children: t.node
|
|
20
|
+
const d = ({ theme: o, children: i }) => {
|
|
21
|
+
const s = p(() => y(o), [o]);
|
|
22
|
+
return /* @__PURE__ */ f("div", { style: { display: "contents", ...s }, children: i });
|
|
29
23
|
};
|
|
24
|
+
d.displayName = "ThemeProvider";
|
|
30
25
|
export {
|
|
31
|
-
|
|
26
|
+
d as ThemeProvider
|
|
32
27
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinloger/dev-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.cjs",
|
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
"dist",
|
|
11
11
|
"style.css"
|
|
12
12
|
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/esm/index.d.ts",
|
|
16
|
+
"import": "./dist/esm/index.js",
|
|
17
|
+
"require": "./dist/cjs/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./style.css": "./style.css"
|
|
20
|
+
},
|
|
13
21
|
"style": "./style.css",
|
|
14
22
|
"scripts": {
|
|
15
23
|
"dev": "vite",
|
|
@@ -24,13 +32,15 @@
|
|
|
24
32
|
"react": "^19.2.0",
|
|
25
33
|
"react-dom": "^19.2.0"
|
|
26
34
|
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/coinloger/dev-ui.git"
|
|
38
|
+
},
|
|
27
39
|
"dependencies": {
|
|
28
|
-
"clsx": "^2.1.0"
|
|
29
|
-
"prop-types": "^15.8.1"
|
|
40
|
+
"clsx": "^2.1.0"
|
|
30
41
|
},
|
|
31
42
|
"devDependencies": {
|
|
32
43
|
"@eslint/js": "^9.39.1",
|
|
33
|
-
"@types/prop-types": "^15.7.15",
|
|
34
44
|
"@types/react": "^19.2.5",
|
|
35
45
|
"@types/react-dom": "^19.2.3",
|
|
36
46
|
"@vitejs/plugin-react": "^5.1.1",
|
|
@@ -46,4 +56,4 @@
|
|
|
46
56
|
"vite": "^7.2.4",
|
|
47
57
|
"vite-plugin-dts": "^3.7.3"
|
|
48
58
|
}
|
|
49
|
-
}
|
|
59
|
+
}
|