diff --git a/biome.json b/biome.json index d7ba0966..414718b0 100644 --- a/biome.json +++ b/biome.json @@ -10,11 +10,11 @@ "**/*.ts", "**/*.tsx" ], - "ignore": ["lib/", ".vscode/"] + "ignore": ["lib/", "lib-commonjs/", ".vscode/"] }, "organizeImports": { "enabled": true, - "ignore": ["generated/", ".vscode/"] + "ignore": ["generated/", "lib-commonjs/", ".vscode/"] }, "formatter": { "enabled": true, @@ -23,7 +23,7 @@ }, "linter": { "enabled": true, - "ignore": ["generated/", ".vscode/"], + "ignore": ["generated/", "lib-commonjs/", ".vscode/"], "rules": { "recommended": false, "correctness": { diff --git a/theme/lib-commonjs/index.js b/theme/lib-commonjs/index.js new file mode 100644 index 00000000..4c6aec7b --- /dev/null +++ b/theme/lib-commonjs/index.js @@ -0,0 +1,195 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + axisBlueDarkTheme: () => axisBlueDarkTheme, + axisBlueLightTheme: () => axisBlueLightTheme, + axisCustomTokens: () => axisCustomTokens, + axisDarkTheme: () => axisDarkTheme, + axisLightTheme: () => axisLightTheme, + blueBrand: () => blueBrand, + brand: () => brand, + useIdentifyCurrentAxisTheme: () => useIdentifyCurrentAxisTheme +}); +module.exports = __toCommonJS(index_exports); + +// src/hooks/use-identify-current-axis-theme.hook.ts +var import_react = __toESM(require("react")); +var import_react_components = require("@fluentui/react-components"); +function useIdentifyCurrentAxisTheme() { + const state = (0, import_react_components.useFluentProvider_unstable)({}, import_react.default.createRef()); + const { theme } = (0, import_react_components.useFluentProviderContextValues_unstable)(state); + const AxisCustomUtilityThemeTokens = theme; + return AxisCustomUtilityThemeTokens ? { + name: AxisCustomUtilityThemeTokens.axisCustomUtilityThemeName, + variant: AxisCustomUtilityThemeTokens.axisCustomUtilityThemeVariant + } : null; +} + +// src/themes/blue.ts +var import_react_theme = require("@fluentui/react-theme"); +var blueBrand = { + 10: "#032B3D", + 20: "#05435E", + 30: "#025578", + 40: "#026690", + 50: "#0373A3", + 60: "#0182B3", + 70: "#028FCC", + 80: "#009DDE", + 90: "#00AEF2", + 100: "#0ABAFF", + 110: "#29C7FF", + 120: "#5CD4FF", + 130: "#91E1FF", + 140: "#AEE9FF", + 150: "#C4EFFF", + 160: "#D4F3FF" +}; +var axisBlueDarkTheme = { + ...(0, import_react_theme.createDarkTheme)(blueBrand), + axisCustomColorMySystemsBackground: "#004F6E", + axisCustomColorMySystemsForeground: "#99D8F1", + axisCustomColorMyAxisBackground: "#BC8D00", + axisCustomColorMyAxisForeground: "#FFEBAD", + axisCustomColorMyBusinessBackground: "#6B0646", + axisCustomColorMyBusinessForeground: "#EF9BD1", + axisCustomColorMyProductsBackground: "#476320", + axisCustomColorMyProductsForeground: "#D1E8B2", + axisCustomUtilityThemeName: "axisBlueDarkTheme", + axisCustomUtilityThemeVariant: "dark" +}; +var axisBlueLightTheme = { + ...(0, import_react_theme.createLightTheme)(blueBrand), + axisCustomColorMyAxisBackground: "#DFA001", + axisCustomColorMyAxisForeground: "#FFF5D6", + axisCustomColorMySystemsBackground: "#008DC6", + axisCustomColorMySystemsForeground: "#CCEBF8", + axisCustomColorMyBusinessBackground: "#C10B7E", + axisCustomColorMyBusinessForeground: "#F7CEE8", + axisCustomColorMyProductsBackground: "#7FB239", + axisCustomColorMyProductsForeground: "#E8F4D9", + axisCustomUtilityThemeName: "axisBlueLightTheme", + axisCustomUtilityThemeVariant: "light" +}; + +// src/themes/brand.ts +var import_react_theme2 = require("@fluentui/react-theme"); +var brand = { + 10: "#281E03", + 20: "#342818", + 30: "#3E2F1D", + 40: "#4C381E", + 50: "#674808", + 60: "#B07A0F", + 70: "#E0A101", + 80: "#EFAB01", + 90: "#FEC10C", + 100: "#FFCC33", + 110: "#FFD450", + 120: "#FFDC70", + 130: "#FFE79B", + 140: "#FFEEBA", + 150: "#FFF6D7", + 160: "#FFFCF1" +}; +var axisDarkTheme = { + ...(0, import_react_theme2.createDarkTheme)(brand), + colorNeutralForegroundOnBrand: "#000000", + colorNeutralStroke3: "#2E2E2E", + colorNeutralStroke2: "#383838", + colorBrandStroke2: "#5C3E00", + colorBrandForegroundLink: "#0ABAFF", + colorBrandForegroundLinkHover: "#29C7FF", + colorBrandForegroundLinkPressed: "#00AEF2", + colorBrandForegroundLinkSelected: "#0ABAFF", + colorScrollbarOverlay: "rgba(255,255,255,0.2)", + colorStatusDangerBackground1: "#481D20", + colorStatusDangerBorder1: "#901c27", + colorStatusWarningBackground1: "#492D1D", + colorStatusWarningBorder1: "#884228", + colorStatusSuccessBackground1: "#113711", + colorStatusSuccessBorder1: "#116811", + axisCustomColorMySystemsBackground: "#004F6E", + axisCustomColorMySystemsForeground: "#99D8F1", + axisCustomColorMyAxisBackground: "#BC8D00", + axisCustomColorMyAxisForeground: "#FFEBAD", + axisCustomColorMyBusinessBackground: "#6B0646", + axisCustomColorMyBusinessForeground: "#EF9BD1", + axisCustomColorMyProductsBackground: "#476320", + axisCustomColorMyProductsForeground: "#D1E8B2", + axisCustomUtilityThemeName: "axisDarkTheme", + axisCustomUtilityThemeVariant: "dark" +}; +var axisLightTheme = { + ...(0, import_react_theme2.createLightTheme)(brand), + colorNeutralForegroundOnBrand: "#000000", + colorNeutralBackgroundInverted: "#B2D3FB", + colorBrandBackground: "#ffcc33", + colorBrandBackgroundHover: "#FEC10C", + colorBrandBackgroundPressed: "#B07A0F", + colorBrandBackgroundSelected: "#B07A0F", + colorNeutralForegroundInverted: "#242424", + colorCompoundBrandBackground: "#FEC10C", + colorCompoundBrandBackgroundHover: "#EFAB01", + colorCompoundBrandBackgroundPressed: "#E0A101", + colorBrandForegroundLink: "#028fcc", + colorBrandForegroundLinkHover: "#0182b3", + colorBrandForegroundLinkPressed: "#026690", + colorBrandForegroundLinkSelected: "#028fcc", + colorBrandStroke2Contrast: "#FFDC70", + colorScrollbarOverlay: "rgba(0,0,0,0.2)", + axisCustomColorMyAxisBackground: "#DFA001", + axisCustomColorMyAxisForeground: "#FFF5D6", + axisCustomColorMySystemsBackground: "#008DC6", + axisCustomColorMySystemsForeground: "#CCEBF8", + axisCustomColorMyBusinessBackground: "#C10B7E", + axisCustomColorMyBusinessForeground: "#F7CEE8", + axisCustomColorMyProductsBackground: "#7FB239", + axisCustomColorMyProductsForeground: "#E8F4D9", + axisCustomUtilityThemeName: "axisLightTheme", + axisCustomUtilityThemeVariant: "light" +}; + +// src/types/theme.types.ts +var axisCustomTokens = { + axisCustomColorMyAxisBackground: "var(--axisCustomColorMyAxisBackground)", + axisCustomColorMyAxisForeground: "var(--axisCustomColorMyAxisForeground)", + axisCustomColorMySystemsBackground: "var(--axisCustomColorMySystemsBackground)", + axisCustomColorMySystemsForeground: "var(--axisCustomColorMySystemsForeground)", + axisCustomColorMyBusinessBackground: "var(--axisCustomColorMyBusinessBackground)", + axisCustomColorMyBusinessForeground: "var(--axisCustomColorMyBusinessForeground)", + axisCustomColorMyProductsBackground: "var(--axisCustomColorMyProductsBackground)", + axisCustomColorMyProductsForeground: "var(--axisCustomColorMyProductsForeground)", + axisCustomUtilityThemeName: "var(--axisCustomUtilityThemeName)", + axisCustomUtilityThemeVariant: "var(--axisCustomUtilityThemeName)" +}; +//# sourceMappingURL=index.js.map diff --git a/theme/lib-commonjs/index.js.map b/theme/lib-commonjs/index.js.map new file mode 100644 index 00000000..f25c382d --- /dev/null +++ b/theme/lib-commonjs/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/hooks/use-identify-current-axis-theme.hook.ts", "../src/themes/blue.ts", "../src/themes/brand.ts", "../src/types/theme.types.ts"], + "sourcesContent": ["export { useIdentifyCurrentAxisTheme } from \"./hooks/use-identify-current-axis-theme.hook.js\";\nexport {\n axisBlueDarkTheme,\n axisBlueLightTheme,\n blueBrand,\n} from \"./themes/blue.js\";\nexport { axisDarkTheme, axisLightTheme, brand } from \"./themes/brand.js\";\nexport * from \"./types/theme.types.js\";\n", "import React from \"react\";\n\nimport {\n useFluentProviderContextValues_unstable,\n useFluentProvider_unstable,\n} from \"@fluentui/react-components\";\nimport { AxisCustomUtilityTokens, AxisThemeVariant } from \"../index.js\";\nimport { AxisThemeName } from \"../index.js\";\n\nexport type Result = {\n name: AxisThemeName;\n variant: AxisThemeVariant;\n} | null;\n\nexport function useIdentifyCurrentAxisTheme(): Result {\n const state = useFluentProvider_unstable({}, React.createRef());\n const { theme } = useFluentProviderContextValues_unstable(state);\n const AxisCustomUtilityThemeTokens = theme as AxisCustomUtilityTokens;\n\n return AxisCustomUtilityThemeTokens\n ? {\n name: AxisCustomUtilityThemeTokens.axisCustomUtilityThemeName,\n variant: AxisCustomUtilityThemeTokens.axisCustomUtilityThemeVariant,\n }\n : null;\n}\n", "import {\n BrandVariants,\n createDarkTheme,\n createLightTheme,\n} from \"@fluentui/react-theme\";\nimport { AxisTheme } from \"../index.js\";\n\nexport const blueBrand: BrandVariants = {\n 10: \"#032B3D\",\n 20: \"#05435E\",\n 30: \"#025578\",\n 40: \"#026690\",\n 50: \"#0373A3\",\n 60: \"#0182B3\",\n 70: \"#028FCC\",\n 80: \"#009DDE\",\n 90: \"#00AEF2\",\n 100: \"#0ABAFF\",\n 110: \"#29C7FF\",\n 120: \"#5CD4FF\",\n 130: \"#91E1FF\",\n 140: \"#AEE9FF\",\n 150: \"#C4EFFF\",\n 160: \"#D4F3FF\",\n};\n\nexport const axisBlueDarkTheme: AxisTheme = {\n ...createDarkTheme(blueBrand),\n axisCustomColorMySystemsBackground: \"#004F6E\",\n axisCustomColorMySystemsForeground: \"#99D8F1\",\n axisCustomColorMyAxisBackground: \"#BC8D00\",\n axisCustomColorMyAxisForeground: \"#FFEBAD\",\n axisCustomColorMyBusinessBackground: \"#6B0646\",\n axisCustomColorMyBusinessForeground: \"#EF9BD1\",\n axisCustomColorMyProductsBackground: \"#476320\",\n axisCustomColorMyProductsForeground: \"#D1E8B2\",\n axisCustomUtilityThemeName: \"axisBlueDarkTheme\",\n axisCustomUtilityThemeVariant: \"dark\",\n};\n\nexport const axisBlueLightTheme: AxisTheme = {\n ...createLightTheme(blueBrand),\n axisCustomColorMyAxisBackground: \"#DFA001\",\n axisCustomColorMyAxisForeground: \"#FFF5D6\",\n axisCustomColorMySystemsBackground: \"#008DC6\",\n axisCustomColorMySystemsForeground: \"#CCEBF8\",\n axisCustomColorMyBusinessBackground: \"#C10B7E\",\n axisCustomColorMyBusinessForeground: \"#F7CEE8\",\n axisCustomColorMyProductsBackground: \"#7FB239\",\n axisCustomColorMyProductsForeground: \"#E8F4D9\",\n axisCustomUtilityThemeName: \"axisBlueLightTheme\",\n axisCustomUtilityThemeVariant: \"light\",\n};\n", "import {\n BrandVariants,\n createDarkTheme,\n createLightTheme,\n} from \"@fluentui/react-theme\";\nimport { AxisTheme } from \"../index.js\";\n\nexport const brand: BrandVariants = {\n 10: \"#281E03\",\n 20: \"#342818\",\n 30: \"#3E2F1D\",\n 40: \"#4C381E\",\n 50: \"#674808\",\n 60: \"#B07A0F\",\n 70: \"#E0A101\",\n 80: \"#EFAB01\",\n 90: \"#FEC10C\",\n 100: \"#FFCC33\",\n 110: \"#FFD450\",\n 120: \"#FFDC70\",\n 130: \"#FFE79B\",\n 140: \"#FFEEBA\",\n 150: \"#FFF6D7\",\n 160: \"#FFFCF1\",\n};\n\nexport const axisDarkTheme: AxisTheme = {\n ...createDarkTheme(brand),\n colorNeutralForegroundOnBrand: \"#000000\",\n colorNeutralStroke3: \"#2E2E2E\",\n colorNeutralStroke2: \"#383838\",\n colorBrandStroke2: \"#5C3E00\",\n colorBrandForegroundLink: \"#0ABAFF\",\n colorBrandForegroundLinkHover: \"#29C7FF\",\n colorBrandForegroundLinkPressed: \"#00AEF2\",\n colorBrandForegroundLinkSelected: \"#0ABAFF\",\n colorScrollbarOverlay: \"rgba(255,255,255,0.2)\",\n colorStatusDangerBackground1: \"#481D20\",\n colorStatusDangerBorder1: \"#901c27\",\n colorStatusWarningBackground1: \"#492D1D\",\n colorStatusWarningBorder1: \"#884228\",\n colorStatusSuccessBackground1: \"#113711\",\n colorStatusSuccessBorder1: \"#116811\",\n axisCustomColorMySystemsBackground: \"#004F6E\",\n axisCustomColorMySystemsForeground: \"#99D8F1\",\n axisCustomColorMyAxisBackground: \"#BC8D00\",\n axisCustomColorMyAxisForeground: \"#FFEBAD\",\n axisCustomColorMyBusinessBackground: \"#6B0646\",\n axisCustomColorMyBusinessForeground: \"#EF9BD1\",\n axisCustomColorMyProductsBackground: \"#476320\",\n axisCustomColorMyProductsForeground: \"#D1E8B2\",\n axisCustomUtilityThemeName: \"axisDarkTheme\",\n axisCustomUtilityThemeVariant: \"dark\",\n};\n\nexport const axisLightTheme: AxisTheme = {\n ...createLightTheme(brand),\n colorNeutralForegroundOnBrand: \"#000000\",\n colorNeutralBackgroundInverted: \"#B2D3FB\",\n colorBrandBackground: \"#ffcc33\",\n colorBrandBackgroundHover: \"#FEC10C\",\n colorBrandBackgroundPressed: \"#B07A0F\",\n colorBrandBackgroundSelected: \"#B07A0F\",\n colorNeutralForegroundInverted: \"#242424\",\n colorCompoundBrandBackground: \"#FEC10C\",\n colorCompoundBrandBackgroundHover: \"#EFAB01\",\n colorCompoundBrandBackgroundPressed: \"#E0A101\",\n colorBrandForegroundLink: \"#028fcc\",\n colorBrandForegroundLinkHover: \"#0182b3\",\n colorBrandForegroundLinkPressed: \"#026690\",\n colorBrandForegroundLinkSelected: \"#028fcc\",\n colorBrandStroke2Contrast: \"#FFDC70\",\n colorScrollbarOverlay: \"rgba(0,0,0,0.2)\",\n axisCustomColorMyAxisBackground: \"#DFA001\",\n axisCustomColorMyAxisForeground: \"#FFF5D6\",\n axisCustomColorMySystemsBackground: \"#008DC6\",\n axisCustomColorMySystemsForeground: \"#CCEBF8\",\n axisCustomColorMyBusinessBackground: \"#C10B7E\",\n axisCustomColorMyBusinessForeground: \"#F7CEE8\",\n axisCustomColorMyProductsBackground: \"#7FB239\",\n axisCustomColorMyProductsForeground: \"#E8F4D9\",\n axisCustomUtilityThemeName: \"axisLightTheme\",\n axisCustomUtilityThemeVariant: \"light\",\n};\n", "import { Theme } from \"@fluentui/react-theme\";\n\nexport type AxisCustomColorTokens = {\n axisCustomColorMySystemsBackground: string;\n axisCustomColorMySystemsForeground: string;\n axisCustomColorMyAxisBackground: string;\n axisCustomColorMyAxisForeground: string;\n axisCustomColorMyBusinessBackground: string;\n axisCustomColorMyBusinessForeground: string;\n axisCustomColorMyProductsBackground: string;\n axisCustomColorMyProductsForeground: string;\n};\n\nexport type AxisThemeVariant = \"dark\" | \"light\";\nexport type AxisDarkThemeName = \"axisDarkTheme\" | \"axisBlueDarkTheme\";\nexport type AxisLightThemeName = \"axisLightTheme\" | \"axisBlueLightTheme\";\nexport type AxisThemeName = AxisDarkThemeName | AxisLightThemeName;\n\nexport type AxisCustomUtilityTokens = {\n axisCustomUtilityThemeName: AxisThemeName;\n axisCustomUtilityThemeVariant: AxisThemeVariant;\n};\n\nexport type AxisCustomTokens = AxisCustomColorTokens & AxisCustomUtilityTokens;\nexport type AxisTheme = Theme & AxisCustomTokens;\n\nexport const axisCustomTokens: Record = {\n axisCustomColorMyAxisBackground: \"var(--axisCustomColorMyAxisBackground)\",\n axisCustomColorMyAxisForeground: \"var(--axisCustomColorMyAxisForeground)\",\n axisCustomColorMySystemsBackground:\n \"var(--axisCustomColorMySystemsBackground)\",\n axisCustomColorMySystemsForeground:\n \"var(--axisCustomColorMySystemsForeground)\",\n axisCustomColorMyBusinessBackground:\n \"var(--axisCustomColorMyBusinessBackground)\",\n axisCustomColorMyBusinessForeground:\n \"var(--axisCustomColorMyBusinessForeground)\",\n axisCustomColorMyProductsBackground:\n \"var(--axisCustomColorMyProductsBackground)\",\n axisCustomColorMyProductsForeground:\n \"var(--axisCustomColorMyProductsForeground)\",\n axisCustomUtilityThemeName: \"var(--axisCustomUtilityThemeName)\",\n axisCustomUtilityThemeVariant: \"var(--axisCustomUtilityThemeName)\",\n};\n"], + "mappings": "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", + "names": ["React", "import_react_theme"] +} diff --git a/theme/package.json b/theme/package.json index a2c2706f..035af6f1 100644 --- a/theme/package.json +++ b/theme/package.json @@ -10,20 +10,21 @@ }, "license": "MIT", "author": "Axis Communications AB", - "type": "module", "exports": { ".": { "types": "./lib/index.d.ts", - "import": "./lib/index.js" + "import": "./lib/index.js", + "require": "./lib-commonjs/index.js" } }, "bin": { "fluent-theme-tokens": "./lib/tokens.cjs" }, - "files": ["lib"], + "files": ["lib", "lib-commonjs"], "scripts": { - "build": "pnpm build:types && pnpm build:esm && pnpm build:cli", + "build": "pnpm build:types && pnpm build:esm && pnpm build:cjs && pnpm build:cli", "build:cli": "esbuild --format=cjs --bundle --platform=node --packages=external --outfile=lib/tokens.cjs src/tokens/build.ts", + "build:cjs": "esbuild --format=cjs --bundle --sourcemap --packages=external --outdir=lib-commonjs src/index.ts", "build:esm": "esbuild --format=esm --bundle --sourcemap --packages=external --outdir=lib src/index.ts", "build:types": "tsc -p tsconfig.build.json", "check:unused-deps": "depcheck . --config=depcheck.yml",