@digdir/designsystemet 0.1.0-next.27 → 0.1.0-next.29
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/dist/src/colors/theme.js +1 -1
- package/dist/src/tokens/create/index.js +3 -3
- package/dist/src/tokens/index.js +1 -1
- package/dist/types/src/colors/theme.d.ts +1 -1
- package/dist/types/src/colors/theme.d.ts.map +1 -1
- package/dist/types/src/tokens/create/index.d.ts +1 -1
- package/dist/types/src/tokens/create/index.d.ts.map +1 -1
- package/dist/types/src/tokens/index.d.ts +1 -1
- package/dist/types/src/tokens/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/src/colors/theme.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BackgroundColor, Color, Theme } from "@adobe/leonardo-contrast-colors";
|
|
2
2
|
import { Hsluv } from "hsluv";
|
|
3
|
-
import { getContrastFromHex, getContrastFromLightness, getLightnessFromHex } from "./utils";
|
|
3
|
+
import { getContrastFromHex, getContrastFromLightness, getLightnessFromHex } from "./utils.js";
|
|
4
4
|
const baseColors = {
|
|
5
5
|
blue: "#0A71C0",
|
|
6
6
|
green: "#078D19",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import * as R from "ramda";
|
|
4
|
-
import { baseColors, generateScaleForColor } from "../../colors";
|
|
5
|
-
import generateMetadataJson from "../../init/generateMetadataJson";
|
|
6
|
-
import generateThemesJson from "../../init/generateThemesJson";
|
|
4
|
+
import { baseColors, generateScaleForColor } from "../../colors/index.js";
|
|
5
|
+
import generateMetadataJson from "../../init/generateMetadataJson.js";
|
|
6
|
+
import generateThemesJson from "../../init/generateThemesJson.js";
|
|
7
7
|
const DIRNAME = import.meta.dirname || __dirname;
|
|
8
8
|
const DEFAULT_FILES_PATH = path.join(DIRNAME, "../../init/template/default-files/design-tokens/");
|
|
9
9
|
const createColorTokens = (colorArray) => {
|
package/dist/src/tokens/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CssColor } from '@adobe/leonardo-contrast-colors';
|
|
2
|
-
import type { ColorInfo, ColorMode, ColorNumber, ContrastMode, GlobalColors, ThemeColors, ThemeInfo } from './types';
|
|
2
|
+
import type { ColorInfo, ColorMode, ColorNumber, ContrastMode, GlobalColors, ThemeColors, ThemeInfo } from './types.js';
|
|
3
3
|
export declare const baseColors: Record<GlobalColors, CssColor>;
|
|
4
4
|
type Colors = Record<ThemeColors, CssColor>;
|
|
5
5
|
export type ColorError = 'none' | 'decorative' | 'interaction';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/colors/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAIhE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/colors/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAIhE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGxH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,QAAQ,CAOrD,CAAC;AAEF,KAAK,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,aAAa,CAAC;AAE/D,KAAK,aAAa,GAAG;IACnB,SAAS,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IAC9B,YA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Colors } from '../../colors';
|
|
2
|
+
import type { ThemeColors } from '../../colors/index.js';
|
|
3
3
|
type Colors = Record<ThemeColors, CssColor>;
|
|
4
4
|
type Typography = Record<string, string>;
|
|
5
5
|
type CreateTokens = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/create/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAGhE,OAAO,KAAK,EAAwB,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/create/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAGhE,OAAO,KAAK,EAAwB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI/E,KAAK,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC5C,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAGzC,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAQF,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AACtE,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;AAC/D,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAC/C,KAAK,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;AA2GtC,eAAO,MAAM,YAAY,SAAgB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDpD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createTokens } from './create/index';
|
|
1
|
+
export { createTokens } from './create/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|