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

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.
@@ -63,8 +63,8 @@ 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
69
  color: ${(props) => (0, polished_1.readableColor)(props.theme.text.default)};
70
70
  cursor: default;
@@ -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};
@@ -16,7 +16,7 @@ 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};
19
+ background-color: ${(props) => props.theme.color.intent.default.none};
20
20
  border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
21
21
  color: ${(props) => props.theme.neutral[900]};
22
22
  cursor: pointer;
@@ -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
  `;
@@ -10,7 +10,7 @@ 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};
13
+ background: ${(props) => props.theme.color.intent.default.none};
14
14
  border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
15
15
  -webkit-transition: 0.4s;
16
16
  transition: 0.4s;
@@ -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
 
@@ -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);
@@ -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);
@@ -194,7 +194,7 @@ exports.commonSelectStyles = (0, styled_components_1.css) `
194
194
  color: ${(props) => props.theme.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.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
  `;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -60,8 +60,8 @@ 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
66
  color: ${(props) => readableColor(props.theme.text.default)};
67
67
  cursor: default;
@@ -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};
@@ -13,7 +13,7 @@ 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};
16
+ background-color: ${(props) => props.theme.color.intent.default.none};
17
17
  border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
18
18
  color: ${(props) => props.theme.neutral[900]};
19
19
  cursor: pointer;
@@ -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
  `;
@@ -7,7 +7,7 @@ export const ToggleFieldToggle = styled.span `
7
7
  left: 0;
8
8
  right: 0;
9
9
  bottom: 0;
10
- background: ${(props) => props.theme.intent.none};
10
+ background: ${(props) => props.theme.color.intent.default.none};
11
11
  border: ${(props) => `${props.theme.strokeWidth.thin} solid ${props.theme.border.default}`};
12
12
  -webkit-transition: 0.4s;
13
13
  transition: 0.4s;
@@ -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
 
@@ -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);
@@ -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);
@@ -191,7 +191,7 @@ export const commonSelectStyles = css `
191
191
  color: ${(props) => props.theme.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.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
  `;
@@ -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.3",
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.4",
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",