@equinor/cpl-theme-react 0.0.5 → 0.0.7

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.css +190 -37
  3. package/package.json +3 -4
package/README.md CHANGED
@@ -10,4 +10,4 @@ yarn add @equinor/cpl-theme-react
10
10
 
11
11
  ## Components
12
12
 
13
- - `ThemeProvider` - A provider component which will only be rendered on the client side that wraps your application and manages theme mode state.
13
+ - `ThemeProvider` - A provider component which will only be rendered on the client side that wraps your application and manages theme mode state.
package/dist/index.css CHANGED
@@ -1,6 +1,84 @@
1
- /* src/styles.css */
2
- :root[data-equinor-cpl-theme=light] {
3
- --eds-color-border-interactive-resting: #b3b3b3;
1
+ :root[data-equinor-cpl-theme='light'] {
2
+ --eds_text__static_icons__default: rgba(61, 61, 61, 1);
3
+ --eds_text__static_icons__secondary: rgba(86, 86, 86, 1);
4
+ --eds_text__static_icons__tertiary: rgba(111, 111, 111, 1);
5
+ --eds_text__static_icons__primary_white: rgba(255, 255, 255, 1);
6
+ --eds_ui_background__default: rgba(255, 255, 255, 1);
7
+ --eds_ui_background__semitransparent: rgba(255, 255, 255, 0.2);
8
+ --eds_ui_background__light: rgba(247, 247, 247, 1);
9
+ --eds_ui_background__scrim: rgba(0, 0, 0, 0.4);
10
+ --eds_ui_background__overlay: rgba(0, 0, 0, 0.8);
11
+ --eds_ui_background__medium: rgba(220, 220, 220, 1);
12
+ --eds_ui_background__info: rgba(213, 234, 244, 1);
13
+ --eds_ui_background__warning: rgba(255, 231, 214, 1);
14
+ --eds_ui_background__danger: rgba(255, 193, 193, 1);
15
+ --eds_infographic_substitute__purple_berry: rgba(140, 17, 89, 1);
16
+ --eds_infographic_substitute__pink_rose: rgba(226, 73, 115, 1);
17
+ --eds_infographic_substitute__pink_salmon: rgba(255, 146, 168, 1);
18
+ --eds_infographic_substitute__green_cucumber: rgba(0, 95, 87, 1);
19
+ --eds_infographic_substitute__green_succulent: rgba(0, 151, 123, 1);
20
+ --eds_infographic_substitute__green_mint: rgba(64, 211, 143, 1);
21
+ --eds_infographic_substitute__blue_ocean: rgba(0, 64, 136, 1);
22
+ --eds_infographic_substitute__blue_overcast: rgba(0, 132, 196, 1);
23
+ --eds_infographic_substitute__blue_sky: rgba(82, 192, 255, 1);
24
+ --eds_infographic_primary__moss_green_100: rgba(0, 112, 121, 1);
25
+ --eds_infographic_primary__moss_green_55: rgba(115, 177, 181, 1);
26
+ --eds_infographic_primary__moss_green_34: rgba(168, 206, 209, 1);
27
+ --eds_infographic_primary__moss_green_21: rgba(201, 224, 226, 1);
28
+ --eds_infographic_primary__moss_green_13: rgba(222, 237, 238, 1);
29
+ --eds_infographic_primary__energy_red_100: rgba(235, 0, 55, 1);
30
+ --eds_infographic_primary__energy_red_55: rgba(255, 125, 152, 1);
31
+ --eds_infographic_primary__energy_red_34: rgba(255, 174, 191, 1);
32
+ --eds_infographic_primary__energy_red_21: rgba(255, 205, 215, 1);
33
+ --eds_infographic_primary__energy_red_13: rgba(255, 224, 231, 1);
34
+ --eds_infographic_primary__weathered_red: rgba(125, 0, 35, 1);
35
+ --eds_infographic_primary__slate_blue: rgba(36, 55, 70, 1);
36
+ --eds_infographic_primary__spruce_wood: rgba(255, 231, 214, 1);
37
+ --eds_infographic_primary__mist_blue: rgba(213, 234, 244, 1);
38
+ --eds_infographic_primary__lichen_green: rgba(230, 250, 236, 1);
39
+ --eds_logo__fill_positive: rgba(235, 0, 55, 1);
40
+ --eds_logo__fill_negative: rgba(255, 255, 255, 1);
41
+ --eds_interactive_primary__selected_highlight: rgba(230, 250, 236, 1);
42
+ --eds_interactive_primary__selected_hover: rgba(195, 243, 210, 1);
43
+ --eds_interactive_primary__resting: rgba(0, 112, 121, 1);
44
+ --eds_interactive_primary__hover: rgba(0, 79, 85, 1);
45
+ --eds_interactive_primary__hover_alt: rgba(222, 237, 238, 1);
46
+ --eds_interactive_secondary__highlight: rgba(213, 234, 244, 1);
47
+ --eds_interactive_secondary__resting: rgba(36, 55, 70, 1);
48
+ --eds_interactive_secondary__link_hover: rgba(23, 36, 47, 1);
49
+ --eds_interactive_danger__highlight: rgba(255, 193, 193, 1);
50
+ --eds_interactive_danger__resting: rgba(235, 0, 0, 1);
51
+ --eds_interactive_danger__hover: rgba(179, 13, 47, 1);
52
+ --eds_interactive_danger__text: rgba(179, 13, 47, 1);
53
+ --eds_interactive_warning__highlight: rgba(255, 231, 214, 1);
54
+ --eds_interactive_warning__resting: rgba(255, 146, 0, 1);
55
+ --eds_interactive_warning__hover: rgba(173, 98, 0, 1);
56
+ --eds_interactive_warning__text: rgba(173, 98, 0, 1);
57
+ --eds_interactive_success__highlight: rgba(230, 250, 236, 1);
58
+ --eds_interactive_success__resting: rgba(75, 183, 72, 1);
59
+ --eds_interactive_success__hover: rgba(53, 129, 50, 1);
60
+ --eds_interactive_success__text: rgba(53, 129, 50, 1);
61
+ --eds_interactive_table__cell__fill_resting: rgba(255, 255, 255, 1);
62
+ --eds_interactive_table__cell__fill_hover: rgba(234, 234, 234, 1);
63
+ --eds_interactive_table__cell__fill_activated: rgba(230, 250, 236, 1);
64
+ --eds_interactive_table__header__fill_activated: rgba(234, 234, 234, 1);
65
+ --eds_interactive_table__header__fill_hover: rgba(220, 220, 220, 1);
66
+ --eds_interactive_table__header__fill_resting: rgba(247, 247, 247, 1);
67
+ --eds_interactive__disabled__text: rgba(190, 190, 190, 1);
68
+ --eds_interactive__text_highlight: rgba(213, 234, 244, 1);
69
+ --eds_interactive__focus: rgba(0, 112, 121, 1);
70
+ --eds_interactive__disabled__border: rgba(220, 220, 220, 1);
71
+ --eds_interactive__disabled__fill: rgba(234, 234, 234, 1);
72
+ --eds_interactive__link_on_interactive_colors: rgba(255, 255, 255, 1);
73
+ --eds_interactive__icon_on_interactive_colors: rgba(255, 255, 255, 1);
74
+ --eds_interactive__link_in_snackbars: rgba(151, 202, 206, 1);
75
+ --eds_interactive__pressed_overlay_dark: rgba(0, 0, 0, 0.2);
76
+ --eds_interactive__pressed_overlay_light: rgba(255, 255, 255, 0.2);
77
+
78
+ /** Custom variables - not part of EDS */
79
+ --ui-background-temporary-nav: #fff;
80
+
81
+ /* Chart colors (1-22) */
4
82
  --chart-color-1: #00a3be;
5
83
  --chart-color-2: #d58000;
6
84
  --chart-color-3: #889900;
@@ -23,34 +101,109 @@
23
101
  --chart-color-20: #ae8775;
24
102
  --chart-color-21: #666666;
25
103
  --chart-color-22: #949494;
104
+
105
+
26
106
  }
27
- :root[data-equinor-cpl-theme=dark] {
28
- --background-default: rgba(19, 38, 52, 1);
29
- --background-raised: #243746;
30
- --color-text: #ffffff;
31
- --color-text-secondary: rgba(222, 229, 231, 1);
32
- --color-text-tertiary: rgba(156, 166, 172, 1);
33
- --color-text-static-icons-primary: rgba(255, 255, 255, 1);
34
- --color-text-static-primary-black: rgba(0, 0, 0, 1);
35
- --color-text-static-icons-secondary: rgba(222, 229, 231, 1);
36
- --color-text-static-icons-tertiary: rgba(156, 166, 172, 1);
37
- --interactive-primary-resting: rgba(151, 202, 206, 1);
38
- --interactive-primary-hover-alt: rgba(173, 226, 230, 0.1);
39
- --interactive-primary-hover: rgba(173, 226, 230, 1);
40
- --interactive-secondary-resting: rgba(222, 229, 231, 1);
41
- --interactive-secondary-highlight: rgba(255, 255, 255, 0.1);
42
- --interactive-secondary-hover: rgba(255, 255, 255, 1);
43
- --interactive-focus-border: #97cace;
44
- --interactive-disabled-text: #637583;
45
- --interactive-disabled-border: #405462;
46
- --interactive-focus: rgba(0, 112, 121, 1);
47
- --interactive-danger-text: rgba(255, 102, 112, 1);
48
- --interactive-warning-text: rgba(255, 198, 122, 1);
49
- --interactive-success-text: rgba(161, 218, 160, 1);
50
- --interactive-table-header-fill-resting: #243746;
51
- --line-color: #444c52;
52
- --line-color-2: #394955;
53
- --background-lighten: rgba(2, 1, 1, 0.16);
107
+
108
+ /* Dark theme */
109
+ :root[data-equinor-cpl-theme='dark'] {
110
+ /**
111
+ These variables have been verified
112
+ **/
113
+
114
+ --eds_text__static_icons__default: rgba(255, 255, 255, 1);
115
+ --eds_text__static_icons__secondary:rgba(222, 229, 231, 1);
116
+ --eds_text__static_icons__tertiary: rgba(156, 166, 172, 1);
117
+ --eds_text__static_icons__primary_white: rgba(0, 0, 0, 1);
118
+ --eds_ui_background__default: rgba(19, 38, 52, 1);
119
+
120
+ --eds_interactive_primary__resting: rgba(151, 202, 206, 1);
121
+ --eds_interactive_primary__hover: rgba(173, 226, 230, 1);
122
+ --eds_interactive_primary__hover_alt: rgba(173, 226, 230, 0.1);
123
+ --eds_interactive_secondary__highlight: rgba(255, 255, 255, 0.1);
124
+ --eds_interactive_secondary__resting: rgba(222, 229, 231, 1);
125
+ --eds_interactive_secondary__link_hover: rgba(255, 255, 255, 1);
126
+
127
+ /**
128
+ * Note: colors have been programatically converted from light mode
129
+ Need to verify colors
130
+ **/
131
+
132
+ --eds_ui_background__semitransparent: rgba(0, 0, 0, 0.8);
133
+ --eds_ui_background__light: rgba(8, 8, 8, 1);
134
+ --eds_ui_background__scrim: rgba(255, 255, 255, 0.6);
135
+ --eds_ui_background__overlay: rgba(255, 255, 255, 0.2);
136
+ --eds_ui_background__medium: rgba(35, 35, 35, 1);
137
+ --eds_ui_background__info: rgba(42, 21, 11, 1);
138
+ --eds_ui_background__warning: rgba(0, 24, 41, 1);
139
+ --eds_ui_background__danger: rgba(0, 62, 62, 1);
140
+
141
+ --eds_infographic_substitute__purple_berry: rgba(115, 238, 166, 1);
142
+ --eds_infographic_substitute__pink_rose: rgba(29, 182, 140, 1);
143
+ --eds_infographic_substitute__pink_salmon: rgba(0, 109, 87, 1);
144
+ --eds_infographic_substitute__green_cucumber: rgba(255, 160, 168, 1);
145
+ --eds_infographic_substitute__green_succulent: rgba(255, 104, 132, 1);
146
+ --eds_infographic_substitute__green_mint: rgba(191, 44, 112, 1);
147
+ --eds_infographic_substitute__blue_ocean: rgba(255, 191, 119, 1);
148
+ --eds_infographic_substitute__blue_overcast: rgba(255, 123, 59, 1);
149
+ --eds_infographic_substitute__blue_sky: rgba(173, 63, 0, 1);
150
+ --eds_infographic_primary__moss_green_100: rgba(255, 143, 134, 1);
151
+ --eds_infographic_primary__moss_green_55: rgba(140, 78, 74, 1);
152
+ --eds_infographic_primary__moss_green_34: rgba(87, 49, 46, 1);
153
+ --eds_infographic_primary__moss_green_21: rgba(54, 31, 29, 1);
154
+ --eds_infographic_primary__moss_green_13: rgba(33, 18, 17, 1);
155
+ --eds_infographic_primary__energy_red_100: rgba(20, 255, 200, 1);
156
+ --eds_infographic_primary__energy_red_55: rgba(0, 130, 103, 1);
157
+ --eds_infographic_primary__energy_red_34: rgba(0, 81, 64, 1);
158
+ --eds_infographic_primary__energy_red_21: rgba(0, 50, 40, 1);
159
+ --eds_infographic_primary__energy_red_13: rgba(0, 31, 24, 1);
160
+ --eds_infographic_primary__weathered_red: rgba(130, 255, 220, 1);
161
+ --eds_infographic_primary__slate_blue: rgba(219, 200, 185, 1);
162
+ --eds_infographic_primary__spruce_wood: rgba(0, 24, 41, 1);
163
+ --eds_infographic_primary__mist_blue: rgba(42, 21, 11, 1);
164
+ --eds_infographic_primary__lichen_green: rgba(25, 5, 19, 1);
165
+
166
+ --eds_logo__fill_positive: rgba(20, 255, 200, 1);
167
+ --eds_logo__fill_negative: rgba(0, 0, 0, 1);
168
+
169
+ --eds_interactive_primary__selected_highlight: rgba(25, 5, 19, 1);
170
+ --eds_interactive_primary__selected_hover: rgba(60, 12, 45, 1);
171
+ --eds_interactive_danger__highlight: rgba(0, 62, 62, 1);
172
+ --eds_interactive_danger__resting: rgba(20, 255, 255, 1);
173
+ --eds_interactive_danger__hover: rgba(76, 242, 208, 1);
174
+ --eds_interactive_danger__text: rgba(255, 102, 112, 1); /* updated*/
175
+ --eds_interactive_warning__highlight: rgba(0, 24, 41, 1);
176
+ --eds_interactive_warning__resting: rgba(0, 109, 255, 1);
177
+ --eds_interactive_warning__hover: rgba(82, 157, 255, 1);
178
+ --eds_interactive_warning__text: rgba(255, 198, 122, 1); /* updated */
179
+ --eds_interactive_success__highlight: rgba(25, 5, 19, 1);
180
+ --eds_interactive_success__resting: rgba(180, 72, 183, 1);
181
+ --eds_interactive_success__hover: rgba(202, 126, 205, 1);
182
+ --eds_interactive_success__text: rgba(161, 218, 160, 1); /* updated */
183
+ --eds_interactive_table__cell__fill_resting: rgba(36, 55, 70, 1); /* updated */
184
+ --eds_interactive_table__cell__fill_hover: rgba(21, 21, 21, 1);
185
+ --eds_interactive_table__cell__fill_activated: rgba(25, 5, 19, 1);
186
+ --eds_interactive_table__header__fill_activated: rgba(21, 21, 21, 1);
187
+ --eds_interactive_table__header__fill_hover: rgba(35, 35, 35, 1);
188
+ --eds_interactive_table__header__fill_resting: rgba(8, 8, 8, 1);
189
+ --eds_interactive__disabled__text: rgba(99, 117, 131, 1); /*updated*/
190
+ --eds_interactive__text_highlight: rgba(42, 21, 11, 1);
191
+ --eds_interactive__focus: rgba(0, 112, 121, 1); /*updated */
192
+ --eds_interactive__disabled__border: rgba(64, 84, 98, 1); /* updated*/
193
+ --eds_interactive__disabled__fill: rgba(21, 21, 21, 1);
194
+ --eds_interactive__link_on_interactive_colors: rgba(0, 0, 0, 1);
195
+ --eds_interactive__icon_on_interactive_colors: rgba(0, 0, 0, 1);
196
+ --eds_interactive__link_in_snackbars: rgba(151, 202, 206, 1); /* updated */
197
+ --eds_interactive__pressed_overlay_dark: rgba(255, 255, 255, 0.8);
198
+ --eds_interactive__pressed_overlay_light: rgba(0, 0, 0, 0.8);
199
+
200
+ /**
201
+ * CUSTOM VARIABLES
202
+ Have not been able to find a match for these
203
+ **/
204
+ --ui-background-temporary-nav: rgb(62, 79, 92);
205
+
206
+ /* Chart colors (1-22) */
54
207
  --chart-color-1: #2caffe;
55
208
  --chart-color-2: #544fc5;
56
209
  --chart-color-3: #00e272;
@@ -73,13 +226,13 @@
73
226
  --chart-color-20: #91e8e1;
74
227
  --chart-color-21: #2caffe;
75
228
  --chart-color-22: #544fc5;
76
- --eds-color-surface-input: rgba(0, 0, 0, 0.28);
77
- --eds-color-text-input-placeholder: rgba(100, 114, 125, 1);
78
- --eds-color-icon-interactive: rgba(166, 175, 181, 1);
79
- --eds-color-text-static: rgba(166, 175, 181, 1);
80
- --eds-color-text-static-2: rgba(194, 200, 204, 1);
81
229
  }
230
+
82
231
  body {
83
- background-color: var(--background-default);
84
- color: var(--color-text);
232
+ background-color: var(--eds_ui_background__default);
233
+ color: var(--eds_text__static_icons__default);
234
+
235
+ a {
236
+ color: var(--eds_text__static_icons__default);
237
+ }
85
238
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/cpl-theme-react",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -14,8 +14,7 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@equinor/eds-core-react": "^0.42.5",
17
- "@storybook/react": "^8.6.14",
18
- "@storybook/test": "^8.6.14",
17
+ "@storybook/react": "^9.0.12",
19
18
  "@types/react": "^18.3.18",
20
19
  "@types/react-dom": "^18.3.5",
21
20
  "@types/styled-components": "^5.1.34",
@@ -37,7 +36,7 @@
37
36
  "access": "public"
38
37
  },
39
38
  "scripts": {
40
- "build": "tsup src/index.ts --format esm,cjs --dts --external react",
39
+ "build": "tsup src/index.ts --format esm,cjs --dts --external react && cp src/styles.css dist/index.css",
41
40
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
42
41
  "dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react",
43
42
  "lint": "TIMING=1 eslint . --fix",