@rjsf/mantine 6.0.0-beta.14
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 +153 -0
- package/dist/index.js +1918 -0
- package/dist/index.js.map +7 -0
- package/dist/mantine.esm.js +1967 -0
- package/dist/mantine.esm.js.map +7 -0
- package/dist/mantine.umd.js +1714 -0
- package/lib/Form/index.d.ts +6 -0
- package/lib/Form/index.js +7 -0
- package/lib/Form/index.js.map +1 -0
- package/lib/Theme/index.d.ts +5 -0
- package/lib/Theme/index.js +10 -0
- package/lib/Theme/index.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/templates/ArrayFieldItemTemplate.d.ts +6 -0
- package/lib/templates/ArrayFieldItemTemplate.js +14 -0
- package/lib/templates/ArrayFieldItemTemplate.js.map +1 -0
- package/lib/templates/ArrayFieldTemplate.d.ts +6 -0
- package/lib/templates/ArrayFieldTemplate.js +20 -0
- package/lib/templates/ArrayFieldTemplate.js.map +1 -0
- package/lib/templates/ArrayFieldTitleTemplate.d.ts +7 -0
- package/lib/templates/ArrayFieldTitleTemplate.js +18 -0
- package/lib/templates/ArrayFieldTitleTemplate.js.map +1 -0
- package/lib/templates/BaseInputTemplate.d.ts +8 -0
- package/lib/templates/BaseInputTemplate.js +36 -0
- package/lib/templates/BaseInputTemplate.js.map +1 -0
- package/lib/templates/ButtonTemplates/AddButton.d.ts +4 -0
- package/lib/templates/ButtonTemplates/AddButton.js +11 -0
- package/lib/templates/ButtonTemplates/AddButton.js.map +1 -0
- package/lib/templates/ButtonTemplates/IconButton.d.ts +8 -0
- package/lib/templates/ButtonTemplates/IconButton.js +25 -0
- package/lib/templates/ButtonTemplates/IconButton.js.map +1 -0
- package/lib/templates/ButtonTemplates/SubmitButton.d.ts +4 -0
- package/lib/templates/ButtonTemplates/SubmitButton.js +13 -0
- package/lib/templates/ButtonTemplates/SubmitButton.js.map +1 -0
- package/lib/templates/ButtonTemplates/index.d.ts +3 -0
- package/lib/templates/ButtonTemplates/index.js +15 -0
- package/lib/templates/ButtonTemplates/index.js.map +1 -0
- package/lib/templates/DescriptionField.d.ts +6 -0
- package/lib/templates/DescriptionField.js +15 -0
- package/lib/templates/DescriptionField.js.map +1 -0
- package/lib/templates/ErrorList.d.ts +6 -0
- package/lib/templates/ErrorList.js +13 -0
- package/lib/templates/ErrorList.js.map +1 -0
- package/lib/templates/FieldErrorTemplate.d.ts +6 -0
- package/lib/templates/FieldErrorTemplate.js +16 -0
- package/lib/templates/FieldErrorTemplate.js.map +1 -0
- package/lib/templates/FieldHelpTemplate.d.ts +6 -0
- package/lib/templates/FieldHelpTemplate.js +13 -0
- package/lib/templates/FieldHelpTemplate.js.map +1 -0
- package/lib/templates/FieldTemplate.d.ts +7 -0
- package/lib/templates/FieldTemplate.js +18 -0
- package/lib/templates/FieldTemplate.js.map +1 -0
- package/lib/templates/GridTemplate.d.ts +7 -0
- package/lib/templates/GridTemplate.js +20 -0
- package/lib/templates/GridTemplate.js.map +1 -0
- package/lib/templates/MultiSchemaFieldTemplate.d.ts +2 -0
- package/lib/templates/MultiSchemaFieldTemplate.js +6 -0
- package/lib/templates/MultiSchemaFieldTemplate.js.map +1 -0
- package/lib/templates/ObjectFieldTemplate.d.ts +8 -0
- package/lib/templates/ObjectFieldTemplate.js +24 -0
- package/lib/templates/ObjectFieldTemplate.js.map +1 -0
- package/lib/templates/TitleField.d.ts +6 -0
- package/lib/templates/TitleField.js +11 -0
- package/lib/templates/TitleField.js.map +1 -0
- package/lib/templates/WrapIfAdditionalTemplate.d.ts +7 -0
- package/lib/templates/WrapIfAdditionalTemplate.js +29 -0
- package/lib/templates/WrapIfAdditionalTemplate.js.map +1 -0
- package/lib/templates/icons.d.ts +11 -0
- package/lib/templates/icons.js +20 -0
- package/lib/templates/icons.js.map +1 -0
- package/lib/templates/index.d.ts +4 -0
- package/lib/templates/index.js +36 -0
- package/lib/templates/index.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/utils.d.ts +2 -0
- package/lib/utils.js +35 -0
- package/lib/utils.js.map +1 -0
- package/lib/widgets/CheckboxWidget.d.ts +8 -0
- package/lib/widgets/CheckboxWidget.js +33 -0
- package/lib/widgets/CheckboxWidget.js.map +1 -0
- package/lib/widgets/CheckboxesWidget.d.ts +7 -0
- package/lib/widgets/CheckboxesWidget.js +33 -0
- package/lib/widgets/CheckboxesWidget.js.map +1 -0
- package/lib/widgets/ColorWidget.d.ts +6 -0
- package/lib/widgets/ColorWidget.js +28 -0
- package/lib/widgets/ColorWidget.js.map +1 -0
- package/lib/widgets/DateTime/AltDateTimeWidget.d.ts +13 -0
- package/lib/widgets/DateTime/AltDateTimeWidget.js +16 -0
- package/lib/widgets/DateTime/AltDateTimeWidget.js.map +1 -0
- package/lib/widgets/DateTime/AltDateWidget.d.ts +11 -0
- package/lib/widgets/DateTime/AltDateWidget.js +51 -0
- package/lib/widgets/DateTime/AltDateWidget.js.map +1 -0
- package/lib/widgets/DateTime/DateTimeInput.d.ts +5 -0
- package/lib/widgets/DateTime/DateTimeInput.js +39 -0
- package/lib/widgets/DateTime/DateTimeInput.js.map +1 -0
- package/lib/widgets/DateTime/DateTimeWidget.d.ts +6 -0
- package/lib/widgets/DateTime/DateTimeWidget.js +11 -0
- package/lib/widgets/DateTime/DateTimeWidget.js.map +1 -0
- package/lib/widgets/DateTime/DateWidget.d.ts +6 -0
- package/lib/widgets/DateTime/DateWidget.js +11 -0
- package/lib/widgets/DateTime/DateWidget.js.map +1 -0
- package/lib/widgets/DateTime/TimeWidget.d.ts +6 -0
- package/lib/widgets/DateTime/TimeWidget.js +27 -0
- package/lib/widgets/DateTime/TimeWidget.js.map +1 -0
- package/lib/widgets/DateTime/index.d.ts +5 -0
- package/lib/widgets/DateTime/index.js +6 -0
- package/lib/widgets/DateTime/index.js.map +1 -0
- package/lib/widgets/FileWidget.d.ts +7 -0
- package/lib/widgets/FileWidget.js +106 -0
- package/lib/widgets/FileWidget.js.map +1 -0
- package/lib/widgets/PasswordWidget.d.ts +7 -0
- package/lib/widgets/PasswordWidget.js +30 -0
- package/lib/widgets/PasswordWidget.js.map +1 -0
- package/lib/widgets/RadioWidget.d.ts +7 -0
- package/lib/widgets/RadioWidget.js +33 -0
- package/lib/widgets/RadioWidget.js.map +1 -0
- package/lib/widgets/RangeWidget.d.ts +7 -0
- package/lib/widgets/RangeWidget.js +34 -0
- package/lib/widgets/RangeWidget.js.map +1 -0
- package/lib/widgets/SelectWidget.d.ts +7 -0
- package/lib/widgets/SelectWidget.js +45 -0
- package/lib/widgets/SelectWidget.js.map +1 -0
- package/lib/widgets/TextareaWidget.d.ts +7 -0
- package/lib/widgets/TextareaWidget.js +30 -0
- package/lib/widgets/TextareaWidget.js.map +1 -0
- package/lib/widgets/index.d.ts +4 -0
- package/lib/widgets/index.js +34 -0
- package/lib/widgets/index.js.map +1 -0
- package/package.json +110 -0
- package/src/Form/index.ts +15 -0
- package/src/Theme/index.ts +18 -0
- package/src/index.ts +8 -0
- package/src/templates/ArrayFieldItemTemplate.tsx +40 -0
- package/src/templates/ArrayFieldTemplate.tsx +103 -0
- package/src/templates/ArrayFieldTitleTemplate.tsx +33 -0
- package/src/templates/BaseInputTemplate.tsx +134 -0
- package/src/templates/ButtonTemplates/AddButton.tsx +17 -0
- package/src/templates/ButtonTemplates/IconButton.tsx +87 -0
- package/src/templates/ButtonTemplates/SubmitButton.tsx +20 -0
- package/src/templates/ButtonTemplates/index.ts +21 -0
- package/src/templates/DescriptionField.tsx +24 -0
- package/src/templates/ErrorList.tsx +36 -0
- package/src/templates/FieldErrorTemplate.tsx +27 -0
- package/src/templates/FieldHelpTemplate.tsx +22 -0
- package/src/templates/FieldTemplate.tsx +66 -0
- package/src/templates/GridTemplate.tsx +30 -0
- package/src/templates/MultiSchemaFieldTemplate.tsx +15 -0
- package/src/templates/ObjectFieldTemplate.tsx +104 -0
- package/src/templates/TitleField.tsx +17 -0
- package/src/templates/WrapIfAdditionalTemplate.tsx +99 -0
- package/src/templates/icons.tsx +141 -0
- package/src/templates/index.ts +43 -0
- package/src/tsconfig.json +23 -0
- package/src/utils.ts +37 -0
- package/src/widgets/CheckboxWidget.tsx +110 -0
- package/src/widgets/CheckboxesWidget.tsx +112 -0
- package/src/widgets/ColorWidget.tsx +85 -0
- package/src/widgets/DateTime/AltDateTimeWidget.tsx +22 -0
- package/src/widgets/DateTime/AltDateWidget.tsx +139 -0
- package/src/widgets/DateTime/DateTimeInput.tsx +97 -0
- package/src/widgets/DateTime/DateTimeWidget.tsx +24 -0
- package/src/widgets/DateTime/DateWidget.tsx +22 -0
- package/src/widgets/DateTime/TimeWidget.tsx +83 -0
- package/src/widgets/DateTime/index.ts +5 -0
- package/src/widgets/FileWidget.tsx +176 -0
- package/src/widgets/PasswordWidget.tsx +88 -0
- package/src/widgets/RadioWidget.tsx +103 -0
- package/src/widgets/RangeWidget.tsx +95 -0
- package/src/widgets/SelectWidget.tsx +109 -0
- package/src/widgets/TextareaWidget.tsx +87 -0
- package/src/widgets/index.ts +42 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `TitleField` is the template to use to render the title of a field
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `TitleFieldProps` for this component
|
|
5
|
+
*/
|
|
6
|
+
export default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: TitleFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Title } from '@mantine/core';
|
|
3
|
+
/** The `TitleField` is the template to use to render the title of a field
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `TitleFieldProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function TitleField(props) {
|
|
8
|
+
const { id, title } = props;
|
|
9
|
+
return title ? (_jsx(Title, { id: id, order: 3, fw: 'normal', children: title })) : null;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=TitleField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleField.js","sourceRoot":"","sources":["../../src/templates/TitleField.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,KAA+B;IAE/B,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC5B,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,KAAK,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAC,QAAQ,YACjC,KAAK,GACA,CACT,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema, WrapIfAdditionalTemplateProps } from '@rjsf/utils';
|
|
2
|
+
/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are
|
|
3
|
+
* part of an `additionalProperties` part of a schema.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `WrapIfAdditionalProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function WrapIfAdditionalTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: WrapIfAdditionalTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { ADDITIONAL_PROPERTY_FLAG, UI_OPTIONS_KEY, buttonId, TranslatableString, } from '@rjsf/utils';
|
|
4
|
+
import { Flex, Grid, TextInput } from '@mantine/core';
|
|
5
|
+
/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are
|
|
6
|
+
* part of an `additionalProperties` part of a schema.
|
|
7
|
+
*
|
|
8
|
+
* @param props - The `WrapIfAdditionalProps` for this component
|
|
9
|
+
*/
|
|
10
|
+
export default function WrapIfAdditionalTemplate(props) {
|
|
11
|
+
const { id, classNames, style, label, required, readonly, disabled, schema, uiSchema, onKeyChange, onDropPropertyClick, registry, children, } = props;
|
|
12
|
+
const { templates, translateString } = registry;
|
|
13
|
+
// Button templates are not overridden in the uiSchema
|
|
14
|
+
const { RemoveButton } = templates.ButtonTemplates;
|
|
15
|
+
const keyLabel = translateString(TranslatableString.KeyLabel, [label]);
|
|
16
|
+
const additional = ADDITIONAL_PROPERTY_FLAG in schema;
|
|
17
|
+
const handleBlur = useCallback(({ target }) => onKeyChange(target && target.value), [onKeyChange]);
|
|
18
|
+
if (!additional) {
|
|
19
|
+
return (_jsx("div", { className: classNames, style: style, children: children }));
|
|
20
|
+
}
|
|
21
|
+
// The `block` prop is not part of the `IconButtonProps` defined in the template, so put it into the uiSchema instead
|
|
22
|
+
const uiOptions = uiSchema ? uiSchema[UI_OPTIONS_KEY] : {};
|
|
23
|
+
const buttonUiOptions = {
|
|
24
|
+
...uiSchema,
|
|
25
|
+
[UI_OPTIONS_KEY]: { ...uiOptions, block: true },
|
|
26
|
+
};
|
|
27
|
+
return (_jsx("div", { className: classNames, style: style, children: _jsxs(Flex, { gap: 'xs', align: 'end', justify: 'center', children: [_jsxs(Grid, { w: '100%', align: 'center', children: [_jsx(Grid.Col, { span: 6, className: 'form-additional', children: _jsx("div", { className: 'form-group', children: _jsx(TextInput, { className: 'form-group', label: keyLabel, defaultValue: label, required: required, disabled: disabled || readonly, id: `${id}-key`, name: `${id}-key`, onBlur: !readonly ? handleBlur : undefined }) }) }), _jsx(Grid.Col, { span: 6, className: 'form-additional', children: children })] }), _jsx(RemoveButton, { id: buttonId(id, 'remove'), iconType: 'sm', className: 'rjsf-array-item-remove', disabled: disabled || readonly, onClick: onDropPropertyClick(label), uiSchema: buttonUiOptions, registry: registry })] }) }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=WrapIfAdditionalTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WrapIfAdditionalTemplate.js","sourceRoot":"","sources":["../../src/templates/WrapIfAdditionalTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,QAAQ,EAIR,kBAAkB,GAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAI9C,KAA6C;IAC7C,MAAM,EACJ,EAAE,EACF,UAAU,EACV,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IAChD,sDAAsD;IACtD,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC,eAAe,CAAC;IACnD,MAAM,QAAQ,GAAG,eAAe,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACvE,MAAM,UAAU,GAAG,wBAAwB,IAAI,MAAM,CAAC;IAEtD,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,EAAE,MAAM,EAAgC,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,EACjF,CAAC,WAAW,CAAC,CACd,CAAC;IAEF,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,O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AAwB,EAClC,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC,EACnC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,QAAQ,GAClB,IACG,GACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
interface IconProps extends ComponentPropsWithoutRef<'svg'> {
|
|
3
|
+
size?: number | string;
|
|
4
|
+
}
|
|
5
|
+
export declare function Plus({ size, style, ...others }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Copy({ size, style, ...others }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function ChevronDown({ size, style, ...others }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ChevronUp({ size, style, ...others }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function X({ size, style, ...others }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function ExclamationCircle({ size, style, ...others }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function Plus({ size, style, ...others }) {
|
|
3
|
+
return (_jsxs("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '24', height: '24', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: 'icon icon-tabler icons-tabler-outline icon-tabler-plus', style: { width: size, height: size, ...style }, ...others, children: [_jsx("path", { stroke: 'none', d: 'M0 0h24v24H0z', fill: 'none' }), _jsx("path", { d: 'M12 5l0 14' }), _jsx("path", { d: 'M5 12l14 0' })] }));
|
|
4
|
+
}
|
|
5
|
+
export function Copy({ size, style, ...others }) {
|
|
6
|
+
return (_jsxs("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '24', height: '24', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: 'icon icon-tabler icons-tabler-outline icon-tabler-copy', style: { width: size, height: size, ...style }, ...others, children: [_jsx("path", { stroke: 'none', d: 'M0 0h24v24H0z', fill: 'none' }), _jsx("path", { d: 'M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z' }), _jsx("path", { d: 'M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1' })] }));
|
|
7
|
+
}
|
|
8
|
+
export function ChevronDown({ size, style, ...others }) {
|
|
9
|
+
return (_jsxs("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '24', height: '24', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: 'icon icon-tabler icons-tabler-outline icon-tabler-chevron-down', style: { width: size, height: size, ...style }, ...others, children: [_jsx("path", { stroke: 'none', d: 'M0 0h24v24H0z', fill: 'none' }), _jsx("path", { d: 'M6 9l6 6l6 -6' })] }));
|
|
10
|
+
}
|
|
11
|
+
export function ChevronUp({ size, style, ...others }) {
|
|
12
|
+
return (_jsxs("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '24', height: '24', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: 'icon icon-tabler icons-tabler-outline icon-tabler-chevron-up', style: { width: size, height: size, ...style }, ...others, children: [_jsx("path", { stroke: 'none', d: 'M0 0h24v24H0z', fill: 'none' }), _jsx("path", { d: 'M6 15l6 -6l6 6' })] }));
|
|
13
|
+
}
|
|
14
|
+
export function X({ size, style, ...others }) {
|
|
15
|
+
return (_jsxs("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '24', height: '24', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: 'icon icon-tabler icons-tabler-outline icon-tabler-x', style: { width: size, height: size, ...style }, ...others, children: [_jsx("path", { stroke: 'none', d: 'M0 0h24v24H0z', fill: 'none' }), _jsx("path", { d: 'M18 6l-12 12' }), _jsx("path", { d: 'M6 6l12 12' })] }));
|
|
16
|
+
}
|
|
17
|
+
export function ExclamationCircle({ size, style, ...others }) {
|
|
18
|
+
return (_jsxs("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '24', height: '24', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: 'icon icon-tabler icons-tabler-outline icon-tabler-exclamation-circle', style: { width: size, height: size, ...style }, ...others, children: [_jsx("path", { d: 'M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0' }), _jsx("path", { d: 'M12 9v4' }), _jsx("path", { d: 'M12 16v.01' })] }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/templates/icons.tsx"],"names":[],"mappings":";AAMA,MAAM,UAAU,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,EAAa;IACxD,OAAO,CACL,eACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,SAAS,EAAC,wDAAwD,EA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AI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,KAC1C,MAAM,aAEV,eAAM,MAAM,EAAC,MAAM,EAAC,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,EACpD,eAAM,CAAC,EAAC,cAAc,GAAG,EACzB,eAAM,CAAC,EAAC,YAAY,GAAG,IACnB,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,EAAa;IACrE,OAAO,CACL,eACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,SAAS,EAAC,sEAAsE,EAChF,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,KAC1C,MAAM,aAEV,eAAM,CAAC,EAAC,4CAA4C,GAAG,EACvD,eAAM,CAAC,EAAC,SAAS,GAAG,EACpB,eAAM,CAAC,EAAC,YAAY,GAAG,IACnB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';
|
|
2
|
+
export declare function generateTemplates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): Partial<TemplatesType<T, S, F>>;
|
|
3
|
+
declare const _default: Partial<TemplatesType<any, RJSFSchema, any>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import ArrayFieldItemTemplate from './ArrayFieldItemTemplate';
|
|
2
|
+
import ArrayFieldTemplate from './ArrayFieldTemplate';
|
|
3
|
+
import ArrayFieldTitleTemplate from './ArrayFieldTitleTemplate';
|
|
4
|
+
import BaseInputTemplate from './BaseInputTemplate';
|
|
5
|
+
import DescriptionField from './DescriptionField';
|
|
6
|
+
import ErrorList from './ErrorList';
|
|
7
|
+
import ButtonTemplates from './ButtonTemplates';
|
|
8
|
+
import FieldErrorTemplate from './FieldErrorTemplate';
|
|
9
|
+
import FieldTemplate from './FieldTemplate';
|
|
10
|
+
import FieldHelpTemplate from './FieldHelpTemplate';
|
|
11
|
+
import GridTemplate from './GridTemplate';
|
|
12
|
+
import ObjectFieldTemplate from './ObjectFieldTemplate';
|
|
13
|
+
import TitleField from './TitleField';
|
|
14
|
+
import WrapIfAdditionalTemplate from './WrapIfAdditionalTemplate';
|
|
15
|
+
import MultiSchemaFieldTemplate from './MultiSchemaFieldTemplate';
|
|
16
|
+
export function generateTemplates() {
|
|
17
|
+
return {
|
|
18
|
+
ArrayFieldItemTemplate,
|
|
19
|
+
ArrayFieldTemplate,
|
|
20
|
+
ArrayFieldTitleTemplate,
|
|
21
|
+
BaseInputTemplate,
|
|
22
|
+
ButtonTemplates: ButtonTemplates(),
|
|
23
|
+
DescriptionFieldTemplate: DescriptionField,
|
|
24
|
+
ErrorListTemplate: ErrorList,
|
|
25
|
+
FieldErrorTemplate,
|
|
26
|
+
FieldTemplate,
|
|
27
|
+
FieldHelpTemplate,
|
|
28
|
+
GridTemplate,
|
|
29
|
+
ObjectFieldTemplate,
|
|
30
|
+
TitleFieldTemplate: TitleField,
|
|
31
|
+
WrapIfAdditionalTemplate,
|
|
32
|
+
MultiSchemaFieldTemplate,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export default generateTemplates();
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,MAAM,UAAU,iBAAiB;IAK/B,OAAO;QACL,sBAAsB;QACtB,kBAAkB;QAClB,uBAAuB;QACvB,iBAAiB;QACjB,eAAe,EAAE,eAAe,EAAW;QAC3C,wBAAwB,EAAE,gBAAgB;QAC1C,iBAAiB,EAAE,SAAS;QAC5B,kBAAkB;QAClB,aAAa;QACb,iBAAiB;QACjB,YAAY;QACZ,mBAAmB;QACnB,kBAAkB,EAAE,UAAU;QAC9B,wBAAwB;QACxB,wBAAwB;KACzB,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,EAAE,CAAC"}
|