@creativecodeco/ui 0.0.3 → 0.0.4
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/README.md
CHANGED
|
@@ -25,11 +25,11 @@ yarn add @creativecodeco/ui
|
|
|
25
25
|
### Dependencies
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npm install --save-dev tailwindcss postcss postcss-import autoprefixer
|
|
28
|
+
npm install --save-dev tailwindcss postcss postcss-import autoprefixer usehooks-ts
|
|
29
29
|
|
|
30
30
|
or
|
|
31
31
|
|
|
32
|
-
yarn add -D tailwindcss postcss postcss-import autoprefixer
|
|
32
|
+
yarn add -D tailwindcss postcss postcss-import autoprefixer usehooks-ts
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Setting Tailwind
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type FieldPath, type FieldValues } from 'react-hook-form';
|
|
2
|
-
import { ControllerType } from '../../types/helpers/controller.types';
|
|
2
|
+
import type { ControllerType } from '../../types/helpers/controller.types';
|
|
3
3
|
export default function Controller<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ control, name, as: Input, defaultValue, shouldUnregister, rules, ...rest }: ControllerType<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { FieldPath, FieldValues, ControllerProps as RHFControllerProps } from 'react-hook-form';
|
|
3
|
-
import { TextBox } from '../../ui/forms';
|
|
3
|
+
import { DropDown, TextBox } from '../../ui/forms';
|
|
4
4
|
type TextBoxType = {
|
|
5
5
|
as: typeof TextBox;
|
|
6
6
|
} & React.ComponentProps<typeof TextBox>;
|
|
7
|
-
type
|
|
7
|
+
type DropDownType = {
|
|
8
|
+
as: typeof DropDown;
|
|
9
|
+
} & React.ComponentProps<typeof DropDown>;
|
|
10
|
+
type Inputs = TextBoxType | DropDownType;
|
|
8
11
|
export type ControllerType<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<RHFControllerProps<TFieldValues, TName>, 'render'> & Inputs;
|
|
9
12
|
export {};
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"UI",
|
|
10
10
|
"Framework Design"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.0.
|
|
12
|
+
"version": "0.0.4",
|
|
13
13
|
"homepage": "https://github.com/creativecodeco/ui",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "John Toro",
|
|
@@ -43,18 +43,19 @@
|
|
|
43
43
|
"postcss-import": "15.1.0",
|
|
44
44
|
"react": "18.2.0",
|
|
45
45
|
"react-hook-form": "7.49.2",
|
|
46
|
-
"tailwindcss": "3.4.0"
|
|
46
|
+
"tailwindcss": "3.4.0",
|
|
47
|
+
"usehooks-ts": "2.9.1"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@babel/core": "7.23.7",
|
|
50
|
-
"@babel/preset-env": "
|
|
51
|
-
"@babel/preset-react": "
|
|
52
|
-
"@babel/preset-typescript": "
|
|
51
|
+
"@babel/preset-env": "7.23.7",
|
|
52
|
+
"@babel/preset-react": "7.23.3",
|
|
53
|
+
"@babel/preset-typescript": "7.23.3",
|
|
53
54
|
"@jest/globals": "29.7.0",
|
|
54
55
|
"@storybook/addon-essentials": "7.6.7",
|
|
55
56
|
"@storybook/addon-interactions": "7.6.7",
|
|
56
57
|
"@storybook/addon-links": "7.6.7",
|
|
57
|
-
"@storybook/addon-mdx-gfm": "
|
|
58
|
+
"@storybook/addon-mdx-gfm": "7.6.7",
|
|
58
59
|
"@storybook/blocks": "7.6.7",
|
|
59
60
|
"@storybook/react": "7.6.7",
|
|
60
61
|
"@storybook/react-webpack5": "7.6.7",
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
"tsc-alias": "1.8.8",
|
|
112
113
|
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
113
114
|
"typescript": "5.3.3",
|
|
114
|
-
"usehooks-ts": "
|
|
115
|
+
"usehooks-ts": "2.9.1"
|
|
115
116
|
},
|
|
116
117
|
"files": [
|
|
117
118
|
"lib"
|