From 60009193373c0fb412265b99849bd0dd0ccf7b4c Mon Sep 17 00:00:00 2001 From: amirasalah Date: Sun, 14 Jun 2020 20:51:10 +0200 Subject: [PATCH] upgrade bit.dev --- .bitmap | 8 ++++---- dist/Date.d.ts | 1 + dist/Date.js | 4 ++-- dist/components/StreetAddress.d.ts | 1 + dist/components/StreetAddress.js | 4 ++-- dist/components/Text.d.ts | 1 + dist/components/Text.js | 4 ++-- dist/pages/SignIn.d.ts | 2 ++ dist/pages/SignIn.js | 8 ++++---- 9 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.bitmap b/.bitmap index 2f1ba23..1180755 100644 --- a/.bitmap +++ b/.bitmap @@ -1,7 +1,7 @@ /* THIS IS A BIT-AUTO-GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */ { - "theopensystemslab.planx-components/date@0.0.2": { + "theopensystemslab.planx-components/date@0.0.3": { "files": [ { "relativePath": "src/components/Date.tsx", @@ -49,7 +49,7 @@ "origin": "AUTHORED", "exported": true }, - "theopensystemslab.planx-components/sign-in@0.0.2": { + "theopensystemslab.planx-components/sign-in@0.0.3": { "files": [ { "relativePath": "src/pages/SignIn.tsx", @@ -73,7 +73,7 @@ "origin": "AUTHORED", "exported": true }, - "theopensystemslab.planx-components/street-address@0.0.2": { + "theopensystemslab.planx-components/street-address@0.0.3": { "files": [ { "relativePath": "src/components/StreetAddress.tsx", @@ -97,7 +97,7 @@ "origin": "AUTHORED", "exported": true }, - "theopensystemslab.planx-components/text@1.0.1": { + "theopensystemslab.planx-components/text@1.0.2": { "files": [ { "relativePath": "src/components/Text.tsx", diff --git a/dist/Date.d.ts b/dist/Date.d.ts index fbaa21b..142c404 100644 --- a/dist/Date.d.ts +++ b/dist/Date.d.ts @@ -5,6 +5,7 @@ interface IDate { type: string; options: string[]; inputProps: ILimits; + topSpacing?: number; includeSubmit?: boolean; } interface ILimits { diff --git a/dist/Date.js b/dist/Date.js index a3e860f..a09e0a4 100644 --- a/dist/Date.js +++ b/dist/Date.js @@ -7,14 +7,14 @@ import { useFormik } from "formik"; import * as React from "react"; import FocusWithin from "react-focus-within"; import Question from "./Question"; -export const Date = ({ title, type, name, options, inputProps, includeSubmit = false }) => { +export const Date = ({ title, type, name, options, inputProps, topSpacing, includeSubmit = false }) => { const formik = useFormik({ initialValues: {}, onSubmit: values => { console.log(JSON.stringify(values, null, 2)); } }); - return (React.createElement(Box, { py: 4 }, + return (React.createElement(Box, { py: topSpacing || 4 }, React.createElement(FocusWithin, null, ({ isFocused, getFocusProps }) => (React.createElement("form", Object.assign({ onSubmit: formik.handleSubmit }, getFocusProps()), title && (React.createElement(Box, { pb: 1 }, React.createElement(Question, { inFocus: isFocused }, title))), diff --git a/dist/components/StreetAddress.d.ts b/dist/components/StreetAddress.d.ts index 7e9aa71..9d7be36 100644 --- a/dist/components/StreetAddress.d.ts +++ b/dist/components/StreetAddress.d.ts @@ -4,6 +4,7 @@ interface IStreetAddress { type: string; options: string[]; includeLookup?: boolean; + topSpacing?: number; } export declare const StreetAddress: React.FC; export default StreetAddress; diff --git a/dist/components/StreetAddress.js b/dist/components/StreetAddress.js index a1c857a..f8ff44d 100644 --- a/dist/components/StreetAddress.js +++ b/dist/components/StreetAddress.js @@ -11,7 +11,7 @@ const nations = [ "nation4", "nation5" ]; -export const StreetAddress = ({ title, type, options, includeLookup = false }) => { +export const StreetAddress = ({ title, type, options, includeLookup = false, topSpacing }) => { const [errorMessageVisible, setErrorMessageVisible] = React.useState(false); const [successMessageVisible, setSuccessMessageVisible] = React.useState(false); const [submitButtonDisabled, setSubmitButtonDisabled] = React.useState(true); @@ -60,7 +60,7 @@ export const StreetAddress = ({ title, type, options, includeLookup = false }) = } }; return (React.createElement(FocusWithin, null, ({ isFocused, getFocusProps }) => (React.createElement("div", Object.assign({}, getFocusProps()), - React.createElement(Box, { py: 4, maxWidth: 480 }, + React.createElement(Box, { py: topSpacing || 4, maxWidth: 480 }, React.createElement("form", { "data-testid": "streetAddressForm", onSubmit: formik.handleSubmit }, title && (React.createElement(Box, { mb: 1.5 }, React.createElement(Question, { inFocus: isFocused }, diff --git a/dist/components/Text.d.ts b/dist/components/Text.d.ts index c1df105..b5e6126 100644 --- a/dist/components/Text.d.ts +++ b/dist/components/Text.d.ts @@ -15,6 +15,7 @@ interface IText { unit?: string; min?: string; max?: string; + topSpacing?: number; maxWords?: number; inputProps?: IMinMax; includeSubmit?: boolean; diff --git a/dist/components/Text.js b/dist/components/Text.js index 441d0e3..8473c68 100644 --- a/dist/components/Text.js +++ b/dist/components/Text.js @@ -7,7 +7,7 @@ import * as React from "react"; import FocusWithin from "react-focus-within"; import Messages from "../shared/components/submit-messages"; import Question from "./Question"; -export const Text = ({ title, label = false, fullWidth = true, placeholder = "", multiline = false, required = false, name = "", type = "", unit = "", maxWords, inputProps = { +export const Text = ({ title, topSpacing, label = false, fullWidth = true, placeholder = "", multiline = false, required = false, name = "", type = "", unit = "", maxWords, inputProps = { min: 0, max: Infinity }, includeSubmit = false }) => { @@ -32,7 +32,7 @@ export const Text = ({ title, label = false, fullWidth = true, placeholder = "", } }); return (React.createElement(FocusWithin, null, ({ isFocused, getFocusProps }) => (React.createElement("div", Object.assign({}, getFocusProps()), - React.createElement(Box, { py: 4, maxWidth: 480 }, + React.createElement(Box, { py: topSpacing || 4, maxWidth: 480 }, React.createElement("form", { "data-testid": "textForm", onSubmit: formik.handleSubmit }, title && (React.createElement(Box, { mb: 1.5 }, React.createElement(Question, { inFocus: isFocused }, title))), diff --git a/dist/pages/SignIn.d.ts b/dist/pages/SignIn.d.ts index b6abcc1..9de71b1 100644 --- a/dist/pages/SignIn.d.ts +++ b/dist/pages/SignIn.d.ts @@ -1,6 +1,8 @@ import * as React from "react"; interface ISignIn { fullPage?: boolean; + topSpacing?: number; + title?: string; } declare const SignIn: React.FC; export default SignIn; diff --git a/dist/pages/SignIn.js b/dist/pages/SignIn.js index bd62d19..3954811 100644 --- a/dist/pages/SignIn.js +++ b/dist/pages/SignIn.js @@ -13,7 +13,7 @@ const useStyles = makeStyles({ color: "currentColor" } }); -const SignIn = ({ fullPage }) => { +const SignIn = ({ fullPage, topSpacing, title }) => { const [email, setEmail] = React.useState(""); const set = useStore(state => state.set); const handleSubmit = e => { @@ -24,9 +24,9 @@ const SignIn = ({ fullPage }) => { window.location.href = "/"; }; const signInComponent = () => { - return (React.createElement(Box, { maxWidth: 400 }, - React.createElement(Typography, { component: "h1", variant: "h3", gutterBottom: true }, - React.createElement("strong", null, "Sign in")), + return (React.createElement(Box, { py: topSpacing, maxWidth: 400 }, + title && (React.createElement(Typography, { component: "h1", variant: "h3", gutterBottom: true }, + React.createElement("strong", null, title))), React.createElement(Box, { pb: 2 }, "Sign in or", " ",