@dappworks/kit 0.4.122 → 0.4.124
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/aiem.d.mts +629 -0
- package/dist/aiem.mjs +3 -0
- package/dist/aiem.mjs.map +1 -1
- package/dist/form.d.mts +1 -0
- package/dist/form.mjs +75 -16
- package/dist/form.mjs.map +1 -1
- package/dist/metrics.mjs +1 -1
- package/dist/metrics.mjs.map +1 -1
- package/package.json +1 -1
package/dist/form.mjs
CHANGED
|
@@ -25,7 +25,16 @@ function CheckboxWidget({
|
|
|
25
25
|
disabled,
|
|
26
26
|
uiSchema
|
|
27
27
|
}) {
|
|
28
|
-
const {
|
|
28
|
+
const {
|
|
29
|
+
className,
|
|
30
|
+
nextuiClassNames = {
|
|
31
|
+
base: "m-0 flex items-center justify-start w-full cursor-pointer rounded-lg gap-2 p-[13px] bg-transparent border dark:border-[#2c2c2c]"
|
|
32
|
+
},
|
|
33
|
+
size = "sm",
|
|
34
|
+
color = "primary",
|
|
35
|
+
description,
|
|
36
|
+
descriptionClassName
|
|
37
|
+
} = options;
|
|
29
38
|
const { validate } = uiSchema;
|
|
30
39
|
const [errMsg, setErrMsg] = useState("");
|
|
31
40
|
const isInvalid = !!errMsg;
|
|
@@ -33,9 +42,7 @@ function CheckboxWidget({
|
|
|
33
42
|
Checkbox,
|
|
34
43
|
{
|
|
35
44
|
className: cn("w-full", className),
|
|
36
|
-
classNames:
|
|
37
|
-
base: cn("m-0 flex items-center justify-start w-full", "cursor-pointer rounded-lg gap-2 p-[13px] bg-content2 border-1 border-transparent", nextuiClassNames.base, value ? `border-${color}` : "")
|
|
38
|
-
}),
|
|
45
|
+
classNames: nextuiClassNames,
|
|
39
46
|
defaultSelected: value,
|
|
40
47
|
isDisabled: disabled,
|
|
41
48
|
icon: /* @__PURE__ */ React7.createElement(Check, { className: "bg-white dark:bg-black" }),
|
|
@@ -60,7 +67,21 @@ function CheckboxWidget({
|
|
|
60
67
|
function InputWidget(props) {
|
|
61
68
|
var _a;
|
|
62
69
|
const { onChange, options, label, value, required, disabled, uiSchema } = props;
|
|
63
|
-
const {
|
|
70
|
+
const {
|
|
71
|
+
className,
|
|
72
|
+
nextuiClassNames = {
|
|
73
|
+
inputWrapper: "rounded-lg shadow-none border dark:border-[#2c2c2c] !bg-transparent data-[hover=true]:!bg-default-50 group-data-[focus=true]:!bg-transparent"
|
|
74
|
+
},
|
|
75
|
+
labelPlacement = "inside",
|
|
76
|
+
size = "sm",
|
|
77
|
+
inputType = "text",
|
|
78
|
+
color,
|
|
79
|
+
variant,
|
|
80
|
+
radius,
|
|
81
|
+
startContent,
|
|
82
|
+
endContent,
|
|
83
|
+
description
|
|
84
|
+
} = options;
|
|
64
85
|
const { requiredErrMsg, validate } = uiSchema;
|
|
65
86
|
const placeholder = (_a = uiSchema["ui:options"]) == null ? void 0 : _a.placeholder;
|
|
66
87
|
const isFirstChecked = useRef(true);
|
|
@@ -107,7 +128,8 @@ function SelectWidget(props) {
|
|
|
107
128
|
const {
|
|
108
129
|
className,
|
|
109
130
|
nextuiClassNames = {
|
|
110
|
-
|
|
131
|
+
trigger: "rounded-lg bg-transparent shadow-none border dark:border-[#2c2c2c] data-[hover=true]:bg-default-50",
|
|
132
|
+
popoverContent: "rounded-lg shadow-md border border-[#F4F4F5] dark:border-[#3e3e3e]"
|
|
111
133
|
},
|
|
112
134
|
listboxProps = {
|
|
113
135
|
itemClasses: {
|
|
@@ -180,7 +202,20 @@ function MultipleSelectWidget(props) {
|
|
|
180
202
|
var _a;
|
|
181
203
|
const { onChange, options, label, value, required, uiSchema = {} } = props;
|
|
182
204
|
const { selectOptions = [], requiredErrMsg, validate } = uiSchema;
|
|
183
|
-
const {
|
|
205
|
+
const {
|
|
206
|
+
className,
|
|
207
|
+
nextuiClassNames = {
|
|
208
|
+
base: "w-full",
|
|
209
|
+
trigger: "min-h-12 py-1 rounded-lg bg-transparent shadow-none border dark:border-[#2c2c2c] data-[hover=true]:bg-default-50",
|
|
210
|
+
popoverContent: "rounded-lg shadow-md border dark:border-[#3e3e3e]"
|
|
211
|
+
},
|
|
212
|
+
labelPlacement = "inside",
|
|
213
|
+
listboxProps = {},
|
|
214
|
+
size = "sm",
|
|
215
|
+
color,
|
|
216
|
+
description,
|
|
217
|
+
renderValue = DefaultRenderValue
|
|
218
|
+
} = options;
|
|
184
219
|
const placeholder = ((_a = uiSchema["ui:options"]) == null ? void 0 : _a.placeholder) || "Select an option";
|
|
185
220
|
const selectedKeys = useMemo(() => {
|
|
186
221
|
return value ? value.split(",") : [];
|
|
@@ -220,11 +255,7 @@ function MultipleSelectWidget(props) {
|
|
|
220
255
|
checkValue(_v);
|
|
221
256
|
},
|
|
222
257
|
items: selectOptions,
|
|
223
|
-
classNames:
|
|
224
|
-
base: "w-full",
|
|
225
|
-
trigger: "min-h-12 py-1",
|
|
226
|
-
popoverContent: "rounded-lg shadow-md border dark:border-[#3e3e3e]"
|
|
227
|
-
}, nextuiClassNames),
|
|
258
|
+
classNames: nextuiClassNames,
|
|
228
259
|
listboxProps: __spreadValues({
|
|
229
260
|
itemClasses: {
|
|
230
261
|
base: [
|
|
@@ -898,11 +929,11 @@ var CollapsibleBox = ({ formKey, title, titleBoxCss, formState, submitButtonProp
|
|
|
898
929
|
return /* @__PURE__ */ React7.createElement("div", { id: `form-${formKey}` }, /* @__PURE__ */ React7.createElement(
|
|
899
930
|
"div",
|
|
900
931
|
{
|
|
901
|
-
className: "mt-5 mb-[10px] flex justify-between items-center cursor-pointer border-t-[1px solid #E5E5EA] py-[5px]
|
|
932
|
+
className: "mt-5 mb-[10px] flex justify-between items-center cursor-pointer border-t-[1px solid #E5E5EA] py-[5px]",
|
|
902
933
|
onClick: () => setOpened((o) => !o)
|
|
903
934
|
},
|
|
904
935
|
/* @__PURE__ */ React7.createElement("div", { className: cn("text-gray-900 dark:text-gray-100 font-bold text-base", titleBoxCss) }, title),
|
|
905
|
-
opened ? /* @__PURE__ */ React7.createElement(ChevronUp,
|
|
936
|
+
opened ? /* @__PURE__ */ React7.createElement(ChevronUp, { size: 18, className: "text-[#717179] dark:text-[#A1A1A9]" }) : /* @__PURE__ */ React7.createElement(ChevronDown, { size: 18, className: "text-[#717179] dark:text-[#A1A1A9]" })
|
|
906
937
|
), /* @__PURE__ */ React7.createElement("div", { className: cn("mt-2", opened ? "block" : "hidden") }, /* @__PURE__ */ React7.createElement(JSONSchemaForm, { formState }, submitButtonProps && /* @__PURE__ */ React7.createElement(SubmitButton, { formKey, formState, buttonProps: submitButtonProps }), customButtonProps && /* @__PURE__ */ React7.createElement(CustomButton, { formKey, formState, buttonProps: customButtonProps }))));
|
|
907
938
|
};
|
|
908
939
|
var ListLayout = (props) => {
|
|
@@ -1011,7 +1042,22 @@ var JSONForm = (props) => {
|
|
|
1011
1042
|
function TextareaWidget(props) {
|
|
1012
1043
|
var _a;
|
|
1013
1044
|
const { onChange, options, label, value, required, disabled, uiSchema } = props;
|
|
1014
|
-
const {
|
|
1045
|
+
const {
|
|
1046
|
+
className,
|
|
1047
|
+
nextuiClassNames = {
|
|
1048
|
+
inputWrapper: "rounded-lg shadow-none border dark:border-[#2c2c2c] !bg-transparent data-[hover=true]:!bg-default-50 group-data-[focus=true]:!bg-transparent"
|
|
1049
|
+
},
|
|
1050
|
+
labelPlacement = "inside",
|
|
1051
|
+
size = "md",
|
|
1052
|
+
minRows = 3,
|
|
1053
|
+
maxRows = 8,
|
|
1054
|
+
color,
|
|
1055
|
+
variant,
|
|
1056
|
+
radius,
|
|
1057
|
+
startContent,
|
|
1058
|
+
endContent,
|
|
1059
|
+
description
|
|
1060
|
+
} = options;
|
|
1015
1061
|
const { requiredErrMsg, validate } = uiSchema;
|
|
1016
1062
|
const placeholder = (_a = uiSchema["ui:options"]) == null ? void 0 : _a.placeholder;
|
|
1017
1063
|
const isFirstChecked = useRef(true);
|
|
@@ -1054,7 +1100,19 @@ function TextareaWidget(props) {
|
|
|
1054
1100
|
);
|
|
1055
1101
|
}
|
|
1056
1102
|
function DatePickerWidget({ label, options, value, required, disabled, uiSchema, onChange }) {
|
|
1057
|
-
const {
|
|
1103
|
+
const {
|
|
1104
|
+
className,
|
|
1105
|
+
nextuiClassNames = { calendarContent: "min-w-fit" },
|
|
1106
|
+
dateInputClassNames = {
|
|
1107
|
+
inputWrapper: "rounded-lg bg-transparent border dark:border-[#2c2c2c] hover:bg-default-50"
|
|
1108
|
+
},
|
|
1109
|
+
labelPlacement = "inside",
|
|
1110
|
+
size = "sm",
|
|
1111
|
+
granularity = "day",
|
|
1112
|
+
color = "default",
|
|
1113
|
+
description,
|
|
1114
|
+
variant
|
|
1115
|
+
} = options;
|
|
1058
1116
|
const [date, setDate] = useState();
|
|
1059
1117
|
const { requiredErrMsg, validate } = uiSchema;
|
|
1060
1118
|
const isFirstChecked = useRef(true);
|
|
@@ -1081,6 +1139,7 @@ function DatePickerWidget({ label, options, value, required, disabled, uiSchema,
|
|
|
1081
1139
|
labelPlacement,
|
|
1082
1140
|
color,
|
|
1083
1141
|
granularity,
|
|
1142
|
+
variant,
|
|
1084
1143
|
value: date,
|
|
1085
1144
|
isRequired: required,
|
|
1086
1145
|
description: description || "",
|