@cronocode/react-box 1.2.6 → 1.2.7
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/components/textbox.mjs +5 -5
- package/package.json +1 -1
- package/theme.d.ts +1 -1
- package/theme.mjs +21 -21
package/components/textbox.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as a } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { O as
|
|
5
|
-
import {
|
|
3
|
+
import i from "../box.mjs";
|
|
4
|
+
import { O as m } from "../utils/utils.mjs";
|
|
5
|
+
import { useTheme as s } from "../theme.mjs";
|
|
6
6
|
import "../box.module.css.mjs";
|
|
7
7
|
const u = [
|
|
8
8
|
"name",
|
|
@@ -19,8 +19,8 @@ const u = [
|
|
|
19
19
|
"pattern"
|
|
20
20
|
];
|
|
21
21
|
function p(t, e) {
|
|
22
|
-
const o =
|
|
23
|
-
return /* @__PURE__ */ n(
|
|
22
|
+
const o = s("textbox", t), r = m.buildProps(t, u, o);
|
|
23
|
+
return /* @__PURE__ */ n(i, { ref: e, tag: "input", inline: !0, ...r });
|
|
24
24
|
}
|
|
25
25
|
const h = a(p);
|
|
26
26
|
export {
|
package/package.json
CHANGED
package/theme.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare namespace Theme {
|
|
|
19
19
|
}
|
|
20
20
|
export let Styles: ThemeComponentStyles;
|
|
21
21
|
export function setup(styles: ThemeComponentStyles): void;
|
|
22
|
-
export function useTheme(component: keyof ThemeComponentStyles, props: ThemeComponentProps): BoxStyles;
|
|
23
22
|
export {};
|
|
24
23
|
}
|
|
25
24
|
export default Theme;
|
|
25
|
+
export declare function useTheme(component: keyof Theme.ThemeComponentStyles, props: Theme.ThemeComponentProps): BoxStyles;
|
package/theme.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
var
|
|
1
|
+
import { useMemo as m } from "react";
|
|
2
|
+
var r;
|
|
3
3
|
((t) => {
|
|
4
4
|
t.Styles = {};
|
|
5
|
-
function
|
|
5
|
+
function n(l) {
|
|
6
6
|
t.Styles = l;
|
|
7
7
|
}
|
|
8
|
-
t.setup =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
t
|
|
23
|
-
}
|
|
24
|
-
const S = n;
|
|
8
|
+
t.setup = n;
|
|
9
|
+
})(r || (r = {}));
|
|
10
|
+
const y = r;
|
|
11
|
+
function f(t, n) {
|
|
12
|
+
const { clean: l, disabled: i, theme: s } = n;
|
|
13
|
+
return m(() => {
|
|
14
|
+
var d, a;
|
|
15
|
+
if (l)
|
|
16
|
+
return {};
|
|
17
|
+
let e = r.Styles[t];
|
|
18
|
+
if (!e)
|
|
19
|
+
return {};
|
|
20
|
+
let u = s ? { ...e.styles, ...(d = e.themes) == null ? void 0 : d[s].styles } : e.styles;
|
|
21
|
+
return i ? s ? { ...u, ...e.disabled, ...(a = e.themes) == null ? void 0 : a[s].disabled } : { ...u, ...e.disabled } : u;
|
|
22
|
+
}, [t, l, i, s]);
|
|
23
|
+
}
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
y as default,
|
|
26
|
+
f as useTheme
|
|
27
27
|
};
|