@loopr-ai/craft 0.5.2 → 0.7.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-85c9347b.js → ButtonBase-c303b1df.js} +3 -3
- package/dist/Form.interfaces-c9b49688.js +6 -0
- package/dist/{createSvgIcon-70f9f72b.js → Grow-d188a215.js} +3944 -4020
- package/dist/TextField-b13f5aff.js +5931 -0
- package/dist/{TransitionGroupContext-fe9a562f.js → TransitionGroupContext-7cd3ef83.js} +3 -3
- package/dist/Typography-c0106ed0.js +178 -0
- package/dist/{ZoomControllers-7fb8d495.js → ZoomControllers-2e737c18.js} +678 -681
- package/dist/components/cell/AvatarGroup/index.js +3 -3
- package/dist/components/cell/Button/index.js +3 -3
- package/dist/components/cell/Chip/index.js +5 -5
- package/dist/components/cell/ProgressBar/index.js +3 -3
- package/dist/components/cell/Search/index.js +27 -5949
- package/dist/components/cell/Typography/index.d.ts +2 -1
- package/dist/components/cell/Typography/index.js +16 -188
- package/dist/components/organ/Form/FieldInput.d.ts +27 -0
- package/dist/components/organ/Form/FieldInput.js +440 -0
- package/dist/components/organ/Form/Form.interfaces.d.ts +55 -0
- package/dist/components/organ/Form/Form.interfaces.js +1 -0
- package/dist/components/organ/Form/Form.styles.d.ts +5 -0
- package/dist/components/organ/Form/Form.styles.js +10 -0
- package/dist/components/organ/Form/Form.utils.d.ts +2 -0
- package/dist/components/organ/Form/Form.utils.js +27 -0
- package/dist/components/organ/Form/index.d.ts +28 -0
- package/dist/components/organ/Form/index.js +130 -0
- package/dist/components/organ/ZoomControlWithDrag/ZoomControllers.js +1 -1
- package/dist/components/organ/ZoomControlWithDrag/index.js +1 -1
- package/dist/{createSvgIcon-58aa3adf.js → createSvgIcon-5180e4db.js} +2 -2
- package/dist/createSvgIcon-78477fc1.js +81 -0
- package/dist/{createTheme-a4db2989.js → createTheme-54078d82.js} +3 -3
- package/dist/dividerClasses-68f129df.js +10 -0
- package/dist/{exactProp-d79ccada.js → exactProp-893ad662.js} +1 -1
- package/dist/{extendSxProp-db8b9da5.js → extendSxProp-8c660b3a.js} +1 -1
- package/dist/global/theme.d.ts +32 -11
- package/dist/global/theme.js +39 -23
- package/dist/main.d.ts +5 -3
- package/dist/main.js +20 -16
- package/dist/providers/CraftThemeProvider.js +2 -2
- package/dist/{styled-126c6a62.js → styled-2bc0b59e.js} +12 -12
- package/dist/{useTheme-573c40a2.js → useTheme-e2efed29.js} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormInputProps } from "./FieldInput";
|
|
3
|
+
export interface InputField {
|
|
4
|
+
label: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: "text" | "number" | "select" | "email" | "password" | "custom";
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
beforeField?: string | React.ReactNode;
|
|
12
|
+
afterField?: string | React.ReactNode;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface Option {
|
|
16
|
+
name: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
19
|
+
export type OptionsType = Array<Option> | Array<string>;
|
|
20
|
+
interface OptionsResponseHandler {
|
|
21
|
+
key: string;
|
|
22
|
+
name: string;
|
|
23
|
+
value: string | number;
|
|
24
|
+
}
|
|
25
|
+
export interface SelectField extends InputField {
|
|
26
|
+
options?: OptionsType;
|
|
27
|
+
api_endpoint?: string;
|
|
28
|
+
optionsResponseHandler?: OptionsResponseHandler;
|
|
29
|
+
}
|
|
30
|
+
interface Validation {
|
|
31
|
+
min?: number;
|
|
32
|
+
max?: number;
|
|
33
|
+
min_length?: number;
|
|
34
|
+
max_length?: number;
|
|
35
|
+
pattern?: string;
|
|
36
|
+
invalid_message: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ConfigField extends SelectField {
|
|
39
|
+
validation?: Validation;
|
|
40
|
+
customComponent?: string;
|
|
41
|
+
submitDataKey?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface CustomFieldProps {
|
|
44
|
+
value: string;
|
|
45
|
+
handleChange: (key: string, value: string) => void;
|
|
46
|
+
}
|
|
47
|
+
export interface CustomFields {
|
|
48
|
+
[key_name: string]: React.ComponentType<FormInputProps>;
|
|
49
|
+
}
|
|
50
|
+
export interface InvalidData {
|
|
51
|
+
message: string;
|
|
52
|
+
field: string;
|
|
53
|
+
value: string;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function k(t, r, e) {
|
|
2
|
+
const c = t.split("."), o = c.length - 1;
|
|
3
|
+
let s = {};
|
|
4
|
+
for (let n = o; n >= 0; n--) {
|
|
5
|
+
const u = c[n];
|
|
6
|
+
let y = {};
|
|
7
|
+
n === o ? s[u] = r === "number" ? parseInt(e) : e : (y[u] = { ...s }, s = y);
|
|
8
|
+
}
|
|
9
|
+
return s;
|
|
10
|
+
}
|
|
11
|
+
function p(t, r) {
|
|
12
|
+
const [e] = Object.keys(r);
|
|
13
|
+
return t.hasOwnProperty(e) ? {
|
|
14
|
+
...t,
|
|
15
|
+
[e]: p(
|
|
16
|
+
t[e],
|
|
17
|
+
r[e]
|
|
18
|
+
)
|
|
19
|
+
} : {
|
|
20
|
+
...t,
|
|
21
|
+
...r
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
k as createNestedObject,
|
|
26
|
+
p as deepMergeObjects
|
|
27
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CraftFC } from "../../../global/interfaces";
|
|
3
|
+
import { ConfigField, CustomFields, InvalidData } from "./Form.interfaces";
|
|
4
|
+
interface FormProps {
|
|
5
|
+
config: Array<ConfigField>;
|
|
6
|
+
submitText?: string;
|
|
7
|
+
handleSubmit: (data: any) => void;
|
|
8
|
+
handleInvalidData?: (data: Array<InvalidData>) => void;
|
|
9
|
+
cancelText?: string;
|
|
10
|
+
handleCancel: () => void;
|
|
11
|
+
onChange?: (key: string, value: string) => void;
|
|
12
|
+
customFields?: CustomFields;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Form component
|
|
17
|
+
* @param config - Array of ConfigField objects
|
|
18
|
+
* @param submitText - Text for submit button
|
|
19
|
+
* @param handleSubmit - Function to handle form submission
|
|
20
|
+
* @param handleInvalidData - Function to handle invalid form data
|
|
21
|
+
* @param cancelText - Text for cancel button
|
|
22
|
+
* @param handleCancel - Function to handle form cancel
|
|
23
|
+
* @param onChange - Function to handle form field change
|
|
24
|
+
* @param customFields - Custom form fields
|
|
25
|
+
* @param style - Form style
|
|
26
|
+
*/
|
|
27
|
+
declare const Form: CraftFC<FormProps>;
|
|
28
|
+
export default Form;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { jsxs as N, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, useCallback as q, useEffect as w } from "react";
|
|
3
|
+
import j from "../../cell/Button/index.js";
|
|
4
|
+
import A from "./FieldInput.js";
|
|
5
|
+
import K from "./Form.styles.js";
|
|
6
|
+
import { createNestedObject as P, deepMergeObjects as R } from "./Form.utils.js";
|
|
7
|
+
const J = ({
|
|
8
|
+
config: u,
|
|
9
|
+
submitText: _ = "Submit",
|
|
10
|
+
handleSubmit: v,
|
|
11
|
+
handleInvalidData: c,
|
|
12
|
+
cancelText: y = "Cancel",
|
|
13
|
+
handleCancel: F,
|
|
14
|
+
onChange: f,
|
|
15
|
+
style: S = {},
|
|
16
|
+
customFields: O = {}
|
|
17
|
+
}) => {
|
|
18
|
+
const [o, b] = x({}), [V, h] = x([]);
|
|
19
|
+
function C(e, s) {
|
|
20
|
+
b((m) => ({
|
|
21
|
+
...m,
|
|
22
|
+
[e]: s
|
|
23
|
+
})), f == null || f(e, s);
|
|
24
|
+
}
|
|
25
|
+
function d() {
|
|
26
|
+
const e = {};
|
|
27
|
+
u.forEach((s) => {
|
|
28
|
+
e[s.name] = s.defaultValue || "";
|
|
29
|
+
}), b(e), h([]);
|
|
30
|
+
}
|
|
31
|
+
function E() {
|
|
32
|
+
const e = [];
|
|
33
|
+
return u.forEach((s) => {
|
|
34
|
+
const { name: m, label: a, type: r, validation: t, required: p } = s, n = o[m], i = m;
|
|
35
|
+
if (t)
|
|
36
|
+
if (r === "number") {
|
|
37
|
+
const g = parseInt(n);
|
|
38
|
+
t.min && g < t.min && e.push({
|
|
39
|
+
field: i,
|
|
40
|
+
value: n,
|
|
41
|
+
message: t.invalid_message
|
|
42
|
+
}), t.max && g > t.max && e.push({
|
|
43
|
+
field: i,
|
|
44
|
+
value: n,
|
|
45
|
+
message: t.invalid_message
|
|
46
|
+
}), isNaN(g) && e.push({
|
|
47
|
+
field: i,
|
|
48
|
+
value: n,
|
|
49
|
+
message: "Invalid number"
|
|
50
|
+
});
|
|
51
|
+
} else
|
|
52
|
+
r === "text" && (t.min_length && n.length < t.min_length && e.push({
|
|
53
|
+
field: i,
|
|
54
|
+
value: n,
|
|
55
|
+
message: t.invalid_message
|
|
56
|
+
}), t.max_length && n.length > t.max_length && e.push({
|
|
57
|
+
field: i,
|
|
58
|
+
value: n,
|
|
59
|
+
message: t.invalid_message
|
|
60
|
+
}), t.pattern && !new RegExp(t.pattern).test(n) && e.push({
|
|
61
|
+
field: i,
|
|
62
|
+
value: n,
|
|
63
|
+
message: t.invalid_message
|
|
64
|
+
}));
|
|
65
|
+
p && !n && e.push({
|
|
66
|
+
field: i,
|
|
67
|
+
value: n,
|
|
68
|
+
message: `${a} is required`
|
|
69
|
+
});
|
|
70
|
+
}), h(e), e.length && (c == null || c(e)), !e.length;
|
|
71
|
+
}
|
|
72
|
+
const M = q(
|
|
73
|
+
(e) => {
|
|
74
|
+
let s = {};
|
|
75
|
+
return e.forEach((m) => {
|
|
76
|
+
const { name: a, type: r, submitDataKey: t } = m;
|
|
77
|
+
if (t) {
|
|
78
|
+
const p = P(
|
|
79
|
+
t,
|
|
80
|
+
r,
|
|
81
|
+
o[a]
|
|
82
|
+
);
|
|
83
|
+
s = R(s, p);
|
|
84
|
+
} else
|
|
85
|
+
s[a] = r === "number" ? parseInt(o[a]) : o[a];
|
|
86
|
+
}), s;
|
|
87
|
+
},
|
|
88
|
+
[o]
|
|
89
|
+
);
|
|
90
|
+
function k(e) {
|
|
91
|
+
if (e.preventDefault(), E()) {
|
|
92
|
+
const m = M(u);
|
|
93
|
+
v(m);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function B() {
|
|
97
|
+
d(), F();
|
|
98
|
+
}
|
|
99
|
+
w(() => {
|
|
100
|
+
d();
|
|
101
|
+
}, []);
|
|
102
|
+
const D = {
|
|
103
|
+
...K.form,
|
|
104
|
+
...S
|
|
105
|
+
};
|
|
106
|
+
return /* @__PURE__ */ N("form", { style: D, children: [
|
|
107
|
+
Object.keys(o).length && u.map((e) => {
|
|
108
|
+
const s = V.find(
|
|
109
|
+
(a) => a.field === e.name
|
|
110
|
+
), m = {
|
|
111
|
+
...e,
|
|
112
|
+
value: o[e.name],
|
|
113
|
+
handleChange: C,
|
|
114
|
+
error: !!s,
|
|
115
|
+
helperText: s == null ? void 0 : s.message
|
|
116
|
+
};
|
|
117
|
+
if (e.type === "custom" && e.customComponent) {
|
|
118
|
+
const a = O[e.customComponent];
|
|
119
|
+
if (a)
|
|
120
|
+
return /* @__PURE__ */ l(a, { ...m }, e.name);
|
|
121
|
+
} else
|
|
122
|
+
return /* @__PURE__ */ l(A, { ...m }, e.name);
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ l(j, { type: "submit", onClick: k, children: _ }),
|
|
125
|
+
/* @__PURE__ */ l(j, { onClick: B, children: y })
|
|
126
|
+
] });
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
J as default
|
|
130
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as y } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useEffect as n, useMemo as w } from "react";
|
|
3
|
-
import { B as m, T as C, Z as S, a as W } from "../../../ZoomControllers-
|
|
3
|
+
import { B as m, T as C, Z as S, a as W } from "../../../ZoomControllers-2e737c18.js";
|
|
4
4
|
const D = {
|
|
5
5
|
position: "relative",
|
|
6
6
|
borderRadius: "1rem",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as b, c as h, _ as w, a as y, P as o } from "./createTheme-
|
|
1
|
+
import { g as b, c as h, _ as w, a as y, P as o } from "./createTheme-54078d82.js";
|
|
2
2
|
import * as v from "react";
|
|
3
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-
|
|
4
|
+
import { g as T, s as N, a as R, c as O, b as B } from "./styled-2bc0b59e.js";
|
|
5
5
|
function j(e) {
|
|
6
6
|
return b("MuiSvgIcon", e);
|
|
7
7
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { a as _, C as g, c as E, h as b } from "./createTheme-54078d82.js";
|
|
2
|
+
import { c as y } from "./createSvgIcon-5180e4db.js";
|
|
3
|
+
import { c as C, d as N, i as S, o as I, a as $, u as x, b as T } from "./Grow-d188a215.js";
|
|
4
|
+
import { s as q, a as P, b as w, u as D, c as O } from "./TransitionGroupContext-7cd3ef83.js";
|
|
5
|
+
import { u as R } from "./unsupportedProp-3dbf01f6.js";
|
|
6
|
+
function M(e, r) {
|
|
7
|
+
return process.env.NODE_ENV === "production" ? () => null : (t, u, s, n, o) => {
|
|
8
|
+
const a = s || "<<anonymous>>", i = o || u;
|
|
9
|
+
return typeof t[u] < "u" ? new Error(`The ${n} \`${i}\` of \`${a}\` is deprecated. ${r}`) : null;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function F(e, r) {
|
|
13
|
+
if (process.env.NODE_ENV === "production")
|
|
14
|
+
return () => null;
|
|
15
|
+
const t = r ? _({}, r.propTypes) : null;
|
|
16
|
+
return (s) => (n, o, a, i, l, ...v) => {
|
|
17
|
+
const f = l || o, p = t == null ? void 0 : t[f];
|
|
18
|
+
if (p) {
|
|
19
|
+
const d = p(n, o, a, i, l, ...v);
|
|
20
|
+
if (d)
|
|
21
|
+
return d;
|
|
22
|
+
}
|
|
23
|
+
return typeof n[o] < "u" && !n[s] ? new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${s}\` prop.`) : null;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const k = {
|
|
27
|
+
configure: (e) => {
|
|
28
|
+
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(`
|
|
29
|
+
`)), g.configure(e);
|
|
30
|
+
}
|
|
31
|
+
}, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
32
|
+
__proto__: null,
|
|
33
|
+
capitalize: E,
|
|
34
|
+
createChainedFunction: C,
|
|
35
|
+
createSvgIcon: y,
|
|
36
|
+
debounce: N,
|
|
37
|
+
deprecatedPropType: M,
|
|
38
|
+
isMuiElement: S,
|
|
39
|
+
ownerDocument: I,
|
|
40
|
+
ownerWindow: $,
|
|
41
|
+
requirePropFactory: F,
|
|
42
|
+
setRef: q,
|
|
43
|
+
unstable_ClassNameGenerator: k,
|
|
44
|
+
unstable_useEnhancedEffect: P,
|
|
45
|
+
unstable_useId: x,
|
|
46
|
+
unsupportedProp: R,
|
|
47
|
+
useControlled: T,
|
|
48
|
+
useEventCallback: w,
|
|
49
|
+
useForkRef: D,
|
|
50
|
+
useIsFocusVisible: O
|
|
51
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
52
|
+
var h = { exports: {} };
|
|
53
|
+
(function(e) {
|
|
54
|
+
function r(t) {
|
|
55
|
+
return t && t.__esModule ? t : {
|
|
56
|
+
default: t
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
60
|
+
})(h);
|
|
61
|
+
var Y = h.exports, c = {};
|
|
62
|
+
const V = /* @__PURE__ */ b(G);
|
|
63
|
+
var m;
|
|
64
|
+
function B() {
|
|
65
|
+
return m || (m = 1, function(e) {
|
|
66
|
+
"use client";
|
|
67
|
+
Object.defineProperty(e, "__esModule", {
|
|
68
|
+
value: !0
|
|
69
|
+
}), Object.defineProperty(e, "default", {
|
|
70
|
+
enumerable: !0,
|
|
71
|
+
get: function() {
|
|
72
|
+
return r.createSvgIcon;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
var r = V;
|
|
76
|
+
}(c)), c;
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
Y as i,
|
|
80
|
+
B as r
|
|
81
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { g as t } from "./styled-2bc0b59e.js";
|
|
2
|
+
import { g as e } from "./createTheme-54078d82.js";
|
|
3
|
+
function a(i) {
|
|
4
|
+
return e("MuiDivider", i);
|
|
5
|
+
}
|
|
6
|
+
const r = t("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]), d = r;
|
|
7
|
+
export {
|
|
8
|
+
d,
|
|
9
|
+
a as g
|
|
10
|
+
};
|
package/dist/global/theme.d.ts
CHANGED
|
@@ -2,34 +2,55 @@ export declare const defaultTheme: import("@mui/material").Theme;
|
|
|
2
2
|
export declare const fontCustomizations: {
|
|
3
3
|
headingLarge: {
|
|
4
4
|
fontWeight: string;
|
|
5
|
-
fontSize:
|
|
5
|
+
fontSize: {
|
|
6
|
+
sm: string;
|
|
7
|
+
md: string;
|
|
8
|
+
};
|
|
6
9
|
};
|
|
7
10
|
headingMedium: {
|
|
8
11
|
fontWeight: string;
|
|
9
|
-
fontSize:
|
|
12
|
+
fontSize: {
|
|
13
|
+
sm: string;
|
|
14
|
+
md: string;
|
|
15
|
+
};
|
|
10
16
|
};
|
|
11
17
|
headingSmall: {
|
|
12
18
|
fontWeight: string;
|
|
13
|
-
fontSize:
|
|
19
|
+
fontSize: {
|
|
20
|
+
sm: string;
|
|
21
|
+
md: string;
|
|
22
|
+
};
|
|
14
23
|
};
|
|
15
24
|
bodyText: {
|
|
16
25
|
fontWeight: string;
|
|
17
|
-
fontSize:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
fontSize: {
|
|
27
|
+
sm: string;
|
|
28
|
+
md: string;
|
|
29
|
+
};
|
|
21
30
|
};
|
|
22
31
|
boldText: {
|
|
23
32
|
fontWeight: string;
|
|
24
|
-
fontSize:
|
|
33
|
+
fontSize: {
|
|
34
|
+
sm: string;
|
|
35
|
+
md: string;
|
|
36
|
+
};
|
|
25
37
|
};
|
|
26
38
|
subtitleNormal: {
|
|
27
|
-
fontSize:
|
|
39
|
+
fontSize: {
|
|
40
|
+
sm: string;
|
|
41
|
+
md: string;
|
|
42
|
+
};
|
|
28
43
|
};
|
|
29
44
|
subtitleSmall: {
|
|
30
|
-
fontSize:
|
|
45
|
+
fontSize: {
|
|
46
|
+
sm: string;
|
|
47
|
+
md: string;
|
|
48
|
+
};
|
|
31
49
|
};
|
|
32
50
|
helperText: {
|
|
33
|
-
fontSize:
|
|
51
|
+
fontSize: {
|
|
52
|
+
sm: string;
|
|
53
|
+
md: string;
|
|
54
|
+
};
|
|
34
55
|
};
|
|
35
56
|
};
|
package/dist/global/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../assets/theme.css";
|
|
2
|
-
import { f as e } from "../createTheme-
|
|
2
|
+
import { f as e } from "../createTheme-54078d82.js";
|
|
3
3
|
const f = {
|
|
4
4
|
50: "#fffde7",
|
|
5
5
|
100: "#fff9c4",
|
|
@@ -16,61 +16,77 @@ const f = {
|
|
|
16
16
|
A400: "#ffea00",
|
|
17
17
|
A700: "#ffd600"
|
|
18
18
|
}, t = f;
|
|
19
|
-
const
|
|
19
|
+
const n = e({
|
|
20
20
|
palette: {
|
|
21
|
+
// define other things related to the theme/color here
|
|
21
22
|
primary: {
|
|
22
23
|
main: "#3C4FE0",
|
|
23
24
|
dark: "#3F4DBA",
|
|
24
25
|
contrastText: "white"
|
|
25
26
|
},
|
|
26
27
|
secondary: {
|
|
27
|
-
// light: yellow[400],
|
|
28
28
|
main: t[500]
|
|
29
|
-
// dark: yellow[700],
|
|
30
|
-
// contrastText: '#fff'
|
|
31
29
|
}
|
|
32
30
|
},
|
|
33
31
|
typography: {
|
|
34
32
|
fontFamily: "DM Sans, sans-serif"
|
|
35
33
|
}
|
|
36
|
-
}),
|
|
34
|
+
}), r = {
|
|
37
35
|
headingLarge: {
|
|
38
36
|
fontWeight: "700",
|
|
39
|
-
fontSize:
|
|
37
|
+
fontSize: {
|
|
38
|
+
sm: "1.375rem",
|
|
39
|
+
md: "1.5rem"
|
|
40
|
+
}
|
|
40
41
|
},
|
|
41
42
|
headingMedium: {
|
|
42
43
|
fontWeight: "700",
|
|
43
|
-
fontSize:
|
|
44
|
+
fontSize: {
|
|
45
|
+
sm: "1.125rem",
|
|
46
|
+
md: "1.25rem"
|
|
47
|
+
}
|
|
44
48
|
},
|
|
45
49
|
headingSmall: {
|
|
46
|
-
fontWeight: "
|
|
47
|
-
fontSize:
|
|
50
|
+
fontWeight: "700",
|
|
51
|
+
fontSize: {
|
|
52
|
+
sm: "1rem",
|
|
53
|
+
md: "1.125rem"
|
|
54
|
+
}
|
|
48
55
|
},
|
|
49
56
|
bodyText: {
|
|
50
57
|
fontWeight: "400",
|
|
51
|
-
fontSize:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
fontSize: "0.875rem"
|
|
58
|
+
fontSize: {
|
|
59
|
+
sm: "0.875rem",
|
|
60
|
+
md: "1rem"
|
|
61
|
+
}
|
|
56
62
|
},
|
|
57
63
|
boldText: {
|
|
58
64
|
fontWeight: "700",
|
|
59
|
-
fontSize:
|
|
65
|
+
fontSize: {
|
|
66
|
+
sm: "0.875rem",
|
|
67
|
+
md: "1rem"
|
|
68
|
+
}
|
|
60
69
|
},
|
|
61
70
|
subtitleNormal: {
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
fontSize: {
|
|
72
|
+
sm: "0.75rem",
|
|
73
|
+
md: "0.875rem"
|
|
74
|
+
}
|
|
64
75
|
},
|
|
65
76
|
subtitleSmall: {
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
fontSize: {
|
|
78
|
+
sm: "0.625rem",
|
|
79
|
+
md: "0.75rem"
|
|
80
|
+
}
|
|
68
81
|
},
|
|
69
82
|
helperText: {
|
|
70
|
-
fontSize:
|
|
83
|
+
fontSize: {
|
|
84
|
+
sm: "0.5rem",
|
|
85
|
+
md: "0.625rem"
|
|
86
|
+
}
|
|
71
87
|
}
|
|
72
88
|
};
|
|
73
89
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
90
|
+
n as defaultTheme,
|
|
91
|
+
r as fontCustomizations
|
|
76
92
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import AvatarGroup from "./components/cell/AvatarGroup";
|
|
2
2
|
import Button from "./components/cell/Button";
|
|
3
|
+
import Chip from "./components/cell/Chip";
|
|
3
4
|
import ProgressBar from "./components/cell/ProgressBar";
|
|
4
5
|
import Search from "./components/cell/Search";
|
|
5
6
|
import Typography from "./components/cell/Typography";
|
|
6
|
-
import
|
|
7
|
+
import Form from "./components/organ/Form";
|
|
8
|
+
import * as FormTypes from "./components/organ/Form/Form.interfaces";
|
|
7
9
|
import ZoomControlWithDrag from "./components/organ/ZoomControlWithDrag";
|
|
8
|
-
export { Button,
|
|
10
|
+
export { AvatarGroup, Button, Chip, Form, FormTypes, ProgressBar, Search, Typography, ZoomControlWithDrag, };
|
|
9
11
|
export * from "./global/interfaces";
|
|
10
12
|
export * from "./providers";
|
package/dist/main.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { default as a } from "./components/cell/
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as p } from "./components/cell/
|
|
4
|
-
import { default as s } from "./components/cell/
|
|
5
|
-
import { default as d } from "./components/cell/
|
|
6
|
-
import { default as x } from "./components/cell/
|
|
7
|
-
import { default as g } from "./components/organ/
|
|
8
|
-
import {
|
|
1
|
+
import { default as a } from "./components/cell/AvatarGroup/index.js";
|
|
2
|
+
import { default as t } from "./components/cell/Button/index.js";
|
|
3
|
+
import { default as p } from "./components/cell/Chip/index.js";
|
|
4
|
+
import { default as s } from "./components/cell/ProgressBar/index.js";
|
|
5
|
+
import { default as d } from "./components/cell/Search/index.js";
|
|
6
|
+
import { default as x } from "./components/cell/Typography/index.js";
|
|
7
|
+
import { default as g } from "./components/organ/Form/index.js";
|
|
8
|
+
import { F as y } from "./Form.interfaces-c9b49688.js";
|
|
9
|
+
import { default as F } from "./components/organ/ZoomControlWithDrag/index.js";
|
|
10
|
+
import { default as n } from "./providers/CraftThemeProvider.js";
|
|
9
11
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
a as AvatarGroup,
|
|
13
|
+
t as Button,
|
|
14
|
+
p as Chip,
|
|
15
|
+
n as CraftThemeProvider,
|
|
16
|
+
g as Form,
|
|
17
|
+
y as FormTypes,
|
|
18
|
+
s as ProgressBar,
|
|
19
|
+
d as Search,
|
|
20
|
+
x as Typography,
|
|
21
|
+
F as ZoomControlWithDrag
|
|
18
22
|
};
|
|
@@ -2,9 +2,9 @@ import { jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import * as p from "react";
|
|
3
3
|
import { useMemo as O } from "react";
|
|
4
4
|
import { defaultTheme as P } from "../global/theme.js";
|
|
5
|
-
import { P as n, a as c, _ as D, f as j, n as V } from "../createTheme-
|
|
5
|
+
import { P as n, a as c, _ as D, f as j, n as V } from "../createTheme-54078d82.js";
|
|
6
6
|
import { c as b, a as g, T as f } from "../useThemeWithoutDefault-188598a8.js";
|
|
7
|
-
import { e as v } from "../exactProp-
|
|
7
|
+
import { e as v } from "../exactProp-893ad662.js";
|
|
8
8
|
const l = /* @__PURE__ */ p.createContext(null);
|
|
9
9
|
process.env.NODE_ENV !== "production" && (l.displayName = "ThemeContext");
|
|
10
10
|
const E = l;
|