@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.
Files changed (41) hide show
  1. package/dist/ButtonBase-750a4103.js +832 -0
  2. package/dist/TransitionGroupContext-e16207d6.js +127 -0
  3. package/dist/assets/theme.css +1 -0
  4. package/dist/chainPropTypes-004bf492.js +8 -0
  5. package/dist/components/cell/AvatarGroup/index.d.ts +31 -0
  6. package/dist/components/cell/AvatarGroup/index.js +390 -0
  7. package/dist/components/cell/Button/index.d.ts +19 -4
  8. package/dist/components/cell/Button/index.js +383 -4
  9. package/dist/components/cell/Chip/index.d.ts +27 -0
  10. package/dist/components/cell/Chip/index.js +483 -0
  11. package/dist/components/cell/ProgressBar/index.d.ts +27 -0
  12. package/dist/components/cell/ProgressBar/index.js +326 -0
  13. package/dist/components/cell/Search/index.d.ts +25 -0
  14. package/dist/components/cell/Search/index.js +26358 -0
  15. package/dist/components/cell/Typography/index.d.ts +20 -0
  16. package/dist/components/cell/Typography/index.js +217 -0
  17. package/dist/createSvgIcon-5dcb7caa.js +184 -0
  18. package/dist/createTheme-95c30431.js +2221 -0
  19. package/dist/emotion-react.browser.esm-ff33c213.js +439 -0
  20. package/dist/exactProp-a28c53c1.js +13 -0
  21. package/dist/global/colors.d.ts +16 -0
  22. package/dist/global/colors.js +22 -0
  23. package/dist/global/constants.js +1 -0
  24. package/dist/global/enums.js +1 -0
  25. package/dist/global/interfaces.d.ts +6 -0
  26. package/dist/global/interfaces.js +1 -0
  27. package/dist/global/theme.d.ts +35 -0
  28. package/dist/global/theme.js +76 -0
  29. package/dist/main.d.ts +8 -2
  30. package/dist/main.js +14 -4
  31. package/dist/providers/CraftThemeProvider.d.ts +16 -0
  32. package/dist/providers/CraftThemeProvider.js +135 -0
  33. package/dist/providers/index.d.ts +2 -0
  34. package/dist/providers/index.js +4 -0
  35. package/dist/styled-05df7dc6.js +699 -0
  36. package/dist/unsupportedProp-3dbf01f6.js +9 -0
  37. package/dist/useTheme-462e5dc6.js +10 -0
  38. package/dist/useThemeWithoutDefault-188598a8.js +950 -0
  39. package/package.json +24 -3
  40. package/dist/components/cell/Input/index.d.ts +0 -5
  41. package/dist/components/cell/Input/index.js +0 -6
@@ -0,0 +1,135 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import * as p from "react";
3
+ import { useMemo as O } from "react";
4
+ import { defaultTheme as P } from "../global/theme.js";
5
+ import { P as n, _ as c, a as D, f as j, m as V } from "../createTheme-95c30431.js";
6
+ import { c as b, a as g, T as f } from "../useThemeWithoutDefault-188598a8.js";
7
+ import { e as v } from "../exactProp-a28c53c1.js";
8
+ const l = /* @__PURE__ */ p.createContext(null);
9
+ process.env.NODE_ENV !== "production" && (l.displayName = "ThemeContext");
10
+ const E = l;
11
+ function N() {
12
+ const e = p.useContext(E);
13
+ return process.env.NODE_ENV !== "production" && p.useDebugValue(e), e;
14
+ }
15
+ const M = typeof Symbol == "function" && Symbol.for, x = M ? Symbol.for("mui.nested") : "__THEME_NESTED__";
16
+ function C(e, t) {
17
+ if (typeof t == "function") {
18
+ const o = t(e);
19
+ return process.env.NODE_ENV !== "production" && (o || console.error(["MUI: You should return an object from your theme function, i.e.", "<ThemeProvider theme={() => ({})} />"].join(`
20
+ `))), o;
21
+ }
22
+ return c({}, e, t);
23
+ }
24
+ function d(e) {
25
+ const {
26
+ children: t,
27
+ theme: o
28
+ } = e, r = N();
29
+ process.env.NODE_ENV !== "production" && r === null && typeof o == "function" && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
30
+ `));
31
+ const i = p.useMemo(() => {
32
+ const s = r === null ? o : C(r, o);
33
+ return s != null && (s[x] = r !== null), s;
34
+ }, [o, r]);
35
+ return /* @__PURE__ */ u(E.Provider, {
36
+ value: i,
37
+ children: t
38
+ });
39
+ }
40
+ process.env.NODE_ENV !== "production" && (d.propTypes = {
41
+ /**
42
+ * Your component tree.
43
+ */
44
+ children: n.node,
45
+ /**
46
+ * A theme object. You can provide a function to extend the outer theme.
47
+ */
48
+ theme: n.oneOfType([n.object, n.func]).isRequired
49
+ });
50
+ process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (d.propTypes = v(d.propTypes));
51
+ const a = {};
52
+ function T(e, t, o, r = !1) {
53
+ return p.useMemo(() => {
54
+ const i = e && t[e] || t;
55
+ if (typeof o == "function") {
56
+ const s = o(i), m = e ? c({}, t, {
57
+ [e]: s
58
+ }) : s;
59
+ return r ? () => m : m;
60
+ }
61
+ return e ? c({}, t, {
62
+ [e]: o
63
+ }) : c({}, t, o);
64
+ }, [e, t, o, r]);
65
+ }
66
+ function h(e) {
67
+ const {
68
+ children: t,
69
+ theme: o,
70
+ themeId: r
71
+ } = e, i = b(a), s = N() || a;
72
+ process.env.NODE_ENV !== "production" && (i === null && typeof o == "function" || r && i && !i[r] && typeof o == "function") && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
73
+ `));
74
+ const m = T(r, i, o), _ = T(r, s, o, !0);
75
+ return /* @__PURE__ */ u(d, {
76
+ theme: _,
77
+ children: /* @__PURE__ */ u(g.Provider, {
78
+ value: m,
79
+ children: t
80
+ })
81
+ });
82
+ }
83
+ process.env.NODE_ENV !== "production" && (h.propTypes = {
84
+ // ----------------------------- Warning --------------------------------
85
+ // | These PropTypes are generated from the TypeScript type definitions |
86
+ // | To update them edit the d.ts file and run "yarn proptypes" |
87
+ // ----------------------------------------------------------------------
88
+ /**
89
+ * Your component tree.
90
+ */
91
+ children: n.node,
92
+ /**
93
+ * A theme object. You can provide a function to extend the outer theme.
94
+ */
95
+ theme: n.oneOfType([n.func, n.object]).isRequired,
96
+ /**
97
+ * The design system's unique id for getting the corresponded theme when there are multiple design systems.
98
+ */
99
+ themeId: n.string
100
+ });
101
+ process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (h.propTypes = v(h.propTypes));
102
+ const R = ["theme"];
103
+ function y(e) {
104
+ let {
105
+ theme: t
106
+ } = e, o = D(e, R);
107
+ const r = t[f];
108
+ return /* @__PURE__ */ u(h, c({}, o, {
109
+ themeId: r ? f : void 0,
110
+ theme: r || t
111
+ }));
112
+ }
113
+ process.env.NODE_ENV !== "production" && (y.propTypes = {
114
+ /**
115
+ * Your component tree.
116
+ */
117
+ children: n.node,
118
+ /**
119
+ * A theme object. You can provide a function to extend the outer theme.
120
+ */
121
+ theme: n.oneOfType([n.object, n.func]).isRequired
122
+ });
123
+ const k = ({
124
+ children: e,
125
+ theme: t = {}
126
+ }) => {
127
+ const o = O(
128
+ () => j(V(P, t)),
129
+ [t]
130
+ );
131
+ return /* @__PURE__ */ u(y, { theme: o, children: e });
132
+ };
133
+ export {
134
+ k as default
135
+ };
@@ -0,0 +1,2 @@
1
+ import CraftThemeProvider from "./CraftThemeProvider";
2
+ export { CraftThemeProvider };
@@ -0,0 +1,4 @@
1
+ import { default as a } from "./CraftThemeProvider.js";
2
+ export {
3
+ a as CraftThemeProvider
4
+ };