@nolwenture/formik-jsonschema-form 1.0.0-beta.3 → 1.0.0-beta.5

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.
Files changed (59) hide show
  1. package/dist/cjs/Form/components/FieldInfo.js +5 -5
  2. package/dist/cjs/Form/components/FieldInput.js +21 -16
  3. package/dist/cjs/Form/components/Form.js +8 -8
  4. package/dist/cjs/Form/fields/ArrayField/ArrayField.js +20 -8
  5. package/dist/cjs/Form/fields/BooleanField/BooleanField.js +1 -1
  6. package/dist/cjs/Form/fields/BooleanField/styledComponents.js +5 -1
  7. package/dist/cjs/Form/fields/DateField/DateField.js +1 -1
  8. package/dist/cjs/Form/fields/FileUploadField/styledComponents.js +4 -4
  9. package/dist/cjs/Form/fields/MultipleChoiceField/MultipleChoiceField.js +1 -1
  10. package/dist/cjs/Form/fields/ObjectField/ObjectField.js +12 -5
  11. package/dist/cjs/Form/fields/ObjectField/styledComponents.js +4 -4
  12. package/dist/cjs/Form/fields/RadioField/RadioField.js +1 -1
  13. package/dist/cjs/Form/fields/RadioField/styledComponents.js +5 -1
  14. package/dist/cjs/Form/fields/SchemaField/SchemaField.js +1 -0
  15. package/dist/cjs/Form/fields/SearchableMultiTagSelectField/styledComponents.js +6 -6
  16. package/dist/cjs/Form/fields/SearchableSelectField/styledComponents.js +1 -1
  17. package/dist/cjs/Form/fields/StringField/StringField.js +5 -2
  18. package/dist/cjs/Form/fields/TextAreaField/TextAreaField.js +1 -1
  19. package/dist/cjs/Form/fields/TextAreaField/styledComponents.js +2 -2
  20. package/dist/cjs/Form/fields/ToggleField/ToggleField.js +1 -1
  21. package/dist/cjs/Form/fields/ToggleField/styledComponents.js +7 -3
  22. package/dist/cjs/Form/styles/common.js +14 -14
  23. package/dist/cjs/Form/templates/ObjectFieldTemplate/styledComponents.js +2 -2
  24. package/dist/cjs/FormView/components/Field.js +1 -1
  25. package/dist/cjs/FormView/components/old_styledComponents.js +4 -4
  26. package/dist/esm/Form/components/FieldInfo.js +5 -5
  27. package/dist/esm/Form/components/FieldInput.js +20 -15
  28. package/dist/esm/Form/components/Form.js +8 -8
  29. package/dist/esm/Form/fields/ArrayField/ArrayField.js +20 -8
  30. package/dist/esm/Form/fields/BooleanField/BooleanField.js +1 -1
  31. package/dist/esm/Form/fields/BooleanField/styledComponents.js +5 -1
  32. package/dist/esm/Form/fields/DateField/DateField.js +1 -1
  33. package/dist/esm/Form/fields/FileUploadField/styledComponents.js +4 -4
  34. package/dist/esm/Form/fields/MultipleChoiceField/MultipleChoiceField.js +1 -1
  35. package/dist/esm/Form/fields/ObjectField/ObjectField.js +12 -5
  36. package/dist/esm/Form/fields/ObjectField/styledComponents.js +4 -4
  37. package/dist/esm/Form/fields/RadioField/RadioField.js +1 -1
  38. package/dist/esm/Form/fields/RadioField/styledComponents.js +5 -1
  39. package/dist/esm/Form/fields/SchemaField/SchemaField.js +1 -0
  40. package/dist/esm/Form/fields/SearchableMultiTagSelectField/styledComponents.js +6 -6
  41. package/dist/esm/Form/fields/SearchableSelectField/styledComponents.js +1 -1
  42. package/dist/esm/Form/fields/StringField/StringField.js +5 -2
  43. package/dist/esm/Form/fields/TextAreaField/TextAreaField.js +1 -1
  44. package/dist/esm/Form/fields/TextAreaField/styledComponents.js +2 -2
  45. package/dist/esm/Form/fields/ToggleField/ToggleField.js +1 -1
  46. package/dist/esm/Form/fields/ToggleField/styledComponents.js +7 -3
  47. package/dist/esm/Form/styles/common.js +14 -14
  48. package/dist/esm/Form/templates/ObjectFieldTemplate/styledComponents.js +2 -2
  49. package/dist/esm/FormView/components/Field.js +1 -1
  50. package/dist/esm/FormView/components/old_styledComponents.js +4 -4
  51. package/dist/types/Form/components/FieldInput.d.ts +5 -0
  52. package/dist/types/Form/components/index.d.ts +5 -0
  53. package/dist/types/Form/templates/ArrayFieldTemplate/types.d.ts +0 -4
  54. package/dist/types/Form/templates/FieldTemplate/types.d.ts +0 -4
  55. package/dist/types/FormView/templates/ArrayFieldTemplate/types.d.ts +0 -4
  56. package/dist/types/FormView/templates/FieldTemplate/types.d.ts +0 -4
  57. package/dist/types/common/types/Field.d.ts +0 -3
  58. package/dist/types/common/types/Schemas.d.ts +11 -8
  59. package/package.json +3 -2
@@ -66,19 +66,19 @@ exports.FieldInfoBoxInnerElement = styled_components_1.styled.div `
66
66
  background: ${(props) => props.theme.color.intent.default.none};
67
67
  border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.intent.default.none}`};
68
68
  border-radius: ${(props) => props.theme.borderRadius.none};
69
- color: ${(props) => (0, polished_1.readableColor)(props.theme.text.default)};
69
+ color: ${(props) => (0, polished_1.readableColor)(props.theme.color.text.default)};
70
70
  cursor: default;
71
71
  padding: ${(props) => `${props.theme.spacing.xs} ${props.theme.spacing.s}`};
72
72
  text-align: center;
73
73
  `;
74
74
  exports.FieldInfoContainer = styled_components_1.styled.a `
75
75
  position: relative;
76
- color: ${(props) => props.theme.text.default};
76
+ color: ${(props) => props.theme.color.text.default};
77
77
  background: none;
78
78
  outline: none;
79
79
  cursor: pointer;
80
80
  border: ${(props) => `${props.theme.strokeWidth.thin} solid
81
- ${props.theme.border.default}`};
81
+ ${props.theme.color.border.default}`};
82
82
  border-radius: ${(props) => props.theme.borderRadius.circle};
83
83
  line-height: 1em;
84
84
  font-family: ${(props) => props.theme.typography.fontFamily.base};
@@ -89,8 +89,8 @@ exports.FieldInfoContainer = styled_components_1.styled.a `
89
89
 
90
90
  &:active,
91
91
  &:focus {
92
- color: ${(props) => (0, polished_1.readableColor)(props.theme.text.default)};
93
- background: ${(props) => props.theme.text.default};
92
+ color: ${(props) => (0, polished_1.readableColor)(props.theme.color.text.default)};
93
+ background: ${(props) => props.theme.color.text.default};
94
94
  ${exports.FieldInfoBoxElement} {
95
95
  opacity: 1;
96
96
  visibility: visible;
@@ -23,32 +23,32 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.FieldInput = exports.FieldHelp = exports.FieldDescription = exports.FieldTitle = exports.FieldWrapper = void 0;
26
+ exports.SelectFieldInput = exports.FieldInput = exports.FieldHelp = exports.FieldDescription = exports.FieldTitle = exports.FieldWrapper = void 0;
27
27
  const jsx_runtime_1 = require("react/jsx-runtime");
28
28
  const styled_components_1 = require("styled-components");
29
29
  const formik = __importStar(require("formik"));
30
30
  exports.FieldWrapper = styled_components_1.styled.div `
31
- margin: ${(props) => `${props.theme.spacing.s} 0`};
32
- color: ${(props) => props.theme.text.default};
31
+ margin: ${(props) => `${props.theme.spacing.s} 0`};
32
+ color: ${(props) => props.theme.color.text.default};
33
33
  `;
34
34
  exports.FieldTitle = styled_components_1.styled.label `
35
- font-size: ${(props) => props.theme.typography.size.base};
36
- font-family: ${(props) => props.theme.typography.fontFamily.base};
37
- font-weight: ${(props) => props.theme.typography.weight.medium};
38
- margin-right: ${(props) => props.theme.spacing.s};
39
- color: ${(props) => props.theme.text.default};
35
+ font-size: ${(props) => props.theme.typography.size.base};
36
+ font-family: ${(props) => props.theme.typography.fontFamily.base};
37
+ font-weight: ${(props) => props.theme.typography.weight.medium};
38
+ margin-right: ${(props) => props.theme.spacing.s};
39
+ color: ${(props) => props.theme.color.text.default};
40
40
  `;
41
41
  exports.FieldDescription = styled_components_1.styled.p `
42
- color: ${(props) => props.theme.text.default};
43
- margin: 0;
44
- font-family: ${(props) => props.theme.typography.fontFamily.base};
45
- font-size: ${(props) => props.theme.typography.size.base};
42
+ color: ${(props) => props.theme.color.text.default};
43
+ margin: 0;
44
+ font-family: ${(props) => props.theme.typography.fontFamily.base};
45
+ font-size: ${(props) => props.theme.typography.size.base};
46
46
  `;
47
47
  exports.FieldHelp = styled_components_1.styled.p `
48
- color: ${(props) => props.theme.text.default};
49
- margin: 0;
50
- font-family: ${(props) => props.theme.typography.fontFamily.base};
51
- font-size: ${(props) => props.theme.typography.size.small};
48
+ color: ${(props) => props.theme.color.text.default};
49
+ margin: 0;
50
+ font-family: ${(props) => props.theme.typography.fontFamily.base};
51
+ font-size: ${(props) => props.theme.typography.size.small};
52
52
  `;
53
53
  /*
54
54
  * Works like Formik field, but "as" props needs to be given with "formikAs", since styled components uses as.
@@ -57,3 +57,8 @@ exports.FieldHelp = styled_components_1.styled.p `
57
57
  exports.FieldInput = (0, styled_components_1.styled)(({ formikAs, ...props }) => {
58
58
  return (0, jsx_runtime_1.jsx)(formik.Field, { ...props, as: formikAs });
59
59
  }) ``;
60
+ exports.SelectFieldInput = (0, styled_components_1.styled)(exports.FieldInput) `
61
+ &[readonly] {
62
+ pointer-events: none;
63
+ }
64
+ `;
@@ -31,22 +31,22 @@ const styled_components_1 = __importDefault(require("styled-components"));
31
31
  const formik = __importStar(require("formik"));
32
32
  const common_1 = require("../styles/common");
33
33
  exports.Form = (0, styled_components_1.default)(formik.Form) `
34
- ${common_1.commonCheckboxStyles}
34
+ ${common_1.commonCheckboxStyles}
35
35
 
36
- ${common_1.commonRadioStyles}
36
+ ${common_1.commonRadioStyles}
37
37
 
38
- color: ${(props) => props.theme.text.default};
39
- font-family: ${(props) => props.theme.typography.fontFamily.base};
38
+ color: ${(props) => props.theme.color.text.default};
39
+ font-family: ${(props) => props.theme.typography.fontFamily.base};
40
40
 
41
- ${common_1.commonButtonStyles}
41
+ ${common_1.commonButtonStyles}
42
42
 
43
- ${common_1.commonInputStyles}
43
+ ${common_1.commonInputStyles}
44
44
 
45
45
  ${common_1.commonSelectStyles}
46
46
 
47
47
  :focus {
48
- ${(props) => props.theme.focus.default};
49
- }
48
+ ${(props) => props.theme.focus.default};
49
+ }
50
50
  `;
51
51
  exports.FormButtonWrapper = styled_components_1.default.div ``;
52
52
  exports.FormButton = styled_components_1.default.button `
@@ -32,7 +32,7 @@ const moveInArray = (values, index, direction) => {
32
32
  }
33
33
  };
34
34
  const ArrayField = (props) => {
35
- const { fields: { SchemaField }, templates: { ArrayFieldTemplate, FieldTemplate }, components: { FieldInput, ArrayFieldItem, ArrayFieldItemButtons, ArrayFieldList, ArrayFieldAddButton, ArrayFieldRemoveButton, ArrayFieldUpButton, ArrayFieldDownButton, }, useItemsAsAdditionalItems, } = (0, react_1.useContext)(FormRegistry_1.FormRegistry);
35
+ const { fields: { SchemaField }, templates: { ArrayFieldTemplate, FieldTemplate }, components: { SelectFieldInput, ArrayFieldItem, ArrayFieldItemButtons, ArrayFieldList, ArrayFieldAddButton, ArrayFieldRemoveButton, ArrayFieldUpButton, ArrayFieldDownButton, }, useItemsAsAdditionalItems, } = (0, react_1.useContext)(FormRegistry_1.FormRegistry);
36
36
  (0, hooks_1.useSetDefault)(props);
37
37
  const { name, schema, uiSchema } = props;
38
38
  const { type, props: inputProps } = (0, react_1.useMemo)(() => (0, utils_1.extractUiSchema)(uiSchema), [uiSchema]);
@@ -98,16 +98,28 @@ const ArrayField = (props) => {
98
98
  // Backwards compatibility ends
99
99
  const { disabled } = (0, react_1.useMemo)(() => (0, utils_1.extractUiSchema)(uiSchema), [uiSchema]);
100
100
  const valueArray = Array.isArray(value) ? value : undefined;
101
- return schema.anyOf !== undefined ? ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-array": name, children: (0, jsx_runtime_1.jsx)(FieldInput, { type,
102
- ...inputProps, name: name, formikAs: "select", multiple: enums?.type === utils_1.EnumsTypes.MULTI_SELECT, children: enums?.values.map((option, index) => ((0, jsx_runtime_1.jsx)("option", { value: option.const, children: option.title }, index))) }) })) : ((0, jsx_runtime_1.jsxs)(ArrayFieldTemplate, { ...props, "data-fjsf-array": name, children: [(0, jsx_runtime_1.jsxs)(ArrayFieldList, { children: [(items || []).map((itemSchema, index) => ((0, jsx_runtime_1.jsx)(ArrayFieldItem, { children: (0, jsx_runtime_1.jsx)(SchemaField, { name: `${name}[${index}]`, schema: typeof itemSchema !== "boolean" ? itemSchema : {}, uiSchema: uiSchema?.[index] || uiSchema?.items,
101
+ const preventManipulation = disabled || schema.readOnly;
102
+ return schema.anyOf !== undefined ? ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-array": name, children: (0, jsx_runtime_1.jsx)(SelectFieldInput, { type,
103
+ readOnly: schema.readOnly,
104
+ ...inputProps, name: name, formikAs: "select", multiple: enums?.type === utils_1.EnumsTypes.MULTI_SELECT, children: enums?.values.map((option, index) => ((0, jsx_runtime_1.jsx)("option", { value: option.const, children: option.title }, index))) }) })) : ((0, jsx_runtime_1.jsxs)(ArrayFieldTemplate, { ...props, "data-fjsf-array": name, children: [(0, jsx_runtime_1.jsxs)(ArrayFieldList, { children: [(items || []).map((itemSchema, index) => ((0, jsx_runtime_1.jsx)(ArrayFieldItem, { children: (0, jsx_runtime_1.jsx)(SchemaField, { name: `${name}[${index}]`, schema: prepareChildSchema(itemSchema, schema), uiSchema: {
105
+ disabled,
106
+ ...(uiSchema?.[index] || uiSchema?.items),
107
+ },
103
108
  // "true" will prevent validation for required array fields
104
109
  // since a value always exists in the array
105
- forceDefaultValue: false }) }, index))), (valueArray?.slice(items.length) || []).map((_, index) => ((0, jsx_runtime_1.jsxs)(ArrayFieldItem, { children: [(0, jsx_runtime_1.jsx)(SchemaField, { name: `${name}[${index + items.length}]`, schema: additionalItems && typeof additionalItems !== "boolean"
106
- ? additionalItems
107
- : {}, uiSchema: {
110
+ forceDefaultValue: false }) }, index))), (valueArray?.slice(items.length) || []).map((_, index) => ((0, jsx_runtime_1.jsxs)(ArrayFieldItem, { children: [(0, jsx_runtime_1.jsx)(SchemaField, { name: `${name}[${index + items.length}]`, schema: prepareChildSchema(additionalItems, schema), uiSchema: {
108
111
  disabled,
109
112
  ...(uiSchema?.[index + items.length] || uiSchema?.items),
110
- } }), (0, jsx_runtime_1.jsxs)(ArrayFieldItemButtons, { children: [(0, jsx_runtime_1.jsx)(ArrayFieldRemoveButton, { ...(uiSchema?.["ui:removeButtonOptions"]?.props ?? {}), onClick: () => setValue(removeFromArray(value, index + items.length)), children: uiSchema?.["ui:removeButtonOptions"]?.content ?? "-" }), value.length > 1 && index > 0 && ((0, jsx_runtime_1.jsx)(ArrayFieldUpButton, { ...(uiSchema?.["ui:upButtonOptions"]?.props ?? {}), onClick: () => setValue(moveInArray(value, index + items.length, -1)), children: uiSchema?.["ui:upButtonOptions"]?.content ?? "↑" })), value.length > 1 &&
111
- index < value?.slice(items.length).length - 1 && ((0, jsx_runtime_1.jsx)(ArrayFieldDownButton, { ...(uiSchema?.["ui:downButtonOptions"]?.props ?? {}), onClick: () => setValue(moveInArray(value, index + items.length, 1)), children: uiSchema?.["ui:downButtonOptions"]?.content ?? "↓" }))] })] }, index)))] }), additionalItems && ((0, jsx_runtime_1.jsx)(ArrayFieldAddButton, { ...(uiSchema?.["ui:addButtonOptions"]?.props ?? {}), onClick: () => setValue(appendArray(value)), children: uiSchema?.["ui:addButtonOptions"]?.content ?? "+" }))] }));
113
+ } }), !preventManipulation && ((0, jsx_runtime_1.jsxs)(ArrayFieldItemButtons, { children: [(0, jsx_runtime_1.jsx)(ArrayFieldRemoveButton, { ...(uiSchema?.["ui:removeButtonOptions"]?.props ?? {}), onClick: () => setValue(removeFromArray(value, index + items.length)), children: uiSchema?.["ui:removeButtonOptions"]?.content ?? "-" }), value.length > 1 && index > 0 && ((0, jsx_runtime_1.jsx)(ArrayFieldUpButton, { ...(uiSchema?.["ui:upButtonOptions"]?.props ?? {}), onClick: () => setValue(moveInArray(value, index + items.length, -1)), children: uiSchema?.["ui:upButtonOptions"]?.content ?? "↑" })), value.length > 1 &&
114
+ index < value?.slice(items.length).length - 1 && ((0, jsx_runtime_1.jsx)(ArrayFieldDownButton, { ...(uiSchema?.["ui:downButtonOptions"]?.props ?? {}), onClick: () => setValue(moveInArray(value, index + items.length, 1)), children: uiSchema?.["ui:downButtonOptions"]?.content ?? "↓" }))] }))] }, index)))] }), additionalItems && !preventManipulation && ((0, jsx_runtime_1.jsx)(ArrayFieldAddButton, { ...(uiSchema?.["ui:addButtonOptions"]?.props ?? {}), onClick: () => setValue(appendArray(value)), children: uiSchema?.["ui:addButtonOptions"]?.content ?? "+" }))] }));
112
115
  };
113
116
  exports.ArrayField = ArrayField;
117
+ function prepareChildSchema(childSchema, parentSchema) {
118
+ if (!childSchema || typeof childSchema === "boolean") {
119
+ return {};
120
+ }
121
+ if (parentSchema.readOnly) {
122
+ return { ...childSchema, readOnly: parentSchema.readOnly };
123
+ }
124
+ return childSchema;
125
+ }
@@ -13,7 +13,7 @@ const BooleanField = (props) => {
13
13
  const { name, uiSchema } = props;
14
14
  const { label, props: inputProps } = (0, react_1.useMemo)(() => (0, utils_1.extractUiSchema)(uiSchema), [uiSchema]);
15
15
  const { values, setValues } = (0, formik_1.useFormikContext)();
16
- return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-boolean": name, children: (0, jsx_runtime_1.jsxs)(BooleanFieldWrapper, { children: [(0, jsx_runtime_1.jsx)(FieldInput, { ...inputProps, name: name, type: "checkbox" }), (0, jsx_runtime_1.jsx)("span", { onClick: () => {
16
+ return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-boolean": name, children: (0, jsx_runtime_1.jsxs)(BooleanFieldWrapper, { children: [(0, jsx_runtime_1.jsx)(FieldInput, { readOnly: props.schema.readOnly, ...inputProps, name: name, type: "checkbox" }), (0, jsx_runtime_1.jsx)("span", { onClick: () => {
17
17
  setValues({
18
18
  ...values,
19
19
  [name]: !values?.[name],
@@ -5,11 +5,15 @@ const styled_components_1 = require("styled-components");
5
5
  const common_1 = require("../../styles/common");
6
6
  exports.BooleanFieldWrapper = styled_components_1.styled.div `
7
7
  align-items: center;
8
- color: ${(props) => props.theme.text.default};
8
+ color: ${(props) => props.theme.color.text.default};
9
9
  cursor: pointer;
10
10
  display: flex;
11
11
  font-family: ${(props) => props.theme.typography.fontFamily.base};
12
12
  gap: ${(props) => props.theme.spacing.s};
13
13
 
14
14
  ${common_1.commonCheckboxStyles}
15
+
16
+ & > input[readonly], & > input[readonly] ~ span {
17
+ pointer-events: none;
18
+ }
15
19
  `;
@@ -12,6 +12,6 @@ const DateField = (props) => {
12
12
  (0, hooks_1.useSetDefault)(props);
13
13
  const { name, uiSchema } = props;
14
14
  const { props: inputProps } = (0, react_1.useMemo)(() => (0, utils_1.extractUiSchema)(uiSchema), [uiSchema]);
15
- return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-string": name, children: (0, jsx_runtime_1.jsx)(styledComponents_1.DateFieldWrapper, { children: (0, jsx_runtime_1.jsx)(FieldInput, { ...inputProps, name: name, type: "date" }) }) }));
15
+ return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-string": name, children: (0, jsx_runtime_1.jsx)(styledComponents_1.DateFieldWrapper, { children: (0, jsx_runtime_1.jsx)(FieldInput, { readOnly: props.schema.readOnly, ...inputProps, name: name, type: "date" }) }) }));
16
16
  };
17
17
  exports.DateField = DateField;
@@ -23,14 +23,14 @@ exports.FileUploadFieldProgressBarContainer = styled_components_1.default.div `
23
23
  width: 7.5rem;
24
24
  height: ${(props) => props.theme.spacing.xl};
25
25
  border-radius: ${(props) => props.theme.strokeWidth.thick};
26
- background-color: ${(props) => props.theme.background.input};
26
+ background-color: ${(props) => props.theme.color.background.input};
27
27
  position: relative;
28
28
  margin-left: ${(props) => props.theme.spacing.s};
29
29
  `;
30
30
  exports.FileUploadFieldProgressBar = styled_components_1.default.div `
31
31
  width: ${(props) => props.$progress}%;
32
32
  height: 100%;
33
- background-color: ${(props) => props.theme.neutral[500]};
33
+ background-color: ${(props) => props.theme.color.palette.neutral[500]};
34
34
  border-radius: ${(props) => props.theme.strokeWidth.thick};
35
35
  transition: width 0.2s ease;
36
36
  `;
@@ -39,7 +39,7 @@ exports.FileUploadFieldProgressText = styled_components_1.default.span `
39
39
  top: 50%;
40
40
  left: 50%;
41
41
  transform: translate(-50%, -50%);
42
- color: ${(props) => props.theme.neutral[200]};
42
+ color: ${(props) => props.theme.color.palette.neutral[200]};
43
43
  font-family: ${(props) => props.theme.typography.fontFamily.base};
44
44
  font-weight: ${(props) => props.theme.typography.weight.bold};
45
45
  `;
@@ -58,6 +58,6 @@ exports.FileUploadFieldFileInfoText = styled_components_1.default.span `
58
58
  margin-left: ${(props) => props.theme.spacing.s};
59
59
  font-family: ${(props) => props.theme.typography.fontFamily.base};
60
60
  font-size: ${(props) => props.theme.typography.size.base};
61
- color: ${(props) => props.theme.text.default};
61
+ color: ${(props) => props.theme.color.text.default};
62
62
  `;
63
63
  exports.FileUploadFieldContainer = styled_components_1.default.div ``;
@@ -27,6 +27,6 @@ const MultipleChoiceField = (props) => {
27
27
  return { "data-fjsf-string": name };
28
28
  }
29
29
  })();
30
- return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, ...fieldDataAttribute, children: (0, jsx_runtime_1.jsx)(MultipleChoiceFieldInput, { inputProps: inputProps, name: name, enums: enums, style: style, value: value, form: form }) }));
30
+ return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, ...fieldDataAttribute, children: (0, jsx_runtime_1.jsx)(MultipleChoiceFieldInput, { inputProps: { readOnly: props.schema.readOnly, ...inputProps }, name: name, enums: enums, style: style, value: value, form: form }) }));
31
31
  };
32
32
  exports.MultipleChoiceField = MultipleChoiceField;
@@ -59,7 +59,7 @@ const ObjectField = (props) => {
59
59
  const childSchema = properties?.[child];
60
60
  if (!childSchema)
61
61
  return undefined;
62
- return ((0, jsx_runtime_1.jsx)(SchemaField, { required: required?.includes(child), name: name ? [name, child].join(".") : child, schema: typeof childSchema !== "boolean" ? childSchema : {}, uiSchema: uiSchema?.[child] }, child));
62
+ return ((0, jsx_runtime_1.jsx)(SchemaField, { required: required?.includes(child), name: name ? [name, child].join(".") : child, schema: prepareChildSchema(childSchema, schema), uiSchema: uiSchema?.[child] }, child));
63
63
  }
64
64
  else {
65
65
  const { title, fields, collapsible } = child;
@@ -67,14 +67,12 @@ const ObjectField = (props) => {
67
67
  const childSchema = properties?.[child2];
68
68
  if (!childSchema)
69
69
  return undefined;
70
- return ((0, jsx_runtime_1.jsx)(SchemaField, { name: name ? [name, child2].join(".") : child2, schema: typeof childSchema !== "boolean" ? childSchema : {}, uiSchema: uiSchema?.[child2] }, child2));
70
+ return ((0, jsx_runtime_1.jsx)(SchemaField, { name: name ? [name, child2].join(".") : child2, schema: prepareChildSchema(childSchema, schema), uiSchema: uiSchema?.[child2] }, child2));
71
71
  }) }, fields.join("_")));
72
72
  }
73
73
  })
74
74
  .filter((x) => x), (!hideUnmarkedAdditionalProperties || additionalProperties) &&
75
- Object.entries(additionalValues || {}).map(([childName]) => ((0, jsx_runtime_1.jsxs)(ObjectFieldItem, { children: [(0, jsx_runtime_1.jsx)(SchemaField, { required: required?.includes(childName), name: name ? [name, childName].join(".") : childName, schema: typeof schema.additionalProperties !== "boolean"
76
- ? schema.additionalProperties
77
- : {}, uiSchema: uiSchema?.[childName] }, childName), (0, jsx_runtime_1.jsx)(ObjectFieldItemButtons, { children: getObjectFieldButton({
75
+ Object.entries(additionalValues || {}).map(([childName]) => ((0, jsx_runtime_1.jsxs)(ObjectFieldItem, { children: [(0, jsx_runtime_1.jsx)(SchemaField, { required: required?.includes(childName), name: name ? [name, childName].join(".") : childName, schema: prepareChildSchema(schema.additionalProperties, schema), uiSchema: uiSchema?.[childName] }, childName), (0, jsx_runtime_1.jsx)(ObjectFieldItemButtons, { children: getObjectFieldButton({
78
76
  purpose: types_1.ObjectFieldButtonPurpose.REMOVE,
79
77
  onClick: () => {
80
78
  const { [childName]: _removedProperty, ...newValue } = value;
@@ -94,3 +92,12 @@ const ObjectField = (props) => {
94
92
  })] }));
95
93
  };
96
94
  exports.ObjectField = ObjectField;
95
+ function prepareChildSchema(childSchema, parentSchema) {
96
+ if (!childSchema || typeof childSchema === "boolean") {
97
+ return {};
98
+ }
99
+ if (parentSchema.readOnly) {
100
+ return { ...childSchema, readOnly: parentSchema.readOnly };
101
+ }
102
+ return childSchema;
103
+ }
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ObjectFieldSectionTitle = exports.ObjectFieldSectionWrapper = exports.ObjectFieldAddButton = exports.ObjectFieldRemoveButton = exports.ObjectFieldDownButton = exports.ObjectFieldUpButton = exports.ObjectFieldLineButton = exports.ObjectFieldButton = exports.ObjectFieldItemButtons = exports.ObjectFieldItem = exports.ObjectFieldList = void 0;
4
4
  const styled_components_1 = require("styled-components");
5
5
  exports.ObjectFieldList = styled_components_1.styled.ul `
6
- color: ${(props) => props.theme.text.default};
6
+ color: ${(props) => props.theme.color.text.default};
7
7
  list-style-type: none;
8
8
  padding: 0;
9
9
  `;
10
10
  exports.ObjectFieldItem = styled_components_1.styled.li `
11
- color: ${(props) => props.theme.text.default};
11
+ color: ${(props) => props.theme.color.text.default};
12
12
  display: flex;
13
13
  `;
14
14
  exports.ObjectFieldItemButtons = styled_components_1.styled.div `
@@ -17,8 +17,8 @@ exports.ObjectFieldItemButtons = styled_components_1.styled.div `
17
17
  `;
18
18
  exports.ObjectFieldButton = styled_components_1.styled.a `
19
19
  background-color: ${(props) => props.theme.color.intent.default.none};
20
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
21
- color: ${(props) => props.theme.neutral[900]};
20
+ border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.border.default}`};
21
+ color: ${(props) => props.theme.color.palette.neutral[900]};
22
22
  cursor: pointer;
23
23
  display: inline-block;
24
24
  font-weight: ${(props) => props.theme.typography.weight.bold};
@@ -11,6 +11,6 @@ const RadioField = (props) => {
11
11
  (0, hooks_1.useSetDefault)(props);
12
12
  const { name, uiSchema } = props;
13
13
  const { label, props: inputProps } = (0, react_1.useMemo)(() => (0, utils_1.extractUiSchema)(uiSchema), [uiSchema]);
14
- return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-boolean": name, children: (0, jsx_runtime_1.jsx)(RadioFieldInput, { inputProps: inputProps, label: label, name: name }) }));
14
+ return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-boolean": name, children: (0, jsx_runtime_1.jsx)(RadioFieldInput, { inputProps: { readOnly: props.schema.readOnly, ...inputProps }, label: label, name: name }) }));
15
15
  };
16
16
  exports.RadioField = RadioField;
@@ -5,7 +5,7 @@ const styled_components_1 = require("styled-components");
5
5
  const FieldInput_1 = require("../../components/FieldInput");
6
6
  const common_1 = require("../../styles/common");
7
7
  exports.RadioFieldContainer = styled_components_1.styled.div `
8
- color: ${(props) => props.theme.text.default};
8
+ color: ${(props) => props.theme.color.text.default};
9
9
  display: flex;
10
10
  font-family: ${(props) => props.theme.typography.fontFamily.base};
11
11
  gap: ${(props) => props.theme.spacing.l};
@@ -14,6 +14,10 @@ exports.RadioFieldContainer = styled_components_1.styled.div `
14
14
  exports.RadioFieldElement = styled_components_1.styled.label `
15
15
  display: inline-flex;
16
16
  align-items: center;
17
+
18
+ &:has(input[readonly]) {
19
+ pointer-events: none;
20
+ }
17
21
  `;
18
22
  exports.RadioFieldInputElement = (0, styled_components_1.styled)(FieldInput_1.FieldInput) `
19
23
  margin: unset;
@@ -33,6 +33,7 @@ const SchemaField = (props) => {
33
33
  schema: schemaSolvedForReferences.schema,
34
34
  uiSchema: schemaSolvedForReferences.uiSchema,
35
35
  };
36
+ console.log({ newProps });
36
37
  return (0, jsx_runtime_1.jsx)(FieldComponent, { ...newProps });
37
38
  };
38
39
  exports.SchemaField = SchemaField;
@@ -25,8 +25,8 @@ exports.SearchableMultiTagSelectFieldBadgeContainer = styled_components_1.styled
25
25
  gap: ${(props) => props.theme.strokeWidth.thin};
26
26
  `;
27
27
  exports.SearchableMultiTagSelectFieldBadge = styled_components_1.styled.span `
28
- color: ${(props) => props.theme.background.input};
29
- background: ${(props) => props.theme.text.default};
28
+ color: ${(props) => props.theme.color.background.input};
29
+ background: ${(props) => props.theme.color.text.default};
30
30
  padding: ${(props) => `0 ${props.theme.spacing.xs} 0 ${props.theme.spacing.s}`};
31
31
  border-radius: ${(props) => props.theme.borderRadius.none};
32
32
  display: flex;
@@ -43,10 +43,10 @@ exports.SearchableMultiTagSelectFieldOptionList = styled_components_1.styled.ul
43
43
  width: 100%;
44
44
  padding: unset;
45
45
  margin: unset;
46
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
46
+ border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.border.default}`};
47
47
  border-radius: ${(props) => props.theme.borderRadius.s};
48
48
  position: absolute;
49
- background: ${(props) => props.theme.background.default};
49
+ background: ${(props) => props.theme.color.background.default};
50
50
  top: 100%;
51
51
  z-index: 1000;
52
52
  `;
@@ -56,12 +56,12 @@ exports.SearchableMultiTagSelectFieldOptionListItem = styled_components_1.styled
56
56
  padding: ${(props) => `${props.theme.spacing.xxs} ${props.theme.spacing.xs}`};
57
57
  height: ${(props) => props.theme.spacing.xl};
58
58
  &:hover {
59
- background: ${(props) => props.theme.background.input};
59
+ background: ${(props) => props.theme.color.background.input};
60
60
  }
61
61
  `;
62
62
  exports.SearchableMultiTagSelectFieldOptionListWithoutItem = styled_components_1.styled.li `
63
63
  cursor: default;
64
- color: ${(props) => props.theme.background.default};
64
+ color: ${(props) => props.theme.color.background.default};
65
65
  list-style-type: none;
66
66
  padding: ${(props) => `${props.theme.spacing.xxs} ${props.theme.spacing.xs}`};
67
67
  height: ${(props) => props.theme.spacing.xl};
@@ -38,7 +38,7 @@ exports.SearchableSelectFieldClearButton = styled_components_1.styled.span `
38
38
  bottom: 0;
39
39
  top: 0;
40
40
  margin: auto;
41
- background-color: ${(props) => props.theme.neutral[500]};
41
+ background-color: ${(props) => props.theme.color.palette.neutral[500]};
42
42
  border-radius: ${(props) => props.theme.borderRadius.circle};
43
43
  line-height: 1rem;
44
44
  min-width: 1rem;
@@ -9,7 +9,7 @@ const FormRegistry_1 = require("../../FormRegistry");
9
9
  const hooks_1 = require("../../hooks");
10
10
  const styledComponents_1 = require("./styledComponents");
11
11
  const StringField = (props) => {
12
- const { templates: { FieldTemplate }, components: { FieldInput }, } = (0, react_1.useContext)(FormRegistry_1.FormRegistry);
12
+ const { templates: { FieldTemplate }, components: { FieldInput, SelectFieldInput }, } = (0, react_1.useContext)(FormRegistry_1.FormRegistry);
13
13
  (0, hooks_1.useSetDefault)(props);
14
14
  const { name, uiSchema = {}, schema } = props;
15
15
  const { type, placeholder, props: inputProps, } = (0, react_1.useMemo)(() => (0, utils_1.extractUiSchema)(uiSchema), [uiSchema]);
@@ -20,7 +20,8 @@ const StringField = (props) => {
20
20
  : { "data-fjsf-number": name };
21
21
  switch (enums?.type) {
22
22
  case "select":
23
- return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, ...fieldDataAttribute, children: (0, jsx_runtime_1.jsx)(styledComponents_1.StringFieldWrapper, { children: (0, jsx_runtime_1.jsxs)(FieldInput, { type,
23
+ return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, ...fieldDataAttribute, children: (0, jsx_runtime_1.jsx)(styledComponents_1.StringFieldWrapper, { children: (0, jsx_runtime_1.jsxs)(SelectFieldInput, { type,
24
+ readOnly: props.schema.readOnly,
24
25
  ...inputProps, name: name, formikAs: "select", onChange: (e) => {
25
26
  const selectedOption = enums?.values.find((option) => option.const.toString() === e.target.value);
26
27
  const selectedValue = selectedOption
@@ -31,8 +32,10 @@ const StringField = (props) => {
31
32
  hidden: true,
32
33
  ...uiSchema["ui:placeholderOptionOptions"]?.props, children: placeholder }), enums?.values.map((option, index) => ((0, jsx_runtime_1.jsx)("option", { value: option.const.toString(), children: option.title }, index)))] }) }) }));
33
34
  default:
35
+ console.log({ props, type, inputProps });
34
36
  return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, ...fieldDataAttribute, children: (0, jsx_runtime_1.jsx)(styledComponents_1.StringFieldWrapper, { children: (0, jsx_runtime_1.jsx)(FieldInput, { type,
35
37
  placeholder,
38
+ readOnly: props.schema.readOnly,
36
39
  ...inputProps, name: name }) }) }));
37
40
  }
38
41
  };
@@ -11,6 +11,6 @@ const TextAreaField = (props) => {
11
11
  (0, hooks_1.useSetDefault)(props);
12
12
  const { name, uiSchema } = props;
13
13
  const { props: inputProps } = (0, react_1.useMemo)(() => (0, utils_1.extractUiSchema)(uiSchema), [uiSchema]);
14
- return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-string": name, children: (0, jsx_runtime_1.jsx)(TextAreaFieldInput, { ...inputProps, name: name, formikAs: "textarea" }) }));
14
+ return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-string": name, children: (0, jsx_runtime_1.jsx)(TextAreaFieldInput, { readOnly: props.schema.readOnly, ...inputProps, name: name, formikAs: "textarea" }) }));
15
15
  };
16
16
  exports.TextAreaField = TextAreaField;
@@ -7,10 +7,10 @@ exports.TextAreaFieldInput = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  const FieldInput_1 = require("../../components/FieldInput");
9
9
  exports.TextAreaFieldInput = (0, styled_components_1.default)(FieldInput_1.FieldInput) `
10
- background-color: ${(props) => props.theme.background.input};
10
+ background-color: ${(props) => props.theme.color.background.input};
11
11
  width: 100%;
12
12
  min-height: 5rem;
13
- color: ${(props) => props.theme.text.default};
13
+ color: ${(props) => props.theme.color.text.default};
14
14
  font-family: ${(props) => props.theme.typography.fontFamily.base};
15
15
  font-size: ${(props) => props.theme.typography.size.base};
16
16
  padding: ${(props) => props.theme.spacing.s};
@@ -11,6 +11,6 @@ const ToggleField = (props) => {
11
11
  (0, hooks_1.useSetDefault)(props);
12
12
  const { name, uiSchema } = props;
13
13
  const { props: inputProps } = (0, react_1.useMemo)(() => (0, utils_1.extractUiSchema)(uiSchema), [uiSchema]);
14
- return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-boolean": name, children: (0, jsx_runtime_1.jsx)(ToggleFieldInput, { inputProps: inputProps, name: name }) }));
14
+ return ((0, jsx_runtime_1.jsx)(FieldTemplate, { ...props, "data-fjsf-boolean": name, children: (0, jsx_runtime_1.jsx)(ToggleFieldInput, { inputProps: { readOnly: props.schema.readOnly, ...inputProps }, name: name }) }));
15
15
  };
16
16
  exports.ToggleField = ToggleField;
@@ -11,7 +11,7 @@ exports.ToggleFieldToggle = styled_components_1.styled.span `
11
11
  right: 0;
12
12
  bottom: 0;
13
13
  background: ${(props) => props.theme.color.intent.default.none};
14
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
14
+ border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.border.default}`};
15
15
  -webkit-transition: 0.4s;
16
16
  transition: 0.4s;
17
17
  border-radius: ${(props) => props.theme.borderRadius.circle};
@@ -21,7 +21,7 @@ exports.ToggleFieldToggle = styled_components_1.styled.span `
21
21
  content: "";
22
22
  height: 0.9rem;
23
23
  width: 0.9rem;
24
- background: ${(props) => props.theme.background.default};
24
+ background: ${(props) => props.theme.color.background.default};
25
25
  -webkit-transition: 0.4s;
26
26
  transition: 0.4s;
27
27
  border-radius: ${(props) => props.theme.borderRadius.circle};
@@ -33,6 +33,10 @@ exports.ToggleFieldLabel = styled_components_1.styled.label `
33
33
  position: relative;
34
34
  display: inline-block;
35
35
  width: 2rem;
36
+
37
+ &:has(input[readonly]) {
38
+ pointer-events: none;
39
+ }
36
40
  `;
37
41
  exports.ToggleFieldInputElement = (0, styled_components_1.styled)(FieldInput_1.FieldInput) `
38
42
  opacity: 0;
@@ -40,7 +44,7 @@ exports.ToggleFieldInputElement = (0, styled_components_1.styled)(FieldInput_1.F
40
44
  height: 0;
41
45
 
42
46
  &:checked + ${exports.ToggleFieldToggle} {
43
- //background: ${(props) => props.theme.background.input};
47
+ //background: ${(props) => props.theme.color.background.input};
44
48
  }
45
49
 
46
50
  &:focus + ${exports.ToggleFieldToggle} {
@@ -21,17 +21,17 @@ exports.commonButtonStyles = (0, styled_components_1.css) `
21
21
  `;
22
22
  exports.commonInputStyles = (0, styled_components_1.css) `
23
23
  input {
24
- background-color: ${(props) => props.theme.background.input};
24
+ background-color: ${(props) => props.theme.color.background.input};
25
25
  border-radius: ${(props) => props.theme.borderRadius.none};
26
26
  border: ${(props) => `${props.theme.strokeWidth.thin} solid
27
- ${props.theme.border.default}`};
28
- color: ${(props) => props.theme.text.default};
27
+ ${props.theme.color.border.default}`};
28
+ color: ${(props) => props.theme.color.text.default};
29
29
  font-family: ${(props) => props.theme.typography.fontFamily.base};
30
30
  font-size: ${(props) => props.theme.typography.size.base};
31
31
  padding: ${(props) => props.theme.spacing.s};
32
32
 
33
33
  ::placeholder {
34
- color: ${(props) => props.theme.text.muted};
34
+ color: ${(props) => props.theme.color.text.muted};
35
35
  }
36
36
 
37
37
  &:focus {
@@ -44,11 +44,11 @@ exports.commonCheckboxStyles = (0, styled_components_1.css) `
44
44
  margin-left: 0;
45
45
  -webkit-appearance: none;
46
46
  appearance: none;
47
- background-color: ${(props) => props.theme.background.input};
47
+ background-color: ${(props) => props.theme.color.background.input};
48
48
  border-radius: ${(props) => props.theme.borderRadius.none};
49
49
  border: ${(props) => props.theme.strokeWidth.thin} solid
50
- ${(props) => props.theme.border.default};
51
- color: ${(props) => (0, polished_1.readableColor)(props.theme.background.input)};
50
+ ${(props) => props.theme.color.border.default};
51
+ color: ${(props) => (0, polished_1.readableColor)(props.theme.color.background.input)};
52
52
  cursor: pointer;
53
53
  display: grid;
54
54
  font: inherit;
@@ -148,11 +148,11 @@ exports.commonRadioStyles = (0, styled_components_1.css) `
148
148
  input[type="radio"] {
149
149
  -webkit-appearance: none;
150
150
  appearance: none;
151
- background-color: ${(props) => props.theme.background.input};
151
+ background-color: ${(props) => props.theme.color.background.input};
152
152
  border-radius: ${(props) => props.theme.borderRadius.circle};
153
153
  border: ${(props) => props.theme.strokeWidth.thin} solid
154
- ${(props) => props.theme.border.default};
155
- color: ${(props) => (0, polished_1.readableColor)(props.theme.background.input)};
154
+ ${(props) => props.theme.color.border.default};
155
+ color: ${(props) => (0, polished_1.readableColor)(props.theme.color.background.input)};
156
156
  cursor: pointer;
157
157
  display: grid;
158
158
  font: inherit;
@@ -187,11 +187,11 @@ exports.commonRadioStyles = (0, styled_components_1.css) `
187
187
  `;
188
188
  exports.commonSelectStyles = (0, styled_components_1.css) `
189
189
  select {
190
- background-color: ${(props) => props.theme.background.input};
190
+ background-color: ${(props) => props.theme.color.background.input};
191
191
  border-radius: ${(props) => props.theme.borderRadius.none};
192
192
  border: ${(props) => `${props.theme.strokeWidth.thin} solid
193
- ${props.theme.border.default}`};
194
- color: ${(props) => props.theme.text.default};
193
+ ${props.theme.color.border.default}`};
194
+ color: ${(props) => props.theme.color.text.default};
195
195
  font-family: ${(props) => props.theme.typography.fontFamily.base};
196
196
  font-size: ${(props) => props.theme.typography.size.base};
197
197
  font-weight: ${(props) => props.theme.typography.weight.normal};
@@ -204,7 +204,7 @@ exports.commonSelectStyles = (0, styled_components_1.css) `
204
204
  `;
205
205
  exports.datePickerIconStyles = (0, styled_components_1.css) `
206
206
  ::-webkit-calendar-picker-indicator {
207
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="${(props) => props.theme.text
207
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="${(props) => props.theme.color.text
208
208
  .default}" d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/></svg>');
209
209
 
210
210
  cursor: pointer;
@@ -5,7 +5,7 @@ exports.getComponents = getComponents;
5
5
  const styled_components_1 = require("styled-components");
6
6
  const common_1 = require("../../styles/common");
7
7
  exports.ObjectFieldTemplateWrapper = styled_components_1.styled.fieldset `
8
- color: ${(props) => props.theme.text.default};
8
+ color: ${(props) => props.theme.color.text.default};
9
9
  font-family: ${(props) => props.theme.typography.fontFamily.base};
10
10
  margin-inline: 0;
11
11
  margin-bottom: ${(props) => props.theme.spacing.xs};
@@ -13,7 +13,7 @@ exports.ObjectFieldTemplateWrapper = styled_components_1.styled.fieldset `
13
13
  ${common_1.commonSelectStyles}
14
14
  `;
15
15
  exports.ObjectFieldTemplateTitle = styled_components_1.styled.legend `
16
- color: ${(props) => props.theme.text.default};
16
+ color: ${(props) => props.theme.color.text.default};
17
17
  font-family: ${(props) => props.theme.typography.fontFamily.base};
18
18
  `;
19
19
  exports.ObjectFieldTemplateDescription = undefined;
@@ -8,6 +8,6 @@ exports.FieldTitle = styled_components_1.styled.label `
8
8
  font-family: ${(props) => props.theme.typography.fontFamily.base};
9
9
  font-weight: ${(props) => props.theme.typography.weight.medium};
10
10
  margin-right: ${(props) => props.theme.spacing.s};
11
- color: ${(props) => props.theme.text.default};
11
+ color: ${(props) => props.theme.color.text.default};
12
12
  `;
13
13
  exports.FieldDescription = styled_components_1.styled.div ``;