@douglasneuroinformatics/libui 3.3.0 → 3.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/components.d.ts +2 -1
- package/dist/components.js +18 -15
- package/dist/components.js.map +1 -1
- package/dist/douglasneuroinformatics-libui-3.4.0.tgz +0 -0
- package/package.json +2 -2
- package/src/components/Form/BaseRadioField.tsx +1 -1
- package/src/components/Form/BooleanField/BooleanFieldCheckbox.tsx +1 -1
- package/src/components/Form/BooleanField/BooleanFieldRadio.tsx +1 -1
- package/src/components/Form/DateField/DateField.tsx +1 -1
- package/src/components/Form/FieldGroup/FieldGroupRoot.tsx +4 -2
- package/src/components/Form/Form.tsx +3 -0
- package/src/components/Form/NumberField/NumberFieldInput.tsx +1 -1
- package/src/components/Form/NumberField/NumberFieldRadio.tsx +1 -1
- package/src/components/Form/NumberField/NumberFieldSelect.tsx +1 -1
- package/src/components/Form/NumberField/NumberFieldSlider.tsx +1 -1
- package/src/components/Form/SetField/SetFieldListbox.tsx +1 -1
- package/src/components/Form/SetField/SetFieldSelect.tsx +2 -1
- package/src/components/Form/StringField/StringFieldInput.tsx +1 -1
- package/src/components/Form/StringField/StringFieldPassword.tsx +1 -1
- package/src/components/Form/StringField/StringFieldSelect.tsx +1 -1
- package/src/components/Form/StringField/StringFieldTextArea.tsx +1 -1
- package/dist/douglasneuroinformatics-libui-3.3.0.tgz +0 -0
package/dist/components.d.ts
CHANGED
|
@@ -1166,6 +1166,7 @@ type FormProps<TSchema extends z.ZodType<FormDataType>, TData extends z.TypeOf<T
|
|
|
1166
1166
|
[key: `data-${string}`]: unknown;
|
|
1167
1167
|
className?: string;
|
|
1168
1168
|
content: FormContent<TData>;
|
|
1169
|
+
fieldsFooter?: React$1.ReactNode;
|
|
1169
1170
|
id?: string;
|
|
1170
1171
|
initialValues?: PartialNullableFormDataType<TData>;
|
|
1171
1172
|
onError?: (error: z.ZodError<TData>) => void;
|
|
@@ -1177,7 +1178,7 @@ type FormProps<TSchema extends z.ZodType<FormDataType>, TData extends z.TypeOf<T
|
|
|
1177
1178
|
submitBtnLabel?: string;
|
|
1178
1179
|
validationSchema: z.ZodType<TData>;
|
|
1179
1180
|
};
|
|
1180
|
-
declare const Form: <TSchema extends z.ZodType<FormDataType>, TData extends z.TypeOf<TSchema> = z.TypeOf<TSchema>>({ className, content, id, initialValues, onError, onSubmit, preventResetValuesOnReset, readOnly, resetBtn, revalidateOnBlur, submitBtnLabel, validationSchema, ...props }: FormProps<TSchema, TData>) => react_jsx_runtime.JSX.Element;
|
|
1181
|
+
declare const Form: <TSchema extends z.ZodType<FormDataType>, TData extends z.TypeOf<TSchema> = z.TypeOf<TSchema>>({ className, content, fieldsFooter, id, initialValues, onError, onSubmit, preventResetValuesOnReset, readOnly, resetBtn, revalidateOnBlur, submitBtnLabel, validationSchema, ...props }: FormProps<TSchema, TData>) => react_jsx_runtime.JSX.Element;
|
|
1181
1182
|
|
|
1182
1183
|
type HeadingProps = {
|
|
1183
1184
|
children: string;
|
package/dist/components.js
CHANGED
|
@@ -1921,7 +1921,7 @@ var FieldGroupDescription = ({ description }) => description ? /* @__PURE__ */ j
|
|
|
1921
1921
|
// src/components/Form/FieldGroup/FieldGroupRoot.tsx
|
|
1922
1922
|
import "react";
|
|
1923
1923
|
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
1924
|
-
var FieldGroupRoot = ({ children }) => /* @__PURE__ */ jsx94("div", { className: "flex flex-col gap-3 @container", children });
|
|
1924
|
+
var FieldGroupRoot = ({ children, name }) => /* @__PURE__ */ jsx94("div", { className: "flex flex-col gap-3 @container", "data-field-group": name, children });
|
|
1925
1925
|
|
|
1926
1926
|
// src/components/Form/FieldGroup/FieldGroupRow.tsx
|
|
1927
1927
|
import "react";
|
|
@@ -1969,7 +1969,7 @@ var NumberFieldInput = ({
|
|
|
1969
1969
|
setValue(newValue);
|
|
1970
1970
|
}
|
|
1971
1971
|
};
|
|
1972
|
-
return /* @__PURE__ */ jsxs24(FieldGroup, { children: [
|
|
1972
|
+
return /* @__PURE__ */ jsxs24(FieldGroup, { name, children: [
|
|
1973
1973
|
/* @__PURE__ */ jsxs24(FieldGroup.Row, { children: [
|
|
1974
1974
|
/* @__PURE__ */ jsx96(Label3, { children: label }),
|
|
1975
1975
|
/* @__PURE__ */ jsx96(FieldGroup.Description, { description })
|
|
@@ -2044,7 +2044,7 @@ var NumberFieldRadio = ({
|
|
|
2044
2044
|
value
|
|
2045
2045
|
}) => {
|
|
2046
2046
|
const optionsCount = Object.keys(options).length;
|
|
2047
|
-
return /* @__PURE__ */ jsxs25(FieldGroup, { children: [
|
|
2047
|
+
return /* @__PURE__ */ jsxs25(FieldGroup, { name, children: [
|
|
2048
2048
|
/* @__PURE__ */ jsxs25(FieldGroup.Row, { children: [
|
|
2049
2049
|
/* @__PURE__ */ jsx99(Label3, { children: label }),
|
|
2050
2050
|
/* @__PURE__ */ jsx99(FieldGroup.Description, { description })
|
|
@@ -2227,7 +2227,7 @@ var NumberFieldSelect = ({
|
|
|
2227
2227
|
setValue,
|
|
2228
2228
|
value
|
|
2229
2229
|
}) => {
|
|
2230
|
-
return /* @__PURE__ */ jsxs28(FieldGroup, { children: [
|
|
2230
|
+
return /* @__PURE__ */ jsxs28(FieldGroup, { name, children: [
|
|
2231
2231
|
/* @__PURE__ */ jsxs28(FieldGroup.Row, { children: [
|
|
2232
2232
|
/* @__PURE__ */ jsx107(Label3, { children: label }),
|
|
2233
2233
|
/* @__PURE__ */ jsx107(FieldGroup.Description, { description })
|
|
@@ -2294,7 +2294,7 @@ var NumberFieldSlider = ({
|
|
|
2294
2294
|
setValue,
|
|
2295
2295
|
value
|
|
2296
2296
|
}) => {
|
|
2297
|
-
return /* @__PURE__ */ jsxs30(FieldGroup, { children: [
|
|
2297
|
+
return /* @__PURE__ */ jsxs30(FieldGroup, { name, children: [
|
|
2298
2298
|
/* @__PURE__ */ jsxs30(FieldGroup.Row, { children: [
|
|
2299
2299
|
/* @__PURE__ */ jsx109(Label3, { children: label }),
|
|
2300
2300
|
/* @__PURE__ */ jsx109(FieldGroup.Description, { description })
|
|
@@ -2384,7 +2384,7 @@ var BooleanFieldCheckbox = ({
|
|
|
2384
2384
|
setValue,
|
|
2385
2385
|
value
|
|
2386
2386
|
}) => {
|
|
2387
|
-
return /* @__PURE__ */ jsxs32(FieldGroup, { children: [
|
|
2387
|
+
return /* @__PURE__ */ jsxs32(FieldGroup, { name, children: [
|
|
2388
2388
|
/* @__PURE__ */ jsxs32(FieldGroup.Row, { children: [
|
|
2389
2389
|
/* @__PURE__ */ jsx112(
|
|
2390
2390
|
Checkbox,
|
|
@@ -2428,7 +2428,7 @@ var BooleanFieldRadio = ({
|
|
|
2428
2428
|
},
|
|
2429
2429
|
[match3, setValue]
|
|
2430
2430
|
);
|
|
2431
|
-
return /* @__PURE__ */ jsxs33(FieldGroup, { children: [
|
|
2431
|
+
return /* @__PURE__ */ jsxs33(FieldGroup, { name, children: [
|
|
2432
2432
|
/* @__PURE__ */ jsx113(Label3, { children: label }),
|
|
2433
2433
|
/* @__PURE__ */ jsxs33(
|
|
2434
2434
|
RadioGroup4,
|
|
@@ -2497,7 +2497,7 @@ var DateField = ({ disabled, error, label, name, readOnly, setValue, value }) =>
|
|
|
2497
2497
|
useEffect4(() => {
|
|
2498
2498
|
setInputValue(value ? toBasicISOString2(value) : "");
|
|
2499
2499
|
}, [value]);
|
|
2500
|
-
return /* @__PURE__ */ jsxs34(FieldGroup, { children: [
|
|
2500
|
+
return /* @__PURE__ */ jsxs34(FieldGroup, { name, children: [
|
|
2501
2501
|
/* @__PURE__ */ jsx115(Label3, { htmlFor: name, children: label }),
|
|
2502
2502
|
/* @__PURE__ */ jsxs34(Popover, { open: isDatePickerOpen, onOpenChange: setIsDatePickerOpen, children: [
|
|
2503
2503
|
/* @__PURE__ */ jsx115(Popover.Trigger, { children: /* @__PURE__ */ jsx115(
|
|
@@ -2546,7 +2546,7 @@ var SetFieldListbox = ({
|
|
|
2546
2546
|
readOnly,
|
|
2547
2547
|
value
|
|
2548
2548
|
}) => {
|
|
2549
|
-
return /* @__PURE__ */ jsxs35(FieldGroup, { children: [
|
|
2549
|
+
return /* @__PURE__ */ jsxs35(FieldGroup, { name, children: [
|
|
2550
2550
|
/* @__PURE__ */ jsxs35(FieldGroup.Row, { children: [
|
|
2551
2551
|
/* @__PURE__ */ jsx116(Label3, { children: label }),
|
|
2552
2552
|
/* @__PURE__ */ jsx116(FieldGroup.Description, { description })
|
|
@@ -2576,12 +2576,13 @@ var SetFieldSelect = ({
|
|
|
2576
2576
|
disabled,
|
|
2577
2577
|
error,
|
|
2578
2578
|
label,
|
|
2579
|
+
name,
|
|
2579
2580
|
onCheckedChange,
|
|
2580
2581
|
options,
|
|
2581
2582
|
readOnly,
|
|
2582
2583
|
value
|
|
2583
2584
|
}) => {
|
|
2584
|
-
return value ? /* @__PURE__ */ jsxs36(FieldGroup, { children: [
|
|
2585
|
+
return value ? /* @__PURE__ */ jsxs36(FieldGroup, { name, children: [
|
|
2585
2586
|
/* @__PURE__ */ jsxs36(FieldGroup.Row, { children: [
|
|
2586
2587
|
/* @__PURE__ */ jsx117(Label3, { children: label }),
|
|
2587
2588
|
/* @__PURE__ */ jsx117(FieldGroup.Description, { description })
|
|
@@ -2646,7 +2647,7 @@ var StringFieldInput = ({
|
|
|
2646
2647
|
setValue,
|
|
2647
2648
|
value
|
|
2648
2649
|
}) => {
|
|
2649
|
-
return /* @__PURE__ */ jsxs37(FieldGroup, { children: [
|
|
2650
|
+
return /* @__PURE__ */ jsxs37(FieldGroup, { name, children: [
|
|
2650
2651
|
/* @__PURE__ */ jsxs37(FieldGroup.Row, { children: [
|
|
2651
2652
|
/* @__PURE__ */ jsx119(Label3, { htmlFor: name, children: label }),
|
|
2652
2653
|
/* @__PURE__ */ jsx119(FieldGroup.Description, { description })
|
|
@@ -2690,7 +2691,7 @@ var StringFieldPassword = ({
|
|
|
2690
2691
|
setStrength(value ? calculateStrength(value) : 0);
|
|
2691
2692
|
}
|
|
2692
2693
|
}, [value]);
|
|
2693
|
-
return /* @__PURE__ */ jsxs38(FieldGroup, { children: [
|
|
2694
|
+
return /* @__PURE__ */ jsxs38(FieldGroup, { name, children: [
|
|
2694
2695
|
/* @__PURE__ */ jsxs38(FieldGroup.Row, { children: [
|
|
2695
2696
|
/* @__PURE__ */ jsx120(Label3, { htmlFor: name, children: label }),
|
|
2696
2697
|
/* @__PURE__ */ jsx120(FieldGroup.Description, { description })
|
|
@@ -2773,7 +2774,7 @@ var BaseRadioField = ({
|
|
|
2773
2774
|
value
|
|
2774
2775
|
}) => {
|
|
2775
2776
|
const optionsCount = Object.keys(options).length;
|
|
2776
|
-
return /* @__PURE__ */ jsxs39(FieldGroup, { children: [
|
|
2777
|
+
return /* @__PURE__ */ jsxs39(FieldGroup, { name, children: [
|
|
2777
2778
|
/* @__PURE__ */ jsxs39(FieldGroup.Row, { children: [
|
|
2778
2779
|
/* @__PURE__ */ jsx121(Label3, { children: label }),
|
|
2779
2780
|
/* @__PURE__ */ jsx121(FieldGroup.Description, { description })
|
|
@@ -2822,7 +2823,7 @@ var StringFieldSelect = ({
|
|
|
2822
2823
|
setValue,
|
|
2823
2824
|
value
|
|
2824
2825
|
}) => {
|
|
2825
|
-
return /* @__PURE__ */ jsxs40(FieldGroup, { children: [
|
|
2826
|
+
return /* @__PURE__ */ jsxs40(FieldGroup, { name, children: [
|
|
2826
2827
|
/* @__PURE__ */ jsxs40(FieldGroup.Row, { children: [
|
|
2827
2828
|
/* @__PURE__ */ jsx123(Label3, { children: label }),
|
|
2828
2829
|
/* @__PURE__ */ jsx123(FieldGroup.Description, { description })
|
|
@@ -2867,7 +2868,7 @@ var StringFieldTextArea = ({
|
|
|
2867
2868
|
setValue,
|
|
2868
2869
|
value
|
|
2869
2870
|
}) => {
|
|
2870
|
-
return /* @__PURE__ */ jsxs41(FieldGroup, { children: [
|
|
2871
|
+
return /* @__PURE__ */ jsxs41(FieldGroup, { name, children: [
|
|
2871
2872
|
/* @__PURE__ */ jsxs41(FieldGroup.Row, { children: [
|
|
2872
2873
|
/* @__PURE__ */ jsx125(Label3, { htmlFor: name, children: label }),
|
|
2873
2874
|
/* @__PURE__ */ jsx125(FieldGroup.Description, { description })
|
|
@@ -3118,6 +3119,7 @@ import { jsx as jsx131, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
|
3118
3119
|
var Form = ({
|
|
3119
3120
|
className,
|
|
3120
3121
|
content,
|
|
3122
|
+
fieldsFooter,
|
|
3121
3123
|
id,
|
|
3122
3124
|
initialValues,
|
|
3123
3125
|
onError,
|
|
@@ -3226,6 +3228,7 @@ var Form = ({
|
|
|
3226
3228
|
values
|
|
3227
3229
|
}
|
|
3228
3230
|
),
|
|
3231
|
+
fieldsFooter,
|
|
3229
3232
|
/* @__PURE__ */ jsxs43("div", { className: "flex w-full gap-3", children: [
|
|
3230
3233
|
/* @__PURE__ */ jsx131(Button, { "aria-label": "Submit", className: "block w-full", disabled: readOnly, type: "submit", variant: "primary", children: submitBtnLabel ?? t("form.submit") }),
|
|
3231
3234
|
resetBtn && /* @__PURE__ */ jsx131(
|