Skip to content

Commit ce12636

Browse files
authored
Merge pull request #160 from finos/dev
Update main SDK from dev
2 parents b868e0c + 5926524 commit ce12636

File tree

9 files changed

+2357
-1781
lines changed

9 files changed

+2357
-1781
lines changed

package-lock.json

Lines changed: 2334 additions & 1756 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@finos/a11y-theme-builder-sdk",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Accessibility Theme Builder SDK",
55
"author": "Keith Smith <KeithSmith@discover.com>",
66
"license": "Apache-2.0",
@@ -19,17 +19,17 @@
1919
"prepare": "tsc"
2020
},
2121
"devDependencies": {
22-
"@babel/preset-env": "^7.20.2",
23-
"@types/jest": "^29.5.1",
24-
"babel-jest": "^29.5.0",
22+
"@babel/preset-env": "^7.25.3",
23+
"@types/jest": "^29.5.12",
24+
"babel-jest": "^29.7.0",
2525
"jest": "^29.5.0",
26-
"ts-jest": "^29.0.5",
27-
"ts-node": "^10.9.1",
28-
"typedoc": "^0.23.28",
29-
"typescript": "^4.9.4"
26+
"ts-jest": "^29.2.4",
27+
"ts-node": "^10.9.2",
28+
"typedoc": "^0.26.5",
29+
"typescript": "^5.5.4"
3030
},
3131
"dependencies": {
32-
"@types/chroma-js": "^2.1.5",
33-
"chroma-js": "^2.4.2"
32+
"@types/chroma-js": "^2.4.4",
33+
"chroma-js": "^2.6.0"
3434
}
3535
}
Binary file not shown.

src/atoms/bevelSettings.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ export class BevelSettingsProps {
6969
this.verticalShadowLength = new PropertyNumberRange(`${p} Vertical Shadow Length`, false, bs, 0, 10, 6);
7070
this.blurRadius = new PropertyNumberRange(`${p} Blur Radius`, false, bs, 0, 10, 6);
7171
this.spreadRadius = new PropertyNumberRange(`${p} Spread Radius`, false, bs, 0, 10, 1);
72-
this.lightGlowOpacity = new PropertyNumberRange(`${p} Light Glow Opacity`, false, bs, 0, 100, 30);
73-
this.darkShadowOpacity = new PropertyNumberRange(`${p} Dark Shadow Opacity`, false, bs, 0, 100, 50);
74-
this.percentageChange = new PropertyPercentage(`${p} Percentage Change`, false, bs, 20);
72+
this.lightGlowOpacity = new PropertyNumberRange(`${p} Light Glow Opacity`, false, bs, 0, 100, 17);
73+
this.darkShadowOpacity = new PropertyNumberRange(`${p} Dark Shadow Opacity`, false, bs, 0, 100, 10);
74+
this.percentageChange = new PropertyPercentage(`${p} Percentage Change`, false, bs, 17);
7575
}
7676

7777
public deserialize(obj: any) {

src/atoms/colorPalette.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright (c) 2023 Discover Financial Services
33
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
44
*/
5-
import * as chroma from "chroma-js";
65
import { Node } from "../common/node";
76
import { Atom } from "./atom";
87
import { MyMap } from "../util/myMap";

src/atoms/colorThemes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
44
*/
55
/* eslint-disable */
6-
import * as chroma from "chroma-js";
6+
import chroma from "chroma-js";
77
import { Atom } from "./atom";
88
import { ColorPalette } from "./colorPalette";
99
import { Node } from "../common/node";

src/atoms/inputBackground.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright (c) 2023 Discover Financial Services
33
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
44
*/
5-
import * as chroma from "chroma-js";
65
import { TitledShade, PropertyTitledShade } from "../common/props";
76
import { ColorTheme } from "./colorThemes";
87
import { Atom } from "./atom";

src/code/cssGenerator.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ class CSSTheme {
12781278

12791279
private genCV1LM2(vk: CSSVariableKind) {
12801280
this.genCV(vk, true, [
1281-
"1", "primary-050",
1281+
"1", "primary-0",
12821282
"2", "primary-100",
12831283
"3", "primary-300",
12841284
"4", "primary-500",
@@ -1293,7 +1293,7 @@ class CSSTheme {
12931293

12941294
private genCV1DM(vk: CSSVariableKind) {
12951295
this.genCV(vk, false, [
1296-
"1", "primary-050",
1296+
"1", "primary-0",
12971297
"2", "primary-100",
12981298
"3", "primary-300",
12991299
"4", "primary-500",
@@ -1323,7 +1323,7 @@ class CSSTheme {
13231323

13241324
private genCV2LM2(vk: CSSVariableKind) {
13251325
this.genCV(vk, true, [
1326-
"1", "primary-050",
1326+
"1", "primary-0",
13271327
"2", "primary-100",
13281328
"3", "primary-300",
13291329
"4", "primary-500",
@@ -1338,7 +1338,7 @@ class CSSTheme {
13381338

13391339
private genCV2DM(vk: CSSVariableKind) {
13401340
this.genCV(vk, false, [
1341-
"1", "primary-050",
1341+
"1", "primary-0",
13421342
"2", "primary-100",
13431343
"3", "primary-300",
13441344
"4", "primary-500",
@@ -1368,7 +1368,7 @@ class CSSTheme {
13681368

13691369
private genCV3LM2(vk: CSSVariableKind) {
13701370
this.genCV(vk, true, [
1371-
"1", "primary-050",
1371+
"1", "primary-0",
13721372
"2", "primary-100",
13731373
"3", "primary-300",
13741374
"4", "primary-500",
@@ -1383,7 +1383,7 @@ class CSSTheme {
13831383

13841384
private genCV3DM(vk: CSSVariableKind) {
13851385
this.genCV(vk, false, [
1386-
"1", "primary-050",
1386+
"1", "primary-0",
13871387
"2", "primary-100",
13881388
"3", "primary-300",
13891389
"4", "primary-500",

src/common/shade.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023 Discover Financial Services
33
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
44
*/
5-
import * as chroma from "chroma-js";
5+
import chroma from "chroma-js";
66
import { Logger } from "../util/logger";
77
import { Util } from "../util/util";
88

@@ -990,9 +990,9 @@ export class Shade {
990990
public buildComplimentaryShades(): Shade[] {
991991
const ra = this.rgbArray;
992992
const rgb = chroma.rgb(ra[0],ra[1],ra[2]);
993-
const h = rgb.get('hsv.h');
993+
const h = rgb.get('hsv.h') + 180;
994994
const s = rgb.get('hsv.s');
995-
const v = rgb.get('hsv.v') + 180;
995+
const v = rgb.get('hsv.v');
996996
const h0 = h + 30;
997997
const h1 = h - 30;
998998
const rgb1 = 'rgb(' + chroma.hsv(h0,s,v).rgb() + ')';

0 commit comments

Comments
 (0)