cleanplate 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/.storybook/cleanplate-theme.js +41 -0
- package/.storybook/main.js +21 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/preview.js +14 -0
- package/LICENSE +121 -0
- package/README.md +17 -0
- package/dist/index.es.js +1 -0
- package/dist/index.js +1 -0
- package/package.json +53 -0
- package/rollup.config.mjs +39 -0
- package/src/components/app-shell/AppShell.jsx +7 -0
- package/src/components/app-shell/index.js +1 -0
- package/src/components/app-shell/styles.css +6 -0
- package/src/components/badge/Badge.jsx +7 -0
- package/src/components/badge/index.js +1 -0
- package/src/components/badge/styles.css +6 -0
- package/src/components/button/Button.jsx +7 -0
- package/src/components/button/index.js +1 -0
- package/src/components/button/styles.css +9 -0
- package/src/components/form-controls/Input.jsx +36 -0
- package/src/components/form-controls/TextArea.jsx +36 -0
- package/src/components/form-controls/index.js +2 -0
- package/src/components/form-controls/styles.css +22 -0
- package/src/components/icon/Icon.jsx +8 -0
- package/src/components/icon/index.js +1 -0
- package/src/components/icon/styles.css +6 -0
- package/src/components/modal/Modal.jsx +7 -0
- package/src/components/modal/index.js +1 -0
- package/src/components/modal/styles.css +6 -0
- package/src/components/typography/Typography.jsx +22 -0
- package/src/components/typography/index.js +1 -0
- package/src/components/typography/styles.css +6 -0
- package/src/index.js +6 -0
- package/src/stories/button.stories.jsx +12 -0
- package/src/stories/icon.stories.jsx +13 -0
- package/src/stories/typography.stories.jsx +36 -0
- package/website/assets/images/cleanplate-icon.svg +1 -0
- package/website/assets/images/cleanplate-logo.svg +1 -0
- package/website/assets/images/favicon.ico +0 -0
- package/website/favicon.ico +0 -0
- package/website/index.html +43 -0
- package/website/style.css +42 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// .storybook/YourTheme.js
|
|
2
|
+
|
|
3
|
+
import { create } from "@storybook/theming/create";
|
|
4
|
+
|
|
5
|
+
export default create({
|
|
6
|
+
base: "light",
|
|
7
|
+
// Typography
|
|
8
|
+
fontBase: '"Open Sans", sans-serif',
|
|
9
|
+
fontCode: "monospace",
|
|
10
|
+
|
|
11
|
+
brandTitle: "My custom Storybook",
|
|
12
|
+
brandUrl: "https://cleanplate.sivadass.in",
|
|
13
|
+
brandImage:
|
|
14
|
+
"https://f005.backblazeb2.com/file/sivadass-cloud/cleanplate-logo.svg",
|
|
15
|
+
brandTarget: "_self",
|
|
16
|
+
|
|
17
|
+
//
|
|
18
|
+
colorPrimary: "#3A10E5",
|
|
19
|
+
colorSecondary: "#585C6D",
|
|
20
|
+
|
|
21
|
+
// UI
|
|
22
|
+
appBg: "#ffffff",
|
|
23
|
+
appContentBg: "#ffffff",
|
|
24
|
+
appBorderColor: "#585C6D",
|
|
25
|
+
appBorderRadius: 4,
|
|
26
|
+
|
|
27
|
+
// Text colors
|
|
28
|
+
textColor: "#10162F",
|
|
29
|
+
textInverseColor: "#ffffff",
|
|
30
|
+
|
|
31
|
+
// Toolbar default and active colors
|
|
32
|
+
barTextColor: "#9E9E9E",
|
|
33
|
+
barSelectedColor: "#585C6D",
|
|
34
|
+
barBg: "#ffffff",
|
|
35
|
+
|
|
36
|
+
// Form colors
|
|
37
|
+
inputBg: "#ffffff",
|
|
38
|
+
inputBorder: "#10162F",
|
|
39
|
+
inputTextColor: "#10162F",
|
|
40
|
+
inputBorderRadius: 2,
|
|
41
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** @type { import('@storybook/react-vite').StorybookConfig } */
|
|
2
|
+
const config = {
|
|
3
|
+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
4
|
+
addons: [
|
|
5
|
+
"@storybook/addon-links",
|
|
6
|
+
"@storybook/addon-essentials",
|
|
7
|
+
"@storybook/addon-onboarding",
|
|
8
|
+
"@storybook/addon-interactions",
|
|
9
|
+
],
|
|
10
|
+
framework: {
|
|
11
|
+
name: "@storybook/react-vite",
|
|
12
|
+
options: {},
|
|
13
|
+
},
|
|
14
|
+
docs: {
|
|
15
|
+
autodocs: "tag",
|
|
16
|
+
},
|
|
17
|
+
core: {
|
|
18
|
+
builder: "@storybook/builder-vite", // 👈 The builder enabled here.
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export default config;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @type { import('@storybook/react').Preview } */
|
|
2
|
+
const preview = {
|
|
3
|
+
parameters: {
|
|
4
|
+
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
5
|
+
controls: {
|
|
6
|
+
matchers: {
|
|
7
|
+
color: /(background|color)$/i,
|
|
8
|
+
date: /Date$/i,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default preview;
|
package/LICENSE
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Creative Commons Legal Code
|
|
2
|
+
|
|
3
|
+
CC0 1.0 Universal
|
|
4
|
+
|
|
5
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
6
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
7
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
8
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
9
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
10
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
11
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
12
|
+
HEREUNDER.
|
|
13
|
+
|
|
14
|
+
Statement of Purpose
|
|
15
|
+
|
|
16
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
17
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
18
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
19
|
+
authorship and/or a database (each, a "Work").
|
|
20
|
+
|
|
21
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
22
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
23
|
+
scientific works ("Commons") that the public can reliably and without fear
|
|
24
|
+
of later claims of infringement build upon, modify, incorporate in other
|
|
25
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
26
|
+
and for any purposes, including without limitation commercial purposes.
|
|
27
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
|
28
|
+
culture and the further production of creative, cultural and scientific
|
|
29
|
+
works, or to gain reputation or greater distribution for their Work in
|
|
30
|
+
part through the use and efforts of others.
|
|
31
|
+
|
|
32
|
+
For these and/or other purposes and motivations, and without any
|
|
33
|
+
expectation of additional consideration or compensation, the person
|
|
34
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
35
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
36
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
37
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
38
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
39
|
+
|
|
40
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
41
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
|
42
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
|
43
|
+
limited to, the following:
|
|
44
|
+
|
|
45
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
|
46
|
+
communicate, and translate a Work;
|
|
47
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
48
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
|
49
|
+
likeness depicted in a Work;
|
|
50
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
|
51
|
+
subject to the limitations in paragraph 4(a), below;
|
|
52
|
+
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
53
|
+
in a Work;
|
|
54
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
55
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
|
56
|
+
protection of databases, and under any national implementation
|
|
57
|
+
thereof, including any amended or successor version of such
|
|
58
|
+
directive); and
|
|
59
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
|
60
|
+
world based on applicable law or treaty, and any national
|
|
61
|
+
implementations thereof.
|
|
62
|
+
|
|
63
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
64
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
65
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
66
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
67
|
+
of action, whether now known or unknown (including existing as well as
|
|
68
|
+
future claims and causes of action), in the Work (i) in all territories
|
|
69
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
70
|
+
treaty (including future time extensions), (iii) in any current or future
|
|
71
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
72
|
+
including without limitation commercial, advertising or promotional
|
|
73
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
74
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
|
75
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
76
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
|
77
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
78
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
|
79
|
+
|
|
80
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
81
|
+
be judged legally invalid or ineffective under applicable law, then the
|
|
82
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
|
83
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
|
84
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
85
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
86
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
87
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
88
|
+
maximum duration provided by applicable law or treaty (including future
|
|
89
|
+
time extensions), (iii) in any current or future medium and for any number
|
|
90
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
91
|
+
limitation commercial, advertising or promotional purposes (the
|
|
92
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
|
93
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
|
94
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
|
95
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
96
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
|
97
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
|
98
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
|
99
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
|
100
|
+
express Statement of Purpose.
|
|
101
|
+
|
|
102
|
+
4. Limitations and Disclaimers.
|
|
103
|
+
|
|
104
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
105
|
+
surrendered, licensed or otherwise affected by this document.
|
|
106
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
|
107
|
+
warranties of any kind concerning the Work, express, implied,
|
|
108
|
+
statutory or otherwise, including without limitation warranties of
|
|
109
|
+
title, merchantability, fitness for a particular purpose, non
|
|
110
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
|
111
|
+
the present or absence of errors, whether or not discoverable, all to
|
|
112
|
+
the greatest extent permissible under applicable law.
|
|
113
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
114
|
+
that may apply to the Work or any use thereof, including without
|
|
115
|
+
limitation any person's Copyright and Related Rights in the Work.
|
|
116
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
117
|
+
consents, permissions or other rights required for any use of the
|
|
118
|
+
Work.
|
|
119
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
120
|
+
party to this document and has no duty or obligation with respect to
|
|
121
|
+
this CC0 or use of the Work.
|
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# cleanplate
|
|
2
|
+
|
|
3
|
+
CleanPlate - Headless React UI Framework
|
|
4
|
+
|
|
5
|
+
### Components
|
|
6
|
+
|
|
7
|
+
- Button
|
|
8
|
+
- Typography
|
|
9
|
+
- Badge
|
|
10
|
+
- AppShell
|
|
11
|
+
- Form Controls
|
|
12
|
+
- Icon
|
|
13
|
+
- Modal
|
|
14
|
+
|
|
15
|
+
### Documentation & Demo
|
|
16
|
+
|
|
17
|
+
Storybook playground is available at [https://cleanplate.sivadass.in](https://cleanplate.sivadass.in)
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,i){void 0===i&&(i={});var t=i.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}e(".cp-typography{color:red;font-family:inherit;font-size:inherit;line-height:1.5}");e(".cp-app-shell{color:orange;font-family:inherit;font-size:inherit;line-height:1.5}");e(".cp-button{border:1px solid #ccc;border-radius:8px;cursor:pointer;font-family:inherit;font-size:inherit;height:44px;padding:0 16px}");e(".cp-icon{color:red;font-family:inherit;font-size:inherit;line-height:1.5}");e(".cp-badge{color:red;font-family:inherit;font-size:inherit;line-height:1.5}");e(".cp-form-field{font-family:inherit;font-size:inherit;margin-bottom:16px}.cp-form-label{color:#999;display:block;margin-bottom:8px}.cp-form-control{border:1px solid #ccc;border-radius:8px;height:44px;padding:0 16px}.cp-textarea-field textarea{min-height:88px;padding:16px}");
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(e,i){void 0===i&&(i={});var t=i.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}e(".cp-typography{color:red;font-family:inherit;font-size:inherit;line-height:1.5}");e(".cp-app-shell{color:orange;font-family:inherit;font-size:inherit;line-height:1.5}");e(".cp-button{border:1px solid #ccc;border-radius:8px;cursor:pointer;font-family:inherit;font-size:inherit;height:44px;padding:0 16px}");e(".cp-icon{color:red;font-family:inherit;font-size:inherit;line-height:1.5}");e(".cp-badge{color:red;font-family:inherit;font-size:inherit;line-height:1.5}");e(".cp-form-field{font-family:inherit;font-size:inherit;margin-bottom:16px}.cp-form-label{color:#999;display:block;margin-bottom:8px}.cp-form-control{border:1px solid #ccc;border-radius:8px;height:44px;padding:0 16px}.cp-textarea-field textarea{min-height:88px;padding:16px}");
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cleanplate",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "CleanPlate - A Headless React UI Framework",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.es.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"storybook": "storybook dev -p 6001",
|
|
9
|
+
"build-storybook": "storybook build",
|
|
10
|
+
"build-package": "rollup -c"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/sivadass/cleanplate.git"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react",
|
|
18
|
+
"ui",
|
|
19
|
+
"headless"
|
|
20
|
+
],
|
|
21
|
+
"author": "Sivadass N",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/sivadass/cleanplate/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/sivadass/cleanplate#readme",
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@babel/preset-react": "^7.23.3",
|
|
29
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
30
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
31
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
32
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
33
|
+
"@storybook/addon-essentials": "^7.5.3",
|
|
34
|
+
"@storybook/addon-interactions": "^7.5.3",
|
|
35
|
+
"@storybook/addon-links": "^7.5.3",
|
|
36
|
+
"@storybook/addon-onboarding": "^1.0.8",
|
|
37
|
+
"@storybook/blocks": "^7.5.3",
|
|
38
|
+
"@storybook/react": "^7.5.3",
|
|
39
|
+
"@storybook/react-vite": "^7.5.3",
|
|
40
|
+
"@storybook/testing-library": "^0.2.2",
|
|
41
|
+
"prop-types": "^15.8.1",
|
|
42
|
+
"react": "^18.2.0",
|
|
43
|
+
"react-dom": "^18.2.0",
|
|
44
|
+
"rollup": "^4.4.0",
|
|
45
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
46
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
47
|
+
"storybook": "^7.5.3"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"react": "^18.2.0",
|
|
51
|
+
"react-dom": "^18.2.0"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import resolve from "@rollup/plugin-node-resolve";
|
|
2
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
3
|
+
import terser from "@rollup/plugin-terser";
|
|
4
|
+
import external from "rollup-plugin-peer-deps-external";
|
|
5
|
+
import postcss from "rollup-plugin-postcss";
|
|
6
|
+
import { babel } from "@rollup/plugin-babel";
|
|
7
|
+
// import packageJson from "./package.json";
|
|
8
|
+
|
|
9
|
+
// const packageJson = require("./package.json");
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
input: "src/index.js",
|
|
13
|
+
output: [
|
|
14
|
+
{
|
|
15
|
+
file: "dist/index.js",
|
|
16
|
+
format: "cjs",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
file: "dist/index.es.js",
|
|
20
|
+
format: "es",
|
|
21
|
+
exports: "named",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
plugins: [
|
|
25
|
+
external(),
|
|
26
|
+
resolve(),
|
|
27
|
+
commonjs(),
|
|
28
|
+
postcss({
|
|
29
|
+
plugins: [],
|
|
30
|
+
minimize: true,
|
|
31
|
+
}),
|
|
32
|
+
babel({
|
|
33
|
+
exclude: "node_modules/**",
|
|
34
|
+
presets: ["@babel/preset-react"],
|
|
35
|
+
babelHelpers: "bundled",
|
|
36
|
+
}),
|
|
37
|
+
terser(),
|
|
38
|
+
],
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AppShell.jsx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Badge.jsx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Button.jsx";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./styles.css";
|
|
2
|
+
|
|
3
|
+
const Input = ({
|
|
4
|
+
name,
|
|
5
|
+
id,
|
|
6
|
+
onChange,
|
|
7
|
+
defaultValue,
|
|
8
|
+
value,
|
|
9
|
+
label = "",
|
|
10
|
+
isDisabled = false,
|
|
11
|
+
type = "text",
|
|
12
|
+
className = "",
|
|
13
|
+
}) => {
|
|
14
|
+
const fieldWrapperClassName = `cp-form-field cp-input-field ${className}`;
|
|
15
|
+
return (
|
|
16
|
+
<div className={fieldWrapperClassName}>
|
|
17
|
+
{label && <label className="cp-form-label">{label}</label>}
|
|
18
|
+
<input
|
|
19
|
+
className="cp-form-control"
|
|
20
|
+
type={type}
|
|
21
|
+
disabled={isDisabled}
|
|
22
|
+
name={name}
|
|
23
|
+
id={id}
|
|
24
|
+
defaultValue={defaultValue}
|
|
25
|
+
value={value}
|
|
26
|
+
onChange={(e) => {
|
|
27
|
+
if (onChange) {
|
|
28
|
+
onChange(e);
|
|
29
|
+
}
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default Input;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./styles.css";
|
|
2
|
+
|
|
3
|
+
const TextArea = ({
|
|
4
|
+
name,
|
|
5
|
+
id,
|
|
6
|
+
onChange,
|
|
7
|
+
defaultValue,
|
|
8
|
+
value,
|
|
9
|
+
label = "",
|
|
10
|
+
isDisabled = false,
|
|
11
|
+
type = "text",
|
|
12
|
+
className = "",
|
|
13
|
+
}) => {
|
|
14
|
+
const fieldWrapperClassName = `cp-form-field cp-textarea-field ${className}`;
|
|
15
|
+
return (
|
|
16
|
+
<div className={fieldWrapperClassName}>
|
|
17
|
+
{label && <label className="cp-form-label">{label}</label>}
|
|
18
|
+
<textarea
|
|
19
|
+
className="cp-form-control"
|
|
20
|
+
type={type}
|
|
21
|
+
disabled={isDisabled}
|
|
22
|
+
name={name}
|
|
23
|
+
id={id}
|
|
24
|
+
defaultValue={defaultValue}
|
|
25
|
+
value={value}
|
|
26
|
+
onChange={(e) => {
|
|
27
|
+
if (onChange) {
|
|
28
|
+
onChange(e);
|
|
29
|
+
}
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default TextArea;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.cp-form-field {
|
|
2
|
+
font-family: inherit;
|
|
3
|
+
font-size: inherit;
|
|
4
|
+
margin-bottom: 16px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.cp-form-label {
|
|
8
|
+
display: block;
|
|
9
|
+
margin-bottom: 8px;
|
|
10
|
+
color: #999;
|
|
11
|
+
}
|
|
12
|
+
.cp-form-control {
|
|
13
|
+
height: 44px;
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
border: 1px solid #ccc;
|
|
16
|
+
padding: 0 16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.cp-textarea-field textarea {
|
|
20
|
+
min-height: 88px;
|
|
21
|
+
padding: 16px;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Icon.jsx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Modal.jsx";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./styles.css";
|
|
2
|
+
|
|
3
|
+
const Typography = ({ children, variant }) => {
|
|
4
|
+
switch (variant) {
|
|
5
|
+
case "h1":
|
|
6
|
+
return <h1 className="cp-typography">{children}</h1>;
|
|
7
|
+
case "h2":
|
|
8
|
+
return <h2 className="cp-typography">{children}</h2>;
|
|
9
|
+
case "h3":
|
|
10
|
+
return <h3 className="cp-typography">{children}</h3>;
|
|
11
|
+
case "h4":
|
|
12
|
+
return <h4 className="cp-typography">{children}</h4>;
|
|
13
|
+
case "h5":
|
|
14
|
+
return <h5 className="cp-typography">{children}</h5>;
|
|
15
|
+
case "h6":
|
|
16
|
+
return <h6 className="cp-typography">{children}</h6>;
|
|
17
|
+
default:
|
|
18
|
+
return <p className="cp-typography">{children}</p>;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default Typography;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Typography.jsx";
|
package/src/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./components/typography/index";
|
|
2
|
+
export * from "./components/app-shell/index";
|
|
3
|
+
export * from "./components/button/index";
|
|
4
|
+
export * from "./components/icon/index";
|
|
5
|
+
export * from "./components/badge/index";
|
|
6
|
+
export * from "./components/form-controls/index";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import Typography from "../components/typography/Typography";
|
|
2
|
+
|
|
3
|
+
const meta = {
|
|
4
|
+
component: Typography,
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const H1 = {
|
|
8
|
+
name: "Title - H1",
|
|
9
|
+
render: () => <Typography variant="h1">Hello world!</Typography>,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const H2 = {
|
|
13
|
+
render: () => <Typography variant="h2">Hello world!</Typography>,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const H3 = {
|
|
17
|
+
render: () => <Typography variant="h3">Hello world!</Typography>,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const H4 = {
|
|
21
|
+
render: () => <Typography variant="h4">Hello world!</Typography>,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const H5 = {
|
|
25
|
+
render: () => <Typography variant="h5">Hello world!</Typography>,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const H6 = {
|
|
29
|
+
render: () => <Typography variant="h6">Hello world!</Typography>,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Paragraph = {
|
|
33
|
+
render: () => <Typography>Hello world!</Typography>,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" fill="none"><path fill="#222" d="M61.543 19.703A32 32 0 1 1 31.989 0c4.23-.012 8.42.828 12.32 2.469a2.286 2.286 0 0 1 1.234 2.994 2.286 2.286 0 0 1-2.994 1.211A27.429 27.429 0 1 0 57.314 21.44a2.285 2.285 0 1 1 4.229-1.737ZM43.417 9.143a6.857 6.857 0 0 0 6.857-6.857 2.286 2.286 0 0 1 4.572 0 6.857 6.857 0 0 0 6.857 6.857 2.286 2.286 0 1 1 0 4.571 6.857 6.857 0 0 0-6.857 6.857 2.286 2.286 0 1 1-4.572 0 6.857 6.857 0 0 0-6.857-6.857 2.285 2.285 0 1 1 0-4.571Zm6.857 2.286c.867.65 1.636 1.42 2.286 2.285.65-.866 1.42-1.636 2.286-2.285a11.433 11.433 0 0 1-2.286-2.286c-.65.866-1.42 1.636-2.286 2.286Zm0 20.571a18.286 18.286 0 1 1-36.572 0 18.286 18.286 0 0 1 36.572 0Zm-4.571 0a13.715 13.715 0 1 0-27.43 0 13.715 13.715 0 0 0 27.43 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="166" height="32" fill="none"><path fill="#222" d="M30.771 9.851A16 16 0 1 1 15.994.001c2.116-.007 4.21.413 6.16 1.233a1.143 1.143 0 0 1 .617 1.497 1.143 1.143 0 0 1-1.497.606 13.714 13.714 0 1 0 7.383 7.383 1.143 1.143 0 0 1 2.114-.869Zm-9.062-5.28a3.428 3.428 0 0 0 3.428-3.428 1.143 1.143 0 1 1 2.286 0A3.428 3.428 0 0 0 30.85 4.57a1.143 1.143 0 1 1 0 2.286 3.428 3.428 0 0 0-3.428 3.429 1.143 1.143 0 0 1-2.286 0 3.428 3.428 0 0 0-3.428-3.429 1.143 1.143 0 0 1 0-2.286Zm3.428 1.143c.433.325.818.71 1.143 1.143.325-.433.71-.818 1.143-1.143a5.714 5.714 0 0 1-1.143-1.143c-.325.434-.71.818-1.143 1.143Zm0 10.286A9.143 9.143 0 1 1 6.85 16a9.143 9.143 0 0 1 18.287 0Zm-2.286 0a6.857 6.857 0 1 0-13.714 0 6.857 6.857 0 0 0 13.714 0Z"/><path fill="#000" d="M60.315 13h-2.113a4.394 4.394 0 0 0-1.782-2.761 4.776 4.776 0 0 0-1.457-.716 5.82 5.82 0 0 0-1.67-.239c-1.057 0-2.015.267-2.873.801-.852.534-1.53 1.321-2.037 2.361-.5 1.04-.75 2.315-.75 3.827 0 1.511.25 2.787.75 3.826.506 1.04 1.185 1.827 2.037 2.361.858.534 1.816.801 2.873.801.58 0 1.136-.08 1.67-.238a4.888 4.888 0 0 0 1.457-.708 4.477 4.477 0 0 0 1.781-2.77h2.114a7.038 7.038 0 0 1-.869 2.395 6.544 6.544 0 0 1-1.568 1.799 6.867 6.867 0 0 1-2.105 1.116c-.773.256-1.6.384-2.48.384-1.489 0-2.813-.364-3.972-1.091-1.16-.727-2.071-1.762-2.736-3.102-.665-1.341-.997-2.932-.997-4.773 0-1.841.332-3.432.997-4.773.665-1.34 1.577-2.375 2.736-3.102 1.16-.728 2.483-1.091 3.972-1.091.88 0 1.707.128 2.48.383.778.256 1.48.631 2.105 1.125a6.428 6.428 0 0 1 1.568 1.79c.42.699.71 1.497.87 2.395Zm5.154-5.455V25h-2.01V7.545h2.01Zm9.173 17.728c-1.261 0-2.35-.279-3.264-.835-.91-.563-1.611-1.347-2.105-2.353-.489-1.011-.733-2.187-.733-3.528 0-1.341.244-2.523.733-3.546.494-1.028 1.181-1.83 2.062-2.403.887-.58 1.92-.87 3.103-.87.681 0 1.355.114 2.02.341.664.228 1.27.597 1.815 1.108.545.506.98 1.177 1.304 2.012.324.835.486 1.864.486 3.085v.852H69.972v-1.738h8.045c0-.739-.148-1.398-.443-1.977a3.34 3.34 0 0 0-1.245-1.373c-.533-.335-1.164-.502-1.891-.502-.802 0-1.495.198-2.08.596a3.925 3.925 0 0 0-1.338 1.534 4.507 4.507 0 0 0-.469 2.028v1.16c0 .988.17 1.826.511 2.514.347.682.827 1.201 1.44 1.56.615.352 1.328.528 2.14.528.529 0 1.006-.074 1.432-.222.432-.153.804-.38 1.116-.681.313-.307.554-.688.725-1.142l1.943.545a4.309 4.309 0 0 1-1.031 1.738c-.483.495-1.08.881-1.79 1.16-.71.272-1.509.409-2.395.409Zm12.332.034c-.83 0-1.582-.156-2.258-.469a3.876 3.876 0 0 1-1.61-1.372c-.399-.602-.597-1.33-.597-2.182 0-.75.147-1.358.443-1.824.295-.471.69-.84 1.184-1.108a6.224 6.224 0 0 1 1.637-.596 19.926 19.926 0 0 1 1.815-.324c.796-.102 1.44-.18 1.935-.23.5-.057.863-.15 1.09-.282.234-.13.35-.358.35-.681v-.069c0-.84-.23-1.494-.69-1.96-.455-.466-1.145-.699-2.071-.699-.96 0-1.713.21-2.259.631-.545.42-.929.87-1.15 1.347l-1.91-.682c.341-.796.796-1.415 1.364-1.858a5.109 5.109 0 0 1 1.875-.938 7.78 7.78 0 0 1 2.011-.272c.421 0 .904.05 1.45.153a4.635 4.635 0 0 1 1.593.605c.517.307.946.77 1.287 1.39.341.619.511 1.448.511 2.488V25h-2.01v-1.773h-.103c-.137.284-.364.588-.682.912-.318.324-.742.6-1.27.827-.528.227-1.173.34-1.935.34Zm.307-1.807c.796 0 1.466-.156 2.012-.469.55-.312.965-.716 1.244-1.21a3.084 3.084 0 0 0 .426-1.56v-1.84c-.085.102-.273.195-.562.28-.284.08-.614.151-.99.214-.368.057-.73.108-1.082.153-.346.04-.627.074-.843.102a7.678 7.678 0 0 0-1.466.333c-.449.148-.813.372-1.091.673-.273.296-.41.699-.41 1.21 0 .7.26 1.228.776 1.586.523.352 1.185.528 1.986.528Zm11.376-6.375V25h-2.011V11.91h1.943v2.044h.17a3.74 3.74 0 0 1 1.398-1.602c.625-.409 1.432-.613 2.42-.613.887 0 1.662.181 2.327.545.665.358 1.182.903 1.551 1.636.37.728.554 1.648.554 2.762V25h-2.011v-8.182c0-1.028-.267-1.83-.801-2.403-.534-.58-1.267-.87-2.199-.87-.642 0-1.216.14-1.722.418a2.99 2.99 0 0 0-1.184 1.219c-.29.534-.435 1.182-.435 1.943Zm12.3 7.875V7.545h5.898c1.369 0 2.489.248 3.358.742.875.489 1.523 1.15 1.943 1.986.421.835.631 1.767.631 2.795 0 1.029-.21 1.963-.631 2.804-.415.841-1.057 1.512-1.926 2.012-.869.494-1.983.741-3.341.741h-4.227V16.75h4.159c.938 0 1.69-.162 2.259-.486.568-.324.98-.761 1.235-1.312.262-.557.392-1.185.392-1.884 0-.699-.13-1.324-.392-1.875-.255-.551-.67-.983-1.244-1.295-.574-.318-1.335-.478-2.284-.478h-3.716V25h-2.114ZM127.93 7.545V25h-2.011V7.545h2.011Zm7.537 17.762c-.83 0-1.583-.156-2.259-.469a3.88 3.88 0 0 1-1.611-1.372c-.397-.602-.596-1.33-.596-2.182 0-.75.147-1.358.443-1.824a3.12 3.12 0 0 1 1.185-1.108 6.213 6.213 0 0 1 1.636-.596 19.899 19.899 0 0 1 1.815-.324 82.224 82.224 0 0 1 1.935-.23c.5-.057.864-.15 1.091-.282.233-.13.349-.358.349-.681v-.069c0-.84-.23-1.494-.69-1.96-.455-.466-1.145-.699-2.071-.699-.96 0-1.713.21-2.259.631-.545.42-.929.87-1.15 1.347l-1.909-.682c.341-.796.795-1.415 1.363-1.858a5.112 5.112 0 0 1 1.875-.938 7.788 7.788 0 0 1 2.012-.272c.42 0 .903.05 1.449.153a4.63 4.63 0 0 1 1.593.605c.517.307.946.77 1.287 1.39.341.619.512 1.448.512 2.488V25h-2.012v-1.773h-.102c-.136.284-.364.588-.682.912-.318.324-.741.6-1.27.827-.528.227-1.173.34-1.934.34Zm.306-1.807c.796 0 1.466-.156 2.012-.469.551-.312.966-.716 1.244-1.21a3.085 3.085 0 0 0 .426-1.56v-1.84c-.085.102-.272.195-.562.28-.284.08-.614.151-.989.214-.369.057-.73.108-1.082.153-.347.04-.628.074-.844.102a7.682 7.682 0 0 0-1.466.333c-.449.148-.812.372-1.091.673-.273.296-.409.699-.409 1.21 0 .7.259 1.228.776 1.586.522.352 1.184.528 1.985.528Zm15.058-11.59v1.704h-6.784v-1.705h6.784Zm-4.807-3.137h2.012V21.25c0 .568.082.994.247 1.278.17.279.386.466.647.563.267.09.549.136.844.136.222 0 .404-.011.546-.034l.341-.068.409 1.807a4.116 4.116 0 0 1-.571.153 4.21 4.21 0 0 1-.929.085 4.05 4.05 0 0 1-1.671-.366 3.315 3.315 0 0 1-1.346-1.116c-.353-.5-.529-1.131-.529-1.892V8.773Zm13.181 16.5c-1.262 0-2.35-.279-3.265-.835-.909-.563-1.61-1.347-2.105-2.353-.488-1.011-.733-2.187-.733-3.528 0-1.341.245-2.523.733-3.546.495-1.028 1.182-1.83 2.063-2.403.886-.58 1.92-.87 3.102-.87.682 0 1.355.114 2.02.341.665.228 1.27.597 1.815 1.108.546.506.98 1.177 1.304 2.012.324.835.486 1.864.486 3.085v.852h-10.091v-1.738h8.046c0-.739-.148-1.398-.444-1.977a3.332 3.332 0 0 0-1.244-1.373c-.534-.335-1.165-.502-1.892-.502-.801 0-1.494.198-2.08.596a3.933 3.933 0 0 0-1.338 1.534 4.513 4.513 0 0 0-.468 2.028v1.16c0 .988.17 1.826.511 2.514.347.682.827 1.201 1.44 1.56.614.352 1.327.528 2.14.528a4.35 4.35 0 0 0 1.431-.222 3.07 3.07 0 0 0 1.117-.681c.312-.307.554-.688.724-1.142l1.943.545a4.301 4.301 0 0 1-1.031 1.738 5.02 5.02 0 0 1-1.79 1.16c-.71.272-1.508.409-2.394.409Z"/></svg>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
7
|
+
<link rel="icon" href="./favicon.ico" />
|
|
8
|
+
<title>CleanPlate - React UI Framework</title>
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
10
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
11
|
+
<link
|
|
12
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
|
|
13
|
+
rel="stylesheet"
|
|
14
|
+
/>
|
|
15
|
+
<link rel="stylesheet" href="style.css" />
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<main>
|
|
19
|
+
<div class="container">
|
|
20
|
+
<a href="/index.html" title="CleanPlate">
|
|
21
|
+
<img
|
|
22
|
+
class="logo"
|
|
23
|
+
src="./assets/images/cleanplate-logo.svg"
|
|
24
|
+
alt="CleanPlate"
|
|
25
|
+
/>
|
|
26
|
+
</a>
|
|
27
|
+
<h1>React UI Framework</h1>
|
|
28
|
+
<p>Coming soon!</p>
|
|
29
|
+
</div>
|
|
30
|
+
</main>
|
|
31
|
+
<footer>
|
|
32
|
+
<p>
|
|
33
|
+
<span>
|
|
34
|
+
© 2024 <a href="/index.html">CleanPlate</a> - React UI Framework
|
|
35
|
+
</span>
|
|
36
|
+
<span> | </span>
|
|
37
|
+
<span>
|
|
38
|
+
Made with ❤️ by <a href="https://sivadass.in">Sivadass</a>
|
|
39
|
+
</span>
|
|
40
|
+
</p>
|
|
41
|
+
</footer>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
font-family: "Inter", sans-serif;
|
|
9
|
+
font-size: 16px;
|
|
10
|
+
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
main {
|
|
14
|
+
display: flex;
|
|
15
|
+
min-height: calc(100vh - 64px);
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
padding: 0 32px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
a {
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
color: #4099ff;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.logo {
|
|
27
|
+
display: block;
|
|
28
|
+
width: 100%;
|
|
29
|
+
max-width: 300px;
|
|
30
|
+
margin: 0 auto 32px auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
h1 {
|
|
34
|
+
margin-bottom: 16px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
footer {
|
|
38
|
+
margin: 16px 0;
|
|
39
|
+
height: 32px;
|
|
40
|
+
line-height: 32px;
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
}
|