@loopr-ai/craft 0.2.0 → 0.4.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-83dd7164.js +832 -0
- package/dist/{TransitionGroupContext-ee5b34c9.js → TransitionGroupContext-adf68f00.js} +47 -52
- 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.js +207 -1033
- 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.js +4 -3
- package/dist/components/cell/Search/index.js +7637 -7958
- package/dist/components/cell/Typography/index.js +2 -2
- package/dist/components/organ/ZoomControlWithDrag/index.d.ts +19 -0
- package/dist/components/organ/ZoomControlWithDrag/index.js +1598 -0
- package/dist/createSvgIcon-3bff5571.js +157 -0
- package/dist/createSvgIcon-bd01dddd.js +184 -0
- package/dist/{createTheme-eb26b87a.js → createTheme-f511f0cd.js} +6 -6
- package/dist/{exactProp-0925aa6f.js → exactProp-ed2da606.js} +1 -1
- package/dist/global/theme.js +1 -1
- package/dist/main.d.ts +4 -1
- package/dist/main.js +15 -9
- package/dist/providers/CraftThemeProvider.d.ts +3 -3
- package/dist/providers/CraftThemeProvider.js +60 -53
- package/dist/{styled-b8bfdd6b.js → styled-9f5c49f8.js} +15 -13
- package/dist/unsupportedProp-3dbf01f6.js +9 -0
- package/dist/{useTheme-a9e2b32c.js → useTheme-6e15807e.js} +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { _ as I, C as y, c as $, j as S } from "./createTheme-f511f0cd.js";
|
|
2
|
+
import { c as N } from "./createSvgIcon-bd01dddd.js";
|
|
3
|
+
import { s as w, c as T, b as C, u as D, a as R } from "./TransitionGroupContext-adf68f00.js";
|
|
4
|
+
import * as u from "react";
|
|
5
|
+
import { u as x } from "./unsupportedProp-3dbf01f6.js";
|
|
6
|
+
function V(...e) {
|
|
7
|
+
return e.reduce((t, n) => n == null ? t : function(...o) {
|
|
8
|
+
t.apply(this, o), n.apply(this, o);
|
|
9
|
+
}, () => {
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function M(e, t = 166) {
|
|
13
|
+
let n;
|
|
14
|
+
function r(...o) {
|
|
15
|
+
const s = () => {
|
|
16
|
+
e.apply(this, o);
|
|
17
|
+
};
|
|
18
|
+
clearTimeout(n), n = setTimeout(s, t);
|
|
19
|
+
}
|
|
20
|
+
return r.clear = () => {
|
|
21
|
+
clearTimeout(n);
|
|
22
|
+
}, r;
|
|
23
|
+
}
|
|
24
|
+
function q(e, t) {
|
|
25
|
+
return process.env.NODE_ENV === "production" ? () => null : (n, r, o, s, i) => {
|
|
26
|
+
const c = o || "<<anonymous>>", l = i || r;
|
|
27
|
+
return typeof n[r] < "u" ? new Error(`The ${s} \`${l}\` of \`${c}\` is deprecated. ${t}`) : null;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function O(e, t) {
|
|
31
|
+
return /* @__PURE__ */ u.isValidElement(e) && t.indexOf(e.type.muiName) !== -1;
|
|
32
|
+
}
|
|
33
|
+
function b(e) {
|
|
34
|
+
return e && e.ownerDocument || document;
|
|
35
|
+
}
|
|
36
|
+
function F(e) {
|
|
37
|
+
return b(e).defaultView || window;
|
|
38
|
+
}
|
|
39
|
+
function j(e, t) {
|
|
40
|
+
if (process.env.NODE_ENV === "production")
|
|
41
|
+
return () => null;
|
|
42
|
+
const n = t ? I({}, t.propTypes) : null;
|
|
43
|
+
return (o) => (s, i, c, l, a, ..._) => {
|
|
44
|
+
const d = a || i, p = n == null ? void 0 : n[d];
|
|
45
|
+
if (p) {
|
|
46
|
+
const m = p(s, i, c, l, a, ..._);
|
|
47
|
+
if (m)
|
|
48
|
+
return m;
|
|
49
|
+
}
|
|
50
|
+
return typeof s[i] < "u" && !s[o] ? new Error(`The prop \`${d}\` of \`${e}\` can only be used together with the \`${o}\` prop.`) : null;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
let h = 0;
|
|
54
|
+
function k(e) {
|
|
55
|
+
const [t, n] = u.useState(e), r = e || t;
|
|
56
|
+
return u.useEffect(() => {
|
|
57
|
+
t == null && (h += 1, n(`mui-${h}`));
|
|
58
|
+
}, [t]), r;
|
|
59
|
+
}
|
|
60
|
+
const g = u["useId".toString()];
|
|
61
|
+
function G(e) {
|
|
62
|
+
if (g !== void 0) {
|
|
63
|
+
const t = g();
|
|
64
|
+
return e ?? t;
|
|
65
|
+
}
|
|
66
|
+
return k(e);
|
|
67
|
+
}
|
|
68
|
+
function P({
|
|
69
|
+
controlled: e,
|
|
70
|
+
default: t,
|
|
71
|
+
name: n,
|
|
72
|
+
state: r = "value"
|
|
73
|
+
}) {
|
|
74
|
+
const {
|
|
75
|
+
current: o
|
|
76
|
+
} = u.useRef(e !== void 0), [s, i] = u.useState(t), c = o ? e : s;
|
|
77
|
+
if (process.env.NODE_ENV !== "production") {
|
|
78
|
+
u.useEffect(() => {
|
|
79
|
+
o !== (e !== void 0) && console.error([`MUI: A component is changing the ${o ? "" : "un"}controlled ${r} state of ${n} to be ${o ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
80
|
+
`));
|
|
81
|
+
}, [r, n, e]);
|
|
82
|
+
const {
|
|
83
|
+
current: a
|
|
84
|
+
} = u.useRef(t);
|
|
85
|
+
u.useEffect(() => {
|
|
86
|
+
!o && a !== t && console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
87
|
+
`));
|
|
88
|
+
}, [JSON.stringify(t)]);
|
|
89
|
+
}
|
|
90
|
+
const l = u.useCallback((a) => {
|
|
91
|
+
o || i(a);
|
|
92
|
+
}, []);
|
|
93
|
+
return [c, l];
|
|
94
|
+
}
|
|
95
|
+
const U = {
|
|
96
|
+
configure: (e) => {
|
|
97
|
+
process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
|
|
98
|
+
`)), y.configure(e);
|
|
99
|
+
}
|
|
100
|
+
}, z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
101
|
+
__proto__: null,
|
|
102
|
+
capitalize: $,
|
|
103
|
+
createChainedFunction: V,
|
|
104
|
+
createSvgIcon: N,
|
|
105
|
+
debounce: M,
|
|
106
|
+
deprecatedPropType: q,
|
|
107
|
+
isMuiElement: O,
|
|
108
|
+
ownerDocument: b,
|
|
109
|
+
ownerWindow: F,
|
|
110
|
+
requirePropFactory: j,
|
|
111
|
+
setRef: w,
|
|
112
|
+
unstable_ClassNameGenerator: U,
|
|
113
|
+
unstable_useEnhancedEffect: T,
|
|
114
|
+
unstable_useId: G,
|
|
115
|
+
unsupportedProp: x,
|
|
116
|
+
useControlled: P,
|
|
117
|
+
useEventCallback: C,
|
|
118
|
+
useForkRef: D,
|
|
119
|
+
useIsFocusVisible: R
|
|
120
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
121
|
+
var E = { exports: {} };
|
|
122
|
+
(function(e) {
|
|
123
|
+
function t(n) {
|
|
124
|
+
return n && n.__esModule ? n : {
|
|
125
|
+
default: n
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
129
|
+
})(E);
|
|
130
|
+
var H = E.exports, f = {};
|
|
131
|
+
const A = /* @__PURE__ */ S(z);
|
|
132
|
+
var v;
|
|
133
|
+
function K() {
|
|
134
|
+
return v || (v = 1, function(e) {
|
|
135
|
+
"use client";
|
|
136
|
+
Object.defineProperty(e, "__esModule", {
|
|
137
|
+
value: !0
|
|
138
|
+
}), Object.defineProperty(e, "default", {
|
|
139
|
+
enumerable: !0,
|
|
140
|
+
get: function() {
|
|
141
|
+
return t.createSvgIcon;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
var t = A;
|
|
145
|
+
}(f)), f;
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
F as a,
|
|
149
|
+
O as b,
|
|
150
|
+
V as c,
|
|
151
|
+
M as d,
|
|
152
|
+
G as e,
|
|
153
|
+
H as i,
|
|
154
|
+
b as o,
|
|
155
|
+
K as r,
|
|
156
|
+
P as u
|
|
157
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { g as b, c as h, a as w, _ as y, P as o } from "./createTheme-f511f0cd.js";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { jsxs as C, jsx as z } from "react/jsx-runtime";
|
|
4
|
+
import { g as T, s as N, a as R, c as O, b as B } from "./styled-9f5c49f8.js";
|
|
5
|
+
function j(e) {
|
|
6
|
+
return b("MuiSvgIcon", e);
|
|
7
|
+
}
|
|
8
|
+
T("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
9
|
+
const A = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], E = (e) => {
|
|
10
|
+
const {
|
|
11
|
+
color: n,
|
|
12
|
+
fontSize: t,
|
|
13
|
+
classes: r
|
|
14
|
+
} = e, i = {
|
|
15
|
+
root: ["root", n !== "inherit" && `color${h(n)}`, `fontSize${h(t)}`]
|
|
16
|
+
};
|
|
17
|
+
return B(i, j, r);
|
|
18
|
+
}, V = N("svg", {
|
|
19
|
+
name: "MuiSvgIcon",
|
|
20
|
+
slot: "Root",
|
|
21
|
+
overridesResolver: (e, n) => {
|
|
22
|
+
const {
|
|
23
|
+
ownerState: t
|
|
24
|
+
} = e;
|
|
25
|
+
return [n.root, t.color !== "inherit" && n[`color${h(t.color)}`], n[`fontSize${h(t.fontSize)}`]];
|
|
26
|
+
}
|
|
27
|
+
})(({
|
|
28
|
+
theme: e,
|
|
29
|
+
ownerState: n
|
|
30
|
+
}) => {
|
|
31
|
+
var t, r, i, d, f, c, g, u, m, s, a, p, l;
|
|
32
|
+
return {
|
|
33
|
+
userSelect: "none",
|
|
34
|
+
width: "1em",
|
|
35
|
+
height: "1em",
|
|
36
|
+
display: "inline-block",
|
|
37
|
+
// the <svg> will define the property that has `currentColor`
|
|
38
|
+
// e.g. heroicons uses fill="none" and stroke="currentColor"
|
|
39
|
+
fill: n.hasSvgAsChild ? void 0 : "currentColor",
|
|
40
|
+
flexShrink: 0,
|
|
41
|
+
transition: (t = e.transitions) == null || (r = t.create) == null ? void 0 : r.call(t, "fill", {
|
|
42
|
+
duration: (i = e.transitions) == null || (i = i.duration) == null ? void 0 : i.shorter
|
|
43
|
+
}),
|
|
44
|
+
fontSize: {
|
|
45
|
+
inherit: "inherit",
|
|
46
|
+
small: ((d = e.typography) == null || (f = d.pxToRem) == null ? void 0 : f.call(d, 20)) || "1.25rem",
|
|
47
|
+
medium: ((c = e.typography) == null || (g = c.pxToRem) == null ? void 0 : g.call(c, 24)) || "1.5rem",
|
|
48
|
+
large: ((u = e.typography) == null || (m = u.pxToRem) == null ? void 0 : m.call(u, 35)) || "2.1875rem"
|
|
49
|
+
}[n.fontSize],
|
|
50
|
+
// TODO v5 deprecate, v6 remove for sx
|
|
51
|
+
color: (s = (a = (e.vars || e).palette) == null || (a = a[n.color]) == null ? void 0 : a.main) != null ? s : {
|
|
52
|
+
action: (p = (e.vars || e).palette) == null || (p = p.action) == null ? void 0 : p.active,
|
|
53
|
+
disabled: (l = (e.vars || e).palette) == null || (l = l.action) == null ? void 0 : l.disabled,
|
|
54
|
+
inherit: void 0
|
|
55
|
+
}[n.color]
|
|
56
|
+
};
|
|
57
|
+
}), S = /* @__PURE__ */ v.forwardRef(function(n, t) {
|
|
58
|
+
const r = R({
|
|
59
|
+
props: n,
|
|
60
|
+
name: "MuiSvgIcon"
|
|
61
|
+
}), {
|
|
62
|
+
children: i,
|
|
63
|
+
className: d,
|
|
64
|
+
color: f = "inherit",
|
|
65
|
+
component: c = "svg",
|
|
66
|
+
fontSize: g = "medium",
|
|
67
|
+
htmlColor: u,
|
|
68
|
+
inheritViewBox: m = !1,
|
|
69
|
+
titleAccess: s,
|
|
70
|
+
viewBox: a = "0 0 24 24"
|
|
71
|
+
} = r, p = w(r, A), l = /* @__PURE__ */ v.isValidElement(i) && i.type === "svg", $ = y({}, r, {
|
|
72
|
+
color: f,
|
|
73
|
+
component: c,
|
|
74
|
+
fontSize: g,
|
|
75
|
+
instanceFontSize: n.fontSize,
|
|
76
|
+
inheritViewBox: m,
|
|
77
|
+
viewBox: a,
|
|
78
|
+
hasSvgAsChild: l
|
|
79
|
+
}), x = {};
|
|
80
|
+
m || (x.viewBox = a);
|
|
81
|
+
const I = E($);
|
|
82
|
+
return /* @__PURE__ */ C(V, y({
|
|
83
|
+
as: c,
|
|
84
|
+
className: O(I.root, d),
|
|
85
|
+
focusable: "false",
|
|
86
|
+
color: u,
|
|
87
|
+
"aria-hidden": s ? void 0 : !0,
|
|
88
|
+
role: s ? "img" : void 0,
|
|
89
|
+
ref: t
|
|
90
|
+
}, x, p, l && i.props, {
|
|
91
|
+
ownerState: $,
|
|
92
|
+
children: [l ? i.props.children : i, s ? /* @__PURE__ */ z("title", {
|
|
93
|
+
children: s
|
|
94
|
+
}) : null]
|
|
95
|
+
}));
|
|
96
|
+
});
|
|
97
|
+
process.env.NODE_ENV !== "production" && (S.propTypes = {
|
|
98
|
+
// ----------------------------- Warning --------------------------------
|
|
99
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
100
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
101
|
+
// ----------------------------------------------------------------------
|
|
102
|
+
/**
|
|
103
|
+
* Node passed into the SVG element.
|
|
104
|
+
*/
|
|
105
|
+
children: o.node,
|
|
106
|
+
/**
|
|
107
|
+
* Override or extend the styles applied to the component.
|
|
108
|
+
*/
|
|
109
|
+
classes: o.object,
|
|
110
|
+
/**
|
|
111
|
+
* @ignore
|
|
112
|
+
*/
|
|
113
|
+
className: o.string,
|
|
114
|
+
/**
|
|
115
|
+
* The color of the component.
|
|
116
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
117
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
118
|
+
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
|
119
|
+
* @default 'inherit'
|
|
120
|
+
*/
|
|
121
|
+
color: o.oneOfType([o.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), o.string]),
|
|
122
|
+
/**
|
|
123
|
+
* The component used for the root node.
|
|
124
|
+
* Either a string to use a HTML element or a component.
|
|
125
|
+
*/
|
|
126
|
+
component: o.elementType,
|
|
127
|
+
/**
|
|
128
|
+
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
|
129
|
+
* @default 'medium'
|
|
130
|
+
*/
|
|
131
|
+
fontSize: o.oneOfType([o.oneOf(["inherit", "large", "medium", "small"]), o.string]),
|
|
132
|
+
/**
|
|
133
|
+
* Applies a color attribute to the SVG element.
|
|
134
|
+
*/
|
|
135
|
+
htmlColor: o.string,
|
|
136
|
+
/**
|
|
137
|
+
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
|
138
|
+
* prop will be ignored.
|
|
139
|
+
* Useful when you want to reference a custom `component` and have `SvgIcon` pass that
|
|
140
|
+
* `component`'s viewBox to the root node.
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
inheritViewBox: o.bool,
|
|
144
|
+
/**
|
|
145
|
+
* The shape-rendering attribute. The behavior of the different options is described on the
|
|
146
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
|
147
|
+
* If you are having issues with blurry icons you should investigate this prop.
|
|
148
|
+
*/
|
|
149
|
+
shapeRendering: o.string,
|
|
150
|
+
/**
|
|
151
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
152
|
+
*/
|
|
153
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
154
|
+
/**
|
|
155
|
+
* Provides a human-readable title for the element that contains it.
|
|
156
|
+
* https://www.w3.org/TR/SVG-access/#Equivalent
|
|
157
|
+
*/
|
|
158
|
+
titleAccess: o.string,
|
|
159
|
+
/**
|
|
160
|
+
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
|
161
|
+
* For example, if the SVG element is 500 (width) by 200 (height),
|
|
162
|
+
* and you pass viewBox="0 0 50 20",
|
|
163
|
+
* this means that the coordinates inside the SVG will go from the top left corner (0,0)
|
|
164
|
+
* to bottom right (50,20) and each unit will be worth 10px.
|
|
165
|
+
* @default '0 0 24 24'
|
|
166
|
+
*/
|
|
167
|
+
viewBox: o.string
|
|
168
|
+
});
|
|
169
|
+
S.muiName = "SvgIcon";
|
|
170
|
+
const _ = S;
|
|
171
|
+
function D(e, n) {
|
|
172
|
+
function t(r, i) {
|
|
173
|
+
return /* @__PURE__ */ z(_, y({
|
|
174
|
+
"data-testid": `${n}Icon`,
|
|
175
|
+
ref: i
|
|
176
|
+
}, r, {
|
|
177
|
+
children: e
|
|
178
|
+
}));
|
|
179
|
+
}
|
|
180
|
+
return process.env.NODE_ENV !== "production" && (t.displayName = `${n}Icon`), t.muiName = _.muiName, /* @__PURE__ */ v.memo(/* @__PURE__ */ v.forwardRef(t));
|
|
181
|
+
}
|
|
182
|
+
export {
|
|
183
|
+
D as c
|
|
184
|
+
};
|
|
@@ -2207,15 +2207,15 @@ export {
|
|
|
2207
2207
|
Ge as b,
|
|
2208
2208
|
bt as c,
|
|
2209
2209
|
qr as d,
|
|
2210
|
-
|
|
2211
|
-
|
|
2210
|
+
On as e,
|
|
2211
|
+
En as f,
|
|
2212
2212
|
Ft as g,
|
|
2213
2213
|
zr as h,
|
|
2214
2214
|
oe as i,
|
|
2215
|
-
|
|
2216
|
-
|
|
2215
|
+
vn as j,
|
|
2216
|
+
It as k,
|
|
2217
2217
|
Fr as l,
|
|
2218
|
-
|
|
2219
|
-
|
|
2218
|
+
ae as m,
|
|
2219
|
+
F as n,
|
|
2220
2220
|
xt as s
|
|
2221
2221
|
};
|
package/dist/global/theme.js
CHANGED
package/dist/main.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import Chip from "./components/cell/Chip";
|
|
1
2
|
import Button from "./components/cell/Button";
|
|
2
3
|
import ProgressBar from "./components/cell/ProgressBar";
|
|
3
4
|
import Search from "./components/cell/Search";
|
|
4
5
|
import Typography from "./components/cell/Typography";
|
|
5
|
-
|
|
6
|
+
import AvatarGroup from "./components/cell/AvatarGroup";
|
|
7
|
+
import ZoomControlWithDrag from "./components/organ/ZoomControlWithDrag";
|
|
8
|
+
export { Button, ProgressBar, Search, Chip, Typography, AvatarGroup, ZoomControlWithDrag, };
|
|
6
9
|
export * from "./global/interfaces";
|
|
7
10
|
export * from "./providers";
|
package/dist/main.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { default as a } from "./components/cell/
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as p } from "./components/cell/
|
|
1
|
+
import { default as a } from "./components/cell/Chip/index.js";
|
|
2
|
+
import { default as e } from "./components/cell/Button/index.js";
|
|
3
|
+
import { default as p } from "./components/cell/ProgressBar/index.js";
|
|
4
|
+
import { default as s } from "./components/cell/Search/index.js";
|
|
4
5
|
import { default as d } from "./components/cell/Typography/index.js";
|
|
5
|
-
import { default as
|
|
6
|
+
import { default as x } from "./components/cell/AvatarGroup/index.js";
|
|
7
|
+
import { default as g } from "./components/organ/ZoomControlWithDrag/index.js";
|
|
8
|
+
import { default as C } from "./providers/CraftThemeProvider.js";
|
|
6
9
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
x as AvatarGroup,
|
|
11
|
+
e as Button,
|
|
12
|
+
a as Chip,
|
|
13
|
+
C as CraftThemeProvider,
|
|
14
|
+
p as ProgressBar,
|
|
15
|
+
s as Search,
|
|
16
|
+
d as Typography,
|
|
17
|
+
g as ZoomControlWithDrag
|
|
12
18
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Theme } from
|
|
2
|
-
import React from
|
|
3
|
-
import { CraftFC } from
|
|
1
|
+
import { Theme } from "@mui/material/styles";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CraftFC } from "../global/interfaces";
|
|
4
4
|
interface CraftThemeProviderProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
theme?: Theme;
|
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { defaultTheme as f } from "../global/theme.js";
|
|
3
|
-
import { P as n, _ as c, a as D, e as a, m as j } from "../createTheme-eb26b87a.js";
|
|
4
2
|
import * as p from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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, n as V } from "../createTheme-f511f0cd.js";
|
|
6
|
+
import { c as b, a as g, T as f } from "../useThemeWithoutDefault-188598a8.js";
|
|
7
|
+
import { e as v } from "../exactProp-ed2da606.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;
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
15
|
+
const M = typeof Symbol == "function" && Symbol.for, x = M ? Symbol.for("mui.nested") : "__THEME_NESTED__";
|
|
16
|
+
function C(e, t) {
|
|
16
17
|
if (typeof t == "function") {
|
|
17
|
-
const
|
|
18
|
-
return process.env.NODE_ENV !== "production" && (
|
|
19
|
-
`))),
|
|
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;
|
|
20
21
|
}
|
|
21
|
-
return c({},
|
|
22
|
+
return c({}, e, t);
|
|
22
23
|
}
|
|
23
|
-
function d(
|
|
24
|
+
function d(e) {
|
|
24
25
|
const {
|
|
25
26
|
children: t,
|
|
26
|
-
theme:
|
|
27
|
-
} =
|
|
28
|
-
process.env.NODE_ENV !== "production" && r === null && typeof
|
|
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(`
|
|
29
30
|
`));
|
|
30
31
|
const i = p.useMemo(() => {
|
|
31
|
-
const s = r === null ?
|
|
32
|
+
const s = r === null ? o : C(r, o);
|
|
32
33
|
return s != null && (s[x] = r !== null), s;
|
|
33
|
-
}, [
|
|
34
|
-
return /* @__PURE__ */ u(
|
|
34
|
+
}, [o, r]);
|
|
35
|
+
return /* @__PURE__ */ u(E.Provider, {
|
|
35
36
|
value: i,
|
|
36
37
|
children: t
|
|
37
38
|
});
|
|
@@ -46,34 +47,34 @@ process.env.NODE_ENV !== "production" && (d.propTypes = {
|
|
|
46
47
|
*/
|
|
47
48
|
theme: n.oneOfType([n.object, n.func]).isRequired
|
|
48
49
|
});
|
|
49
|
-
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (d.propTypes =
|
|
50
|
-
const
|
|
51
|
-
function
|
|
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) {
|
|
52
53
|
return p.useMemo(() => {
|
|
53
|
-
const i =
|
|
54
|
-
if (typeof
|
|
55
|
-
const s =
|
|
56
|
-
[
|
|
54
|
+
const i = e && t[e] || t;
|
|
55
|
+
if (typeof o == "function") {
|
|
56
|
+
const s = o(i), m = e ? c({}, t, {
|
|
57
|
+
[e]: s
|
|
57
58
|
}) : s;
|
|
58
59
|
return r ? () => m : m;
|
|
59
60
|
}
|
|
60
|
-
return
|
|
61
|
-
[
|
|
62
|
-
}) : c({}, t,
|
|
63
|
-
}, [
|
|
61
|
+
return e ? c({}, t, {
|
|
62
|
+
[e]: o
|
|
63
|
+
}) : c({}, t, o);
|
|
64
|
+
}, [e, t, o, r]);
|
|
64
65
|
}
|
|
65
|
-
function h(
|
|
66
|
+
function h(e) {
|
|
66
67
|
const {
|
|
67
68
|
children: t,
|
|
68
|
-
theme:
|
|
69
|
+
theme: o,
|
|
69
70
|
themeId: r
|
|
70
|
-
} =
|
|
71
|
-
process.env.NODE_ENV !== "production" && (i === null && typeof
|
|
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(`
|
|
72
73
|
`));
|
|
73
|
-
const m =
|
|
74
|
+
const m = T(r, i, o), _ = T(r, s, o, !0);
|
|
74
75
|
return /* @__PURE__ */ u(d, {
|
|
75
|
-
theme:
|
|
76
|
-
children: /* @__PURE__ */ u(
|
|
76
|
+
theme: _,
|
|
77
|
+
children: /* @__PURE__ */ u(g.Provider, {
|
|
77
78
|
value: m,
|
|
78
79
|
children: t
|
|
79
80
|
})
|
|
@@ -97,19 +98,19 @@ process.env.NODE_ENV !== "production" && (h.propTypes = {
|
|
|
97
98
|
*/
|
|
98
99
|
themeId: n.string
|
|
99
100
|
});
|
|
100
|
-
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (h.propTypes =
|
|
101
|
-
const
|
|
102
|
-
function
|
|
101
|
+
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (h.propTypes = v(h.propTypes));
|
|
102
|
+
const R = ["theme"];
|
|
103
|
+
function y(e) {
|
|
103
104
|
let {
|
|
104
105
|
theme: t
|
|
105
|
-
} =
|
|
106
|
-
const r = t[
|
|
107
|
-
return /* @__PURE__ */ u(h, c({},
|
|
108
|
-
themeId: r ?
|
|
106
|
+
} = e, o = D(e, R);
|
|
107
|
+
const r = t[f];
|
|
108
|
+
return /* @__PURE__ */ u(h, c({}, o, {
|
|
109
|
+
themeId: r ? f : void 0,
|
|
109
110
|
theme: r || t
|
|
110
111
|
}));
|
|
111
112
|
}
|
|
112
|
-
process.env.NODE_ENV !== "production" && (
|
|
113
|
+
process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
113
114
|
/**
|
|
114
115
|
* Your component tree.
|
|
115
116
|
*/
|
|
@@ -119,10 +120,16 @@ process.env.NODE_ENV !== "production" && (O.propTypes = {
|
|
|
119
120
|
*/
|
|
120
121
|
theme: n.oneOfType([n.object, n.func]).isRequired
|
|
121
122
|
});
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
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 });
|
|
125
132
|
};
|
|
126
133
|
export {
|
|
127
|
-
|
|
134
|
+
k as default
|
|
128
135
|
};
|