@nolwenture/formik-jsonschema-form 1.0.0-beta.2 → 1.0.0-beta.4

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 (34) hide show
  1. package/dist/cjs/Form/components/FieldInfo.js +7 -7
  2. package/dist/cjs/Form/components/FieldInput.js +15 -15
  3. package/dist/cjs/Form/components/Form.js +8 -8
  4. package/dist/cjs/Form/fields/BooleanField/styledComponents.js +1 -1
  5. package/dist/cjs/Form/fields/FileUploadField/styledComponents.js +6 -6
  6. package/dist/cjs/Form/fields/ObjectField/styledComponents.js +5 -5
  7. package/dist/cjs/Form/fields/RadioField/styledComponents.js +1 -1
  8. package/dist/cjs/Form/fields/SearchableMultiTagSelectField/styledComponents.js +7 -7
  9. package/dist/cjs/Form/fields/SearchableSelectField/styledComponents.js +1 -1
  10. package/dist/cjs/Form/fields/TextAreaField/styledComponents.js +2 -2
  11. package/dist/cjs/Form/fields/ToggleField/styledComponents.js +4 -4
  12. package/dist/cjs/Form/styles/common.js +24 -23
  13. package/dist/cjs/Form/templates/ObjectFieldTemplate/styledComponents.js +2 -2
  14. package/dist/cjs/FormView/components/Field.js +1 -1
  15. package/dist/cjs/FormView/components/old_styledComponents.js +4 -4
  16. package/dist/cjs/styles/types.js +2 -0
  17. package/dist/esm/Form/components/FieldInfo.js +7 -7
  18. package/dist/esm/Form/components/FieldInput.js +15 -15
  19. package/dist/esm/Form/components/Form.js +8 -8
  20. package/dist/esm/Form/fields/BooleanField/styledComponents.js +1 -1
  21. package/dist/esm/Form/fields/FileUploadField/styledComponents.js +6 -6
  22. package/dist/esm/Form/fields/ObjectField/styledComponents.js +5 -5
  23. package/dist/esm/Form/fields/RadioField/styledComponents.js +1 -1
  24. package/dist/esm/Form/fields/SearchableMultiTagSelectField/styledComponents.js +7 -7
  25. package/dist/esm/Form/fields/SearchableSelectField/styledComponents.js +1 -1
  26. package/dist/esm/Form/fields/TextAreaField/styledComponents.js +2 -2
  27. package/dist/esm/Form/fields/ToggleField/styledComponents.js +4 -4
  28. package/dist/esm/Form/styles/common.js +24 -23
  29. package/dist/esm/Form/templates/ObjectFieldTemplate/styledComponents.js +2 -2
  30. package/dist/esm/FormView/components/Field.js +1 -1
  31. package/dist/esm/FormView/components/old_styledComponents.js +4 -4
  32. package/dist/esm/styles/types.js +1 -0
  33. package/dist/types/styles/types.d.ts +215 -0
  34. package/package.json +5 -2
@@ -63,22 +63,22 @@ exports.FieldInfoBoxArrowElement = styled_components_1.styled.div `
63
63
  margin-left: -5px;
64
64
  `;
65
65
  exports.FieldInfoBoxInnerElement = styled_components_1.styled.div `
66
- background: ${(props) => props.theme.intent.none};
67
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.intent.none}`};
66
+ background: ${(props) => props.theme.color.intent.default.none};
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;
@@ -28,27 +28,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.
@@ -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 `
@@ -5,7 +5,7 @@ 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};
@@ -7,8 +7,8 @@ exports.FileUploadFieldContainer = exports.FileUploadFieldFileInfoText = exports
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  const polished_1 = require("polished");
9
9
  exports.FileUploadFieldFileUploadButton = styled_components_1.default.button `
10
- background-color: ${(props) => props.theme.intent.none};
11
- color: ${(props) => (0, polished_1.readableColor)(props.theme.intent.none)};
10
+ background-color: ${(props) => props.theme.color.intent.default.none};
11
+ color: ${(props) => (0, polished_1.readableColor)(props.theme.color.intent.default.none)};
12
12
  padding: ${(props) => `${props.theme.spacing.s} ${props.theme.spacing.xl}`};
13
13
  border: none;
14
14
  border-radius: ${(props) => props.theme.borderRadius.none};
@@ -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 ``;
@@ -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 `
@@ -16,9 +16,9 @@ exports.ObjectFieldItemButtons = styled_components_1.styled.div `
16
16
  margin: ${(props) => props.theme.spacing.s};
17
17
  `;
18
18
  exports.ObjectFieldButton = styled_components_1.styled.a `
19
- background-color: ${(props) => props.theme.intent.none};
20
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
21
- color: ${(props) => props.theme.neutral[900]};
19
+ background-color: ${(props) => props.theme.color.intent.default.none};
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};
@@ -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};
@@ -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;
@@ -35,7 +35,7 @@ exports.SearchableMultiTagSelectFieldBadge = styled_components_1.styled.span `
35
35
  exports.SearchableMultiTagSelectFieldBadgeCloseElement = styled_components_1.styled.span `
36
36
  cursor: pointer;
37
37
  margin-left: ${(props) => props.theme.spacing.s};
38
- font-size: ${(props) => props.theme.typography.size.s};
38
+ font-size: ${(props) => props.theme.typography.size.small};
39
39
  align-self: baseline;
40
40
  font-family: ${(props) => props.theme.typography.fontFamily.base};
41
41
  `;
@@ -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;
@@ -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};
@@ -10,8 +10,8 @@ exports.ToggleFieldToggle = styled_components_1.styled.span `
10
10
  left: 0;
11
11
  right: 0;
12
12
  bottom: 0;
13
- background: ${(props) => props.theme.intent.none};
14
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
13
+ background: ${(props) => props.theme.color.intent.default.none};
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};
@@ -40,7 +40,7 @@ exports.ToggleFieldInputElement = (0, styled_components_1.styled)(FieldInput_1.F
40
40
  height: 0;
41
41
 
42
42
  &:checked + ${exports.ToggleFieldToggle} {
43
- //background: ${(props) => props.theme.background.input};
43
+ //background: ${(props) => props.theme.color.background.input};
44
44
  }
45
45
 
46
46
  &:focus + ${exports.ToggleFieldToggle} {
@@ -5,12 +5,12 @@ const styled_components_1 = require("styled-components");
5
5
  const polished_1 = require("polished");
6
6
  exports.commonButtonStyles = (0, styled_components_1.css) `
7
7
  button {
8
- background-color: ${(props) => props.theme.intent.none};
8
+ background-color: ${(props) => props.theme.color.intent.default.none};
9
9
  border: none;
10
10
  font-size: ${(props) => props.theme.typography.size.base};
11
11
  &:hover {
12
- background: ${(props) => (0, polished_1.darken)(0.1, props.theme.intent.none)};
13
- color: ${(props) => (0, polished_1.readableColor)((0, polished_1.darken)(0.1, props.theme.intent.none))};
12
+ background: ${(props) => (0, polished_1.darken)(0.1, props.theme.color.intent.default.none)};
13
+ color: ${(props) => (0, polished_1.readableColor)((0, polished_1.darken)(0.1, props.theme.color.intent.default.none))};
14
14
  }
15
15
  padding: ${(props) => `${props.theme.spacing.m} ${props.theme.spacing.l}`};
16
16
 
@@ -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;
@@ -136,7 +136,7 @@ exports.commonCheckboxStyles = (0, styled_components_1.css) `
136
136
  }
137
137
 
138
138
  &:checked {
139
- background-color: ${(props) => props.theme.intent.none};
139
+ background-color: ${(props) => props.theme.color.intent.default.none};
140
140
 
141
141
  &:before {
142
142
  transform: scale(1);
@@ -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;
@@ -177,7 +177,7 @@ exports.commonRadioStyles = (0, styled_components_1.css) `
177
177
  }
178
178
 
179
179
  &:checked {
180
- background-color: ${(props) => props.theme.intent.none};
180
+ background-color: ${(props) => props.theme.color.intent.default.none};
181
181
 
182
182
  &:before {
183
183
  transform: scale(1);
@@ -187,14 +187,14 @@ 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
- font-weight: ${(props) => props.theme.typography.weight.base};
197
+ font-weight: ${(props) => props.theme.typography.weight.normal};
198
198
  padding: ${(props) => `${props.theme.spacing.s}`};
199
199
 
200
200
  &:focus {
@@ -203,9 +203,10 @@ exports.commonSelectStyles = (0, styled_components_1.css) `
203
203
  }
204
204
  `;
205
205
  exports.datePickerIconStyles = (0, styled_components_1.css) `
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.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>');
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.color.text
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>');
208
209
 
209
- cursor: pointer;
210
- }
210
+ cursor: pointer;
211
+ }
211
212
  `;
@@ -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 ``;
@@ -33,8 +33,8 @@ const Selected = styled_components_1.default.div `
33
33
  align-items: center;
34
34
  `;
35
35
  const SelectedBox = styled_components_1.default.span `
36
- color: ${(props) => props.theme.background.default};
37
- background: ${(props) => props.theme.text.default};
36
+ color: ${(props) => props.theme.color.background.default};
37
+ background: ${(props) => props.theme.color.text.default};
38
38
  padding: ${(props) => `0 ${props.theme.spacing.xs}`};
39
39
  font-family: ${(props) => props.theme.typography.fontFamily.base};
40
40
  font-size: ${(props) => props.theme.typography.size.small};
@@ -43,8 +43,8 @@ const SelectedBox = styled_components_1.default.span `
43
43
  align-items: center;
44
44
  `;
45
45
  const NotSelectedCircle = styled_components_1.default.span `
46
- color: ${(props) => props.theme.background.default};
47
- background: ${(props) => props.theme.text.default};
46
+ color: ${(props) => props.theme.color.background.default};
47
+ background: ${(props) => props.theme.color.text.default};
48
48
  padding: ${(props) => props.theme.spacing.xxs};
49
49
  border-radius: ${(props) => props.theme.borderRadius.circle};
50
50
  font-family: ${(props) => props.theme.typography.fontFamily.base};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -60,22 +60,22 @@ export const FieldInfoBoxArrowElement = styled.div `
60
60
  margin-left: -5px;
61
61
  `;
62
62
  export const FieldInfoBoxInnerElement = styled.div `
63
- background: ${(props) => props.theme.intent.none};
64
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.intent.none}`};
63
+ background: ${(props) => props.theme.color.intent.default.none};
64
+ border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.intent.default.none}`};
65
65
  border-radius: ${(props) => props.theme.borderRadius.none};
66
- color: ${(props) => readableColor(props.theme.text.default)};
66
+ color: ${(props) => readableColor(props.theme.color.text.default)};
67
67
  cursor: default;
68
68
  padding: ${(props) => `${props.theme.spacing.xs} ${props.theme.spacing.s}`};
69
69
  text-align: center;
70
70
  `;
71
71
  export const FieldInfoContainer = styled.a `
72
72
  position: relative;
73
- color: ${(props) => props.theme.text.default};
73
+ color: ${(props) => props.theme.color.text.default};
74
74
  background: none;
75
75
  outline: none;
76
76
  cursor: pointer;
77
77
  border: ${(props) => `${props.theme.strokeWidth.thin} solid
78
- ${props.theme.border.default}`};
78
+ ${props.theme.color.border.default}`};
79
79
  border-radius: ${(props) => props.theme.borderRadius.circle};
80
80
  line-height: 1em;
81
81
  font-family: ${(props) => props.theme.typography.fontFamily.base};
@@ -86,8 +86,8 @@ export const FieldInfoContainer = styled.a `
86
86
 
87
87
  &:active,
88
88
  &:focus {
89
- color: ${(props) => readableColor(props.theme.text.default)};
90
- background: ${(props) => props.theme.text.default};
89
+ color: ${(props) => readableColor(props.theme.color.text.default)};
90
+ background: ${(props) => props.theme.color.text.default};
91
91
  ${FieldInfoBoxElement} {
92
92
  opacity: 1;
93
93
  visibility: visible;
@@ -2,27 +2,27 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { styled } from "styled-components";
3
3
  import * as formik from "formik";
4
4
  export const FieldWrapper = styled.div `
5
- margin: ${(props) => `${props.theme.spacing.s} 0`};
6
- color: ${(props) => props.theme.text.default};
5
+ margin: ${(props) => `${props.theme.spacing.s} 0`};
6
+ color: ${(props) => props.theme.color.text.default};
7
7
  `;
8
8
  export const FieldTitle = styled.label `
9
- font-size: ${(props) => props.theme.typography.size.base};
10
- font-family: ${(props) => props.theme.typography.fontFamily.base};
11
- font-weight: ${(props) => props.theme.typography.weight.medium};
12
- margin-right: ${(props) => props.theme.spacing.s};
13
- color: ${(props) => props.theme.text.default};
9
+ font-size: ${(props) => props.theme.typography.size.base};
10
+ font-family: ${(props) => props.theme.typography.fontFamily.base};
11
+ font-weight: ${(props) => props.theme.typography.weight.medium};
12
+ margin-right: ${(props) => props.theme.spacing.s};
13
+ color: ${(props) => props.theme.color.text.default};
14
14
  `;
15
15
  export const FieldDescription = styled.p `
16
- color: ${(props) => props.theme.text.default};
17
- margin: 0;
18
- font-family: ${(props) => props.theme.typography.fontFamily.base};
19
- font-size: ${(props) => props.theme.typography.size.base};
16
+ color: ${(props) => props.theme.color.text.default};
17
+ margin: 0;
18
+ font-family: ${(props) => props.theme.typography.fontFamily.base};
19
+ font-size: ${(props) => props.theme.typography.size.base};
20
20
  `;
21
21
  export const FieldHelp = styled.p `
22
- color: ${(props) => props.theme.text.default};
23
- margin: 0;
24
- font-family: ${(props) => props.theme.typography.fontFamily.base};
25
- font-size: ${(props) => props.theme.typography.size.small};
22
+ color: ${(props) => props.theme.color.text.default};
23
+ margin: 0;
24
+ font-family: ${(props) => props.theme.typography.fontFamily.base};
25
+ font-size: ${(props) => props.theme.typography.size.small};
26
26
  `;
27
27
  /*
28
28
  * Works like Formik field, but "as" props needs to be given with "formikAs", since styled components uses as.
@@ -2,22 +2,22 @@ import styled from "styled-components";
2
2
  import * as formik from "formik";
3
3
  import { commonCheckboxStyles, commonRadioStyles, commonButtonStyles, commonInputStyles, commonSelectStyles, } from "../styles/common";
4
4
  export const Form = styled(formik.Form) `
5
- ${commonCheckboxStyles}
5
+ ${commonCheckboxStyles}
6
6
 
7
- ${commonRadioStyles}
7
+ ${commonRadioStyles}
8
8
 
9
- color: ${(props) => props.theme.text.default};
10
- font-family: ${(props) => props.theme.typography.fontFamily.base};
9
+ color: ${(props) => props.theme.color.text.default};
10
+ font-family: ${(props) => props.theme.typography.fontFamily.base};
11
11
 
12
- ${commonButtonStyles}
12
+ ${commonButtonStyles}
13
13
 
14
- ${commonInputStyles}
14
+ ${commonInputStyles}
15
15
 
16
16
  ${commonSelectStyles}
17
17
 
18
18
  :focus {
19
- ${(props) => props.theme.focus.default};
20
- }
19
+ ${(props) => props.theme.focus.default};
20
+ }
21
21
  `;
22
22
  export const FormButtonWrapper = styled.div ``;
23
23
  export const FormButton = styled.button `
@@ -2,7 +2,7 @@ import { styled } from "styled-components";
2
2
  import { commonCheckboxStyles } from "../../styles/common";
3
3
  export const BooleanFieldWrapper = styled.div `
4
4
  align-items: center;
5
- color: ${(props) => props.theme.text.default};
5
+ color: ${(props) => props.theme.color.text.default};
6
6
  cursor: pointer;
7
7
  display: flex;
8
8
  font-family: ${(props) => props.theme.typography.fontFamily.base};
@@ -1,8 +1,8 @@
1
1
  import styled from "styled-components";
2
2
  import { readableColor } from "polished";
3
3
  export const FileUploadFieldFileUploadButton = styled.button `
4
- background-color: ${(props) => props.theme.intent.none};
5
- color: ${(props) => readableColor(props.theme.intent.none)};
4
+ background-color: ${(props) => props.theme.color.intent.default.none};
5
+ color: ${(props) => readableColor(props.theme.color.intent.default.none)};
6
6
  padding: ${(props) => `${props.theme.spacing.s} ${props.theme.spacing.xl}`};
7
7
  border: none;
8
8
  border-radius: ${(props) => props.theme.borderRadius.none};
@@ -17,14 +17,14 @@ export const FileUploadFieldProgressBarContainer = styled.div `
17
17
  width: 7.5rem;
18
18
  height: ${(props) => props.theme.spacing.xl};
19
19
  border-radius: ${(props) => props.theme.strokeWidth.thick};
20
- background-color: ${(props) => props.theme.background.input};
20
+ background-color: ${(props) => props.theme.color.background.input};
21
21
  position: relative;
22
22
  margin-left: ${(props) => props.theme.spacing.s};
23
23
  `;
24
24
  export const FileUploadFieldProgressBar = styled.div `
25
25
  width: ${(props) => props.$progress}%;
26
26
  height: 100%;
27
- background-color: ${(props) => props.theme.neutral[500]};
27
+ background-color: ${(props) => props.theme.color.palette.neutral[500]};
28
28
  border-radius: ${(props) => props.theme.strokeWidth.thick};
29
29
  transition: width 0.2s ease;
30
30
  `;
@@ -33,7 +33,7 @@ export const FileUploadFieldProgressText = styled.span `
33
33
  top: 50%;
34
34
  left: 50%;
35
35
  transform: translate(-50%, -50%);
36
- color: ${(props) => props.theme.neutral[200]};
36
+ color: ${(props) => props.theme.color.palette.neutral[200]};
37
37
  font-family: ${(props) => props.theme.typography.fontFamily.base};
38
38
  font-weight: ${(props) => props.theme.typography.weight.bold};
39
39
  `;
@@ -52,6 +52,6 @@ export const FileUploadFieldFileInfoText = styled.span `
52
52
  margin-left: ${(props) => props.theme.spacing.s};
53
53
  font-family: ${(props) => props.theme.typography.fontFamily.base};
54
54
  font-size: ${(props) => props.theme.typography.size.base};
55
- color: ${(props) => props.theme.text.default};
55
+ color: ${(props) => props.theme.color.text.default};
56
56
  `;
57
57
  export const FileUploadFieldContainer = styled.div ``;
@@ -1,11 +1,11 @@
1
1
  import { styled } from "styled-components";
2
2
  export const ObjectFieldList = styled.ul `
3
- color: ${(props) => props.theme.text.default};
3
+ color: ${(props) => props.theme.color.text.default};
4
4
  list-style-type: none;
5
5
  padding: 0;
6
6
  `;
7
7
  export const ObjectFieldItem = styled.li `
8
- color: ${(props) => props.theme.text.default};
8
+ color: ${(props) => props.theme.color.text.default};
9
9
  display: flex;
10
10
  `;
11
11
  export const ObjectFieldItemButtons = styled.div `
@@ -13,9 +13,9 @@ export const ObjectFieldItemButtons = styled.div `
13
13
  margin: ${(props) => props.theme.spacing.s};
14
14
  `;
15
15
  export const ObjectFieldButton = styled.a `
16
- background-color: ${(props) => props.theme.intent.none};
17
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
18
- color: ${(props) => props.theme.neutral[900]};
16
+ background-color: ${(props) => props.theme.color.intent.default.none};
17
+ border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.border.default}`};
18
+ color: ${(props) => props.theme.color.palette.neutral[900]};
19
19
  cursor: pointer;
20
20
  display: inline-block;
21
21
  font-weight: ${(props) => props.theme.typography.weight.bold};
@@ -2,7 +2,7 @@ import { styled } from "styled-components";
2
2
  import { FieldInput } from "../../components/FieldInput";
3
3
  import { commonRadioStyles } from "../../styles/common";
4
4
  export const RadioFieldContainer = styled.div `
5
- color: ${(props) => props.theme.text.default};
5
+ color: ${(props) => props.theme.color.text.default};
6
6
  display: flex;
7
7
  font-family: ${(props) => props.theme.typography.fontFamily.base};
8
8
  gap: ${(props) => props.theme.spacing.l};
@@ -22,8 +22,8 @@ export const SearchableMultiTagSelectFieldBadgeContainer = styled.div `
22
22
  gap: ${(props) => props.theme.strokeWidth.thin};
23
23
  `;
24
24
  export const SearchableMultiTagSelectFieldBadge = styled.span `
25
- color: ${(props) => props.theme.background.input};
26
- background: ${(props) => props.theme.text.default};
25
+ color: ${(props) => props.theme.color.background.input};
26
+ background: ${(props) => props.theme.color.text.default};
27
27
  padding: ${(props) => `0 ${props.theme.spacing.xs} 0 ${props.theme.spacing.s}`};
28
28
  border-radius: ${(props) => props.theme.borderRadius.none};
29
29
  display: flex;
@@ -32,7 +32,7 @@ export const SearchableMultiTagSelectFieldBadge = styled.span `
32
32
  export const SearchableMultiTagSelectFieldBadgeCloseElement = styled.span `
33
33
  cursor: pointer;
34
34
  margin-left: ${(props) => props.theme.spacing.s};
35
- font-size: ${(props) => props.theme.typography.size.s};
35
+ font-size: ${(props) => props.theme.typography.size.small};
36
36
  align-self: baseline;
37
37
  font-family: ${(props) => props.theme.typography.fontFamily.base};
38
38
  `;
@@ -40,10 +40,10 @@ export const SearchableMultiTagSelectFieldOptionList = styled.ul `
40
40
  width: 100%;
41
41
  padding: unset;
42
42
  margin: unset;
43
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
43
+ border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.border.default}`};
44
44
  border-radius: ${(props) => props.theme.borderRadius.s};
45
45
  position: absolute;
46
- background: ${(props) => props.theme.background.default};
46
+ background: ${(props) => props.theme.color.background.default};
47
47
  top: 100%;
48
48
  z-index: 1000;
49
49
  `;
@@ -53,12 +53,12 @@ export const SearchableMultiTagSelectFieldOptionListItem = styled.li `
53
53
  padding: ${(props) => `${props.theme.spacing.xxs} ${props.theme.spacing.xs}`};
54
54
  height: ${(props) => props.theme.spacing.xl};
55
55
  &:hover {
56
- background: ${(props) => props.theme.background.input};
56
+ background: ${(props) => props.theme.color.background.input};
57
57
  }
58
58
  `;
59
59
  export const SearchableMultiTagSelectFieldOptionListWithoutItem = styled.li `
60
60
  cursor: default;
61
- color: ${(props) => props.theme.background.default};
61
+ color: ${(props) => props.theme.color.background.default};
62
62
  list-style-type: none;
63
63
  padding: ${(props) => `${props.theme.spacing.xxs} ${props.theme.spacing.xs}`};
64
64
  height: ${(props) => props.theme.spacing.xl};
@@ -35,7 +35,7 @@ export const SearchableSelectFieldClearButton = styled.span `
35
35
  bottom: 0;
36
36
  top: 0;
37
37
  margin: auto;
38
- background-color: ${(props) => props.theme.neutral[500]};
38
+ background-color: ${(props) => props.theme.color.palette.neutral[500]};
39
39
  border-radius: ${(props) => props.theme.borderRadius.circle};
40
40
  line-height: 1rem;
41
41
  min-width: 1rem;
@@ -1,10 +1,10 @@
1
1
  import styled from "styled-components";
2
2
  import { FieldInput } from "../../components/FieldInput";
3
3
  export const TextAreaFieldInput = styled(FieldInput) `
4
- background-color: ${(props) => props.theme.background.input};
4
+ background-color: ${(props) => props.theme.color.background.input};
5
5
  width: 100%;
6
6
  min-height: 5rem;
7
- color: ${(props) => props.theme.text.default};
7
+ color: ${(props) => props.theme.color.text.default};
8
8
  font-family: ${(props) => props.theme.typography.fontFamily.base};
9
9
  font-size: ${(props) => props.theme.typography.size.base};
10
10
  padding: ${(props) => props.theme.spacing.s};
@@ -7,8 +7,8 @@ export const ToggleFieldToggle = styled.span `
7
7
  left: 0;
8
8
  right: 0;
9
9
  bottom: 0;
10
- background: ${(props) => props.theme.intent.none};
11
- border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
10
+ background: ${(props) => props.theme.color.intent.default.none};
11
+ border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.color.border.default}`};
12
12
  -webkit-transition: 0.4s;
13
13
  transition: 0.4s;
14
14
  border-radius: ${(props) => props.theme.borderRadius.circle};
@@ -18,7 +18,7 @@ export const ToggleFieldToggle = styled.span `
18
18
  content: "";
19
19
  height: 0.9rem;
20
20
  width: 0.9rem;
21
- background: ${(props) => props.theme.background.default};
21
+ background: ${(props) => props.theme.color.background.default};
22
22
  -webkit-transition: 0.4s;
23
23
  transition: 0.4s;
24
24
  border-radius: ${(props) => props.theme.borderRadius.circle};
@@ -37,7 +37,7 @@ export const ToggleFieldInputElement = styled(FieldInput) `
37
37
  height: 0;
38
38
 
39
39
  &:checked + ${ToggleFieldToggle} {
40
- //background: ${(props) => props.theme.background.input};
40
+ //background: ${(props) => props.theme.color.background.input};
41
41
  }
42
42
 
43
43
  &:focus + ${ToggleFieldToggle} {
@@ -2,12 +2,12 @@ import { css } from "styled-components";
2
2
  import { darken, readableColor } from "polished";
3
3
  export const commonButtonStyles = css `
4
4
  button {
5
- background-color: ${(props) => props.theme.intent.none};
5
+ background-color: ${(props) => props.theme.color.intent.default.none};
6
6
  border: none;
7
7
  font-size: ${(props) => props.theme.typography.size.base};
8
8
  &:hover {
9
- background: ${(props) => darken(0.1, props.theme.intent.none)};
10
- color: ${(props) => readableColor(darken(0.1, props.theme.intent.none))};
9
+ background: ${(props) => darken(0.1, props.theme.color.intent.default.none)};
10
+ color: ${(props) => readableColor(darken(0.1, props.theme.color.intent.default.none))};
11
11
  }
12
12
  padding: ${(props) => `${props.theme.spacing.m} ${props.theme.spacing.l}`};
13
13
 
@@ -18,17 +18,17 @@ export const commonButtonStyles = css `
18
18
  `;
19
19
  export const commonInputStyles = css `
20
20
  input {
21
- background-color: ${(props) => props.theme.background.input};
21
+ background-color: ${(props) => props.theme.color.background.input};
22
22
  border-radius: ${(props) => props.theme.borderRadius.none};
23
23
  border: ${(props) => `${props.theme.strokeWidth.thin} solid
24
- ${props.theme.border.default}`};
25
- color: ${(props) => props.theme.text.default};
24
+ ${props.theme.color.border.default}`};
25
+ color: ${(props) => props.theme.color.text.default};
26
26
  font-family: ${(props) => props.theme.typography.fontFamily.base};
27
27
  font-size: ${(props) => props.theme.typography.size.base};
28
28
  padding: ${(props) => props.theme.spacing.s};
29
29
 
30
30
  ::placeholder {
31
- color: ${(props) => props.theme.text.muted};
31
+ color: ${(props) => props.theme.color.text.muted};
32
32
  }
33
33
 
34
34
  &:focus {
@@ -41,11 +41,11 @@ export const commonCheckboxStyles = css `
41
41
  margin-left: 0;
42
42
  -webkit-appearance: none;
43
43
  appearance: none;
44
- background-color: ${(props) => props.theme.background.input};
44
+ background-color: ${(props) => props.theme.color.background.input};
45
45
  border-radius: ${(props) => props.theme.borderRadius.none};
46
46
  border: ${(props) => props.theme.strokeWidth.thin} solid
47
- ${(props) => props.theme.border.default};
48
- color: ${(props) => readableColor(props.theme.background.input)};
47
+ ${(props) => props.theme.color.border.default};
48
+ color: ${(props) => readableColor(props.theme.color.background.input)};
49
49
  cursor: pointer;
50
50
  display: grid;
51
51
  font: inherit;
@@ -133,7 +133,7 @@ export const commonCheckboxStyles = css `
133
133
  }
134
134
 
135
135
  &:checked {
136
- background-color: ${(props) => props.theme.intent.none};
136
+ background-color: ${(props) => props.theme.color.intent.default.none};
137
137
 
138
138
  &:before {
139
139
  transform: scale(1);
@@ -145,11 +145,11 @@ export const commonRadioStyles = css `
145
145
  input[type="radio"] {
146
146
  -webkit-appearance: none;
147
147
  appearance: none;
148
- background-color: ${(props) => props.theme.background.input};
148
+ background-color: ${(props) => props.theme.color.background.input};
149
149
  border-radius: ${(props) => props.theme.borderRadius.circle};
150
150
  border: ${(props) => props.theme.strokeWidth.thin} solid
151
- ${(props) => props.theme.border.default};
152
- color: ${(props) => readableColor(props.theme.background.input)};
151
+ ${(props) => props.theme.color.border.default};
152
+ color: ${(props) => readableColor(props.theme.color.background.input)};
153
153
  cursor: pointer;
154
154
  display: grid;
155
155
  font: inherit;
@@ -174,7 +174,7 @@ export const commonRadioStyles = css `
174
174
  }
175
175
 
176
176
  &:checked {
177
- background-color: ${(props) => props.theme.intent.none};
177
+ background-color: ${(props) => props.theme.color.intent.default.none};
178
178
 
179
179
  &:before {
180
180
  transform: scale(1);
@@ -184,14 +184,14 @@ export const commonRadioStyles = css `
184
184
  `;
185
185
  export const commonSelectStyles = css `
186
186
  select {
187
- background-color: ${(props) => props.theme.background.input};
187
+ background-color: ${(props) => props.theme.color.background.input};
188
188
  border-radius: ${(props) => props.theme.borderRadius.none};
189
189
  border: ${(props) => `${props.theme.strokeWidth.thin} solid
190
- ${props.theme.border.default}`};
191
- color: ${(props) => props.theme.text.default};
190
+ ${props.theme.color.border.default}`};
191
+ color: ${(props) => props.theme.color.text.default};
192
192
  font-family: ${(props) => props.theme.typography.fontFamily.base};
193
193
  font-size: ${(props) => props.theme.typography.size.base};
194
- font-weight: ${(props) => props.theme.typography.weight.base};
194
+ font-weight: ${(props) => props.theme.typography.weight.normal};
195
195
  padding: ${(props) => `${props.theme.spacing.s}`};
196
196
 
197
197
  &:focus {
@@ -200,9 +200,10 @@ export const commonSelectStyles = css `
200
200
  }
201
201
  `;
202
202
  export const datePickerIconStyles = css `
203
- ::-webkit-calendar-picker-indicator {
204
- 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.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>');
203
+ ::-webkit-calendar-picker-indicator {
204
+ 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
205
+ .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>');
205
206
 
206
- cursor: pointer;
207
- }
207
+ cursor: pointer;
208
+ }
208
209
  `;
@@ -1,7 +1,7 @@
1
1
  import { styled } from "styled-components";
2
2
  import { commonInputStyles, commonSelectStyles } from "../../styles/common";
3
3
  export const ObjectFieldTemplateWrapper = styled.fieldset `
4
- color: ${(props) => props.theme.text.default};
4
+ color: ${(props) => props.theme.color.text.default};
5
5
  font-family: ${(props) => props.theme.typography.fontFamily.base};
6
6
  margin-inline: 0;
7
7
  margin-bottom: ${(props) => props.theme.spacing.xs};
@@ -9,7 +9,7 @@ export const ObjectFieldTemplateWrapper = styled.fieldset `
9
9
  ${commonSelectStyles}
10
10
  `;
11
11
  export const ObjectFieldTemplateTitle = styled.legend `
12
- color: ${(props) => props.theme.text.default};
12
+ color: ${(props) => props.theme.color.text.default};
13
13
  font-family: ${(props) => props.theme.typography.fontFamily.base};
14
14
  `;
15
15
  export const ObjectFieldTemplateDescription = undefined;
@@ -5,6 +5,6 @@ export const FieldTitle = styled.label `
5
5
  font-family: ${(props) => props.theme.typography.fontFamily.base};
6
6
  font-weight: ${(props) => props.theme.typography.weight.medium};
7
7
  margin-right: ${(props) => props.theme.spacing.s};
8
- color: ${(props) => props.theme.text.default};
8
+ color: ${(props) => props.theme.color.text.default};
9
9
  `;
10
10
  export const FieldDescription = styled.div ``;
@@ -26,8 +26,8 @@ const Selected = styled.div `
26
26
  align-items: center;
27
27
  `;
28
28
  const SelectedBox = styled.span `
29
- color: ${(props) => props.theme.background.default};
30
- background: ${(props) => props.theme.text.default};
29
+ color: ${(props) => props.theme.color.background.default};
30
+ background: ${(props) => props.theme.color.text.default};
31
31
  padding: ${(props) => `0 ${props.theme.spacing.xs}`};
32
32
  font-family: ${(props) => props.theme.typography.fontFamily.base};
33
33
  font-size: ${(props) => props.theme.typography.size.small};
@@ -36,8 +36,8 @@ const SelectedBox = styled.span `
36
36
  align-items: center;
37
37
  `;
38
38
  const NotSelectedCircle = styled.span `
39
- color: ${(props) => props.theme.background.default};
40
- background: ${(props) => props.theme.text.default};
39
+ color: ${(props) => props.theme.color.background.default};
40
+ background: ${(props) => props.theme.color.text.default};
41
41
  padding: ${(props) => props.theme.spacing.xxs};
42
42
  border-radius: ${(props) => props.theme.borderRadius.circle};
43
43
  font-family: ${(props) => props.theme.typography.fontFamily.base};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,215 @@
1
+ export type ThemeType = {
2
+ color: {
3
+ palette: {
4
+ primary: {
5
+ 900: string;
6
+ 800: string;
7
+ 700: string;
8
+ 600: string;
9
+ 500: string;
10
+ 400: string;
11
+ 300: string;
12
+ 200: string;
13
+ 100: string;
14
+ };
15
+ secondary: {
16
+ 900: string;
17
+ 800: string;
18
+ 700: string;
19
+ 600: string;
20
+ 500: string;
21
+ 400: string;
22
+ 300: string;
23
+ 200: string;
24
+ 100: string;
25
+ };
26
+ success: {
27
+ 900: string;
28
+ 800: string;
29
+ 700: string;
30
+ 600: string;
31
+ 500: string;
32
+ 400: string;
33
+ 300: string;
34
+ 200: string;
35
+ 100: string;
36
+ };
37
+ warning: {
38
+ 900: string;
39
+ 800: string;
40
+ 700: string;
41
+ 600: string;
42
+ 500: string;
43
+ 400: string;
44
+ 300: string;
45
+ 200: string;
46
+ 100: string;
47
+ };
48
+ danger: {
49
+ 900: string;
50
+ 800: string;
51
+ 700: string;
52
+ 600: string;
53
+ 500: string;
54
+ 400: string;
55
+ 300: string;
56
+ 200: string;
57
+ 100: string;
58
+ };
59
+ neutral: {
60
+ 900: string;
61
+ 800: string;
62
+ 700: string;
63
+ 600: string;
64
+ 500: string;
65
+ 400: string;
66
+ 300: string;
67
+ 200: string;
68
+ 100: string;
69
+ };
70
+ };
71
+ background: {
72
+ default: string;
73
+ input: string;
74
+ };
75
+ border: {
76
+ default: string;
77
+ muted: string;
78
+ };
79
+ text: {
80
+ muted: string;
81
+ default: string;
82
+ dark: string;
83
+ secondary: string;
84
+ selected: string;
85
+ success: string;
86
+ info: string;
87
+ warning: string;
88
+ danger: string;
89
+ };
90
+ intent: {
91
+ default: {
92
+ none: string;
93
+ primary: string;
94
+ link: string;
95
+ info: string;
96
+ secondary: string;
97
+ tertiary: string;
98
+ success: string;
99
+ warning: string;
100
+ danger: string;
101
+ };
102
+ raised: {
103
+ none: string;
104
+ primary: string;
105
+ link: string;
106
+ info: string;
107
+ secondary: string;
108
+ tertiary: string;
109
+ success: string;
110
+ warning: string;
111
+ danger: string;
112
+ };
113
+ overlay: {
114
+ none: string;
115
+ primary: string;
116
+ link: string;
117
+ info: string;
118
+ secondary: string;
119
+ tertiary: string;
120
+ success: string;
121
+ warning: string;
122
+ danger: string;
123
+ };
124
+ sunken: {
125
+ none: string;
126
+ primary: string;
127
+ link: string;
128
+ info: string;
129
+ secondary: string;
130
+ tertiary: string;
131
+ success: string;
132
+ warning: string;
133
+ danger: string;
134
+ };
135
+ };
136
+ overlay: {
137
+ 10: string;
138
+ 20: string;
139
+ 30: string;
140
+ 40: string;
141
+ 50: string;
142
+ 60: string;
143
+ 70: string;
144
+ 80: string;
145
+ 90: string;
146
+ };
147
+ };
148
+ elevation: {
149
+ default: string;
150
+ raised: string;
151
+ overlay: string;
152
+ sunken: string;
153
+ };
154
+ focus: {
155
+ default: string;
156
+ danger: string;
157
+ };
158
+ spacing: {
159
+ none: string;
160
+ xxs: string;
161
+ xs: string;
162
+ s: string;
163
+ m: string;
164
+ l: string;
165
+ xl: string;
166
+ xxl: string;
167
+ xxxl: string;
168
+ xxxxl: string;
169
+ xxxxxl: string;
170
+ };
171
+ borderRadius: {
172
+ none: string;
173
+ s: string;
174
+ m: string;
175
+ l: string;
176
+ xl: string;
177
+ circle: string;
178
+ };
179
+ strokeWidth: {
180
+ thin: string;
181
+ thick: string;
182
+ thicker: string;
183
+ thickest: string;
184
+ };
185
+ typography: {
186
+ fontFamily: {
187
+ base: string;
188
+ monospace: string;
189
+ };
190
+ weight: {
191
+ normal: string;
192
+ medium: string;
193
+ bold: string;
194
+ extrabold: string;
195
+ };
196
+ size: {
197
+ small: string;
198
+ base: string;
199
+ large: string;
200
+ h1: string;
201
+ h2: string;
202
+ h3: string;
203
+ h4: string;
204
+ };
205
+ lineHeight: {
206
+ small: string;
207
+ base: string;
208
+ large: string;
209
+ h1: string;
210
+ h2: string;
211
+ h3: string;
212
+ h4: string;
213
+ };
214
+ };
215
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolwenture/formik-jsonschema-form",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.4",
4
4
  "description": "Formik form generation from json schema",
5
5
  "author": "Antti Vikman <antti.vikman@nolwenture.com>",
6
6
  "contributors": [
@@ -68,7 +68,7 @@
68
68
  "@babel/preset-env": "^7.25.4",
69
69
  "@babel/preset-react": "^7.24.1",
70
70
  "@babel/preset-typescript": "^7.24.1",
71
- "@nolwenture/component-library": "^1.0.3",
71
+ "@nolwenture/component-library": "^1.0.6",
72
72
  "@storybook/addon-essentials": "^8.0.5",
73
73
  "@storybook/addon-interactions": "^8.0.5",
74
74
  "@storybook/addon-links": "^8.0.5",
@@ -91,6 +91,9 @@
91
91
  "jest": "^29.7.0",
92
92
  "jest-environment-jsdom": "^29.7.0",
93
93
  "react": "^18.2.0",
94
+ "react-dom": "^18.2.0",
95
+ "react-router": "^7.0.1",
96
+ "react-router-dom": "^7.0.1",
94
97
  "rimraf": "^6.0.1",
95
98
  "storybook": "^8.0.5",
96
99
  "styled-components": "^6.1.8",