@nolwenture/formik-jsonschema-form 1.2.8 → 1.2.9

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};
@@ -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 `
@@ -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.s};
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
 
@@ -33,12 +30,10 @@ exports.ObjectFieldTemplateTitle = styled_components_1.default.div `
33
30
  ${exports.ObjectFieldTemplateWrapper}[data-fjsf-level="1"] > & {
34
31
  font-size: ${(props) => props.theme.typography.size.h4};
35
32
  font-weight: ${(props) => props.theme.typography.weight.medium};
36
- margin-top: 0;
37
33
  }
38
34
  ${exports.ObjectFieldTemplateWrapper}[data-fjsf-level="2"] > & {
39
35
  font-size: ${(props) => props.theme.typography.size.large};
40
36
  font-weight: ${(props) => props.theme.typography.weight.medium};
41
- margin-top: ${(props) => props.theme.spacing.xxxl};
42
37
  }
43
38
  `;
44
39
  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};
@@ -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 `
@@ -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.s};
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
 
@@ -26,12 +23,10 @@ export const ObjectFieldTemplateTitle = styled.div `
26
23
  ${ObjectFieldTemplateWrapper}[data-fjsf-level="1"] > & {
27
24
  font-size: ${(props) => props.theme.typography.size.h4};
28
25
  font-weight: ${(props) => props.theme.typography.weight.medium};
29
- margin-top: 0;
30
26
  }
31
27
  ${ObjectFieldTemplateWrapper}[data-fjsf-level="2"] > & {
32
28
  font-size: ${(props) => props.theme.typography.size.large};
33
29
  font-weight: ${(props) => props.theme.typography.weight.medium};
34
- margin-top: ${(props) => props.theme.spacing.xxxl};
35
30
  }
36
31
  `;
37
32
  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.2.9",
4
4
  "description": "Formik form generation from json schema",
5
5
  "author": "anttivikman <antti.vikman@nolwenture.com>",
6
6
  "contributors": [