aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lerna.json5
-rw-r--r--packages/forms/package.json6
-rw-r--r--packages/forms/src/input/index.tsx2
-rw-r--r--packages/forms/src/input/styles.ts2
-rw-r--r--packages/forms/src/label/index.tsx4
-rw-r--r--packages/forms/src/select/index.tsx2
-rw-r--r--packages/forms/src/typings/generic.ts1
-rw-r--r--packages/theme/package.json4
-rw-r--r--packages/typings/package.json4
-rw-r--r--packages/ui/package.json6
10 files changed, 23 insertions, 13 deletions
diff --git a/lerna.json b/lerna.json
index 96e9a5d49..6bd5b5fca 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,6 +1,9 @@
1{ 1{
2 "packages": [ 2 "packages": [
3 "packages/*" 3 "packages/theme",
4 "packages/forms",
5 "packages/ui",
6 "packages/typings"
4 ], 7 ],
5 "version": "independent", 8 "version": "independent",
6 "ignoreChanges": [ 9 "ignoreChanges": [
diff --git a/packages/forms/package.json b/packages/forms/package.json
index 8c21303f4..0ac9a846f 100644
--- a/packages/forms/package.json
+++ b/packages/forms/package.json
@@ -1,6 +1,6 @@
1{ 1{
2 "name": "@meetfranz/forms", 2 "name": "@meetfranz/forms",
3 "version": "1.0.14", 3 "version": "1.0.15",
4 "description": "React form components for Franz", 4 "description": "React form components for Franz",
5 "main": "lib/index.js", 5 "main": "lib/index.js",
6 "scripts": { 6 "scripts": {
@@ -25,7 +25,7 @@
25 "dependencies": { 25 "dependencies": {
26 "@mdi/js": "^3.3.92", 26 "@mdi/js": "^3.3.92",
27 "@mdi/react": "^1.1.0", 27 "@mdi/react": "^1.1.0",
28 "@meetfranz/theme": "^1.0.12", 28 "@meetfranz/theme": "^1.0.13",
29 "react-html-attributes": "^1.4.3", 29 "react-html-attributes": "^1.4.3",
30 "react-loader": "^2.4.5" 30 "react-loader": "^2.4.5"
31 }, 31 },
@@ -35,5 +35,5 @@
35 "react-dom": "16.7.0", 35 "react-dom": "16.7.0",
36 "react-jss": "^8.6.1" 36 "react-jss": "^8.6.1"
37 }, 37 },
38 "gitHead": "795eb685f4f57c66a2989993f0478e94baf3ca77" 38 "gitHead": "e9b9079dc921e85961954727a7b2a8eabe5b9798"
39} 39}
diff --git a/packages/forms/src/input/index.tsx b/packages/forms/src/input/index.tsx
index e410f8fef..a2d7c62d5 100644
--- a/packages/forms/src/input/index.tsx
+++ b/packages/forms/src/input/index.tsx
@@ -113,6 +113,7 @@ class InputComponent extends Component<IProps, IState> {
113 min, 113 min,
114 max, 114 max,
115 step, 115 step,
116 required,
116 } = this.props; 117 } = this.props;
117 118
118 const { 119 const {
@@ -132,6 +133,7 @@ class InputComponent extends Component<IProps, IState> {
132 showLabel={showLabel} 133 showLabel={showLabel}
133 htmlFor={id} 134 htmlFor={id}
134 className={classes.label} 135 className={classes.label}
136 isRequired={required}
135 > 137 >
136 <div 138 <div
137 className={classnames({ 139 className={classnames({
diff --git a/packages/forms/src/input/styles.ts b/packages/forms/src/input/styles.ts
index 2f7ea65f2..e2ab30a4f 100644
--- a/packages/forms/src/input/styles.ts
+++ b/packages/forms/src/input/styles.ts
@@ -4,7 +4,7 @@ import CSS from 'csstype';
4const prefixStyles = (theme: Theme) => ({ 4const prefixStyles = (theme: Theme) => ({
5 background: theme.inputPrefixBackground, 5 background: theme.inputPrefixBackground,
6 color: theme.inputPrefixColor, 6 color: theme.inputPrefixColor,
7 lineHeight: theme.inputHeight, 7 lineHeight: `${theme.inputHeight}px`,
8 padding: '0 10px', 8 padding: '0 10px',
9 fontSize: theme.uiFontSize, 9 fontSize: theme.uiFontSize,
10}); 10});
diff --git a/packages/forms/src/label/index.tsx b/packages/forms/src/label/index.tsx
index 590270a06..1b33ba22c 100644
--- a/packages/forms/src/label/index.tsx
+++ b/packages/forms/src/label/index.tsx
@@ -9,6 +9,7 @@ import styles from './styles';
9 9
10interface ILabel extends IFormField, React.LabelHTMLAttributes<HTMLLabelElement> { 10interface ILabel extends IFormField, React.LabelHTMLAttributes<HTMLLabelElement> {
11 classes: Classes; 11 classes: Classes;
12 isRequired: boolean;
12} 13}
13 14
14class LabelComponent extends Component<ILabel> { 15class LabelComponent extends Component<ILabel> {
@@ -24,6 +25,7 @@ class LabelComponent extends Component<ILabel> {
24 className, 25 className,
25 children, 26 children,
26 htmlFor, 27 htmlFor,
28 isRequired,
27 } = this.props; 29 } = this.props;
28 30
29 if (!showLabel) return children; 31 if (!showLabel) return children;
@@ -36,7 +38,7 @@ class LabelComponent extends Component<ILabel> {
36 htmlFor={htmlFor} 38 htmlFor={htmlFor}
37 > 39 >
38 {showLabel && ( 40 {showLabel && (
39 <span className={classes.label}>{title}</span> 41 <span className={classes.label}>{title}{isRequired && ' *'}</span>
40 )} 42 )}
41 <div className={classes.content}> 43 <div className={classes.content}>
42 {children} 44 {children}
diff --git a/packages/forms/src/select/index.tsx b/packages/forms/src/select/index.tsx
index cfbe91dda..0e5ded176 100644
--- a/packages/forms/src/select/index.tsx
+++ b/packages/forms/src/select/index.tsx
@@ -311,6 +311,7 @@ class SelectComponent extends Component<IProps> {
311 showLabel, 311 showLabel,
312 showSearch, 312 showSearch,
313 onChange, 313 onChange,
314 required,
314 } = this.props; 315 } = this.props;
315 316
316 const { 317 const {
@@ -340,6 +341,7 @@ class SelectComponent extends Component<IProps> {
340 showLabel={showLabel} 341 showLabel={showLabel}
341 htmlFor={id} 342 htmlFor={id}
342 className={classes.label} 343 className={classes.label}
344 isRequired={required}
343 > 345 >
344 <div 346 <div
345 className={classnames({ 347 className={classnames({
diff --git a/packages/forms/src/typings/generic.ts b/packages/forms/src/typings/generic.ts
index b7f2fc452..9688ce2c7 100644
--- a/packages/forms/src/typings/generic.ts
+++ b/packages/forms/src/typings/generic.ts
@@ -5,6 +5,7 @@ export interface IFormField {
5 showLabel?: boolean; 5 showLabel?: boolean;
6 label?: string; 6 label?: string;
7 error?: string; 7 error?: string;
8 required?: boolean;
8} 9}
9 10
10export interface IWithStyle { 11export interface IWithStyle {
diff --git a/packages/theme/package.json b/packages/theme/package.json
index e3d1e7af1..642904089 100644
--- a/packages/theme/package.json
+++ b/packages/theme/package.json
@@ -1,6 +1,6 @@
1{ 1{
2 "name": "@meetfranz/theme", 2 "name": "@meetfranz/theme",
3 "version": "1.0.12", 3 "version": "1.0.13",
4 "description": "Theme configuration for Franz", 4 "description": "Theme configuration for Franz",
5 "author": "Stefan Malzner <stefan@adlk.io>", 5 "author": "Stefan Malzner <stefan@adlk.io>",
6 "homepage": "https://github.com/meetfranz/franz", 6 "homepage": "https://github.com/meetfranz/franz",
@@ -25,5 +25,5 @@
25 "dependencies": { 25 "dependencies": {
26 "color": "^3.1.0" 26 "color": "^3.1.0"
27 }, 27 },
28 "gitHead": "795eb685f4f57c66a2989993f0478e94baf3ca77" 28 "gitHead": "e9b9079dc921e85961954727a7b2a8eabe5b9798"
29} 29}
diff --git a/packages/typings/package.json b/packages/typings/package.json
index d0f7ffc43..5da8389d6 100644
--- a/packages/typings/package.json
+++ b/packages/typings/package.json
@@ -1,6 +1,6 @@
1{ 1{
2 "name": "@meetfranz/typings", 2 "name": "@meetfranz/typings",
3 "version": "0.0.10", 3 "version": "0.0.11",
4 "description": "TypeScript typings for internal and external projects", 4 "description": "TypeScript typings for internal and external projects",
5 "author": "Stefan Malzner <stefan@adlk.io>", 5 "author": "Stefan Malzner <stefan@adlk.io>",
6 "homepage": "https://github.com/meetfranz/franz", 6 "homepage": "https://github.com/meetfranz/franz",
@@ -18,5 +18,5 @@
18 "bugs": { 18 "bugs": {
19 "url": "https://github.com/meetfranz/franz/issues" 19 "url": "https://github.com/meetfranz/franz/issues"
20 }, 20 },
21 "gitHead": "795eb685f4f57c66a2989993f0478e94baf3ca77" 21 "gitHead": "e9b9079dc921e85961954727a7b2a8eabe5b9798"
22} 22}
diff --git a/packages/ui/package.json b/packages/ui/package.json
index d6c72f31f..514b2cc7c 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,6 +1,6 @@
1{ 1{
2 "name": "@meetfranz/ui", 2 "name": "@meetfranz/ui",
3 "version": "0.0.7", 3 "version": "0.0.8",
4 "description": "React UI components for Franz", 4 "description": "React UI components for Franz",
5 "main": "lib/index.js", 5 "main": "lib/index.js",
6 "scripts": { 6 "scripts": {
@@ -25,7 +25,7 @@
25 "dependencies": { 25 "dependencies": {
26 "@mdi/js": "^3.3.92", 26 "@mdi/js": "^3.3.92",
27 "@mdi/react": "^1.1.0", 27 "@mdi/react": "^1.1.0",
28 "@meetfranz/theme": "^1.0.12", 28 "@meetfranz/theme": "^1.0.13",
29 "react-loader": "^2.4.5" 29 "react-loader": "^2.4.5"
30 }, 30 },
31 "peerDependencies": { 31 "peerDependencies": {
@@ -34,5 +34,5 @@
34 "react-dom": "16.7.0", 34 "react-dom": "16.7.0",
35 "react-jss": "^8.6.1" 35 "react-jss": "^8.6.1"
36 }, 36 },
37 "gitHead": "795eb685f4f57c66a2989993f0478e94baf3ca77" 37 "gitHead": "e9b9079dc921e85961954727a7b2a8eabe5b9798"
38} 38}