Skip to content

Commit

Permalink
feat: reorganize
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroslavPetrik committed Apr 15, 2023
1 parent 7d09b99 commit ed29b52
Show file tree
Hide file tree
Showing 64 changed files with 31 additions and 165 deletions.
58 changes: 0 additions & 58 deletions src/array-field/FlatArrayField.stories.skip.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { arrayFieldAtoms, textField } from "@form-atoms/field";

import { ArrayField } from "./ArrayField";
import { FormStory, VariantProps, meta } from "../stories";
import { FormStory, VariantProps, meta } from "../story-form";
import { TextField } from "../text-field";

export default {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Fragment } from "react";

import { ArrayField } from "./ArrayField";
import { NumberField } from "../number-field";
import { FormStory, VariantProps, meta } from "../stories";
import { FormStory, VariantProps, meta } from "../story-form";
import { TextField } from "../text-field";

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {

import { ArrayField } from "./ArrayField";
import { RadioOption } from "../radio-option";
import { FormStory, VariantProps, meta } from "../stories";
import { FormStory, VariantProps, meta } from "../story-form";
import { TextField } from "../text-field";

export default {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { checkboxField } from "@form-atoms/field";

import { CheckboxField } from "./CheckboxField";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";

export default {
title: "CheckboxField",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CheckboxGroupField } from "./CheckboxGroupField";
import { getLabel, getValue, options } from "./languages";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";
import { stringArrayField } from "@form-atoms/field";

export default {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fileField } from "@form-atoms/field";

import { FileField } from "./FileField";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";

export default {
title: "FileField",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { numberField } from "@form-atoms/field";
import { expect } from "@storybook/jest";
import { userEvent, within } from "@storybook/testing-library";

import { NumberField } from "./NumberField";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";

export default {
title: "NumberField",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RadioField } from "./RadioField";
import { country, getLabel, getValue, options } from "../select-field/country";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";
import { stringField } from "@form-atoms/field";

export default {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { numberField } from "@form-atoms/field";

import { RatingField } from "./RatingField";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";

export default {
title: "RatingField",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { country, getLabel, getValue, options } from "./country";
import { SelectField } from "./SelectField";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";
import { stringField } from "@form-atoms/field";

export default {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { numberField } from "@form-atoms/field";
import { z } from "zod";

import { SliderField } from "./SliderField";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";

export default {
title: "SliderField",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { textField } from "@form-atoms/field";
import { z } from "zod";

import { TextField } from "./TextField";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";

export default {
title: "TextField",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { textField } from "@form-atoms/field";

import { TextareaField } from "./TextareaField";
import { FormStory, meta, optionalField } from "../stories";
import { FormStory, meta, optionalField } from "../story-form";

export default {
title: "TextareaField",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 12 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
export * from "./array-field";
export * from "./checkbox-field";
export * from "./checkbox-group-field";
export * from "./file-field";
export * from "./hooks";
export * from "./number-field";
export * from "./radio-field";
export * from "./select-field";
export * from "./slider-field";
export * from "./text-field";
export * from "./textarea-field";
export * from "./components/array-field";
export * from "./components/checkbox-field";
export * from "./components/checkbox-group-field";
export * from "./components/file-field";
export * from "./components/hooks";
export * from "./components/number-field";
export * from "./components/radio-field";
export * from "./components/rating-field";
export * from "./components/select-field";
export * from "./components/slider-field";
export * from "./components/text-field";
export * from "./components/textarea-field";
2 changes: 1 addition & 1 deletion src/showcase/advanced-search/AdvancedSearch.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormStory, meta } from "../../stories";
import { FormStory, meta } from "../../components/story-form";
import { AdvancedSearch } from "./AdvancedSearch";

import { color } from "./ColorPicker";
Expand Down
2 changes: 1 addition & 1 deletion src/showcase/advanced-search/ColorPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { stringArrayField } from "@form-atoms/field";
import { CheckboxGroupField } from "../../checkbox-group-field";
import { CheckboxGroupField } from "../../";

const Dot = ({ color }: { color: string }) => (
<span
Expand Down
2 changes: 1 addition & 1 deletion src/showcase/advanced-search/PriceRange.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { numberField } from "@form-atoms/field";
import { NumberField } from "../../number-field";
import { NumberField } from "../../";

export const priceMin = numberField({ optional: true });
export const priceMax = numberField({ optional: true });
Expand Down
2 changes: 1 addition & 1 deletion src/showcase/advanced-search/ProductBrand.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { stringField } from "@form-atoms/field";
import { SelectField } from "../../select-field";
import { SelectField } from "../../";

export const productBrand = stringField({ optional: true });

Expand Down
2 changes: 1 addition & 1 deletion src/showcase/advanced-search/Rating.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { numberField } from "@form-atoms/field";
import { RadioField } from "../../radio-field";
import { RadioField } from "../../";
import { Rating } from "flowbite-react";

export const rating = numberField({ optional: true });
Expand Down
2 changes: 1 addition & 1 deletion src/showcase/advanced-search/UsageCondition.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropsWithChildren } from "react";
import { RadioField } from "../../radio-field";
import { RadioField } from "../../";
import { stringField } from "@form-atoms/field";

const Container = ({ children }: PropsWithChildren) => (
Expand Down
47 changes: 0 additions & 47 deletions src/stories/Introduction.stories.skip.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions src/text-field/Password.stories.skip.tsx

This file was deleted.

0 comments on commit ed29b52

Please sign in to comment.