@creativecodeco/ui 0.0.1
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 +9 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/theme/index.d.ts +10 -0
- package/lib/theme/index.js +13 -0
- package/lib/theme/tailwindcss/input.css +3 -0
- package/lib/theme/tailwindcss/main.css +5 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +1 -0
- package/lib/types/ui/forms/index.d.ts +2 -0
- package/lib/types/ui/forms/index.js +1 -0
- package/lib/types/ui/forms/text-box.types.d.ts +8 -0
- package/lib/types/ui/forms/text-box.types.js +1 -0
- package/lib/ui/forms/index.d.ts +2 -0
- package/lib/ui/forms/index.js +2 -0
- package/lib/ui/forms/text-box/index.d.ts +2 -0
- package/lib/ui/forms/text-box/index.js +2 -0
- package/lib/ui/forms/text-box/text-box.component.d.ts +4 -0
- package/lib/ui/forms/text-box/text-box.component.js +8 -0
- package/lib/ui/provider/creativecode-ui.provider.d.ts +2 -0
- package/lib/ui/provider/creativecode-ui.provider.js +5 -0
- package/lib/ui/provider/index.d.ts +2 -0
- package/lib/ui/provider/index.js +2 -0
- package/package.json +75 -0
package/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# @creativecodeco/ui
|
|
2
|
+
|
|
3
|
+
> System Design CreativeCode.com.co
|
|
4
|
+
|
|
5
|
+
  
|
|
6
|
+
|
|
7
|
+
## Chromatic
|
|
8
|
+
|
|
9
|
+
[View Components](https://master--658273f7c6c3c10a909dea3b.chromatic.com/)
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const creativeCodeTheme = {
|
|
2
|
+
content: [
|
|
3
|
+
"./src/**/*.{html,js,ts,jsx,tsx,mdx}",
|
|
4
|
+
"./node_modules/creativecodeco/ui/lib/**/*.{js,jsx,ts,tsx}",
|
|
5
|
+
],
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {},
|
|
8
|
+
},
|
|
9
|
+
daisyui: {
|
|
10
|
+
themes: ["light"],
|
|
11
|
+
},
|
|
12
|
+
plugins: [require("daisyui")],
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useImperativeHandle, useRef } from "react";
|
|
3
|
+
const TextBox = forwardRef(({ name, label, isError, error, disabled, ...otherProps }, ref) => {
|
|
4
|
+
const inputRef = useRef(null);
|
|
5
|
+
useImperativeHandle(ref, () => inputRef.current);
|
|
6
|
+
return (_jsxs("div", { className: "form-control w-full", children: [label && (_jsx("div", { className: "label", children: _jsx("label", { htmlFor: name, className: "label-text", children: label }) })), _jsx("input", { ref: inputRef, id: name, name: name, ...otherProps, className: "input input-bordered w-full", disabled: disabled }), isError && _jsx("p", { className: "text-red-500", children: error })] }));
|
|
7
|
+
});
|
|
8
|
+
export default TextBox;
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@creativecodeco/ui",
|
|
3
|
+
"description": "CreativeCode.com.co UI",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"homepage": "https://github.com/creativecodeco/ui",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "John Toro",
|
|
8
|
+
"email": "joaltoroc@creativecode.com.co"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"main": "lib/index.js",
|
|
12
|
+
"source": "src/index.ts",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build-storybook": "npm run build; storybook build",
|
|
15
|
+
"build:alias": "tsc-alias -p tsconfig.build.json",
|
|
16
|
+
"build:css": "postcss src/theme/main.css -o dist/theme/main.css --minify; cpx 'src/theme/*[.]css' 'lib/theme/tailwindcss'",
|
|
17
|
+
"build": "rm -rf lib; tsc -p tsconfig.build.json; npm run build:alias; npm run build:css",
|
|
18
|
+
"chromatic": "chromatic --only-changed true",
|
|
19
|
+
"dev:css": "postcss src/theme/main.css -o dist/theme/main.css --watch",
|
|
20
|
+
"prepack": "npm run build",
|
|
21
|
+
"release": "npm publish --access public",
|
|
22
|
+
"storybook": "storybook dev -p 6006"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"react": "18.2.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@storybook/addon-essentials": "7.6.6",
|
|
29
|
+
"@storybook/addon-interactions": "7.6.6",
|
|
30
|
+
"@storybook/addon-links": "7.6.6",
|
|
31
|
+
"@storybook/addon-onboarding": "1.0.10",
|
|
32
|
+
"@storybook/blocks": "7.6.6",
|
|
33
|
+
"@storybook/react": "7.6.6",
|
|
34
|
+
"@storybook/react-webpack5": "7.6.6",
|
|
35
|
+
"@storybook/test": "7.6.6",
|
|
36
|
+
"@types/node": "20.10.5",
|
|
37
|
+
"@types/react": "18.2.45",
|
|
38
|
+
"@types/react-dom": "18.2.18",
|
|
39
|
+
"autoprefixer": "^10.4.16",
|
|
40
|
+
"chromatic": "^10.1.0",
|
|
41
|
+
"cpx2": "6.0.1",
|
|
42
|
+
"daisyui": "4.4.21",
|
|
43
|
+
"eslint": "8.56.0",
|
|
44
|
+
"eslint-config-prettier": "9.1.0",
|
|
45
|
+
"eslint-config-standard": "17.1.0",
|
|
46
|
+
"eslint-config-standard-react": "13.0.0",
|
|
47
|
+
"eslint-config-standard-with-typescript": "43.0.0",
|
|
48
|
+
"eslint-plugin-import": "2.29.1",
|
|
49
|
+
"eslint-plugin-n": "16.4.0",
|
|
50
|
+
"eslint-plugin-node": "11.1.0",
|
|
51
|
+
"eslint-plugin-prettier": "5.1.0",
|
|
52
|
+
"eslint-plugin-promise": "6.1.1",
|
|
53
|
+
"eslint-plugin-react": "7.33.2",
|
|
54
|
+
"eslint-plugin-standard": "5.0.0",
|
|
55
|
+
"eslint-plugin-storybook": "0.6.15",
|
|
56
|
+
"eslint-plugin-unused-imports": "3.0.0",
|
|
57
|
+
"postcss": "8.4.32",
|
|
58
|
+
"postcss-cli": "11.0.0",
|
|
59
|
+
"postcss-import": "15.1.0",
|
|
60
|
+
"prettier": "3.1.1",
|
|
61
|
+
"prop-types": "15.8.1",
|
|
62
|
+
"react": "18.2.0",
|
|
63
|
+
"react-dom": "18.2.0",
|
|
64
|
+
"storybook": "7.6.6",
|
|
65
|
+
"storybook-addon-themes": "^6.1.0",
|
|
66
|
+
"string-width": "^7.0.0",
|
|
67
|
+
"tailwindcss": "3.4.0",
|
|
68
|
+
"tsc-alias": "1.8.8",
|
|
69
|
+
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
70
|
+
"typescript": "5.3.3"
|
|
71
|
+
},
|
|
72
|
+
"files": [
|
|
73
|
+
"lib"
|
|
74
|
+
]
|
|
75
|
+
}
|