@vrobots/storybook 0.1.45 → 0.1.47

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.
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vrobots/storybook",
3
3
  "private": false,
4
- "version": "0.1.45",
4
+ "version": "0.1.47",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Button, Card, Field, Input, Stack } from "@chakra-ui/react";
3
3
  import { useForm } from "react-hook-form";
4
4
  import { PasswordInput } from "../ui/password-input";
5
- import utils from "../../utils";
6
5
  const Login = ({ title, description, onLogin, ...props }) => {
7
6
  const { register, handleSubmit, formState: { errors }, } = useForm();
8
7
  return (_jsx(Card.Root, { ...props, children: _jsxs(Card.Body, { children: [_jsx(Card.Title, { children: title || "Login" }), !!description && _jsx(Card.Description, { children: description }), _jsxs(Box, { as: "form", onSubmit: handleSubmit((data) => onLogin(data)), mt: 4, children: [_jsxs(Stack, { gap: "4", children: [_jsxs(Field.Root, { invalid: !!errors.emailAddress, required: true, children: [_jsx(Field.Label, { children: "Email Address" }), _jsx(Input, { ...register("emailAddress", {
@@ -13,7 +12,6 @@ const Login = ({ title, description, onLogin, ...props }) => {
13
12
  }
14
13
  }) }), _jsx(Field.ErrorText, { children: errors.emailAddress?.message })] }), _jsxs(Field.Root, { invalid: !!errors.password, children: [_jsx(Field.Label, { children: "Password" }), _jsx(PasswordInput, { ...register("password", {
15
14
  required: "Please enter your password",
16
- validate: (value) => utils.validation.password(value)
17
- }) }), _jsx(Field.ErrorText, { as: "pre", children: errors.password?.message })] })] }), _jsx(Button, { type: "submit", colorScheme: "teal", width: "full", mt: 6, children: "Login" })] })] }) }));
15
+ }) }), _jsx(Field.ErrorText, { children: errors.password?.message })] })] }), _jsx(Button, { type: "submit", colorScheme: "teal", width: "full", mt: 6, children: "Login" })] })] }) }));
18
16
  };
19
17
  export default Login;
@@ -1,3 +1,4 @@
1
+ export * from "./Login";
1
2
  declare const Form: {
2
3
  (): null;
3
4
  Login: ({ title, description, onLogin, ...props }: import("./Login").ILoginProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import Login from "./Login";
2
+ export * from "./Login";
2
3
  const Form = () => null;
3
4
  Form.Login = Login;
4
5
  export default Form;
@@ -1,7 +1,7 @@
1
1
  import type { StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ title, description, onLogin, ...props }: import("../components/form/Login").ILoginProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ title, description, onLogin, ...props }: import("../components/form").ILoginProps) => import("react/jsx-runtime").JSX.Element;
5
5
  tags: string[];
6
6
  parameters: {
7
7
  layout: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vrobots/storybook",
3
3
  "private": false,
4
- "version": "0.1.45",
4
+ "version": "0.1.47",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",