ada-ui 5.3.0 → 5.4.0
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/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/css/ada.blue.css +1 -1
- package/install.js +23 -0
- package/package.json +3 -1
- package/scss/_ada.theme-base.scss +13 -4
- package/scss/ada.blue.scss +0 -42
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# ada-ui
|
|
2
2
|
|
|
3
|
+
## 5.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 063ef97: Add npx script to generate one complete css file
|
|
8
|
+
|
|
9
|
+
## 5.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- d04cec7: Simplify light theme logic by using a hard-coded light theme lightness and chroma base
|
|
14
|
+
|
|
3
15
|
## 5.3.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -34,10 +34,10 @@ e.g.:
|
|
|
34
34
|
|
|
35
35
|
- Releases are created via GitHub Actions using
|
|
36
36
|
[Changesets](https://github.com/changesets/changesets)
|
|
37
|
-
- When adding changes which
|
|
37
|
+
- When adding changes which need a version update, add a changeset by running
|
|
38
38
|
`npm run changeset`
|
|
39
39
|
- When the changes are done, commit/merge your branch which will create/update a
|
|
40
40
|
Release PR (opened by a bot) that incorporates the changesets to update the
|
|
41
41
|
changelog and version number
|
|
42
42
|
- When ready for release, merge the Release PR
|
|
43
|
-
- For creating prereleases (snapshots),
|
|
43
|
+
- For creating prereleases (snapshots), add a new comment to your PR which contains only `/snapshot`
|
package/css/ada.blue.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.warn,.shade2,.shade3,.shade1,.primary,:root{--l-base:
|
|
1
|
+
.warn,.shade2,.shade3,.shade1,.primary,:root{--l-base: 0.31;--c-base: 0.07;--bg-body: var(--color950);--fg-body: var(--color100);--color100: oklch(0.91 0.05 var(--hue));--color500: oklch( calc(var(--l-base) + 0.15) calc(var(--c-base) + 0.06) var(--hue) );--color600: oklch( calc(var(--l-base) + 0.1) calc(var(--c-base) + 0.04) var(--hue) );--color700: oklch( calc(var(--l-base) + 0.05) calc(var(--c-base) + 0.02) var(--hue) );--color800: oklch(var(--l-base) var(--c-base) var(--hue));--color950: oklch(0.18 0.03 var(--hue));--panel-background: oklch(var(--500) / 0.1)}.light-theme.warn,.light-theme.shade2,.light-theme.shade3,.light-theme.shade1,.light-theme.primary,.light-theme:root,:root.light-theme .warn,:root.light-theme .shade2,:root.light-theme .shade3,:root.light-theme .shade1,:root.light-theme .primary,:root.light-theme :root{--l-base: 0.4;--c-base: 0.1;--bg-body: var(--color100);--fg-body: var(--color800)}.primary,:root{--hue: 246}.shade1{--hue: 225}.shade3{--hue: 165}.shade2{--hue: 190}.warn{--hue: 29}
|
package/install.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
import { writeFile, readFile } from "fs/promises";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
import { resolve, dirname } from "path";
|
|
8
|
+
|
|
9
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
|
|
11
|
+
const run = async (theme) => {
|
|
12
|
+
const themeFile = await readFile(
|
|
13
|
+
resolve(__dirname, "css", `ada.${theme}.css`),
|
|
14
|
+
"utf8",
|
|
15
|
+
);
|
|
16
|
+
const baseFile = await readFile(resolve(__dirname, "css", "ada.css"), "utf8");
|
|
17
|
+
|
|
18
|
+
const themeSuffix = theme === "blue" ? "" : `-${theme}`;
|
|
19
|
+
writeFile(`ada${themeSuffix}.css`, themeFile.trim() + baseFile.trim());
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const theme = process.argv[2] ?? "blue";
|
|
23
|
+
run(theme);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ada-ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "concurrently -n scss,serve 'sass scss:css --watch' 'alive-server .'",
|
|
6
6
|
"build": "rm -rf css && sass scss:css -s compressed --no-source-map",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"remove-snapshot": "f(){ if [ -z \"$1\" ]; then echo \"Error: No tag name specified, exiting.\"; exit 1; fi; npm dist-tag rm ada-ui $1; }; f",
|
|
9
9
|
"version": "npm run build && changeset version"
|
|
10
10
|
},
|
|
11
|
+
"bin": "install.js",
|
|
12
|
+
"type": "module",
|
|
11
13
|
"license": "MIT",
|
|
12
14
|
"exports": {
|
|
13
15
|
".": "./css/ada.css",
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
%colourShades {
|
|
2
|
-
--l-base:
|
|
3
|
-
--c-base:
|
|
2
|
+
--l-base: 0.31;
|
|
3
|
+
--c-base: 0.07;
|
|
4
|
+
--bg-body: var(--color950);
|
|
5
|
+
--fg-body: var(--color100);
|
|
6
|
+
|
|
7
|
+
&.light-theme,
|
|
8
|
+
:root.light-theme & {
|
|
9
|
+
--l-base: 0.4;
|
|
10
|
+
--c-base: 0.1;
|
|
11
|
+
--bg-body: var(--color100);
|
|
12
|
+
--fg-body: var(--color800);
|
|
13
|
+
}
|
|
14
|
+
|
|
4
15
|
--color100: oklch(0.91 0.05 var(--hue));
|
|
5
16
|
|
|
6
17
|
--color500: oklch(
|
|
@@ -16,7 +27,5 @@
|
|
|
16
27
|
|
|
17
28
|
--color950: oklch(0.18 0.03 var(--hue));
|
|
18
29
|
|
|
19
|
-
--bg-body: var(--bg-body-override, var(--color950));
|
|
20
|
-
--fg-body: var(--fg-body-override, var(--color100));
|
|
21
30
|
--panel-background: oklch(var(--500) / 0.1);
|
|
22
31
|
}
|
package/scss/ada.blue.scss
CHANGED
|
@@ -1,73 +1,31 @@
|
|
|
1
1
|
@import "ada.theme-base";
|
|
2
2
|
|
|
3
|
-
// The whole logic of setting the variables
|
|
4
|
-
// for every class to ensure the colors are all
|
|
5
|
-
// correct for all variants is quite repetitive.
|
|
6
|
-
// This needs improvement
|
|
7
|
-
|
|
8
|
-
%light-override {
|
|
9
|
-
//Set overrides for light theme
|
|
10
|
-
--l-base-override: 0.4;
|
|
11
|
-
--c-base-override: 0.1;
|
|
12
|
-
--bg-body-override: var(--color100);
|
|
13
|
-
--fg-body-override: var(--color800);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
3
|
:root {
|
|
17
4
|
//Defaults to primary color
|
|
18
5
|
@extend .primary;
|
|
19
|
-
|
|
20
|
-
&.light-theme {
|
|
21
|
-
@extend %light-override;
|
|
22
|
-
}
|
|
23
6
|
}
|
|
24
7
|
|
|
25
8
|
.primary {
|
|
26
9
|
@extend %colourShades;
|
|
27
|
-
|
|
28
|
-
:root.light-theme & {
|
|
29
|
-
@extend %light-override;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
10
|
--hue: 246;
|
|
33
11
|
}
|
|
34
12
|
|
|
35
13
|
.shade1 {
|
|
36
14
|
@extend %colourShades;
|
|
37
|
-
|
|
38
|
-
:root.light-theme & {
|
|
39
|
-
@extend %light-override;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
15
|
--hue: 225;
|
|
43
16
|
}
|
|
44
17
|
|
|
45
18
|
.shade3 {
|
|
46
19
|
@extend %colourShades;
|
|
47
|
-
|
|
48
|
-
:root.light-theme & {
|
|
49
|
-
@extend %light-override;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
20
|
--hue: 165;
|
|
53
21
|
}
|
|
54
22
|
|
|
55
23
|
.shade2 {
|
|
56
24
|
@extend %colourShades;
|
|
57
|
-
|
|
58
|
-
:root.light-theme & {
|
|
59
|
-
@extend %light-override;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
25
|
--hue: 190;
|
|
63
26
|
}
|
|
64
27
|
|
|
65
28
|
.warn {
|
|
66
29
|
@extend %colourShades;
|
|
67
|
-
|
|
68
|
-
:root.light-theme & {
|
|
69
|
-
@extend %light-override;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
30
|
--hue: 29;
|
|
73
31
|
}
|