@contentful/experiences-components-react 0.0.1-beta.0 → 0.0.1-beta.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 +0 -8
- package/dist/index.js +1 -1
- package/package.json +4 -6
- package/styles.css +0 -70
package/README.md
CHANGED
|
@@ -38,14 +38,6 @@ npm install @contentful/experiences-components-react
|
|
|
38
38
|
|
|
39
39
|
By default, the components are unstyled. This allows you to style the components to match your brand and design system. If you want a set of default styles to get started, see below.
|
|
40
40
|
|
|
41
|
-
### Including default styles
|
|
42
|
-
|
|
43
|
-
A set of optional, default styles are included with the components. To include them, import the `styles.css` file from the `@contentful/experiences-components-react` package:
|
|
44
|
-
|
|
45
|
-
```jsx
|
|
46
|
-
import '@contentful/experiences-components-react/styles.css';
|
|
47
|
-
```
|
|
48
|
-
|
|
49
41
|
### Adding custom styles
|
|
50
42
|
|
|
51
43
|
Each component has a css class that you can use to add your own styles. The classes are named in the style of `cf-{component-name}` (ie `cf-button`).
|
package/dist/index.js
CHANGED
|
@@ -428,7 +428,7 @@ const TextComponentDefinition = {
|
|
|
428
428
|
},
|
|
429
429
|
};
|
|
430
430
|
|
|
431
|
-
var css_248z$2 = ".cf-no-image {\n position: relative;\n}\n\n.cf-no-image img {\n background-color: var(--cf-color-gray100);\n outline-offset: -2px;\n outline: 2px solid rgba(var(--cf-color-gray400-rgb), 0.5);\n}\n\n[data-ctfl-draggable-id] .cf-no-image {\n width: 100%;\n height: 100%;\n}\n\n[data-ctfl-draggable-id] .cf-no-image img {\n width: 100%;\n}\n\n.cf-no-image svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n height: var(--cf-text-3xl);\n width: var(--cf-text-3xl);\n max-height: 100%;\n max-width: 100%;\n}\n\n.cf-no-image svg path {\n fill: var(--cf-color-gray400);\n}\n";
|
|
431
|
+
var css_248z$2 = "@import url(https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;1,400;1,600&display=swap);\n\n:root {\n /* All sizing comments based of 16px base body font size */\n\n /* color */\n --cf-color-white: #fff;\n --cf-color-black: #000;\n --cf-color-gray100: #f7f9fa;\n --cf-color-gray400: #aec1cc;\n --cf-color-gray400-rgb: 174, 193, 204;\n\n /* spacing */\n --cf-spacing-0: 0rem; /* 0px */\n --cf-spacing-1: 0.125rem; /* 2px */\n --cf-spacing-2: 0.25rem; /* 4px */\n --cf-spacing-3: 0.375rem; /* 6px */\n --cf-spacing-4: 0.5rem; /* 8px */\n --cf-spacing-5: 0.625rem; /* 10px */\n --cf-spacing-6: 0.75rem; /* 12px */\n --cf-spacing-7: 0.875rem; /* 14px */\n --cf-spacing-8: 1rem; /* 16px */\n --cf-spacing-9: 1.25rem; /* 20px */\n --cf-spacing-10: 1.5rem; /* 24px */\n --cf-spacing-11: 1.75rem; /* 28px */\n --cf-spacing-12: 2rem; /* 32px */\n --cf-spacing-13: 2.25rem; /* 36px */\n\n /* font-size */\n --cf-text-xs: 0.75rem; /* 12px */\n --cf-text-sm: 0.875rem; /* 14px */\n --cf-text-base: 1rem; /* 16px */\n --cf-text-lg: 1.125rem; /* 18px */\n --cf-text-xl: 1.25rem; /* 20px */\n --cf-text-2xl: 1.5rem; /* 24px */\n --cf-text-3xl: 2rem; /* 32px */\n --cf-text-4xl: 2.75rem; /* 44px */\n\n /* font-weight */\n --cf-font-light: 300;\n --cf-font-normal: 400;\n --cf-font-medium: 500;\n --cf-font-semibold: 600;\n --cf-font-bold: 700;\n --cf-font-extra-bold: 800;\n --cf-font-black: 900;\n\n /* border-radius */\n --cf-border-radius-none: 0px; /* none */\n --cf-border-radius-sm: 0.125rem; /* 2px */\n --cf-border-radius: 0.25rem; /* 4px */\n --cf-border-radius-md: 0.375rem; /* 6px */\n --cf-border-radius-lg: 0.5rem; /* 8px */\n --cf-border-radius-xl: 0.75rem; /* 12px */\n --cf-border-radius-2xl: 1rem; /* 16px */\n --cf-border-radius-3xl: 1.5rem; /* 24px */\n --cf-border-radius-full: 9999px; /* full */\n\n /* font-family */\n --cf-font-family-sans: Archivo, Helvetica, Arial, sans-serif;\n --cf-font-family-serif: Georgia, Cambria, Times New Roman, Times, serif;\n\n /* max widths */\n --cf-max-width-full: 100%;\n\n /* component specific colors */\n --cf-button-bg: var(--cf-color-black);\n --cf-button-color: var(--cf-color-white);\n --cf-text-color: var(--cf-color-black);\n}\n\n.cf-no-image {\n position: relative;\n}\n\n.cf-no-image img {\n background-color: var(--cf-color-gray100);\n outline-offset: -2px;\n outline: 2px solid rgba(var(--cf-color-gray400-rgb), 0.5);\n}\n\n[data-ctfl-draggable-id] .cf-no-image {\n width: 100%;\n height: 100%;\n}\n\n[data-ctfl-draggable-id] .cf-no-image img {\n width: 100%;\n}\n\n.cf-no-image svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n height: var(--cf-text-3xl);\n width: var(--cf-text-3xl);\n max-height: 100%;\n max-width: 100%;\n}\n\n.cf-no-image svg path {\n fill: var(--cf-color-gray400);\n}\n";
|
|
432
432
|
styleInject(css_248z$2);
|
|
433
433
|
|
|
434
434
|
const Image = ({ className = '', src, cfImageAsset, ...props }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experiences-components-react",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.1",
|
|
4
4
|
"description": "A basic set of components to use with Studio Experiences",
|
|
5
5
|
"homepage": "https://github.com/contentful/experience-builder/tree/next/packages/components#readme",
|
|
6
6
|
"repository": {
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
"main": "./dist/index.js",
|
|
11
11
|
"module": "./dist/index.js",
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
|
-
"style": "./styles.css",
|
|
14
13
|
"type": "module",
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"registry": "https://npm.pkg.github.com/"
|
|
17
16
|
},
|
|
18
17
|
"scripts": {
|
|
19
|
-
"clean": "rimraf dist
|
|
18
|
+
"clean": "rimraf dist",
|
|
20
19
|
"predev": "npm run clean",
|
|
21
20
|
"dev": "rollup -c ./rollup.config.mjs --watch --environment DEV",
|
|
22
21
|
"prebuild": "npm run clean",
|
|
@@ -32,7 +31,6 @@
|
|
|
32
31
|
"license": "MIT",
|
|
33
32
|
"files": [
|
|
34
33
|
"readme.md",
|
|
35
|
-
"styles.css",
|
|
36
34
|
"package.json",
|
|
37
35
|
"dist/**/*.*"
|
|
38
36
|
],
|
|
@@ -76,10 +74,10 @@
|
|
|
76
74
|
"react-dom": ">=17.0.0"
|
|
77
75
|
},
|
|
78
76
|
"dependencies": {
|
|
79
|
-
"@contentful/experiences-core": "0.0.1-beta.
|
|
77
|
+
"@contentful/experiences-core": "0.0.1-beta.1",
|
|
80
78
|
"@contentful/rich-text-react-renderer": "^15.17.2",
|
|
81
79
|
"postcss-import": "^15.1.0",
|
|
82
80
|
"style-inject": "^0.3.0"
|
|
83
81
|
},
|
|
84
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "cc255e27017366cf0e1e9bf721dcf7b5827ad1c3"
|
|
85
83
|
}
|
package/styles.css
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
@import url(https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;1,400;1,600&display=swap);
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
/* All sizing comments based of 16px base body font size */
|
|
5
|
-
|
|
6
|
-
/* color */
|
|
7
|
-
--cf-color-white: #fff;
|
|
8
|
-
--cf-color-black: #000;
|
|
9
|
-
--cf-color-gray100: #f7f9fa;
|
|
10
|
-
--cf-color-gray400: #aec1cc;
|
|
11
|
-
--cf-color-gray400-rgb: 174, 193, 204;
|
|
12
|
-
|
|
13
|
-
/* spacing */
|
|
14
|
-
--cf-spacing-0: 0rem; /* 0px */
|
|
15
|
-
--cf-spacing-1: 0.125rem; /* 2px */
|
|
16
|
-
--cf-spacing-2: 0.25rem; /* 4px */
|
|
17
|
-
--cf-spacing-3: 0.375rem; /* 6px */
|
|
18
|
-
--cf-spacing-4: 0.5rem; /* 8px */
|
|
19
|
-
--cf-spacing-5: 0.625rem; /* 10px */
|
|
20
|
-
--cf-spacing-6: 0.75rem; /* 12px */
|
|
21
|
-
--cf-spacing-7: 0.875rem; /* 14px */
|
|
22
|
-
--cf-spacing-8: 1rem; /* 16px */
|
|
23
|
-
--cf-spacing-9: 1.25rem; /* 20px */
|
|
24
|
-
--cf-spacing-10: 1.5rem; /* 24px */
|
|
25
|
-
--cf-spacing-11: 1.75rem; /* 28px */
|
|
26
|
-
--cf-spacing-12: 2rem; /* 32px */
|
|
27
|
-
--cf-spacing-13: 2.25rem; /* 36px */
|
|
28
|
-
|
|
29
|
-
/* font-size */
|
|
30
|
-
--cf-text-xs: 0.75rem; /* 12px */
|
|
31
|
-
--cf-text-sm: 0.875rem; /* 14px */
|
|
32
|
-
--cf-text-base: 1rem; /* 16px */
|
|
33
|
-
--cf-text-lg: 1.125rem; /* 18px */
|
|
34
|
-
--cf-text-xl: 1.25rem; /* 20px */
|
|
35
|
-
--cf-text-2xl: 1.5rem; /* 24px */
|
|
36
|
-
--cf-text-3xl: 2rem; /* 32px */
|
|
37
|
-
--cf-text-4xl: 2.75rem; /* 44px */
|
|
38
|
-
|
|
39
|
-
/* font-weight */
|
|
40
|
-
--cf-font-light: 300;
|
|
41
|
-
--cf-font-normal: 400;
|
|
42
|
-
--cf-font-medium: 500;
|
|
43
|
-
--cf-font-semibold: 600;
|
|
44
|
-
--cf-font-bold: 700;
|
|
45
|
-
--cf-font-extra-bold: 800;
|
|
46
|
-
--cf-font-black: 900;
|
|
47
|
-
|
|
48
|
-
/* border-radius */
|
|
49
|
-
--cf-border-radius-none: 0px; /* none */
|
|
50
|
-
--cf-border-radius-sm: 0.125rem; /* 2px */
|
|
51
|
-
--cf-border-radius: 0.25rem; /* 4px */
|
|
52
|
-
--cf-border-radius-md: 0.375rem; /* 6px */
|
|
53
|
-
--cf-border-radius-lg: 0.5rem; /* 8px */
|
|
54
|
-
--cf-border-radius-xl: 0.75rem; /* 12px */
|
|
55
|
-
--cf-border-radius-2xl: 1rem; /* 16px */
|
|
56
|
-
--cf-border-radius-3xl: 1.5rem; /* 24px */
|
|
57
|
-
--cf-border-radius-full: 9999px; /* full */
|
|
58
|
-
|
|
59
|
-
/* font-family */
|
|
60
|
-
--cf-font-family-sans: Archivo, Helvetica, Arial, sans-serif;
|
|
61
|
-
--cf-font-family-serif: Georgia, Cambria, Times New Roman, Times, serif;
|
|
62
|
-
|
|
63
|
-
/* max widths */
|
|
64
|
-
--cf-max-width-full: 100%;
|
|
65
|
-
|
|
66
|
-
/* component specific colors */
|
|
67
|
-
--cf-button-bg: var(--cf-color-black);
|
|
68
|
-
--cf-button-color: var(--cf-color-white);
|
|
69
|
-
--cf-text-color: var(--cf-color-black);
|
|
70
|
-
}
|