@rjsf/shadcn 6.0.0-beta.1
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/README.md +225 -0
- package/dist/blue.css +1 -0
- package/dist/default.css +1 -0
- package/dist/green.css +1 -0
- package/dist/index.js +1521 -0
- package/dist/index.js.map +7 -0
- package/dist/orange.css +1 -0
- package/dist/red.css +1 -0
- package/dist/rjsf-shadcn.esm.js +1540 -0
- package/dist/rjsf-shadcn.esm.js.map +7 -0
- package/dist/rjsf-shadcn.umd.js +1329 -0
- package/dist/rose.css +1 -0
- package/dist/violet.css +1 -0
- package/dist/yellow.css +1 -0
- package/dist/zinc.css +1 -0
- package/lib/AddButton/AddButton.d.ts +6 -0
- package/lib/AddButton/AddButton.js +13 -0
- package/lib/AddButton/AddButton.js.map +1 -0
- package/lib/AddButton/index.d.ts +2 -0
- package/lib/AddButton/index.js +3 -0
- package/lib/AddButton/index.js.map +1 -0
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +6 -0
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +13 -0
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -0
- package/lib/ArrayFieldItemTemplate/index.d.ts +2 -0
- package/lib/ArrayFieldItemTemplate/index.js +3 -0
- package/lib/ArrayFieldItemTemplate/index.js.map +1 -0
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +6 -0
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +18 -0
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -0
- package/lib/ArrayFieldTemplate/index.d.ts +2 -0
- package/lib/ArrayFieldTemplate/index.js +3 -0
- package/lib/ArrayFieldTemplate/index.js.map +1 -0
- package/lib/BaseInputTemplate/BaseInputTemplate.d.ts +8 -0
- package/lib/BaseInputTemplate/BaseInputTemplate.js +25 -0
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -0
- package/lib/BaseInputTemplate/index.d.ts +2 -0
- package/lib/BaseInputTemplate/index.js +3 -0
- package/lib/BaseInputTemplate/index.js.map +1 -0
- package/lib/CheckboxWidget/CheckboxWidget.d.ts +7 -0
- package/lib/CheckboxWidget/CheckboxWidget.js +23 -0
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -0
- package/lib/CheckboxWidget/index.d.ts +2 -0
- package/lib/CheckboxWidget/index.js +3 -0
- package/lib/CheckboxWidget/index.js.map +1 -0
- package/lib/CheckboxesWidget/CheckboxesWidget.d.ts +7 -0
- package/lib/CheckboxesWidget/CheckboxesWidget.js +31 -0
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -0
- package/lib/CheckboxesWidget/index.d.ts +2 -0
- package/lib/CheckboxesWidget/index.js +3 -0
- package/lib/CheckboxesWidget/index.js.map +1 -0
- package/lib/DescriptionField/DescriptionField.d.ts +6 -0
- package/lib/DescriptionField/DescriptionField.js +12 -0
- package/lib/DescriptionField/DescriptionField.js.map +1 -0
- package/lib/DescriptionField/index.d.ts +2 -0
- package/lib/DescriptionField/index.js +3 -0
- package/lib/DescriptionField/index.js.map +1 -0
- package/lib/ErrorList/ErrorList.d.ts +6 -0
- package/lib/ErrorList/ErrorList.js +15 -0
- package/lib/ErrorList/ErrorList.js.map +1 -0
- package/lib/ErrorList/index.d.ts +2 -0
- package/lib/ErrorList/index.js +3 -0
- package/lib/ErrorList/index.js.map +1 -0
- package/lib/FieldErrorTemplate/FieldErrorTemplate.d.ts +6 -0
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js +17 -0
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -0
- package/lib/FieldErrorTemplate/index.d.ts +2 -0
- package/lib/FieldErrorTemplate/index.js +3 -0
- package/lib/FieldErrorTemplate/index.js.map +1 -0
- package/lib/FieldHelpTemplate/FieldHelpTemplate.d.ts +6 -0
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +16 -0
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -0
- package/lib/FieldHelpTemplate/index.d.ts +2 -0
- package/lib/FieldHelpTemplate/index.js +3 -0
- package/lib/FieldHelpTemplate/index.js.map +1 -0
- package/lib/FieldTemplate/FieldTemplate.d.ts +7 -0
- package/lib/FieldTemplate/FieldTemplate.js +17 -0
- package/lib/FieldTemplate/FieldTemplate.js.map +1 -0
- package/lib/FieldTemplate/index.d.ts +2 -0
- package/lib/FieldTemplate/index.js +3 -0
- package/lib/FieldTemplate/index.js.map +1 -0
- package/lib/Form/Form.d.ts +6 -0
- package/lib/Form/Form.js +7 -0
- package/lib/Form/Form.js.map +1 -0
- package/lib/Form/index.d.ts +2 -0
- package/lib/Form/index.js +3 -0
- package/lib/Form/index.js.map +1 -0
- package/lib/GridTemplate/GridTemplate.d.ts +7 -0
- package/lib/GridTemplate/GridTemplate.js +12 -0
- package/lib/GridTemplate/GridTemplate.js.map +1 -0
- package/lib/GridTemplate/index.d.ts +2 -0
- package/lib/GridTemplate/index.js +3 -0
- package/lib/GridTemplate/index.js.map +1 -0
- package/lib/IconButton/IconButton.d.ts +39 -0
- package/lib/IconButton/IconButton.js +57 -0
- package/lib/IconButton/IconButton.js.map +1 -0
- package/lib/IconButton/index.d.ts +2 -0
- package/lib/IconButton/index.js +3 -0
- package/lib/IconButton/index.js.map +1 -0
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +8 -0
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +17 -0
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -0
- package/lib/ObjectFieldTemplate/index.d.ts +2 -0
- package/lib/ObjectFieldTemplate/index.js +3 -0
- package/lib/ObjectFieldTemplate/index.js.map +1 -0
- package/lib/RadioWidget/RadioWidget.d.ts +7 -0
- package/lib/RadioWidget/RadioWidget.js +26 -0
- package/lib/RadioWidget/RadioWidget.js.map +1 -0
- package/lib/RadioWidget/index.d.ts +2 -0
- package/lib/RadioWidget/index.js +3 -0
- package/lib/RadioWidget/index.js.map +1 -0
- package/lib/RangeWidget/RangeWidget.d.ts +15 -0
- package/lib/RangeWidget/RangeWidget.js +39 -0
- package/lib/RangeWidget/RangeWidget.js.map +1 -0
- package/lib/RangeWidget/index.d.ts +2 -0
- package/lib/RangeWidget/index.js +3 -0
- package/lib/RangeWidget/index.js.map +1 -0
- package/lib/SelectWidget/SelectWidget.d.ts +7 -0
- package/lib/SelectWidget/SelectWidget.js +31 -0
- package/lib/SelectWidget/SelectWidget.js.map +1 -0
- package/lib/SelectWidget/index.d.ts +2 -0
- package/lib/SelectWidget/index.js +3 -0
- package/lib/SelectWidget/index.js.map +1 -0
- package/lib/SubmitButton/SubmitButton.d.ts +4 -0
- package/lib/SubmitButton/SubmitButton.js +13 -0
- package/lib/SubmitButton/SubmitButton.js.map +1 -0
- package/lib/SubmitButton/index.d.ts +2 -0
- package/lib/SubmitButton/index.js +3 -0
- package/lib/SubmitButton/index.js.map +1 -0
- package/lib/Templates/Templates.d.ts +4 -0
- package/lib/Templates/Templates.js +41 -0
- package/lib/Templates/Templates.js.map +1 -0
- package/lib/Templates/index.d.ts +2 -0
- package/lib/Templates/index.js +3 -0
- package/lib/Templates/index.js.map +1 -0
- package/lib/TextareaWidget/TextareaWidget.d.ts +10 -0
- package/lib/TextareaWidget/TextareaWidget.js +14 -0
- package/lib/TextareaWidget/TextareaWidget.js.map +1 -0
- package/lib/TextareaWidget/index.d.ts +2 -0
- package/lib/TextareaWidget/index.js +3 -0
- package/lib/TextareaWidget/index.js.map +1 -0
- package/lib/Theme/Theme.d.ts +5 -0
- package/lib/Theme/Theme.js +10 -0
- package/lib/Theme/Theme.js.map +1 -0
- package/lib/Theme/index.d.ts +2 -0
- package/lib/Theme/index.js +3 -0
- package/lib/Theme/index.js.map +1 -0
- package/lib/TitleField/TitleField.d.ts +6 -0
- package/lib/TitleField/TitleField.js +12 -0
- package/lib/TitleField/TitleField.js.map +1 -0
- package/lib/TitleField/index.d.ts +2 -0
- package/lib/TitleField/index.js +3 -0
- package/lib/TitleField/index.js.map +1 -0
- package/lib/Widgets/Widgets.d.ts +4 -0
- package/lib/Widgets/Widgets.js +18 -0
- package/lib/Widgets/Widgets.js.map +1 -0
- package/lib/Widgets/index.d.ts +2 -0
- package/lib/Widgets/index.js +3 -0
- package/lib/Widgets/index.js.map +1 -0
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.d.ts +7 -0
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +23 -0
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -0
- package/lib/WrapIfAdditionalTemplate/index.d.ts +2 -0
- package/lib/WrapIfAdditionalTemplate/index.js +3 -0
- package/lib/WrapIfAdditionalTemplate/index.js.map +1 -0
- package/lib/components/ui/alert.d.ts +27 -0
- package/lib/components/ui/alert.js +42 -0
- package/lib/components/ui/alert.js.map +1 -0
- package/lib/components/ui/badge.d.ts +26 -0
- package/lib/components/ui/badge.js +33 -0
- package/lib/components/ui/badge.js.map +1 -0
- package/lib/components/ui/button.d.ts +32 -0
- package/lib/components/ui/button.js +49 -0
- package/lib/components/ui/button.js.map +1 -0
- package/lib/components/ui/checkbox.d.ts +11 -0
- package/lib/components/ui/checkbox.js +19 -0
- package/lib/components/ui/checkbox.js.map +1 -0
- package/lib/components/ui/command.d.ts +134 -0
- package/lib/components/ui/command.js +84 -0
- package/lib/components/ui/command.js.map +1 -0
- package/lib/components/ui/dialog.d.ts +71 -0
- package/lib/components/ui/dialog.js +77 -0
- package/lib/components/ui/dialog.js.map +1 -0
- package/lib/components/ui/fancy-multi-select.d.ts +50 -0
- package/lib/components/ui/fancy-multi-select.js +62 -0
- package/lib/components/ui/fancy-multi-select.js.map +1 -0
- package/lib/components/ui/fancy-select.d.ts +50 -0
- package/lib/components/ui/fancy-select.js +41 -0
- package/lib/components/ui/fancy-select.js.map +1 -0
- package/lib/components/ui/input.d.ts +17 -0
- package/lib/components/ui/input.js +18 -0
- package/lib/components/ui/input.js.map +1 -0
- package/lib/components/ui/label.d.ts +12 -0
- package/lib/components/ui/label.js +19 -0
- package/lib/components/ui/label.js.map +1 -0
- package/lib/components/ui/radio-group.d.ts +20 -0
- package/lib/components/ui/radio-group.js +32 -0
- package/lib/components/ui/radio-group.js.map +1 -0
- package/lib/components/ui/select.d.ts +30 -0
- package/lib/components/ui/select.js +46 -0
- package/lib/components/ui/select.js.map +1 -0
- package/lib/components/ui/separator.d.ts +12 -0
- package/lib/components/ui/separator.js +19 -0
- package/lib/components/ui/separator.js.map +1 -0
- package/lib/components/ui/slider.d.ts +10 -0
- package/lib/components/ui/slider.js +17 -0
- package/lib/components/ui/slider.js.map +1 -0
- package/lib/components/ui/textarea.d.ts +16 -0
- package/lib/components/ui/textarea.js +17 -0
- package/lib/components/ui/textarea.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/lib/lib/utils.d.ts +2 -0
- package/lib/lib/utils.js +6 -0
- package/lib/lib/utils.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +121 -0
- package/src/AddButton/AddButton.tsx +23 -0
- package/src/AddButton/index.ts +2 -0
- package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +40 -0
- package/src/ArrayFieldItemTemplate/index.ts +2 -0
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +84 -0
- package/src/ArrayFieldTemplate/index.ts +2 -0
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +85 -0
- package/src/BaseInputTemplate/index.ts +2 -0
- package/src/CheckboxWidget/CheckboxWidget.tsx +88 -0
- package/src/CheckboxWidget/index.ts +2 -0
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +73 -0
- package/src/CheckboxesWidget/index.ts +2 -0
- package/src/DescriptionField/DescriptionField.tsx +23 -0
- package/src/DescriptionField/index.ts +2 -0
- package/src/ErrorList/ErrorList.tsx +26 -0
- package/src/ErrorList/index.ts +2 -0
- package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +29 -0
- package/src/FieldErrorTemplate/index.ts +2 -0
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +24 -0
- package/src/FieldHelpTemplate/index.ts +2 -0
- package/src/FieldTemplate/FieldTemplate.tsx +93 -0
- package/src/FieldTemplate/index.ts +2 -0
- package/src/Form/Form.tsx +16 -0
- package/src/Form/index.ts +2 -0
- package/src/GridTemplate/GridTemplate.tsx +16 -0
- package/src/GridTemplate/index.ts +2 -0
- package/src/IconButton/IconButton.tsx +104 -0
- package/src/IconButton/index.ts +2 -0
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +89 -0
- package/src/ObjectFieldTemplate/index.ts +2 -0
- package/src/RadioWidget/RadioWidget.tsx +77 -0
- package/src/RadioWidget/index.ts +2 -0
- package/src/RangeWidget/RangeWidget.tsx +64 -0
- package/src/RangeWidget/index.ts +2 -0
- package/src/SelectWidget/SelectWidget.tsx +93 -0
- package/src/SelectWidget/index.ts +2 -0
- package/src/SubmitButton/SubmitButton.tsx +21 -0
- package/src/SubmitButton/index.ts +2 -0
- package/src/Templates/Templates.ts +47 -0
- package/src/Templates/index.ts +2 -0
- package/src/TextareaWidget/TextareaWidget.tsx +59 -0
- package/src/TextareaWidget/index.ts +2 -0
- package/src/Theme/Theme.tsx +18 -0
- package/src/Theme/index.ts +2 -0
- package/src/TitleField/TitleField.tsx +21 -0
- package/src/TitleField/index.ts +2 -0
- package/src/Widgets/Widgets.ts +24 -0
- package/src/Widgets/index.ts +2 -0
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +93 -0
- package/src/WrapIfAdditionalTemplate/index.ts +2 -0
- package/src/components/ui/alert.tsx +61 -0
- package/src/components/ui/badge.tsx +46 -0
- package/src/components/ui/button.tsx +65 -0
- package/src/components/ui/checkbox.tsx +35 -0
- package/src/components/ui/command.tsx +183 -0
- package/src/components/ui/dialog.tsx +144 -0
- package/src/components/ui/fancy-multi-select.tsx +232 -0
- package/src/components/ui/fancy-select.tsx +157 -0
- package/src/components/ui/input.tsx +34 -0
- package/src/components/ui/label.tsx +27 -0
- package/src/components/ui/radio-group.tsx +54 -0
- package/src/components/ui/select.tsx +174 -0
- package/src/components/ui/separator.tsx +35 -0
- package/src/components/ui/slider.tsx +28 -0
- package/src/components/ui/textarea.tsx +33 -0
- package/src/css/blue.css +71 -0
- package/src/css/default.css +59 -0
- package/src/css/green.css +71 -0
- package/src/css/orange.css +71 -0
- package/src/css/red.css +70 -0
- package/src/css/rose.css +70 -0
- package/src/css/violet.css +69 -0
- package/src/css/yellow.css +69 -0
- package/src/css/zinc.css +69 -0
- package/src/index.ts +8 -0
- package/src/lib/utils.ts +6 -0
- package/src/tsconfig.json +23 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DescriptionField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `ErrorListProps` for this component
|
|
5
|
+
*/
|
|
6
|
+
export default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ errors, registry, }: ErrorListProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TranslatableString } from '@rjsf/utils';
|
|
3
|
+
import { AlertCircle } from 'lucide-react';
|
|
4
|
+
import { Alert, AlertDescription, AlertTitle } from '../components/ui/alert.js';
|
|
5
|
+
/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
|
|
6
|
+
*
|
|
7
|
+
* @param props - The `ErrorListProps` for this component
|
|
8
|
+
*/
|
|
9
|
+
export default function ErrorList({ errors, registry, }) {
|
|
10
|
+
const { translateString } = registry;
|
|
11
|
+
return (_jsxs(Alert, { variant: 'destructive', className: 'mb-2', children: [_jsx(AlertCircle, { className: 'h-4 w-4' }), _jsx(AlertTitle, { children: translateString(TranslatableString.ErrorsLabel) }), _jsx(AlertDescription, { className: 'flex flex-col gap-1', children: errors.map((error, i) => {
|
|
12
|
+
return _jsxs("span", { children: ["\u2022 ", error.stack] }, i);
|
|
13
|
+
}) })] }));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=ErrorList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorList.js","sourceRoot":"","sources":["../../src/ErrorList/ErrorList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAoF,EACnH,MAAM,EACN,QAAQ,GACgB;IACxB,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,OAAO,CACL,MAAC,KAAK,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,MAAM,aAC3C,KAAC,WAAW,IAAC,SAAS,EAAC,SAAS,GAAG,EACnC,KAAC,UAAU,cAAE,eAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAc,EAC1E,KAAC,gBAAgB,IAAC,SAAS,EAAC,qBAAqB,YAC9C,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAS,EAAE,EAAE;oBAC/B,OAAO,sCAAwB,KAAK,CAAC,KAAK,KAAxB,CAAC,CAA+B,CAAC;gBACrD,CAAC,CAAC,GACe,IACb,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ErrorList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `FieldErrorTemplate` component renders the errors local to the particular field
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `FieldErrorProps` for the errors being rendered
|
|
5
|
+
*/
|
|
6
|
+
export default function FieldErrorTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldErrorProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { errorId } from '@rjsf/utils';
|
|
3
|
+
/** The `FieldErrorTemplate` component renders the errors local to the particular field
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `FieldErrorProps` for the errors being rendered
|
|
6
|
+
*/
|
|
7
|
+
export default function FieldErrorTemplate(props) {
|
|
8
|
+
const { errors = [], idSchema } = props;
|
|
9
|
+
if (errors.length === 0) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const id = errorId(idSchema);
|
|
13
|
+
return (_jsx("div", { className: 'flex flex-col gap-1', id: id, children: errors.map((error, i) => {
|
|
14
|
+
return (_jsx("span", { className: 'text-xs font-medium text-destructive mb-1', children: error }, i));
|
|
15
|
+
}) }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=FieldErrorTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldErrorTemplate.js","sourceRoot":"","sources":["../../src/FieldErrorTemplate/FieldErrorTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtG;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAA+B;IAC/B,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,GAAG,OAAO,CAAI,QAAQ,CAAC,CAAC;IAEhC,OAAO,CACL,cAAK,SAAS,EAAC,qBAAqB,EAAC,EAAE,EAAE,EAAE,YACxC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAS,EAAE,EAAE;YAC/B,OAAO,CACL,eAAM,SAAS,EAAE,2CAA2C,YACzD,KAAK,IAD2D,CAAC,CAE7D,CACR,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/FieldErrorTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `FieldHelpTemplate` component renders any help desired for a field
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `FieldHelpProps` to be rendered
|
|
5
|
+
*/
|
|
6
|
+
export default function FieldHelpTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldHelpProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { helpId } from '@rjsf/utils';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
/** The `FieldHelpTemplate` component renders any help desired for a field
|
|
5
|
+
*
|
|
6
|
+
* @param props - The `FieldHelpProps` to be rendered
|
|
7
|
+
*/
|
|
8
|
+
export default function FieldHelpTemplate(props) {
|
|
9
|
+
const { idSchema, help, hasErrors } = props;
|
|
10
|
+
if (!help) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const id = helpId(idSchema);
|
|
14
|
+
return (_jsx("span", { className: cn('text-xs font-medium text-muted-foreground', { ' text-destructive': hasErrors }), id: id, children: help }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=FieldHelpTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldHelpTemplate.js","sourceRoot":"","sources":["../../src/FieldHelpTemplate/FieldHelpTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEpG,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAIvC,KAA8B;IAC9B,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC5C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,GAAG,MAAM,CAAI,QAAQ,CAAC,CAAC;IAC/B,OAAO,CACL,eAAM,SAAS,EAAE,EAAE,CAAC,2CAA2C,EAAE,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,YACzG,IAAI,GACA,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/FieldHelpTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
|
|
3
|
+
* content, (label, description, children, errors and help) inside a `WrapIfAdditional` component.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `FieldTemplateProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function FieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, children, displayLabel, rawErrors, errors, help, description, rawDescription, classNames, style, disabled, label, hidden, onDropPropertyClick, onKeyChange, readonly, required, schema, uiSchema, registry, }: FieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getTemplate, getUiOptions, } from '@rjsf/utils';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
|
|
5
|
+
* content, (label, description, children, errors and help) inside a `WrapIfAdditional` component.
|
|
6
|
+
*
|
|
7
|
+
* @param props - The `FieldTemplateProps` for this component
|
|
8
|
+
*/
|
|
9
|
+
export default function FieldTemplate({ id, children, displayLabel, rawErrors = [], errors, help, description, rawDescription, classNames, style, disabled, label, hidden, onDropPropertyClick, onKeyChange, readonly, required, schema, uiSchema, registry, }) {
|
|
10
|
+
const uiOptions = getUiOptions(uiSchema);
|
|
11
|
+
const WrapIfAdditionalTemplate = getTemplate('WrapIfAdditionalTemplate', registry, uiOptions);
|
|
12
|
+
if (hidden) {
|
|
13
|
+
return _jsx("div", { className: 'hidden', children: children });
|
|
14
|
+
}
|
|
15
|
+
return (_jsx(WrapIfAdditionalTemplate, { classNames: classNames, style: style, disabled: disabled, id: id, label: label, onDropPropertyClick: onDropPropertyClick, onKeyChange: onKeyChange, readonly: readonly, required: required, schema: schema, uiSchema: uiSchema, registry: registry, children: _jsxs("div", { className: 'flex flex-col gap-2', children: [displayLabel && (_jsxs("label", { className: cn('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70', { ' text-destructive': rawErrors.length > 0 }), htmlFor: id, children: [label, required ? '*' : null] })), children, displayLabel && rawDescription && (_jsx("span", { className: cn('text-xs font-medium text-muted-foreground', { ' text-destructive': rawErrors.length > 0 }), children: description })), errors, help] }) }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=FieldTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldTemplate.js","sourceRoot":"","sources":["../../src/FieldTemplate/FieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAInC,EACA,EAAE,EACF,QAAQ,EACR,YAAY,EACZ,SAAS,GAAG,EAAE,EACd,MAAM,EACN,IAAI,EACJ,WAAW,EACX,cAAc,EACd,UAAU,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,mBAAmB,EACnB,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,GACoB;IAC5B,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,wBAAwB,GAAG,WAAW,CAC1C,0BAA0B,EAC1B,QAAQ,EACR,SAAS,CACV,CAAC;IACF,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,cAAK,SAAS,EAAC,QAAQ,YAAE,QAAQ,GAAO,CAAC;IAClD,CAAC;IACD,OAAO,CACL,KAAC,wBAAwB,IACvB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,YAElB,eAAK,SAAS,EAAC,qBAAqB,aACjC,YAAY,IAAI,CACf,iBACE,SAAS,EAAE,EAAE,CACX,4FAA4F,EAC5F,EAAE,mBAAmB,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAC9C,EACD,OAAO,EAAE,EAAE,aAEV,KAAK,EACL,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAChB,CACT,EACA,QAAQ,EACR,YAAY,IAAI,cAAc,IAAI,CACjC,eACE,SAAS,EAAE,EAAE,CAAC,2CAA2C,EAAE,EAAE,mBAAmB,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,YAExG,WAAW,GACP,CACR,EACA,MAAM,EACN,IAAI,IACD,GACmB,CAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/FieldTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { FormProps } from '@rjsf/core';
|
|
3
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
4
|
+
export declare function generateForm<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): ComponentType<FormProps<T, S, F>>;
|
|
5
|
+
declare const _default: ComponentType<FormProps<any, RJSFSchema, any>>;
|
|
6
|
+
export default _default;
|
package/lib/Form/Form.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/Form/Form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAa,SAAS,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,YAAY;IAK1B,OAAO,SAAS,CAAU,aAAa,EAAW,CAAC,CAAC;AACtD,CAAC;AAED,eAAe,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GridTemplateProps } from '@rjsf/utils';
|
|
2
|
+
/** Renders a `GridTemplate` for mui, which is expecting the column sizing information coming in via the
|
|
3
|
+
* extra props provided by the caller, which are spread directly on the `Grid2`.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The GridTemplateProps, including the extra props containing the mui grid positioning details
|
|
6
|
+
*/
|
|
7
|
+
export default function GridTemplate(props: GridTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../lib/utils.js';
|
|
3
|
+
/** Renders a `GridTemplate` for mui, which is expecting the column sizing information coming in via the
|
|
4
|
+
* extra props provided by the caller, which are spread directly on the `Grid2`.
|
|
5
|
+
*
|
|
6
|
+
* @param props - The GridTemplateProps, including the extra props containing the mui grid positioning details
|
|
7
|
+
*/
|
|
8
|
+
export default function GridTemplate(props) {
|
|
9
|
+
const { children, column, className, ...rest } = props;
|
|
10
|
+
return (_jsx("div", { className: cn('grid gap-2', className), ...rest, children: children }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=GridTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridTemplate.js","sourceRoot":"","sources":["../../src/GridTemplate/GridTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAwB;IAC3D,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACvD,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,KAAM,IAAI,YAClD,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/GridTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
import { ButtonProps } from '../components/ui/button.js';
|
|
3
|
+
/** Base button component that renders a Shadcn button with an icon for RJSF form actions.
|
|
4
|
+
* This component serves as the foundation for other specialized buttons used in array operations.
|
|
5
|
+
* It combines RJSF's IconButtonProps with Shadcn's ButtonProps to provide a consistent styling
|
|
6
|
+
* and behavior across the form.
|
|
7
|
+
*
|
|
8
|
+
* @param props - The combined props from RJSF IconButtonProps and Shadcn ButtonProps, including icon and event handlers
|
|
9
|
+
*/
|
|
10
|
+
export default function IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F> & ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
/** Renders a copy button for RJSF array fields that allows users to duplicate array items.
|
|
12
|
+
* The button includes a copy icon and uses the RJSF translation system for the tooltip text.
|
|
13
|
+
* This is used within ArrayField to provide item duplication functionality.
|
|
14
|
+
*
|
|
15
|
+
* @param props - The RJSF icon button properties, including registry for translations and event handlers
|
|
16
|
+
*/
|
|
17
|
+
export declare function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/** Renders a move down button for RJSF array fields that allows reordering of array items.
|
|
19
|
+
* The button includes a chevron-down icon and uses the RJSF translation system for the tooltip text.
|
|
20
|
+
* This is used within ArrayField to allow moving items to a lower index in the array.
|
|
21
|
+
*
|
|
22
|
+
* @param props - The RJSF icon button properties, including registry for translations and event handlers
|
|
23
|
+
*/
|
|
24
|
+
export declare function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/** Renders a move up button for RJSF array fields that allows reordering of array items.
|
|
26
|
+
* The button includes a chevron-up icon and uses the RJSF translation system for the tooltip text.
|
|
27
|
+
* This is used within ArrayField to allow moving items to a higher index in the array.
|
|
28
|
+
*
|
|
29
|
+
* @param props - The RJSF icon button properties, including registry for translations and event handlers
|
|
30
|
+
*/
|
|
31
|
+
export declare function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
/** Renders a remove button for RJSF array fields that allows deletion of array items.
|
|
33
|
+
* The button includes a trash icon and uses the RJSF translation system for the tooltip text.
|
|
34
|
+
* It has special styling with destructive colors to indicate its dangerous action.
|
|
35
|
+
* This is used within ArrayField to provide item removal functionality.
|
|
36
|
+
*
|
|
37
|
+
* @param props - The RJSF icon button properties, including registry for translations and event handlers
|
|
38
|
+
*/
|
|
39
|
+
export declare function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TranslatableString } from '@rjsf/utils';
|
|
3
|
+
import { ChevronDown, ChevronUp, Copy, Trash2 } from 'lucide-react';
|
|
4
|
+
import { Button } from '../components/ui/button.js';
|
|
5
|
+
/** Base button component that renders a Shadcn button with an icon for RJSF form actions.
|
|
6
|
+
* This component serves as the foundation for other specialized buttons used in array operations.
|
|
7
|
+
* It combines RJSF's IconButtonProps with Shadcn's ButtonProps to provide a consistent styling
|
|
8
|
+
* and behavior across the form.
|
|
9
|
+
*
|
|
10
|
+
* @param props - The combined props from RJSF IconButtonProps and Shadcn ButtonProps, including icon and event handlers
|
|
11
|
+
*/
|
|
12
|
+
export default function IconButton(props) {
|
|
13
|
+
const { icon, iconType, className, uiSchema, registry, ...otherProps } = props;
|
|
14
|
+
return (_jsx(Button, { size: 'icon', variant: 'outline', className: className, ...otherProps, type: 'button', children: icon }));
|
|
15
|
+
}
|
|
16
|
+
/** Renders a copy button for RJSF array fields that allows users to duplicate array items.
|
|
17
|
+
* The button includes a copy icon and uses the RJSF translation system for the tooltip text.
|
|
18
|
+
* This is used within ArrayField to provide item duplication functionality.
|
|
19
|
+
*
|
|
20
|
+
* @param props - The RJSF icon button properties, including registry for translations and event handlers
|
|
21
|
+
*/
|
|
22
|
+
export function CopyButton(props) {
|
|
23
|
+
const { registry: { translateString }, } = props;
|
|
24
|
+
return (_jsx(IconButton, { title: translateString(TranslatableString.CopyButton), ...props, icon: _jsx(Copy, { className: 'h-4 w-4' }) }));
|
|
25
|
+
}
|
|
26
|
+
/** Renders a move down button for RJSF array fields that allows reordering of array items.
|
|
27
|
+
* The button includes a chevron-down icon and uses the RJSF translation system for the tooltip text.
|
|
28
|
+
* This is used within ArrayField to allow moving items to a lower index in the array.
|
|
29
|
+
*
|
|
30
|
+
* @param props - The RJSF icon button properties, including registry for translations and event handlers
|
|
31
|
+
*/
|
|
32
|
+
export function MoveDownButton(props) {
|
|
33
|
+
const { registry: { translateString }, } = props;
|
|
34
|
+
return (_jsx(IconButton, { title: translateString(TranslatableString.MoveDownButton), ...props, icon: _jsx(ChevronDown, { className: 'h-4 w-4' }) }));
|
|
35
|
+
}
|
|
36
|
+
/** Renders a move up button for RJSF array fields that allows reordering of array items.
|
|
37
|
+
* The button includes a chevron-up icon and uses the RJSF translation system for the tooltip text.
|
|
38
|
+
* This is used within ArrayField to allow moving items to a higher index in the array.
|
|
39
|
+
*
|
|
40
|
+
* @param props - The RJSF icon button properties, including registry for translations and event handlers
|
|
41
|
+
*/
|
|
42
|
+
export function MoveUpButton(props) {
|
|
43
|
+
const { registry: { translateString }, } = props;
|
|
44
|
+
return (_jsx(IconButton, { title: translateString(TranslatableString.MoveUpButton), ...props, icon: _jsx(ChevronUp, { className: 'h-4 w-4' }) }));
|
|
45
|
+
}
|
|
46
|
+
/** Renders a remove button for RJSF array fields that allows deletion of array items.
|
|
47
|
+
* The button includes a trash icon and uses the RJSF translation system for the tooltip text.
|
|
48
|
+
* It has special styling with destructive colors to indicate its dangerous action.
|
|
49
|
+
* This is used within ArrayField to provide item removal functionality.
|
|
50
|
+
*
|
|
51
|
+
* @param props - The RJSF icon button properties, including registry for translations and event handlers
|
|
52
|
+
*/
|
|
53
|
+
export function RemoveButton(props) {
|
|
54
|
+
const { registry: { translateString }, } = props;
|
|
55
|
+
return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton), ...props, className: 'border-destructive', icon: _jsx(Trash2, { className: 'h-4 w-4 stroke-destructive' }) }));
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../src/IconButton/IconButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,KAA6C;IAE7C,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC/E,OAAO,CACL,KAAC,MAAM,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,SAAS,EAAC,SAAS,EAAE,SAAS,KAAM,UAAU,EAAE,IAAI,EAAC,QAAQ,YACtF,IAAI,GACE,CACV,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CACxB,KAA+B;IAE/B,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IAAC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,KAAM,KAAK,EAAE,IAAI,EAAE,KAAC,IAAI,IAAC,SAAS,EAAC,SAAS,GAAG,GAAI,CACrH,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,KAA+B;IAE/B,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,cAAc,CAAC,KACrD,KAAK,EACT,IAAI,EAAE,KAAC,WAAW,IAAC,SAAS,EAAC,SAAS,GAAG,GACzC,CACH,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,KAA+B;IAE/B,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,YAAY,CAAC,KACnD,KAAK,EACT,IAAI,EAAE,KAAC,SAAS,IAAC,SAAS,EAAC,SAAS,GAAG,GACvC,CACH,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,KAA+B;IAE/B,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,YAAY,CAAC,KACnD,KAAK,EACT,SAAS,EAAE,oBAAoB,EAC/B,IAAI,EAAE,KAAC,MAAM,IAAC,SAAS,EAAC,4BAA4B,GAAG,GACvD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/IconButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormContextType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
|
|
3
|
+
* title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
|
|
4
|
+
* the properties.
|
|
5
|
+
*
|
|
6
|
+
* @param props - The `ObjectFieldTemplateProps` for this component
|
|
7
|
+
*/
|
|
8
|
+
export default function ObjectFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ description, title, properties, required, uiSchema, idSchema, schema, formData, onAddClick, disabled, readonly, registry, }: ObjectFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { buttonId, canExpand, descriptionId, getTemplate, getUiOptions, titleId, } from '@rjsf/utils';
|
|
3
|
+
/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
|
|
4
|
+
* title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
|
|
5
|
+
* the properties.
|
|
6
|
+
*
|
|
7
|
+
* @param props - The `ObjectFieldTemplateProps` for this component
|
|
8
|
+
*/
|
|
9
|
+
export default function ObjectFieldTemplate({ description, title, properties, required, uiSchema, idSchema, schema, formData, onAddClick, disabled, readonly, registry, }) {
|
|
10
|
+
const uiOptions = getUiOptions(uiSchema);
|
|
11
|
+
const TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, uiOptions);
|
|
12
|
+
const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, uiOptions);
|
|
13
|
+
// Button templates are not overridden in the uiSchema
|
|
14
|
+
const { ButtonTemplates: { AddButton }, } = registry.templates;
|
|
15
|
+
return (_jsxs(_Fragment, { children: [title && (_jsx(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry })), description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(idSchema), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsxs("div", { className: 'flex flex-col gap-2', children: [properties.map((element, index) => (_jsx("div", { className: `${element.hidden ? 'hidden' : ''} flex`, children: _jsxs("div", { className: 'w-full', children: [" ", element.content] }) }, index))), canExpand(schema, uiSchema, formData) ? (_jsx(AddButton, { id: buttonId(idSchema, 'add'), onClick: onAddClick(schema), disabled: disabled || readonly, className: 'rjsf-object-property-expand', uiSchema: uiSchema, registry: registry })) : null] })] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ObjectFieldTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectFieldTemplate.js","sourceRoot":"","sources":["../../src/ObjectFieldTemplate/ObjectFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EAEb,WAAW,EACX,YAAY,EAIZ,OAAO,GACR,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAIzC,EACA,WAAW,EACX,KAAK,EACL,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,GAC0B;IAClC,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,kBAAkB,GAAG,WAAW,CAAgC,oBAAoB,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACjH,MAAM,wBAAwB,GAAG,WAAW,CAC1C,0BAA0B,EAC1B,QAAQ,EACR,SAAS,CACV,CAAC;IACF,sDAAsD;IACtD,MAAM,EACJ,eAAe,EAAE,EAAE,SAAS,EAAE,GAC/B,GAAG,QAAQ,CAAC,SAAS,CAAC;IACvB,OAAO,CACL,8BACG,KAAK,IAAI,CACR,KAAC,kBAAkB,IACjB,EAAE,EAAE,OAAO,CAAI,QAAQ,CAAC,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,EACA,WAAW,IAAI,CACd,KAAC,wBAAwB,IACvB,EAAE,EAAE,aAAa,CAAI,QAAQ,CAAC,EAC9B,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,EACD,eAAK,SAAS,EAAC,qBAAqB,aACjC,UAAU,CAAC,GAAG,CAAC,CAAC,OAAY,EAAE,KAAa,EAAE,EAAE,CAAC,CAC/C,cAAiB,SAAS,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,YAClE,eAAK,SAAS,EAAC,QAAQ,kBAAG,OAAO,CAAC,OAAO,IAAO,IADxC,KAAK,CAET,CACP,CAAC,EACD,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CACvC,KAAC,SAAS,IACR,EAAE,EAAE,QAAQ,CAAI,QAAQ,EAAE,KAAK,CAAC,EAChC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,EAC3B,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,SAAS,EAAC,6BAA6B,EACvC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,IACL,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ObjectFieldTemplate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
2
|
+
/** The `RadioWidget` is a widget for rendering a radio group.
|
|
3
|
+
* It is typically used with a string property constrained with enum options.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `WidgetProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, options, value, required, disabled, readonly, onChange, onBlur, onFocus, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ariaDescribedByIds, enumOptionsIsSelected, enumOptionsValueForIndex, optionId, } from '@rjsf/utils';
|
|
3
|
+
import { Label } from '../components/ui/label.js';
|
|
4
|
+
import { RadioGroup, RadioGroupItem } from '../components/ui/radio-group.js';
|
|
5
|
+
import { cn } from '../lib/utils.js';
|
|
6
|
+
/** The `RadioWidget` is a widget for rendering a radio group.
|
|
7
|
+
* It is typically used with a string property constrained with enum options.
|
|
8
|
+
*
|
|
9
|
+
* @param props - The `WidgetProps` for this component
|
|
10
|
+
*/
|
|
11
|
+
export default function RadioWidget({ id, options, value, required, disabled, readonly, onChange, onBlur, onFocus, }) {
|
|
12
|
+
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
13
|
+
const _onChange = (value) => onChange(enumOptionsValueForIndex(value, enumOptions, emptyValue));
|
|
14
|
+
const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
|
|
15
|
+
const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
|
|
16
|
+
const inline = Boolean(options && options.inline);
|
|
17
|
+
return (_jsx("div", { className: 'mb-0', children: _jsx(RadioGroup, { defaultValue: value === null || value === void 0 ? void 0 : value.toString(), required: required, disabled: disabled || readonly, onValueChange: (e) => {
|
|
18
|
+
_onChange(e);
|
|
19
|
+
}, onBlur: _onBlur, onFocus: _onFocus, "aria-describedby": ariaDescribedByIds(id), orientation: inline ? 'horizontal' : 'vertical', className: cn('flex flex-wrap', { 'flex-col': !inline }), children: Array.isArray(enumOptions) &&
|
|
20
|
+
enumOptions.map((option, index) => {
|
|
21
|
+
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
22
|
+
const checked = enumOptionsIsSelected(option.value, value);
|
|
23
|
+
return (_jsxs("div", { className: 'flex items-center gap-2', children: [_jsx(RadioGroupItem, { checked: checked, value: index.toString(), id: optionId(id, index), disabled: itemDisabled }), _jsx(Label, { className: 'leading-tight', children: option.label })] }, optionId(id, index)));
|
|
24
|
+
}) }) }));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=RadioWidget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioWidget.js","sourceRoot":"","sources":["../../src/RadioWidget/RadioWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EAExB,QAAQ,GAIT,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAoF,EACrH,EAAE,EACF,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,OAAO,GACc;IACrB,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAE1D,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAI,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IAC3G,MAAM,OAAO,GAAG,CAAC,EAAE,MAAM,EAAgC,EAAE,EAAE,CAC3D,MAAM,CAAC,EAAE,EAAE,wBAAwB,CAAI,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IAC3F,MAAM,QAAQ,GAAG,CAAC,EAAE,MAAM,EAAgC,EAAE,EAAE,CAC5D,OAAO,CAAC,EAAE,EAAE,wBAAwB,CAAI,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IAE5F,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAElD,OAAO,CACL,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,UAAU,IACT,YAAY,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,EAAE,EAC/B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,aAAa,EAAE,CAAC,CAAS,EAAE,EAAE;gBAC3B,SAAS,CAAC,CAAC,CAAC,CAAC;YACf,CAAC,EACD,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,sBACC,kBAAkB,CAAI,EAAE,CAAC,EAC3C,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,EAC/C,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,CAAC,YAEvD,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;gBACzB,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBAChC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;oBAC9F,MAAM,OAAO,GAAG,qBAAqB,CAAI,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;oBAC9D,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aACtC,KAAC,cAAc,IACb,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EACvB,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,EACvB,QAAQ,EAAE,YAAY,GACtB,EACF,KAAC,KAAK,IAAC,SAAS,EAAC,eAAe,YAAE,MAAM,CAAC,KAAK,GAAS,KAPX,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,CAQ3D,CACP,CAAC;gBACJ,CAAC,CAAC,GACO,GACT,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/RadioWidget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
2
|
+
/**
|
|
3
|
+
* A range widget component that renders a slider for number input
|
|
4
|
+
* @param {object} props - The widget properties
|
|
5
|
+
* @param {number} props.value - The current value of the range
|
|
6
|
+
* @param {boolean} props.readonly - Whether the widget is read-only
|
|
7
|
+
* @param {boolean} props.disabled - Whether the widget is disabled
|
|
8
|
+
* @param {object} props.options - Additional options for the widget
|
|
9
|
+
* @param props.schema - The JSON schema for this field
|
|
10
|
+
* @param {(value: any) => void} props.onChange - Callback for when the value changes
|
|
11
|
+
* @param {string} props.label - The label for the range input
|
|
12
|
+
* @param {string} props.id - The unique identifier for the widget
|
|
13
|
+
* @returns {JSX.Element} The rendered range widget
|
|
14
|
+
*/
|
|
15
|
+
export default function RangeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ value, readonly, disabled, options, schema, onChange, label, id, }: WidgetProps<T, S, F>): JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ariaDescribedByIds, rangeSpec } from '@rjsf/utils';
|
|
3
|
+
import _pick from 'lodash/pick';
|
|
4
|
+
import { Slider } from '../components/ui/slider.js';
|
|
5
|
+
const allowedProps = [
|
|
6
|
+
'name',
|
|
7
|
+
'min',
|
|
8
|
+
'max',
|
|
9
|
+
'step',
|
|
10
|
+
'orientation',
|
|
11
|
+
'disabled',
|
|
12
|
+
'defaultValue',
|
|
13
|
+
'value',
|
|
14
|
+
'onValueChange',
|
|
15
|
+
'className',
|
|
16
|
+
'dir',
|
|
17
|
+
'inverted',
|
|
18
|
+
'minStepsBetweenThumbs',
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* A range widget component that renders a slider for number input
|
|
22
|
+
* @param {object} props - The widget properties
|
|
23
|
+
* @param {number} props.value - The current value of the range
|
|
24
|
+
* @param {boolean} props.readonly - Whether the widget is read-only
|
|
25
|
+
* @param {boolean} props.disabled - Whether the widget is disabled
|
|
26
|
+
* @param {object} props.options - Additional options for the widget
|
|
27
|
+
* @param props.schema - The JSON schema for this field
|
|
28
|
+
* @param {(value: any) => void} props.onChange - Callback for when the value changes
|
|
29
|
+
* @param {string} props.label - The label for the range input
|
|
30
|
+
* @param {string} props.id - The unique identifier for the widget
|
|
31
|
+
* @returns {JSX.Element} The rendered range widget
|
|
32
|
+
*/
|
|
33
|
+
export default function RangeWidget({ value, readonly, disabled, options, schema, onChange, label, id, }) {
|
|
34
|
+
const _onChange = (value) => onChange(value[0]);
|
|
35
|
+
const sliderProps = { value, label, id, ...rangeSpec(schema) };
|
|
36
|
+
const uiProps = { id, ..._pick(options.props || {}, allowedProps) };
|
|
37
|
+
return (_jsxs(_Fragment, { children: [_jsx(Slider, { disabled: disabled || readonly, min: sliderProps.min, max: sliderProps.max, step: sliderProps.step, value: [value], onValueChange: _onChange, ...uiProps, "aria-describedby": ariaDescribedByIds(id) }), value] }));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=RangeWidget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangeWidget.js","sourceRoot":"","sources":["../../src/RangeWidget/RangeWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAmB,SAAS,EAA6C,MAAM,aAAa,CAAC;AACxH,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,YAAY,GAAG;IACnB,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,aAAa;IACb,UAAU;IACV,cAAc;IACd,OAAO;IACP,eAAe;IACf,WAAW;IACX,KAAK;IACL,UAAU;IACV,uBAAuB;CACxB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAoF,EACrH,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,EACL,EAAE,GACmB;IACrB,MAAM,SAAS,GAAG,CAAC,KAAe,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1D,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,SAAS,CAAI,MAAM,CAAC,EAAE,CAAC;IAClE,MAAM,OAAO,GAAG,EAAE,EAAE,EAAE,GAAG,KAAK,CAAE,OAAO,CAAC,KAAgB,IAAI,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC;IAChF,OAAO,CACL,8BACE,KAAC,MAAM,IACL,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,GAAG,EAAE,WAAW,CAAC,GAAG,EACpB,GAAG,EAAE,WAAW,CAAC,GAAG,EACpB,IAAI,EAAE,WAAW,CAAC,IAAI,EACtB,KAAK,EAAE,CAAC,KAAe,CAAC,EACxB,aAAa,EAAE,SAAS,KACpB,OAAO,sBACO,kBAAkB,CAAI,EAAE,CAAC,GAC3C,EACD,KAAK,IACL,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/RangeWidget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
2
|
+
/** The `SelectWidget` is a widget for rendering dropdowns.
|
|
3
|
+
* It is typically used with string properties constrained with enum options.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `WidgetProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function SelectWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ id, options, required, disabled, readonly, value, multiple, autofocus, onChange, onBlur, onFocus, defaultValue, placeholder, rawErrors, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|