@loopr-ai/craft 0.1.0 → 0.3.0
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/ButtonBase-750a4103.js +832 -0
- package/dist/TransitionGroupContext-e16207d6.js +127 -0
- package/dist/assets/theme.css +1 -0
- package/dist/chainPropTypes-004bf492.js +8 -0
- package/dist/components/cell/AvatarGroup/index.d.ts +31 -0
- package/dist/components/cell/AvatarGroup/index.js +390 -0
- package/dist/components/cell/Button/index.d.ts +19 -4
- package/dist/components/cell/Button/index.js +383 -4
- package/dist/components/cell/Chip/index.d.ts +27 -0
- package/dist/components/cell/Chip/index.js +483 -0
- package/dist/components/cell/ProgressBar/index.d.ts +27 -0
- package/dist/components/cell/ProgressBar/index.js +326 -0
- package/dist/components/cell/Search/index.d.ts +25 -0
- package/dist/components/cell/Search/index.js +26358 -0
- package/dist/components/cell/Typography/index.d.ts +20 -0
- package/dist/components/cell/Typography/index.js +217 -0
- package/dist/createSvgIcon-5dcb7caa.js +184 -0
- package/dist/createTheme-95c30431.js +2221 -0
- package/dist/emotion-react.browser.esm-ff33c213.js +439 -0
- package/dist/exactProp-a28c53c1.js +13 -0
- package/dist/global/colors.d.ts +16 -0
- package/dist/global/colors.js +22 -0
- package/dist/global/constants.js +1 -0
- package/dist/global/enums.js +1 -0
- package/dist/global/interfaces.d.ts +6 -0
- package/dist/global/interfaces.js +1 -0
- package/dist/global/theme.d.ts +35 -0
- package/dist/global/theme.js +76 -0
- package/dist/main.d.ts +8 -2
- package/dist/main.js +14 -4
- package/dist/providers/CraftThemeProvider.d.ts +16 -0
- package/dist/providers/CraftThemeProvider.js +135 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +4 -0
- package/dist/styled-05df7dc6.js +699 -0
- package/dist/unsupportedProp-3dbf01f6.js +9 -0
- package/dist/useTheme-462e5dc6.js +10 -0
- package/dist/useThemeWithoutDefault-188598a8.js +950 -0
- package/package.json +24 -3
- package/dist/components/cell/Input/index.d.ts +0 -5
- package/dist/components/cell/Input/index.js +0 -6
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { P as i } from "./createTheme-95c30431.js";
|
|
2
|
+
import { c as m } from "./chainPropTypes-004bf492.js";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import h from "react";
|
|
5
|
+
function b(e) {
|
|
6
|
+
const {
|
|
7
|
+
prototype: t = {}
|
|
8
|
+
} = e;
|
|
9
|
+
return !!t.isReactComponent;
|
|
10
|
+
}
|
|
11
|
+
function w(e, t, n, u, r) {
|
|
12
|
+
const c = e[t], y = r || t;
|
|
13
|
+
if (c == null || // When server-side rendering React doesn't warn either.
|
|
14
|
+
// This is not an accurate check for SSR.
|
|
15
|
+
// This is only in place for emotion compat.
|
|
16
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
17
|
+
typeof window > "u")
|
|
18
|
+
return null;
|
|
19
|
+
let a;
|
|
20
|
+
return typeof c == "function" && !b(c) && (a = "Did you accidentally provide a plain function component instead?"), a !== void 0 ? new Error(`Invalid ${u} \`${y}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
21
|
+
}
|
|
22
|
+
const C = m(i.elementType, w), E = i.oneOfType([i.func, i.object]), K = E;
|
|
23
|
+
function T(e, t) {
|
|
24
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
25
|
+
}
|
|
26
|
+
const R = typeof window < "u" ? o.useLayoutEffect : o.useEffect, v = R;
|
|
27
|
+
function x(e) {
|
|
28
|
+
const t = o.useRef(e);
|
|
29
|
+
return v(() => {
|
|
30
|
+
t.current = e;
|
|
31
|
+
}), o.useCallback((...n) => (
|
|
32
|
+
// @ts-expect-error hide `this`
|
|
33
|
+
// tslint:disable-next-line:ban-comma-operator
|
|
34
|
+
(0, t.current)(...n)
|
|
35
|
+
), []);
|
|
36
|
+
}
|
|
37
|
+
function j(...e) {
|
|
38
|
+
return o.useMemo(() => e.every((t) => t == null) ? null : (t) => {
|
|
39
|
+
e.forEach((n) => {
|
|
40
|
+
T(n, t);
|
|
41
|
+
});
|
|
42
|
+
}, e);
|
|
43
|
+
}
|
|
44
|
+
let s = !0, l = !1, d;
|
|
45
|
+
const g = {
|
|
46
|
+
text: !0,
|
|
47
|
+
search: !0,
|
|
48
|
+
url: !0,
|
|
49
|
+
tel: !0,
|
|
50
|
+
email: !0,
|
|
51
|
+
password: !0,
|
|
52
|
+
number: !0,
|
|
53
|
+
date: !0,
|
|
54
|
+
month: !0,
|
|
55
|
+
week: !0,
|
|
56
|
+
time: !0,
|
|
57
|
+
datetime: !0,
|
|
58
|
+
"datetime-local": !0
|
|
59
|
+
};
|
|
60
|
+
function O(e) {
|
|
61
|
+
const {
|
|
62
|
+
type: t,
|
|
63
|
+
tagName: n
|
|
64
|
+
} = e;
|
|
65
|
+
return !!(n === "INPUT" && g[t] && !e.readOnly || n === "TEXTAREA" && !e.readOnly || e.isContentEditable);
|
|
66
|
+
}
|
|
67
|
+
function P(e) {
|
|
68
|
+
e.metaKey || e.altKey || e.ctrlKey || (s = !0);
|
|
69
|
+
}
|
|
70
|
+
function f() {
|
|
71
|
+
s = !1;
|
|
72
|
+
}
|
|
73
|
+
function _() {
|
|
74
|
+
this.visibilityState === "hidden" && l && (s = !0);
|
|
75
|
+
}
|
|
76
|
+
function F(e) {
|
|
77
|
+
e.addEventListener("keydown", P, !0), e.addEventListener("mousedown", f, !0), e.addEventListener("pointerdown", f, !0), e.addEventListener("touchstart", f, !0), e.addEventListener("visibilitychange", _, !0);
|
|
78
|
+
}
|
|
79
|
+
function V(e) {
|
|
80
|
+
const {
|
|
81
|
+
target: t
|
|
82
|
+
} = e;
|
|
83
|
+
try {
|
|
84
|
+
return t.matches(":focus-visible");
|
|
85
|
+
} catch {
|
|
86
|
+
}
|
|
87
|
+
return s || O(t);
|
|
88
|
+
}
|
|
89
|
+
function A() {
|
|
90
|
+
const e = o.useCallback((r) => {
|
|
91
|
+
r != null && F(r.ownerDocument);
|
|
92
|
+
}, []), t = o.useRef(!1);
|
|
93
|
+
function n() {
|
|
94
|
+
return t.current ? (l = !0, window.clearTimeout(d), d = window.setTimeout(() => {
|
|
95
|
+
l = !1;
|
|
96
|
+
}, 100), t.current = !1, !0) : !1;
|
|
97
|
+
}
|
|
98
|
+
function u(r) {
|
|
99
|
+
return V(r) ? (t.current = !0, !0) : !1;
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
isFocusVisibleRef: t,
|
|
103
|
+
onFocus: u,
|
|
104
|
+
onBlur: n,
|
|
105
|
+
ref: e
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function p(e, t) {
|
|
109
|
+
return p = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u, r) {
|
|
110
|
+
return u.__proto__ = r, u;
|
|
111
|
+
}, p(e, t);
|
|
112
|
+
}
|
|
113
|
+
function D(e, t) {
|
|
114
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, p(e, t);
|
|
115
|
+
}
|
|
116
|
+
const B = h.createContext(null);
|
|
117
|
+
export {
|
|
118
|
+
B as T,
|
|
119
|
+
D as _,
|
|
120
|
+
A as a,
|
|
121
|
+
x as b,
|
|
122
|
+
v as c,
|
|
123
|
+
C as e,
|
|
124
|
+
K as r,
|
|
125
|
+
T as s,
|
|
126
|
+
j as u
|
|
127
|
+
};
|