diff --git a/docs/src/pages/docs/accordion.tsx b/docs/src/pages/docs/accordion.tsx index bcda88ae7..a6d13527f 100644 --- a/docs/src/pages/docs/accordion.tsx +++ b/docs/src/pages/docs/accordion.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Accordion, AccordionItem } from "@sebgroup/react-components/Accordion"; -import { useDynamicForm } from "@hooks/useDynamicForm"; +import { useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Button } from "@sebgroup/react-components/Button"; import { Textbox } from "@sebgroup/react-components/Textbox"; diff --git a/docs/src/pages/docs/breadcrumb.tsx b/docs/src/pages/docs/breadcrumb.tsx index 4c8f6c554..f4385a725 100644 --- a/docs/src/pages/docs/breadcrumb.tsx +++ b/docs/src/pages/docs/breadcrumb.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Breadcrumb, BreadcrumbItem } from "@sebgroup/react-components/Breadcrumb"; -import { useDynamicForm } from "@hooks/useDynamicForm"; +import { useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const homeIcon: JSX.Element = ( diff --git a/docs/src/pages/docs/button.tsx b/docs/src/pages/docs/button.tsx index 934f802f2..e86e1ed28 100644 --- a/docs/src/pages/docs/button.tsx +++ b/docs/src/pages/docs/button.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Button, ButtonSize, ButtonTheme } from "@sebgroup/react-components/Button"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const importString: string = require("!raw-loader!@sebgroup/react-components/Button/Button"); const code: string = ``; diff --git a/docs/src/pages/docs/buttongroup.tsx b/docs/src/pages/docs/buttongroup.tsx index b8042d380..df1bf47e3 100644 --- a/docs/src/pages/docs/buttongroup.tsx +++ b/docs/src/pages/docs/buttongroup.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { ButtonGroup, ButtonGroupProps } from "@sebgroup/react-components/ButtonGroup"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Button } from "@sebgroup/react-components/Button"; const importString: string = require("!raw-loader!@sebgroup/react-components/ButtonGroup/ButtonGroup"); diff --git a/docs/src/pages/docs/carousel.tsx b/docs/src/pages/docs/carousel.tsx index 8dbbc3342..8b2dfe83b 100644 --- a/docs/src/pages/docs/carousel.tsx +++ b/docs/src/pages/docs/carousel.tsx @@ -2,7 +2,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Carousel, CarouselItem, CarouselProps } from "@sebgroup/react-components/Carousel"; import { Img } from "@sebgroup/react-components/Image"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const images = [ require("../../assets/images/painting-1.jpg"), diff --git a/docs/src/pages/docs/checkbox.tsx b/docs/src/pages/docs/checkbox.tsx index 7a7a9cec4..601c0f0e6 100644 --- a/docs/src/pages/docs/checkbox.tsx +++ b/docs/src/pages/docs/checkbox.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Checkbox } from "@sebgroup/react-components/Checkbox/Checkbox"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { FeedbackIndicator, Indicator, IndicatorType } from "@sebgroup/react-components/FeedbackIndicator"; import { CodeSnippet } from "@common/CodeSnippet"; diff --git a/docs/src/pages/docs/closebutton.tsx b/docs/src/pages/docs/closebutton.tsx index 2fefe7346..3bd88abf2 100644 --- a/docs/src/pages/docs/closebutton.tsx +++ b/docs/src/pages/docs/closebutton.tsx @@ -2,7 +2,7 @@ import React from "react"; import Docs from "@common/Docs"; import { CloseButton } from "@sebgroup/react-components/CloseButton"; import { Slider } from "@sebgroup/react-components/Slider"; -import { useDynamicForm } from "@hooks/useDynamicForm"; +import { useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const importString: string = require("!raw-loader!@sebgroup/react-components/CloseButton/CloseButton"); const code: string = ``; diff --git a/docs/src/pages/docs/datepicker.tsx b/docs/src/pages/docs/datepicker.tsx index 2a408e4ca..3d8202bc0 100644 --- a/docs/src/pages/docs/datepicker.tsx +++ b/docs/src/pages/docs/datepicker.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Datepicker } from "@sebgroup/react-components/Datepicker"; -import { useDynamicForm } from "@hooks/useDynamicForm"; +import { useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const importString: string = require("!raw-loader!@sebgroup/react-components/Datepicker/Datepicker"); const code: string = ``; diff --git a/docs/src/pages/docs/dropdown.tsx b/docs/src/pages/docs/dropdown.tsx index d14b3284b..f474af219 100644 --- a/docs/src/pages/docs/dropdown.tsx +++ b/docs/src/pages/docs/dropdown.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Dropdown } from "@sebgroup/react-components/Dropdown"; -import { useDynamicForm } from "@hooks/useDynamicForm"; +import { useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { CodeSnippet } from "@common/CodeSnippet"; const importString: string = require("!raw-loader!@sebgroup/react-components/Dropdown/Dropdown"); diff --git a/docs/src/pages/docs/feedbackindicator.tsx b/docs/src/pages/docs/feedbackindicator.tsx index fd014aaf8..625d20fbc 100644 --- a/docs/src/pages/docs/feedbackindicator.tsx +++ b/docs/src/pages/docs/feedbackindicator.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { FeedbackIndicator, IndicatorType } from "@sebgroup/react-components/FeedbackIndicator"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Checkbox } from "@sebgroup/react-components/Checkbox"; import { RadioButton } from "@sebgroup/react-components/RadioButton"; diff --git a/docs/src/pages/docs/image.tsx b/docs/src/pages/docs/image.tsx index 4a40893dd..f6cf88b94 100644 --- a/docs/src/pages/docs/image.tsx +++ b/docs/src/pages/docs/image.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Img, ImgProps } from "@sebgroup/react-components/Image/Img"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Button } from "@sebgroup/react-components/Button"; const image: string = require("../../assets/images/rabbit-on-the-spot.jpg"); diff --git a/docs/src/pages/docs/imagecropper.tsx b/docs/src/pages/docs/imagecropper.tsx index c121082dd..b7f65c829 100644 --- a/docs/src/pages/docs/imagecropper.tsx +++ b/docs/src/pages/docs/imagecropper.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { ImageCropper } from "@sebgroup/react-components/ImageCropper/ImageCropper"; -import { useDynamicForm } from "@hooks/useDynamicForm"; +import { useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const importString: string = require("!raw-loader!@sebgroup/react-components/ImageCropper/ImageCropper"); const code: string = ``; diff --git a/docs/src/pages/docs/loader.tsx b/docs/src/pages/docs/loader.tsx index 33eafda84..a3fb5aabb 100644 --- a/docs/src/pages/docs/loader.tsx +++ b/docs/src/pages/docs/loader.tsx @@ -1,7 +1,7 @@ import Docs from "@common/Docs"; import React from "react"; import { Loader, LoaderSize, LoaderType } from "@sebgroup/react-components/Loader"; -import { useDynamicForm, DynamicFormOption } from "@hooks/useDynamicForm"; +import { useDynamicForm, DynamicFormOption } from "@sebgroup/react-components/hooks/useDynamicForm"; const importString: string = require("!raw-loader!@sebgroup/react-components/Loader/Loader"); const code: string = ``; diff --git a/docs/src/pages/docs/modal.tsx b/docs/src/pages/docs/modal.tsx index 89e913bc8..074e0d7a5 100644 --- a/docs/src/pages/docs/modal.tsx +++ b/docs/src/pages/docs/modal.tsx @@ -1,6 +1,6 @@ import React from "react"; import Docs from "@common/Docs"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Button } from "@sebgroup/react-components/Button"; import { Modal, ModalSize, ModalPosition } from "@sebgroup/react-components/Modal"; import { Textbox } from "@sebgroup/react-components/Textbox"; diff --git a/docs/src/pages/docs/notification.tsx b/docs/src/pages/docs/notification.tsx index feab2b386..98a0dd246 100644 --- a/docs/src/pages/docs/notification.tsx +++ b/docs/src/pages/docs/notification.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Notification, NotificationProps } from "@sebgroup/react-components/Notification"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Button } from "@sebgroup/react-components/Button"; import { CodeSnippet } from "@common/CodeSnippet"; diff --git a/docs/src/pages/docs/pagination.tsx b/docs/src/pages/docs/pagination.tsx index 8bd372697..86727cc36 100644 --- a/docs/src/pages/docs/pagination.tsx +++ b/docs/src/pages/docs/pagination.tsx @@ -1,6 +1,6 @@ import React from "react"; import Docs from "@common/Docs"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Pagination, Page, CustomNavs, PaginationProps } from "@sebgroup/react-components/Pagination"; import CPUIcon from "../../../static/icons/cpu.svg"; import GameControllerIcon from "../../../static/icons/game-controller.svg"; diff --git a/docs/src/pages/docs/progressbar.tsx b/docs/src/pages/docs/progressbar.tsx index 01233d260..a5b6017fb 100644 --- a/docs/src/pages/docs/progressbar.tsx +++ b/docs/src/pages/docs/progressbar.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { ProgressBar, ProgressBarProps } from "@sebgroup/react-components/ProgressBar"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Slider } from "@sebgroup/react-components/Slider"; const importString: string = require("!raw-loader!@sebgroup/react-components/ProgressBar/ProgressBar"); diff --git a/docs/src/pages/docs/radiobutton.tsx b/docs/src/pages/docs/radiobutton.tsx index 8ed9f953e..b4660148c 100644 --- a/docs/src/pages/docs/radiobutton.tsx +++ b/docs/src/pages/docs/radiobutton.tsx @@ -1,6 +1,6 @@ import React from "react"; import Docs from "@common/Docs"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { RadioButton, RadioGroup } from "@sebgroup/react-components/RadioButton"; import { CodeSnippet } from "@common/CodeSnippet"; import { Indicator, IndicatorType } from "@sebgroup/react-components/FeedbackIndicator"; diff --git a/docs/src/pages/docs/rating.tsx b/docs/src/pages/docs/rating.tsx index e2a5b3f6d..fb8531d1b 100644 --- a/docs/src/pages/docs/rating.tsx +++ b/docs/src/pages/docs/rating.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Rating } from "@sebgroup/react-components/Rating"; -import { useDynamicForm } from "@hooks/useDynamicForm"; +import { useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import HeartSVG from "../../../static/icons/heart.svg"; const importString: string = require("!raw-loader!@sebgroup/react-components/Rating/Rating"); diff --git a/docs/src/pages/docs/slider.tsx b/docs/src/pages/docs/slider.tsx index 308990f75..83b5dbe1a 100644 --- a/docs/src/pages/docs/slider.tsx +++ b/docs/src/pages/docs/slider.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { SliderLabel, Slider, SliderTheme } from "@sebgroup/react-components/Slider"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Indicator, IndicatorType } from "@sebgroup/react-components/FeedbackIndicator"; const importString: string = require("!raw-loader!@sebgroup/react-components/Slider/Slider"); diff --git a/docs/src/pages/docs/stepper.tsx b/docs/src/pages/docs/stepper.tsx index c79425c05..9338f4380 100644 --- a/docs/src/pages/docs/stepper.tsx +++ b/docs/src/pages/docs/stepper.tsx @@ -1,6 +1,6 @@ import React from "react"; import Docs from "@common/Docs"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Stepper } from "@sebgroup/react-components/Stepper"; import { Indicator, IndicatorType } from "@sebgroup/react-components/FeedbackIndicator"; diff --git a/docs/src/pages/docs/steptracker.tsx b/docs/src/pages/docs/steptracker.tsx index 0e40f1073..dcec11d53 100644 --- a/docs/src/pages/docs/steptracker.tsx +++ b/docs/src/pages/docs/steptracker.tsx @@ -1,6 +1,6 @@ import React from "react"; import Docs from "@common/Docs"; -import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { StepTracker } from "@sebgroup/react-components/StepTracker"; import StepLabel, { StepLabelProps } from "@sebgroup/react-components/StepTracker/StepLabel"; diff --git a/docs/src/pages/docs/table.tsx b/docs/src/pages/docs/table.tsx index 9e0f496d0..262a8cbb2 100644 --- a/docs/src/pages/docs/table.tsx +++ b/docs/src/pages/docs/table.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Table, TableBody, TableCell, TableHeader, TableHeaderCell, TableRow } from "@sebgroup/react-components/Table"; -import { useDynamicForm } from "@hooks/useDynamicForm"; +import { useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import makeData from "@utils/makeData"; import { Dropdown } from "@sebgroup/react-components/Dropdown"; import { checkDynamicFormSelectedKey } from "@utils/helpers"; diff --git a/docs/src/pages/docs/textarea.tsx b/docs/src/pages/docs/textarea.tsx index a068b0775..c9357f600 100644 --- a/docs/src/pages/docs/textarea.tsx +++ b/docs/src/pages/docs/textarea.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Textarea } from "@sebgroup/react-components/Textarea"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Indicator, IndicatorType } from "@sebgroup/react-components/FeedbackIndicator"; const importString: string = require("!raw-loader!@sebgroup/react-components/Textarea/Textarea"); diff --git a/docs/src/pages/docs/textbox.tsx b/docs/src/pages/docs/textbox.tsx index abd4d1291..9fa3aa2df 100644 --- a/docs/src/pages/docs/textbox.tsx +++ b/docs/src/pages/docs/textbox.tsx @@ -2,7 +2,7 @@ import React from "react"; import Docs from "@common/Docs"; import SearchIcon from "../../../static/icons/search.svg"; import { Textbox } from "@sebgroup/react-components/Textbox"; -import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Indicator, IndicatorType } from "@sebgroup/react-components/FeedbackIndicator"; const importString: string = require("!raw-loader!@sebgroup/react-components/Textbox/Textbox"); diff --git a/docs/src/pages/docs/textlabel.tsx b/docs/src/pages/docs/textlabel.tsx index 61643741d..2c13ee7d3 100644 --- a/docs/src/pages/docs/textlabel.tsx +++ b/docs/src/pages/docs/textlabel.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { TextLabel } from "@sebgroup/react-components/TextLabel"; -import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const TextLabelPage: React.FC = React.memo(() => { const importString: string = require("!raw-loader!@sebgroup/react-components/TextLabel/TextLabel"); diff --git a/docs/src/pages/docs/timeline.tsx b/docs/src/pages/docs/timeline.tsx index 8c62dd94b..fa662d40d 100644 --- a/docs/src/pages/docs/timeline.tsx +++ b/docs/src/pages/docs/timeline.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Timeline, TimelineDirection, TimelineItem } from "@sebgroup/react-components/Timeline"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { loremIpsum } from "lorem-ipsum"; const importString: string = require("!raw-loader!@sebgroup/react-components/Timeline/Timeline"); diff --git a/docs/src/pages/docs/timer.tsx b/docs/src/pages/docs/timer.tsx index 529a478dd..d6b8e2b4f 100644 --- a/docs/src/pages/docs/timer.tsx +++ b/docs/src/pages/docs/timer.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Timer } from "@sebgroup/react-components/Timer"; -import { DynamicFormSection, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormSection, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const importString: string = require("!raw-loader!@sebgroup/react-components/Timer/Timer"); const code: string = ` { console.log("TIMER ENDED callback"); }} />`; diff --git a/docs/src/pages/docs/toggle-selector.tsx b/docs/src/pages/docs/toggle-selector.tsx index 107ace8ee..b42c3435a 100644 --- a/docs/src/pages/docs/toggle-selector.tsx +++ b/docs/src/pages/docs/toggle-selector.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { ToggleSelector, ToggleSelectorItem } from "@sebgroup/react-components/ToggleSelector"; -import { DynamicFormOption, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; import { Indicator, IndicatorType } from "@sebgroup/react-components/FeedbackIndicator"; import LaughingIcon from "../../../static/icons/emoji-laughing-fill.svg"; import DizzyIcon from "../../../static/icons/emoji-dizzy-fill.svg"; diff --git a/docs/src/pages/docs/toggle.tsx b/docs/src/pages/docs/toggle.tsx index 3daf1dda2..f89204fd7 100644 --- a/docs/src/pages/docs/toggle.tsx +++ b/docs/src/pages/docs/toggle.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Toggle } from "@sebgroup/react-components/Toggle"; -import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const TogglePage: React.FC = () => { const importString: string = require("!raw-loader!@sebgroup/react-components/Toggle/Toggle"); diff --git a/docs/src/pages/docs/tooltip.tsx b/docs/src/pages/docs/tooltip.tsx index 5ee8e63e2..cfee04845 100644 --- a/docs/src/pages/docs/tooltip.tsx +++ b/docs/src/pages/docs/tooltip.tsx @@ -2,7 +2,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Tooltip } from "@sebgroup/react-components/Tooltip"; import { Notification } from "@sebgroup/react-components/Notification"; -import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const TooltipPage: React.FC = () => { const importString: string = require("!raw-loader!@sebgroup/react-components/Tooltip/Tooltip"); diff --git a/docs/src/pages/docs/video.tsx b/docs/src/pages/docs/video.tsx index 42fb871bf..c71edeeed 100644 --- a/docs/src/pages/docs/video.tsx +++ b/docs/src/pages/docs/video.tsx @@ -1,7 +1,7 @@ import React from "react"; import Docs from "@common/Docs"; import { Video } from "@sebgroup/react-components/Video"; -import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@hooks/useDynamicForm"; +import { DynamicFormOption, DynamicFormSection, useDynamicForm } from "@sebgroup/react-components/hooks/useDynamicForm"; const VideoPage: React.FC = () => { const defaultSrc: string = "https://www.youtube.com/embed/f19fctL72CY"; diff --git a/docs/src/utils/helpers.ts b/docs/src/utils/helpers.ts index c63885023..216600143 100644 --- a/docs/src/utils/helpers.ts +++ b/docs/src/utils/helpers.ts @@ -1,4 +1,4 @@ -import { DynamicFormOption } from "@hooks/useDynamicForm"; +import { DynamicFormOption } from "@sebgroup/react-components/hooks/useDynamicForm"; /** check if key selected from options */ diff --git a/lib/package.json b/lib/package.json index 0014e714b..aef134010 100644 --- a/lib/package.json +++ b/lib/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "The components library containing SEB's React components", "scripts": { - "prebuild": "rimraf dist/*", + "prebuild": "rimraf dist/* && npm run test", "build": "rollup -c", "postbuild": "rimraf dist/**/*.test.d.ts && node scripts/post-build.js", "pretest": "rimraf coverage/*", diff --git a/lib/src/hooks/index.ts b/lib/src/hooks/index.ts index 7d4bca16f..21974334c 100644 --- a/lib/src/hooks/index.ts +++ b/lib/src/hooks/index.ts @@ -1 +1,2 @@ export * from "./useCombinedRef"; +export * from "./useDynamicForm"; diff --git a/docs/src/hooks/useDynamicForm.tsx b/lib/src/hooks/useDynamicForm.tsx similarity index 96% rename from docs/src/hooks/useDynamicForm.tsx rename to lib/src/hooks/useDynamicForm.tsx index a3a74de56..c3c617410 100644 --- a/docs/src/hooks/useDynamicForm.tsx +++ b/lib/src/hooks/useDynamicForm.tsx @@ -1,13 +1,13 @@ import React, { useState, ReactNode, useMemo, useCallback } from "react"; import classnames from "classnames"; -import { Checkbox } from "@sebgroup/react-components/Checkbox"; -import { Textbox } from "@sebgroup/react-components/Textbox"; -import { Textarea } from "@sebgroup/react-components/Textarea"; -import { Dropdown, getValueOfMultipleSelect } from "@sebgroup/react-components/Dropdown"; -import { Datepicker } from "@sebgroup/react-components/Datepicker"; -import { Stepper } from "@sebgroup/react-components/Stepper"; -import { RadioButton, RadioGroup } from "@sebgroup/react-components/RadioButton"; +import { Checkbox } from "../Checkbox"; +import { Textbox } from "../Textbox"; +import { Textarea } from "../Textarea"; +import { Dropdown, getValueOfMultipleSelect } from "../Dropdown"; +import { Datepicker } from "../Datepicker"; +import { Stepper } from "../Stepper"; +import { RadioButton, RadioGroup } from "../RadioButton"; type DynamicFormInternalStateValue = string | string[] | DynamicFormOption | DynamicFormOption[] | Date | boolean | number; export interface DynamicFormItem { @@ -283,7 +283,6 @@ const DynamicFormItemComponent: React.FC<{ } case "Dropdown": { - console.log(props.state); formItem = ( <> {props.item?.label && }