@nolwenture/formik-jsonschema-form 1.2.8 → 1.3.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.
@@ -11,7 +11,7 @@ exports.MultipleChoiceFieldContainer = (0, styled_components_1.default)(styledCo
11
11
  flex-wrap: wrap;
12
12
  justify-content: start;
13
13
  flex-direction: column;
14
- gap: ${(props) => props.theme.spacing.l};
14
+ gap: ${(props) => props.theme.spacing.s};
15
15
 
16
16
  &:has(input[readonly]) {
17
17
  flex-direction: column;
@@ -28,7 +28,9 @@ exports.ObjectFieldDownButton = (0, styled_components_1.styled)(exports.ObjectFi
28
28
  exports.ObjectFieldRemoveButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
29
29
  exports.ObjectFieldAddButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
30
30
  exports.ObjectFieldSectionWrapper = styled_components_1.styled.fieldset `
31
- padding: ${(props) => props.theme.spacing.s} ${(props) => props.theme.spacing.l} ${(props) => props.theme.spacing.s} ${(props) => props.theme.spacing.s};
31
+ padding: ${(props) => props.theme.spacing.s}
32
+ ${(props) => props.theme.spacing.l} ${(props) => props.theme.spacing.s}
33
+ ${(props) => props.theme.spacing.s};
32
34
  `;
33
35
  exports.ObjectFieldSectionTitle = styled_components_1.styled.legend `
34
36
  display: flex;
@@ -8,14 +8,15 @@ const common_1 = require("../../styles/common");
8
8
  exports.RadioFieldContainer = (0, styled_components_1.styled)(common_1.CommonCheckboxStyles) `
9
9
  color: ${(props) => props.theme.color.text.default};
10
10
  display: flex;
11
+ flex-direction: column;
11
12
  font-family: ${(props) => props.theme.typography.fontFamily.base};
12
- gap: ${(props) => props.theme.spacing.l};
13
+ gap: ${(props) => props.theme.spacing.s};
13
14
 
14
15
  &:has(input[readonly]) {
15
16
  flex-direction: column;
16
17
  gap: ${(props) => props.theme.spacing.xxs};
17
18
  }
18
-
19
+
19
20
  input[type="radio"] {
20
21
  -webkit-appearance: none;
21
22
  appearance: none;
@@ -68,10 +69,7 @@ exports.RadioFieldElement = styled_components_1.styled.label `
68
69
  pointer-events: none;
69
70
  }
70
71
  `;
71
- exports.RadioFieldInputElement = (0, styled_components_1.styled)(FieldInput_1.FieldInput) `
72
- margin: unset;
73
- margin-top: ${(props) => props.theme.spacing.xxs};
74
- `;
72
+ exports.RadioFieldInputElement = (0, styled_components_1.styled)(FieldInput_1.FieldInput) ``;
75
73
  exports.RadioFieldLabel = styled_components_1.styled.span `
76
74
  margin-left: ${(props) => props.theme.spacing.xs};
77
75
  line-height: ${(props) => props.theme.typography.lineHeight.small};
@@ -36,6 +36,6 @@ const CollapsibleObjectFieldTemplate = (props) => {
36
36
  const hide = collapsed;
37
37
  return ((0, jsx_runtime_1.jsxs)(Wrapper, { ...mergedWrapperProps, children: [(0, jsx_runtime_1.jsxs)(TitleInfoWrapper, { children: [title && ((0, jsx_runtime_1.jsx)(Toggle, { onClick: () => setCollapsed(!collapsed),
38
38
  //ariaExpanded={!hide}
39
- ariaLabel: ariaLabel ?? name, children: (0, jsx_runtime_1.jsxs)(Title, { ...titleProps, htmlFor: name, children: [title, props?.required && (0, jsx_runtime_1.jsx)(RequiredIndicator, {}), (0, jsx_runtime_1.jsx)(Icon, { children: hide ? collapsedIcon ?? "▸" : openIcon ?? "▾" })] }) })), info && (0, jsx_runtime_1.jsx)(Info, { ...info })] }), description && ((0, jsx_runtime_1.jsx)(Description, { ...descriptionProps, children: description })), (0, jsx_runtime_1.jsx)(ChildrenWrapper, { style: hide ? { display: "none" } : undefined, children: children }), help && (0, jsx_runtime_1.jsx)(Help, { ...helpProps, children: help })] }));
39
+ ariaLabel: ariaLabel ?? name, children: (0, jsx_runtime_1.jsxs)(Title, { ...titleProps, htmlFor: name, children: [title, props?.required && (0, jsx_runtime_1.jsx)(RequiredIndicator, {}), (0, jsx_runtime_1.jsx)(Icon, { children: hide ? collapsedIcon ?? "▸" : openIcon ?? "▾" })] }) })), info && (0, jsx_runtime_1.jsx)(Info, { ...info })] }), (0, jsx_runtime_1.jsxs)(ChildrenWrapper, { style: hide ? { display: "none" } : undefined, children: [description && ((0, jsx_runtime_1.jsx)(Description, { ...descriptionProps, children: description })), children, help && (0, jsx_runtime_1.jsx)(Help, { ...helpProps, children: help })] })] }));
40
40
  };
41
41
  exports.CollapsibleObjectFieldTemplate = CollapsibleObjectFieldTemplate;
@@ -12,7 +12,6 @@ const templates_1 = require("./templates");
12
12
  const FormViewRegistry_1 = require("./FormViewRegistry");
13
13
  exports.FormWrapper = styled_components_1.default.div `
14
14
  font-family: ${(props) => props.theme.typography.fontFamily.base};
15
- //padding: ${(props) => props.theme.spacing.xxxxxl};
16
15
  `;
17
16
  const FormView = (props) => {
18
17
  const { schema, uiSchema = {}, className, fields = {}, templates = {}, components = {}, formContext = {}, formOptions = {}, formLocalization = {}, useItemsAsAdditionalItems = false, hideUnmarkedAdditionalProperties = false, } = props;
@@ -11,9 +11,10 @@ const getStyle_1 = require("../../utils/getStyle");
11
11
  const fa_1 = require("react-icons/fa");
12
12
  exports.FieldWrapper = styled_components_1.default.div `
13
13
  color: ${(props) => props.theme.color.text.default};
14
+ display: flex;
15
+ flex-direction: column;
14
16
  font-family: ${(props) => props.theme.typography.fontFamily.base};
15
17
  gap: ${(props) => props.theme.spacing.s};
16
- margin-bottom: ${(props) => props.theme.spacing.s};
17
18
  width: min(100%, 70rem);
18
19
  `;
19
20
  exports.FieldTitle = styled_components_1.default.label `
@@ -84,18 +85,14 @@ const SelectedBox = styled_components_1.default.div `
84
85
  justify-content: center;
85
86
  align-items: start;
86
87
  `;
87
- const NotSelectedCircle = styled_components_1.default.div `
88
- color: ${(props) => props.theme.color.text.default};
88
+ const NotSelectedBox = styled_components_1.default.div `
89
89
  background: ${(props) => props.theme.color.background.default};
90
90
  border: ${(props) => props.theme.strokeWidth.thin} solid
91
91
  ${(props) => props.theme.color.border.default};
92
- border-radius: ${(props) => props.theme.borderRadius.circle};
93
- font-family: ${(props) => props.theme.typography.fontFamily.base};
94
- font-size: ${(props) => props.theme.typography.size.small};
92
+ border-radius: ${(props) => props.theme.borderRadius.none};
95
93
  display: inline-flex;
96
- justify-content: center;
97
- align-items: start;
98
- padding: 0 0.1rem;
94
+ width: 0.85rem;
95
+ height: 0.85rem;
99
96
  `;
100
97
  exports.SelectedIcon = (0, styled_components_1.default)(fa_1.FaCheck) `
101
98
  color: ${(props) => props.theme.color.text.default};
@@ -124,7 +121,7 @@ exports.MultipleChoiceFieldWrapper = styled_components_1.default.div `
124
121
  break-inside: avoid;
125
122
  `;
126
123
  const BooleanFieldValue = ({ name, className, value, label, }) => {
127
- return ((0, jsx_runtime_1.jsx)("div", { className: className, children: value === true ? ((0, jsx_runtime_1.jsxs)(Selected, { children: [(0, jsx_runtime_1.jsx)(SelectedBox, { children: (0, jsx_runtime_1.jsx)(exports.SelectedIcon, {}) }), (0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldLabel, { children: label !== undefined ? label : "Selected" })] })) : ((0, jsx_runtime_1.jsxs)(Selected, { children: [(0, jsx_runtime_1.jsx)(NotSelectedCircle, { children: (0, jsx_runtime_1.jsx)(exports.NotSelectedIcon, {}) }), (0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldLabel, { children: label !== undefined ? label : "Not selected" })] })) }));
124
+ return ((0, jsx_runtime_1.jsx)("div", { className: className, children: value === true ? ((0, jsx_runtime_1.jsxs)(Selected, { children: [(0, jsx_runtime_1.jsx)(SelectedBox, { children: (0, jsx_runtime_1.jsx)(exports.SelectedIcon, {}) }), (0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldLabel, { children: label !== undefined ? label : "Selected" })] })) : ((0, jsx_runtime_1.jsxs)(Selected, { children: [(0, jsx_runtime_1.jsx)(NotSelectedBox, {}), (0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldLabel, { children: label !== undefined ? label : "Not selected" })] })) }));
128
125
  };
129
126
  exports.BooleanFieldValue = BooleanFieldValue;
130
127
  const MultipleChoiceFieldValue = ({ inputProps, name, className, style, selected, notSelected }) => {
@@ -132,6 +129,6 @@ const MultipleChoiceFieldValue = ({ inputProps, name, className, style, selected
132
129
  selected.length > 0 &&
133
130
  selected.map((s) => ((0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldElement, { "data-fjsf-enum-value-view": s.const, children: (0, jsx_runtime_1.jsxs)(Selected, { children: [(0, jsx_runtime_1.jsx)(SelectedBox, { children: (0, jsx_runtime_1.jsx)(exports.SelectedIcon, {}) }), (0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldLabel, { children: s.title ?? "Hello" })] }) }, s.title ?? s))), notSelected &&
134
131
  notSelected?.length > 0 &&
135
- notSelected.map((n) => ((0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldElement, { children: (0, jsx_runtime_1.jsxs)(NotSelected, { children: [(0, jsx_runtime_1.jsx)(NotSelectedCircle, { children: (0, jsx_runtime_1.jsx)(exports.NotSelectedIcon, {}) }), (0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldLabel, { children: n.title })] }) }, n.title ?? n)))] }) }));
132
+ notSelected.map((n) => ((0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldElement, { children: (0, jsx_runtime_1.jsxs)(NotSelected, { children: [(0, jsx_runtime_1.jsx)(NotSelectedBox, {}), (0, jsx_runtime_1.jsx)(styledComponents_1.MultipleChoiceFieldLabel, { children: n.title })] }) }, n.title ?? n)))] }) }));
136
133
  };
137
134
  exports.MultipleChoiceFieldValue = MultipleChoiceFieldValue;
@@ -2,4 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Form = void 0;
4
4
  const styled_components_1 = require("styled-components");
5
- exports.Form = styled_components_1.styled.div ``;
5
+ exports.Form = styled_components_1.styled.div `
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: ${(props) => props.theme.spacing.s};
9
+ `;
@@ -7,18 +7,15 @@ exports.ObjectFieldTemplateDescription = exports.ObjectFieldTemplateTitle = expo
7
7
  exports.getComponents = getComponents;
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  exports.ObjectFieldTemplateWrapper = styled_components_1.default.div `
10
-
11
- &[data-fjsf-level="1"] {
12
- margin-bottom: ${(props) => props.theme.spacing.xxl};
13
- }
14
-
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: ${(props) => props.theme.spacing.l};
15
13
  `;
16
14
  exports.ObjectFieldTemplateTitle = styled_components_1.default.div `
17
15
  color: ${(props) => props.theme.color.text.default};
18
16
  font-family: ${(props) => props.theme.typography.fontFamily.base};
19
17
  font-size: ${(props) => props.theme.typography.size.base};
20
18
  font-weight: ${(props) => props.theme.typography.weight.medium};
21
- margin: ${(props) => `${props.theme.spacing.s} 0 ${props.theme.spacing.l} 0`};
22
19
  page-break-after: avoid;
23
20
  break-after: avoid;
24
21
 
@@ -31,14 +28,13 @@ exports.ObjectFieldTemplateTitle = styled_components_1.default.div `
31
28
  font-weight: ${(props) => props.theme.typography.weight.bold};
32
29
  }
33
30
  ${exports.ObjectFieldTemplateWrapper}[data-fjsf-level="1"] > & {
34
- font-size: ${(props) => props.theme.typography.size.h4};
31
+ font-size: ${(props) => props.theme.typography.size.h3};
35
32
  font-weight: ${(props) => props.theme.typography.weight.medium};
36
- margin-top: 0;
33
+ margin-top: ${(props) => props.theme.spacing.m};
37
34
  }
38
35
  ${exports.ObjectFieldTemplateWrapper}[data-fjsf-level="2"] > & {
39
- font-size: ${(props) => props.theme.typography.size.large};
36
+ font-size: ${(props) => props.theme.typography.size.h4};
40
37
  font-weight: ${(props) => props.theme.typography.weight.medium};
41
- margin-top: ${(props) => props.theme.spacing.xxxl};
42
38
  }
43
39
  `;
44
40
  exports.ObjectFieldTemplateDescription = undefined;
@@ -5,7 +5,7 @@ export const MultipleChoiceFieldContainer = styled(RadioFieldContainer) `
5
5
  flex-wrap: wrap;
6
6
  justify-content: start;
7
7
  flex-direction: column;
8
- gap: ${(props) => props.theme.spacing.l};
8
+ gap: ${(props) => props.theme.spacing.s};
9
9
 
10
10
  &:has(input[readonly]) {
11
11
  flex-direction: column;
@@ -25,7 +25,9 @@ export const ObjectFieldDownButton = styled(ObjectFieldButton) ``;
25
25
  export const ObjectFieldRemoveButton = styled(ObjectFieldButton) ``;
26
26
  export const ObjectFieldAddButton = styled(ObjectFieldButton) ``;
27
27
  export const ObjectFieldSectionWrapper = styled.fieldset `
28
- padding: ${(props) => props.theme.spacing.s} ${(props) => props.theme.spacing.l} ${(props) => props.theme.spacing.s} ${(props) => props.theme.spacing.s};
28
+ padding: ${(props) => props.theme.spacing.s}
29
+ ${(props) => props.theme.spacing.l} ${(props) => props.theme.spacing.s}
30
+ ${(props) => props.theme.spacing.s};
29
31
  `;
30
32
  export const ObjectFieldSectionTitle = styled.legend `
31
33
  display: flex;
@@ -5,14 +5,15 @@ import { CommonCheckboxStyles } from "../../styles/common";
5
5
  export const RadioFieldContainer = styled(CommonCheckboxStyles) `
6
6
  color: ${(props) => props.theme.color.text.default};
7
7
  display: flex;
8
+ flex-direction: column;
8
9
  font-family: ${(props) => props.theme.typography.fontFamily.base};
9
- gap: ${(props) => props.theme.spacing.l};
10
+ gap: ${(props) => props.theme.spacing.s};
10
11
 
11
12
  &:has(input[readonly]) {
12
13
  flex-direction: column;
13
14
  gap: ${(props) => props.theme.spacing.xxs};
14
15
  }
15
-
16
+
16
17
  input[type="radio"] {
17
18
  -webkit-appearance: none;
18
19
  appearance: none;
@@ -65,10 +66,7 @@ export const RadioFieldElement = styled.label `
65
66
  pointer-events: none;
66
67
  }
67
68
  `;
68
- export const RadioFieldInputElement = styled(FieldInput) `
69
- margin: unset;
70
- margin-top: ${(props) => props.theme.spacing.xxs};
71
- `;
69
+ export const RadioFieldInputElement = styled(FieldInput) ``;
72
70
  export const RadioFieldLabel = styled.span `
73
71
  margin-left: ${(props) => props.theme.spacing.xs};
74
72
  line-height: ${(props) => props.theme.typography.lineHeight.small};
@@ -33,5 +33,5 @@ export const CollapsibleObjectFieldTemplate = (props) => {
33
33
  const hide = collapsed;
34
34
  return (_jsxs(Wrapper, { ...mergedWrapperProps, children: [_jsxs(TitleInfoWrapper, { children: [title && (_jsx(Toggle, { onClick: () => setCollapsed(!collapsed),
35
35
  //ariaExpanded={!hide}
36
- ariaLabel: ariaLabel ?? name, children: _jsxs(Title, { ...titleProps, htmlFor: name, children: [title, props?.required && _jsx(RequiredIndicator, {}), _jsx(Icon, { children: hide ? collapsedIcon ?? "▸" : openIcon ?? "▾" })] }) })), info && _jsx(Info, { ...info })] }), description && (_jsx(Description, { ...descriptionProps, children: description })), _jsx(ChildrenWrapper, { style: hide ? { display: "none" } : undefined, children: children }), help && _jsx(Help, { ...helpProps, children: help })] }));
36
+ ariaLabel: ariaLabel ?? name, children: _jsxs(Title, { ...titleProps, htmlFor: name, children: [title, props?.required && _jsx(RequiredIndicator, {}), _jsx(Icon, { children: hide ? collapsedIcon ?? "▸" : openIcon ?? "▾" })] }) })), info && _jsx(Info, { ...info })] }), _jsxs(ChildrenWrapper, { style: hide ? { display: "none" } : undefined, children: [description && (_jsx(Description, { ...descriptionProps, children: description })), children, help && _jsx(Help, { ...helpProps, children: help })] })] }));
37
37
  };
@@ -6,7 +6,6 @@ import { templates as defaultTemplates } from "./templates";
6
6
  import { FormViewRegistry } from "./FormViewRegistry";
7
7
  export const FormWrapper = styled.div `
8
8
  font-family: ${(props) => props.theme.typography.fontFamily.base};
9
- //padding: ${(props) => props.theme.spacing.xxxxxl};
10
9
  `;
11
10
  export const FormView = (props) => {
12
11
  const { schema, uiSchema = {}, className, fields = {}, templates = {}, components = {}, formContext = {}, formOptions = {}, formLocalization = {}, useItemsAsAdditionalItems = false, hideUnmarkedAdditionalProperties = false, } = props;
@@ -5,9 +5,10 @@ import { getStyle } from "../../utils/getStyle";
5
5
  import { FaCheck, FaTimes } from "react-icons/fa";
6
6
  export const FieldWrapper = styled.div `
7
7
  color: ${(props) => props.theme.color.text.default};
8
+ display: flex;
9
+ flex-direction: column;
8
10
  font-family: ${(props) => props.theme.typography.fontFamily.base};
9
11
  gap: ${(props) => props.theme.spacing.s};
10
- margin-bottom: ${(props) => props.theme.spacing.s};
11
12
  width: min(100%, 70rem);
12
13
  `;
13
14
  export const FieldTitle = styled.label `
@@ -78,18 +79,14 @@ const SelectedBox = styled.div `
78
79
  justify-content: center;
79
80
  align-items: start;
80
81
  `;
81
- const NotSelectedCircle = styled.div `
82
- color: ${(props) => props.theme.color.text.default};
82
+ const NotSelectedBox = styled.div `
83
83
  background: ${(props) => props.theme.color.background.default};
84
84
  border: ${(props) => props.theme.strokeWidth.thin} solid
85
85
  ${(props) => props.theme.color.border.default};
86
- border-radius: ${(props) => props.theme.borderRadius.circle};
87
- font-family: ${(props) => props.theme.typography.fontFamily.base};
88
- font-size: ${(props) => props.theme.typography.size.small};
86
+ border-radius: ${(props) => props.theme.borderRadius.none};
89
87
  display: inline-flex;
90
- justify-content: center;
91
- align-items: start;
92
- padding: 0 0.1rem;
88
+ width: 0.85rem;
89
+ height: 0.85rem;
93
90
  `;
94
91
  export const SelectedIcon = styled(FaCheck) `
95
92
  color: ${(props) => props.theme.color.text.default};
@@ -118,12 +115,12 @@ export const MultipleChoiceFieldWrapper = styled.div `
118
115
  break-inside: avoid;
119
116
  `;
120
117
  export const BooleanFieldValue = ({ name, className, value, label, }) => {
121
- return (_jsx("div", { className: className, children: value === true ? (_jsxs(Selected, { children: [_jsx(SelectedBox, { children: _jsx(SelectedIcon, {}) }), _jsx(MultipleChoiceFieldLabel, { children: label !== undefined ? label : "Selected" })] })) : (_jsxs(Selected, { children: [_jsx(NotSelectedCircle, { children: _jsx(NotSelectedIcon, {}) }), _jsx(MultipleChoiceFieldLabel, { children: label !== undefined ? label : "Not selected" })] })) }));
118
+ return (_jsx("div", { className: className, children: value === true ? (_jsxs(Selected, { children: [_jsx(SelectedBox, { children: _jsx(SelectedIcon, {}) }), _jsx(MultipleChoiceFieldLabel, { children: label !== undefined ? label : "Selected" })] })) : (_jsxs(Selected, { children: [_jsx(NotSelectedBox, {}), _jsx(MultipleChoiceFieldLabel, { children: label !== undefined ? label : "Not selected" })] })) }));
122
119
  };
123
120
  export const MultipleChoiceFieldValue = ({ inputProps, name, className, style, selected, notSelected }) => {
124
121
  return (_jsx(MultipleChoiceFieldWrapper, { children: _jsxs(MultipleChoiceFieldContainer, { className: className, style: getStyle(style ?? ""), children: [!selected && !notSelected && _jsx(_Fragment, {}), selected &&
125
122
  selected.length > 0 &&
126
123
  selected.map((s) => (_jsx(MultipleChoiceFieldElement, { "data-fjsf-enum-value-view": s.const, children: _jsxs(Selected, { children: [_jsx(SelectedBox, { children: _jsx(SelectedIcon, {}) }), _jsx(MultipleChoiceFieldLabel, { children: s.title ?? "Hello" })] }) }, s.title ?? s))), notSelected &&
127
124
  notSelected?.length > 0 &&
128
- notSelected.map((n) => (_jsx(MultipleChoiceFieldElement, { children: _jsxs(NotSelected, { children: [_jsx(NotSelectedCircle, { children: _jsx(NotSelectedIcon, {}) }), _jsx(MultipleChoiceFieldLabel, { children: n.title })] }) }, n.title ?? n)))] }) }));
125
+ notSelected.map((n) => (_jsx(MultipleChoiceFieldElement, { children: _jsxs(NotSelected, { children: [_jsx(NotSelectedBox, {}), _jsx(MultipleChoiceFieldLabel, { children: n.title })] }) }, n.title ?? n)))] }) }));
129
126
  };
@@ -1,2 +1,6 @@
1
1
  import { styled } from "styled-components";
2
- export const Form = styled.div ``;
2
+ export const Form = styled.div `
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: ${(props) => props.theme.spacing.s};
6
+ `;
@@ -1,17 +1,14 @@
1
1
  import styled from "styled-components";
2
2
  export const ObjectFieldTemplateWrapper = styled.div `
3
-
4
- &[data-fjsf-level="1"] {
5
- margin-bottom: ${(props) => props.theme.spacing.xxl};
6
- }
7
-
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: ${(props) => props.theme.spacing.l};
8
6
  `;
9
7
  export const ObjectFieldTemplateTitle = styled.div `
10
8
  color: ${(props) => props.theme.color.text.default};
11
9
  font-family: ${(props) => props.theme.typography.fontFamily.base};
12
10
  font-size: ${(props) => props.theme.typography.size.base};
13
11
  font-weight: ${(props) => props.theme.typography.weight.medium};
14
- margin: ${(props) => `${props.theme.spacing.s} 0 ${props.theme.spacing.l} 0`};
15
12
  page-break-after: avoid;
16
13
  break-after: avoid;
17
14
 
@@ -24,14 +21,13 @@ export const ObjectFieldTemplateTitle = styled.div `
24
21
  font-weight: ${(props) => props.theme.typography.weight.bold};
25
22
  }
26
23
  ${ObjectFieldTemplateWrapper}[data-fjsf-level="1"] > & {
27
- font-size: ${(props) => props.theme.typography.size.h4};
24
+ font-size: ${(props) => props.theme.typography.size.h3};
28
25
  font-weight: ${(props) => props.theme.typography.weight.medium};
29
- margin-top: 0;
26
+ margin-top: ${(props) => props.theme.spacing.m};
30
27
  }
31
28
  ${ObjectFieldTemplateWrapper}[data-fjsf-level="2"] > & {
32
- font-size: ${(props) => props.theme.typography.size.large};
29
+ font-size: ${(props) => props.theme.typography.size.h4};
33
30
  font-weight: ${(props) => props.theme.typography.weight.medium};
34
- margin-top: ${(props) => props.theme.spacing.xxxl};
35
31
  }
36
32
  `;
37
33
  export const ObjectFieldTemplateDescription = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolwenture/formik-jsonschema-form",
3
- "version": "1.2.8",
3
+ "version": "1.3.0",
4
4
  "description": "Formik form generation from json schema",
5
5
  "author": "anttivikman <antti.vikman@nolwenture.com>",
6
6
  "contributors": [