@openremote/theme 1.14.0-snapshot.20260114094419

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 ADDED
@@ -0,0 +1,37 @@
1
+ # @openremote/theme
2
+ [![NPM Version][npm-image]][npm-url]
3
+
4
+ This is a package that contains CSS files used for styling OpenRemote components and apps.
5
+ Defined CSS variables like `--or-color-primary` and `--or-color-text-primary` can be used to customize the look and feel of the OpenRemote components.
6
+ Currently, only 1 theme ("default") is provided, but can be expanded upon in the future.
7
+ Every theme is expected to have a light and dark counterpart.
8
+
9
+ ## Install
10
+ ```bash
11
+ npm i @openremote/theme
12
+ yarn add @openremote/theme
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### Using CSS
18
+ ```css
19
+ @import "@openremote/theme/default.css";
20
+ ```
21
+ ### Using JavaScript / TypeScript:
22
+ Note: using the `<style>` tag is an example here. Please check the documentation of your JavaScript bundler for proper installation of CSS files.
23
+ ```typescript
24
+ import themeCss from "@openremote/theme/default.css";
25
+
26
+ // Apply theme to the app
27
+ const style = document.createElement("style");
28
+ style.id = "orDefaultTheme";
29
+ style.textContent = themeCss;
30
+ document.head.appendChild(style);
31
+ ```
32
+
33
+ ## License
34
+ [GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
35
+
36
+ [npm-image]: https://img.shields.io/npm/v/@openremote/theme.svg
37
+ [npm-url]: https://npmjs.org/package/@openremote/theme
package/build.gradle ADDED
@@ -0,0 +1,16 @@
1
+ buildDir = "dist"
2
+
3
+ tasks.register('clean') {
4
+ doLast {
5
+ delete "dist"
6
+ delete "lib"
7
+ }
8
+ }
9
+
10
+ tasks.register('prepareUi') {
11
+ dependsOn clean, npmPrepare
12
+ }
13
+
14
+ tasks.register('publishUi') {
15
+ dependsOn clean, npmPublish
16
+ }
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@openremote/theme",
3
+ "version": "1.14.0-snapshot.20260114094419",
4
+ "description": "CSS themes for OpenRemote components",
5
+ "main": "src/index.css",
6
+ "module": "src/index.css",
7
+ "types": "src/index.d.ts",
8
+ "exports": {
9
+ ".": "./src/index.css",
10
+ "./*.css": "./src/*.css",
11
+ "./*": "./*"
12
+ },
13
+ "scripts": {
14
+ "test": "echo \"No tests\" && exit 0"
15
+ },
16
+ "author": "OpenRemote",
17
+ "repository": "https://github.com/openremote/openremote",
18
+ "license": "AGPL-3.0-or-later",
19
+ "dependencies": {
20
+ "@vaadin/vaadin-lumo-styles": "~25.0.1"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ }
25
+ }
@@ -0,0 +1,8 @@
1
+ export default {
2
+ experiments: {
3
+ css: true
4
+ },
5
+ resolve: {
6
+ extensions: ['.css']
7
+ }
8
+ }
@@ -0,0 +1,168 @@
1
+ /*
2
+ * Copyright 2025, OpenRemote Inc.
3
+ *
4
+ * See the CONTRIBUTORS.txt file in the distribution for a
5
+ * full listing of individual contributors.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the
10
+ * License, or (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Affero General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+ @import "@vaadin/vaadin-lumo-styles/lumo.css";
21
+
22
+ :root[theme~="dark"] {
23
+
24
+ /* Dark theme - Base colors */
25
+ --or-color-base: hsla(120, 20%, 1%);
26
+ --or-color-base-5pct: hsla(120, 6%, 14%);
27
+
28
+ /* Dark theme - Grayscale colors */
29
+ --or-color-contrast-5pct: hsla(120, 9%, 80%, 0.06);
30
+ --or-color-contrast-10pct: hsla(120, 10%, 80%, 0.14);
31
+ --or-color-contrast-20pct: hsla(120, 10%, 80%, 0.23);
32
+ --or-color-contrast-30pct: hsla(120, 10%, 80%, 0.32);
33
+ --or-color-contrast-40pct: hsla(120, 10%, 80%, 0.41);
34
+ --or-color-contrast-50pct: hsla(120, 10%, 80%, 0.5);
35
+ --or-color-contrast-60pct: hsla(120, 10%, 80%, 0.58);
36
+ --or-color-contrast-70pct: hsla(120, 10%, 80%, 0.69);
37
+ --or-color-contrast-80pct: hsla(120, 10%, 80%, 0.8);
38
+ --or-color-contrast-90pct: hsla(120, 10%, 80%, 0.9);
39
+ --or-color-contrast: hsl(120, 10%, 90%);
40
+
41
+ /* Dark theme - Text colors */
42
+ --or-color-text-primary: hsl(117, 44%, 46%);
43
+ --or-color-text-error: hsl(3, 100%, 80%);
44
+ --or-color-text-warning: hsl(43, 99%, 63%);
45
+ --or-color-text-success: hsl(145, 85%, 46%);
46
+
47
+ --or-color-text-heading: hsl(120, 20%, 99%);
48
+ --or-color-text-body: hsla(120, 20%, 99%, 0.9);
49
+ --or-color-text-secondary: hsla(120, 20%, 99%, 0.69);
50
+ --or-color-text-tertiary: hsla(120, 20%, 99%, 0.5);
51
+ --or-color-text-disabled: hsla(120, 20%, 99%, 0.32);
52
+
53
+ /* Dark theme - Primary colors */
54
+ --or-color-primary: hsl(117, 44%, 46%);
55
+ --or-color-primary-50pct: hsla(117, 44%, 46%, 0.76);
56
+ --or-color-primary-10pct: hsla(117, 44%, 46%, 0.13);
57
+ --or-color-primary-contrast: hsl(0, 0%, 100%);
58
+
59
+ /* Dark theme - Error colors */
60
+ --or-color-error: hsl(3, 79%, 49%);
61
+ --or-color-error-50pct: hsla(3, 72%, 62%, 0.5);
62
+ --or-color-error-10pct: hsla(3, 75%, 62%, 0.14);
63
+ --or-color-error-contrast: hsl(0, 0%, 100%);
64
+
65
+ /* Dark theme - Warning colors */
66
+ --or-color-warning: hsl(43, 100%, 48%);
67
+ --or-color-warning-10pct: hsla(40, 100%, 50%, 0.2);
68
+ --or-color-warning-contrast: hsla(214, 33%, 13%, 0.9);
69
+
70
+ /* Dark theme - Success colors */
71
+ --or-color-success: hsl(145, 72%, 30%);
72
+ --or-color-success-50pct: hsla(145, 92%, 51%, 0.5);
73
+ --or-color-success-10pct: hsla(145, 92%, 51%, 0.1);
74
+ --or-color-success-contrast: hsl(0, 0%, 100%);
75
+ }
76
+
77
+ :root {
78
+
79
+ /* Light theme - Base colors */
80
+ --or-color-base: hsl(0, 0%, 100%);
81
+ --or-color-base-5pct: hsla(118, 10%, 25%, 0.16);
82
+
83
+ /* Light theme - Grayscale colors */
84
+ --or-color-contrast-5pct: hsla(117, 10%, 25%, 0.05);
85
+ --or-color-contrast-10pct: hsla(118, 10%, 25%, 0.1);
86
+ --or-color-contrast-20pct: hsla(118, 10%, 25%, 0.16);
87
+ --or-color-contrast-30pct: hsla(118, 10%, 25%, 0.26);
88
+ --or-color-contrast-40pct: hsla(118, 10%, 25%, 0.38);
89
+ --or-color-contrast-50pct: hsla(118, 10%, 25%, 0.52);
90
+ --or-color-contrast-60pct: hsla(118, 10%, 25%, 0.6);
91
+ --or-color-contrast-70pct: hsla(120, 10%, 15%, 0.69);
92
+ --or-color-contrast-80pct: hsla(120, 14%, 15%, 0.83);
93
+ --or-color-contrast-90pct: hsla(118, 14%, 15%, 0.94);
94
+ --or-color-contrast: hsl(118, 11%, 13%);
95
+
96
+ /* Light theme - Text colors */
97
+ --or-color-text-primary: hsl(117, 44%, 46%);
98
+ --or-color-text-error: hsl(3, 89%, 42%);
99
+ --or-color-text-warning: hsl(29, 80%, 33%);
100
+ --or-color-text-success: hsl(145, 85%, 25%);
101
+
102
+ --or-color-text-heading: hsl(120, 20%, 1%);
103
+ --or-color-text-body: hsla(120, 20%, 1%, 0.94);
104
+ --or-color-text-secondary: hsla(120, 6%, 14%, 0.69);
105
+ --or-color-text-tertiary: hsla(120, 6%, 14%, 0.52);
106
+ --or-color-text-disabled: hsla(120, 6%, 14%, 0.26);
107
+
108
+ /* Light theme - Primary colors */
109
+ --or-color-primary: hsl(117, 44%, 46%);
110
+ --or-color-primary-50pct: hsla(117, 44%, 46%, 0.76);
111
+ --or-color-primary-10pct: hsla(117, 44%, 46%, 0.13);
112
+ --or-color-primary-contrast: hsl(0, 0%, 100%);
113
+
114
+ /* Light theme - Error colors */
115
+ --or-color-error: hsl(3, 85%, 48%);
116
+ --or-color-error-50pct: hsla(3, 85%, 49%, 0.5);
117
+ --or-color-error-10pct: hsla(3, 85%, 49%, 0.1);
118
+ --or-color-error-contrast: hsl(0, 0%, 100%);
119
+
120
+ /* Light theme - Warning colors */
121
+ --or-color-warning: hsl(48, 100%, 50%);
122
+ --or-color-warning-10pct: hsla(48, 100%, 50%, 0.25);
123
+ --or-color-warning-contrast: hsla(213, 40%, 16%, 0.94);
124
+
125
+ /* Light theme - Success colors */
126
+ --or-color-success: hsl(145, 72%, 30%);
127
+ --or-color-success-50pct: hsla(145, 72%, 31%, 0.5);
128
+ --or-color-success-10pct: hsla(145, 72%, 31%, 0.1);
129
+ --or-color-success-contrast: hsl(0, 0%, 100%);
130
+
131
+ /* Vaadin colors */
132
+ --lumo-base-color: var(--or-color-base);
133
+ --lumo-contrast-5pct: var(--or-color-contrast-5pct);
134
+ --lumo-contrast-10pct: var(--or-color-contrast-10pct);
135
+ --lumo-contrast-20pct: var(--or-color-contrast-20pct);
136
+ --lumo-contrast-30pct: var(--or-color-contrast-30pct);
137
+ --lumo-contrast-40pct: var(--or-color-contrast-40pct);
138
+ --lumo-contrast-50pct: var(--or-color-contrast-50pct);
139
+ --lumo-contrast-60pct: var(--or-color-contrast-60pct);
140
+ --lumo-contrast-70pct: var(--or-color-contrast-70pct);
141
+ --lumo-contrast-80pct: var(--or-color-contrast-80pct);
142
+ --lumo-contrast-90pct: var(--or-color-contrast-90pct);
143
+ --lumo-contrast: var(--or-color-contrast);
144
+ --lumo-primary-color-10pct: var(--or-color-primary-10pct);
145
+ --lumo-primary-color-50pct: var(--or-color-primary-50pct);
146
+ --lumo-primary-color: var(--or-color-primary);
147
+ --lumo-primary-text-color: var(--or-color-text-primary);
148
+ --lumo-primary-contrast-color: var(--or-color-primary-contrast);
149
+ --lumo-error-color-10pct: var(--or-color-error-10pct);
150
+ --lumo-error-color-50pct: var(--or-color-error-50pct);
151
+ --lumo-error-color: var(--or-color-error);
152
+ --lumo-error-text-color: var(--or-color-text-error);
153
+ --lumo-error-contrast-color: var(--or-color-error-contrast);
154
+ --lumo-warning-color-10pct: var(--or-color-warning-10pct);
155
+ --lumo-warning-color: var(--or-color-warning);
156
+ --lumo-warning-text-color: var(--or-color-text-warning);
157
+ --lumo-warning-contrast-color: var(--or-color-warning-contrast);
158
+ --lumo-success-color-10pct: var(--or-color-success-10pct);
159
+ --lumo-success-color-50pct: var(--or-color-success-50pct);
160
+ --lumo-success-color: var(--or-color-success);
161
+ --lumo-success-text-color: var(--or-color-text-success);
162
+ --lumo-success-contrast-color: var(--or-color-success-contrast);
163
+ --lumo-header-text-color: var(--or-color-text-heading);
164
+ --lumo-body-text-color: var(--or-color-text-body);
165
+ --lumo-secondary-text-color: var(--or-color-text-secondary);
166
+ --lumo-tertiary-text-color: var(--or-color-text-tertiary);
167
+ --lumo-disabled-text-color: var(--or-color-text-disabled);
168
+ }
package/src/index.css ADDED
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright 2025, OpenRemote Inc.
3
+ *
4
+ * See the CONTRIBUTORS.txt file in the distribution for a
5
+ * full listing of individual contributors.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the
10
+ * License, or (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Affero General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+ @import "./default.css";
package/src/index.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Copyright 2025, OpenRemote Inc.
3
+ *
4
+ * See the CONTRIBUTORS.txt file in the distribution for a
5
+ * full listing of individual contributors.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the
10
+ * License, or (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Affero General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+ // CSS modules
21
+ type CSSModuleClasses = { readonly [key: string]: string };
22
+
23
+ declare module "*.module.css" {
24
+ const classes: CSSModuleClasses;
25
+ export default classes;
26
+ }
27
+
28
+ // CSS
29
+ declare module "*.css" {
30
+ /**
31
+ * @deprecated Use `import style from './style.css?inline'` instead.
32
+ */
33
+ const css: string;
34
+ export default css;
35
+ }