Skip to content

Commit

Permalink
Merge pull request #160 from finos/dev
Browse files Browse the repository at this point in the history
Update main SDK from dev
  • Loading branch information
smithbk authored Aug 15, 2024
2 parents b868e0c + 5926524 commit ce12636
Show file tree
Hide file tree
Showing 9 changed files with 2,357 additions and 1,781 deletions.
4,090 changes: 2,334 additions & 1,756 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@finos/a11y-theme-builder-sdk",
"version": "1.0.0",
"version": "1.1.0",
"description": "Accessibility Theme Builder SDK",
"author": "Keith Smith <[email protected]>",
"license": "Apache-2.0",
Expand All @@ -19,17 +19,17 @@
"prepare": "tsc"
},
"devDependencies": {
"@babel/preset-env": "^7.20.2",
"@types/jest": "^29.5.1",
"babel-jest": "^29.5.0",
"@babel/preset-env": "^7.25.3",
"@types/jest": "^29.5.12",
"babel-jest": "^29.7.0",
"jest": "^29.5.0",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typedoc": "^0.23.28",
"typescript": "^4.9.4"
"ts-jest": "^29.2.4",
"ts-node": "^10.9.2",
"typedoc": "^0.26.5",
"typescript": "^5.5.4"
},
"dependencies": {
"@types/chroma-js": "^2.1.5",
"chroma-js": "^2.4.2"
"@types/chroma-js": "^2.4.4",
"chroma-js": "^2.6.0"
}
}
Binary file not shown.
6 changes: 3 additions & 3 deletions src/atoms/bevelSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export class BevelSettingsProps {
this.verticalShadowLength = new PropertyNumberRange(`${p} Vertical Shadow Length`, false, bs, 0, 10, 6);
this.blurRadius = new PropertyNumberRange(`${p} Blur Radius`, false, bs, 0, 10, 6);
this.spreadRadius = new PropertyNumberRange(`${p} Spread Radius`, false, bs, 0, 10, 1);
this.lightGlowOpacity = new PropertyNumberRange(`${p} Light Glow Opacity`, false, bs, 0, 100, 30);
this.darkShadowOpacity = new PropertyNumberRange(`${p} Dark Shadow Opacity`, false, bs, 0, 100, 50);
this.percentageChange = new PropertyPercentage(`${p} Percentage Change`, false, bs, 20);
this.lightGlowOpacity = new PropertyNumberRange(`${p} Light Glow Opacity`, false, bs, 0, 100, 17);
this.darkShadowOpacity = new PropertyNumberRange(`${p} Dark Shadow Opacity`, false, bs, 0, 100, 10);
this.percentageChange = new PropertyPercentage(`${p} Percentage Change`, false, bs, 17);
}

public deserialize(obj: any) {
Expand Down
1 change: 0 additions & 1 deletion src/atoms/colorPalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Copyright (c) 2023 Discover Financial Services
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
*/
import * as chroma from "chroma-js";
import { Node } from "../common/node";
import { Atom } from "./atom";
import { MyMap } from "../util/myMap";
Expand Down
2 changes: 1 addition & 1 deletion src/atoms/colorThemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
*/
/* eslint-disable */
import * as chroma from "chroma-js";
import chroma from "chroma-js";
import { Atom } from "./atom";
import { ColorPalette } from "./colorPalette";
import { Node } from "../common/node";
Expand Down
1 change: 0 additions & 1 deletion src/atoms/inputBackground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Copyright (c) 2023 Discover Financial Services
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
*/
import * as chroma from "chroma-js";
import { TitledShade, PropertyTitledShade } from "../common/props";
import { ColorTheme } from "./colorThemes";
import { Atom } from "./atom";
Expand Down
12 changes: 6 additions & 6 deletions src/code/cssGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ class CSSTheme {

private genCV1LM2(vk: CSSVariableKind) {
this.genCV(vk, true, [
"1", "primary-050",
"1", "primary-0",
"2", "primary-100",
"3", "primary-300",
"4", "primary-500",
Expand All @@ -1293,7 +1293,7 @@ class CSSTheme {

private genCV1DM(vk: CSSVariableKind) {
this.genCV(vk, false, [
"1", "primary-050",
"1", "primary-0",
"2", "primary-100",
"3", "primary-300",
"4", "primary-500",
Expand Down Expand Up @@ -1323,7 +1323,7 @@ class CSSTheme {

private genCV2LM2(vk: CSSVariableKind) {
this.genCV(vk, true, [
"1", "primary-050",
"1", "primary-0",
"2", "primary-100",
"3", "primary-300",
"4", "primary-500",
Expand All @@ -1338,7 +1338,7 @@ class CSSTheme {

private genCV2DM(vk: CSSVariableKind) {
this.genCV(vk, false, [
"1", "primary-050",
"1", "primary-0",
"2", "primary-100",
"3", "primary-300",
"4", "primary-500",
Expand Down Expand Up @@ -1368,7 +1368,7 @@ class CSSTheme {

private genCV3LM2(vk: CSSVariableKind) {
this.genCV(vk, true, [
"1", "primary-050",
"1", "primary-0",
"2", "primary-100",
"3", "primary-300",
"4", "primary-500",
Expand All @@ -1383,7 +1383,7 @@ class CSSTheme {

private genCV3DM(vk: CSSVariableKind) {
this.genCV(vk, false, [
"1", "primary-050",
"1", "primary-0",
"2", "primary-100",
"3", "primary-300",
"4", "primary-500",
Expand Down
6 changes: 3 additions & 3 deletions src/common/shade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2023 Discover Financial Services
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
*/
import * as chroma from "chroma-js";
import chroma from "chroma-js";
import { Logger } from "../util/logger";
import { Util } from "../util/util";

Expand Down Expand Up @@ -990,9 +990,9 @@ export class Shade {
public buildComplimentaryShades(): Shade[] {
const ra = this.rgbArray;
const rgb = chroma.rgb(ra[0],ra[1],ra[2]);
const h = rgb.get('hsv.h');
const h = rgb.get('hsv.h') + 180;
const s = rgb.get('hsv.s');
const v = rgb.get('hsv.v') + 180;
const v = rgb.get('hsv.v');
const h0 = h + 30;
const h1 = h - 30;
const rgb1 = 'rgb(' + chroma.hsv(h0,s,v).rgb() + ')';
Expand Down

0 comments on commit ce12636

Please sign in to comment.