@vueless/storybook 1.2.10-beta.6 → 1.2.10-beta.8
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/.storybook-js/manager.js +5 -4
- package/.storybook-js/preview.js +13 -8
- package/.storybook-js/theme/theme.css +37 -0
- package/.storybook-js/theme/theme.js +30 -0
- package/.storybook-js/vite.config.js +1 -1
- package/.storybook-ts/manager.ts +5 -4
- package/.storybook-ts/preview.ts +13 -8
- package/.storybook-ts/theme/theme.css +38 -0
- package/.storybook-ts/theme/theme.ts +31 -0
- package/.storybook-ts/vite.config.ts +1 -1
- package/decorators/storyDarkModeDecorator.js +8 -7
- package/index.browser.js +5 -1
- package/index.d.ts +3 -2
- package/index.js +3 -0
- package/package.json +12 -10
- package/theme/getThemeDark.js +47 -0
- package/theme/getThemeLight.js +47 -0
- package/theme/getThemeLightPreview.js +42 -0
- package/theme/manager.css +200 -0
- package/{.storybook-ts/themes → theme}/preview.css +185 -146
- package/.storybook-js/themes/manager.css +0 -123
- package/.storybook-js/themes/preview.css +0 -608
- package/.storybook-js/themes/themeDark.js +0 -44
- package/.storybook-js/themes/themeLight.js +0 -44
- package/.storybook-js/themes/themeLightPreview.js +0 -40
- package/.storybook-ts/themes/manager.css +0 -123
- package/.storybook-ts/themes/themeDark.ts +0 -45
- package/.storybook-ts/themes/themeLight.ts +0 -45
- package/.storybook-ts/themes/themeLightPreview.ts +0 -41
package/.storybook-js/manager.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { addons } from "storybook/manager-api";
|
|
2
|
+
import { getThemeDark, getThemeLight } from "@vueless/storybook";
|
|
2
3
|
|
|
3
4
|
/* Theme styles */
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
import "./theme/theme.css";
|
|
6
|
+
import "@vueless/storybook/manager.css";
|
|
7
|
+
import { theme } from "./theme/theme.js";
|
|
7
8
|
|
|
8
9
|
const DARK_MODE_KEY = "dark";
|
|
9
10
|
const LIGHT_MODE_KEY = "light";
|
|
@@ -24,7 +25,7 @@ prefersColorSchemeDark.addEventListener("change", (event) => {
|
|
|
24
25
|
|
|
25
26
|
function setSystemTheme(colorMode) {
|
|
26
27
|
addons.setConfig({
|
|
27
|
-
theme: colorMode === DARK_MODE_KEY ?
|
|
28
|
+
theme: colorMode === DARK_MODE_KEY ? getThemeDark(theme) : getThemeLight(theme),
|
|
28
29
|
panelPosition: "right",
|
|
29
30
|
});
|
|
30
31
|
}
|
package/.storybook-js/preview.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
getThemeDark,
|
|
3
|
+
getThemeLight,
|
|
4
|
+
getThemeLightPreview,
|
|
5
|
+
vue3SourceDecorator,
|
|
6
|
+
storyDarkModeDecorator,
|
|
7
|
+
} from "@vueless/storybook";
|
|
2
8
|
import { getRandomId } from "vueless";
|
|
3
9
|
import { setup } from "@storybook/vue3-vite";
|
|
4
10
|
|
|
5
11
|
/* Theme styles */
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { themeLightPreview } from "./themes/themeLightPreview.js";
|
|
12
|
+
import "./theme/theme.css";
|
|
13
|
+
import "@vueless/storybook/preview.css";
|
|
14
|
+
import { theme } from "./theme/theme.js";
|
|
10
15
|
|
|
11
16
|
/* Vue plugins */
|
|
12
17
|
import { createVueless } from "vueless";
|
|
@@ -37,12 +42,12 @@ export default {
|
|
|
37
42
|
layout: "fullscreen",
|
|
38
43
|
backgrounds: { disable: true },
|
|
39
44
|
docs: {
|
|
40
|
-
theme:
|
|
45
|
+
theme: getThemeLightPreview(theme),
|
|
41
46
|
source: { language: "html" },
|
|
42
47
|
},
|
|
43
48
|
darkMode: {
|
|
44
|
-
light:
|
|
45
|
-
dark:
|
|
49
|
+
light: getThemeLight(theme),
|
|
50
|
+
dark: getThemeDark(theme),
|
|
46
51
|
classTarget: "body",
|
|
47
52
|
stylePreview: true,
|
|
48
53
|
},
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* -------------------- Color Palettes -------------------- */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* Neutral (Gray) Colors */
|
|
5
|
+
--neutral-50: #f9fafb;
|
|
6
|
+
--neutral-100: #f3f4f6;
|
|
7
|
+
--neutral-200: #e5e7eb;
|
|
8
|
+
--neutral-300: #d1d5db;
|
|
9
|
+
--neutral-400: #9ca3af;
|
|
10
|
+
--neutral-500: #6b7280;
|
|
11
|
+
--neutral-600: #4b5563;
|
|
12
|
+
--neutral-700: #374151;
|
|
13
|
+
--neutral-800: #1f2937;
|
|
14
|
+
--neutral-900: #111827;
|
|
15
|
+
--neutral-950: #030712;
|
|
16
|
+
|
|
17
|
+
/* Primary (Green) Colors */
|
|
18
|
+
--primary-50: #f0fdf4;
|
|
19
|
+
--primary-100: #dcfce7;
|
|
20
|
+
--primary-200: #bbf7d0;
|
|
21
|
+
--primary-300: #86efac;
|
|
22
|
+
--primary-400: #4ade80;
|
|
23
|
+
--primary-500: #22c55e;
|
|
24
|
+
--primary-600: #16a34a;
|
|
25
|
+
--primary-700: #15803d;
|
|
26
|
+
--primary-800: #166534;
|
|
27
|
+
--primary-900: #14532d;
|
|
28
|
+
--primary-950: #052e16;
|
|
29
|
+
|
|
30
|
+
/* White */
|
|
31
|
+
--white: #ffffff;
|
|
32
|
+
|
|
33
|
+
/* Border Radius */
|
|
34
|
+
--rounded-sm: 0.25rem;
|
|
35
|
+
--rounded-md: 0.375rem;
|
|
36
|
+
--rounded-lg: 0.5rem;
|
|
37
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const theme = {
|
|
2
|
+
fontBase: '"Roboto", sans-serif',
|
|
3
|
+
fontCode: "monospace",
|
|
4
|
+
brandTitle: "Vueless UI",
|
|
5
|
+
brandUrl: "https://vueless.com",
|
|
6
|
+
brandTarget: "_blank",
|
|
7
|
+
brandImageLight: "./images/logo-light.svg",
|
|
8
|
+
brandImageDark: "./images/logo-dark.svg",
|
|
9
|
+
rounded: {
|
|
10
|
+
sm: 4,
|
|
11
|
+
md: 8,
|
|
12
|
+
lg: 12,
|
|
13
|
+
},
|
|
14
|
+
colors: {
|
|
15
|
+
white: "#ffffff",
|
|
16
|
+
gray: {
|
|
17
|
+
50: "#f9fafb",
|
|
18
|
+
100: "#f3f4f6",
|
|
19
|
+
200: "#e5e7eb",
|
|
20
|
+
300: "#d1d5db",
|
|
21
|
+
400: "#9ca3af",
|
|
22
|
+
500: "#6b7280",
|
|
23
|
+
600: "#4b5563",
|
|
24
|
+
700: "#374151",
|
|
25
|
+
800: "#1f2937",
|
|
26
|
+
900: "#111827",
|
|
27
|
+
950: "#030712",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
package/.storybook-ts/manager.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { addons } from "storybook/manager-api";
|
|
2
|
+
import { getThemeDark, getThemeLight } from "@vueless/storybook";
|
|
2
3
|
|
|
3
4
|
/* Theme styles */
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
import "./theme/theme.css";
|
|
6
|
+
import "@vueless/storybook/manager.css";
|
|
7
|
+
import { theme } from "./theme/theme";
|
|
7
8
|
|
|
8
9
|
const DARK_MODE_KEY = "dark";
|
|
9
10
|
const LIGHT_MODE_KEY = "light";
|
|
@@ -24,7 +25,7 @@ prefersColorSchemeDark.addEventListener("change", (event) => {
|
|
|
24
25
|
|
|
25
26
|
function setSystemTheme(colorMode: string) {
|
|
26
27
|
addons.setConfig({
|
|
27
|
-
theme: colorMode === DARK_MODE_KEY ?
|
|
28
|
+
theme: colorMode === DARK_MODE_KEY ? getThemeDark(theme) : getThemeLight(theme),
|
|
28
29
|
panelPosition: "right",
|
|
29
30
|
});
|
|
30
31
|
}
|
package/.storybook-ts/preview.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
getThemeDark,
|
|
3
|
+
getThemeLight,
|
|
4
|
+
getThemeLightPreview,
|
|
5
|
+
vue3SourceDecorator,
|
|
6
|
+
storyDarkModeDecorator,
|
|
7
|
+
} from "@vueless/storybook";
|
|
2
8
|
import { getRandomId } from "vueless";
|
|
3
9
|
import { setup } from "@storybook/vue3-vite";
|
|
4
10
|
|
|
5
11
|
import type { Preview } from "@storybook/vue3-vite";
|
|
6
12
|
|
|
7
13
|
/* Theme styles */
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { themeLightPreview } from "./themes/themeLightPreview";
|
|
14
|
+
import "./theme/theme.css";
|
|
15
|
+
import "@vueless/storybook/preview.css";
|
|
16
|
+
import { theme } from "./theme/theme";
|
|
12
17
|
|
|
13
18
|
/* Vue plugins */
|
|
14
19
|
import { createVueless } from "vueless";
|
|
@@ -39,12 +44,12 @@ export default {
|
|
|
39
44
|
layout: "fullscreen",
|
|
40
45
|
backgrounds: { disable: true },
|
|
41
46
|
docs: {
|
|
42
|
-
theme:
|
|
47
|
+
theme: getThemeLightPreview(theme),
|
|
43
48
|
source: { language: "html" },
|
|
44
49
|
},
|
|
45
50
|
darkMode: {
|
|
46
|
-
light:
|
|
47
|
-
dark:
|
|
51
|
+
light: getThemeLight(theme),
|
|
52
|
+
dark: getThemeDark(theme),
|
|
48
53
|
classTarget: "body",
|
|
49
54
|
stylePreview: true,
|
|
50
55
|
},
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* -------------------- Color Palettes -------------------- */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* Neutral (Gray) Colors */
|
|
5
|
+
--neutral-50: #f9fafb;
|
|
6
|
+
--neutral-100: #f3f4f6;
|
|
7
|
+
--neutral-200: #e5e7eb;
|
|
8
|
+
--neutral-300: #d1d5db;
|
|
9
|
+
--neutral-400: #9ca3af;
|
|
10
|
+
--neutral-500: #6b7280;
|
|
11
|
+
--neutral-600: #4b5563;
|
|
12
|
+
--neutral-700: #374151;
|
|
13
|
+
--neutral-800: #1f2937;
|
|
14
|
+
--neutral-900: #111827;
|
|
15
|
+
--neutral-950: #030712;
|
|
16
|
+
|
|
17
|
+
/* Primary (Green) Colors */
|
|
18
|
+
--primary-50: #f0fdf4;
|
|
19
|
+
--primary-100: #dcfce7;
|
|
20
|
+
--primary-200: #bbf7d0;
|
|
21
|
+
--primary-300: #86efac;
|
|
22
|
+
--primary-400: #4ade80;
|
|
23
|
+
--primary-500: #22c55e;
|
|
24
|
+
--primary-600: #16a34a;
|
|
25
|
+
--primary-700: #15803d;
|
|
26
|
+
--primary-800: #166534;
|
|
27
|
+
--primary-900: #14532d;
|
|
28
|
+
--primary-950: #052e16;
|
|
29
|
+
|
|
30
|
+
/* White */
|
|
31
|
+
--white: #ffffff;
|
|
32
|
+
|
|
33
|
+
/* Border Radius */
|
|
34
|
+
--rounded-sm: 0.25rem;
|
|
35
|
+
--rounded-md: 0.375rem;
|
|
36
|
+
--rounded-lg: 0.5rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const theme = {
|
|
2
|
+
fontBase: '"Roboto", sans-serif',
|
|
3
|
+
fontCode: "monospace",
|
|
4
|
+
brandTitle: "Vueless UI",
|
|
5
|
+
brandUrl: "https://vueless.com",
|
|
6
|
+
brandTarget: "_blank",
|
|
7
|
+
brandImageLight: "./images/logo-light.svg",
|
|
8
|
+
brandImageDark: "./images/logo-dark.svg",
|
|
9
|
+
rounded: {
|
|
10
|
+
sm: 4,
|
|
11
|
+
md: 8,
|
|
12
|
+
lg: 12,
|
|
13
|
+
},
|
|
14
|
+
colors: {
|
|
15
|
+
white: "#ffffff",
|
|
16
|
+
gray: {
|
|
17
|
+
50: "#f9fafb",
|
|
18
|
+
100: "#f3f4f6",
|
|
19
|
+
200: "#e5e7eb",
|
|
20
|
+
300: "#d1d5db",
|
|
21
|
+
400: "#9ca3af",
|
|
22
|
+
500: "#6b7280",
|
|
23
|
+
600: "#4b5563",
|
|
24
|
+
700: "#374151",
|
|
25
|
+
800: "#1f2937",
|
|
26
|
+
900: "#111827",
|
|
27
|
+
950: "#030712",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
@@ -25,14 +25,15 @@ export const storyDarkModeDecorator = makeDecorator({
|
|
|
25
25
|
// this fixing first load
|
|
26
26
|
document.body.classList.add(storybookColorMode);
|
|
27
27
|
|
|
28
|
+
// TODO: Temporary disables
|
|
28
29
|
// this fixing white blink issue
|
|
29
|
-
if (window.location.toString().includes("viewMode=docs")) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
30
|
+
// if (window.location.toString().includes("viewMode=docs")) {
|
|
31
|
+
// document.documentElement.classList.add(storybookColorMode);
|
|
32
|
+
//
|
|
33
|
+
// setTimeout(() => {
|
|
34
|
+
// document.documentElement.classList.remove("light", "dark");
|
|
35
|
+
// }, 4000);
|
|
36
|
+
// }
|
|
36
37
|
|
|
37
38
|
DecoratorHelpers.initializeThemeState(["light", "dark"], storybookColorMode || systemColorMode);
|
|
38
39
|
|
package/index.browser.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { getThemeDark } from "./theme/getThemeDark.js";
|
|
2
|
+
export { getThemeLight } from "./theme/getThemeLight.js";
|
|
3
|
+
export { getThemeLightPreview } from "./theme/getThemeLightPreview.js";
|
|
4
|
+
|
|
2
5
|
export { vue3SourceDecorator } from "./decorators/vue3SourceDecorator.js";
|
|
6
|
+
export { storyDarkModeDecorator } from "./decorators/storyDarkModeDecorator.js";
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare function defineConfigWithVueless(options?: any): () => any;
|
|
2
2
|
export declare function getVuelessStoriesGlob(vuelessEnv?: string): Promise<string[]>;
|
|
3
3
|
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { getThemeDark } from "./theme/getThemeDark.js";
|
|
5
|
+
export { getThemeLight } from "./theme/getThemeLight.js";
|
|
6
|
+
export { getThemeLightPreview } from "./theme/getThemeLightPreview.js";
|
package/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { buildWebTypes } from "./webTypes/index.js";
|
|
2
|
+
export { getThemeDark } from "./theme/getThemeDark.js";
|
|
3
|
+
export { getThemeLight } from "./theme/getThemeLight.js";
|
|
4
|
+
export { getThemeLightPreview } from "./theme/getThemeLightPreview.js";
|
|
2
5
|
|
|
3
6
|
import { getVuelessConfig } from "vueless/utils/node/vuelessConfig.js";
|
|
4
7
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueless/storybook",
|
|
3
|
-
"version": "1.2.10-beta.
|
|
3
|
+
"version": "1.2.10-beta.8",
|
|
4
4
|
"description": "Simplifies Storybook configuration for Vueless UI library.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"release:major": "release-it major --ci"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@storybook/addon-docs": "^10.0.
|
|
27
|
-
"@storybook/addon-links": "^10.0.
|
|
28
|
-
"@storybook/addon-themes": "^10.0.
|
|
29
|
-
"@storybook/vue3-vite": "^10.0.
|
|
30
|
-
"@vueless/storybook-dark-mode": "^10.0.1
|
|
26
|
+
"@storybook/addon-docs": "^10.0.3",
|
|
27
|
+
"@storybook/addon-links": "^10.0.3",
|
|
28
|
+
"@storybook/addon-themes": "^10.0.3",
|
|
29
|
+
"@storybook/vue3-vite": "^10.0.3",
|
|
30
|
+
"@vueless/storybook-dark-mode": "^10.0.1",
|
|
31
31
|
"chokidar": "^4.0.3",
|
|
32
32
|
"esbuild": "^0.25.9",
|
|
33
33
|
"globby": "^14.1.0",
|
|
34
34
|
"mkdirp": "^3.0.1",
|
|
35
35
|
"prettier2": "npm:prettier@2.8.8",
|
|
36
|
-
"storybook": "^10.0.
|
|
36
|
+
"storybook": "^10.0.3",
|
|
37
37
|
"vue-docgen-api": "^4.79.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"eslint-config-prettier": "^10.1.8",
|
|
47
47
|
"eslint-plugin-node": "^11.1.0",
|
|
48
48
|
"eslint-plugin-prettier": "^5.5.4",
|
|
49
|
-
"eslint-plugin-storybook": "^10.0.
|
|
49
|
+
"eslint-plugin-storybook": "^10.0.3",
|
|
50
50
|
"prettier": "^3.6.2",
|
|
51
51
|
"release-it": "^19.0.4",
|
|
52
52
|
"tailwindcss": "^4.1.12",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"vue": "latest",
|
|
57
57
|
"vue-router": "latest",
|
|
58
58
|
"vue-tsc": "^3.0.6",
|
|
59
|
-
"vueless": "^1.
|
|
59
|
+
"vueless": "^1.3.1"
|
|
60
60
|
},
|
|
61
61
|
"type": "module",
|
|
62
62
|
"main": "index.js",
|
|
@@ -66,7 +66,9 @@
|
|
|
66
66
|
"node": "./index.js",
|
|
67
67
|
"types": "./index.d.ts",
|
|
68
68
|
"browser": "./index.browser.js"
|
|
69
|
-
}
|
|
69
|
+
},
|
|
70
|
+
"./manager.css": "./theme/manager.css",
|
|
71
|
+
"./preview.css": "./theme/preview.css"
|
|
70
72
|
},
|
|
71
73
|
"overrides": {
|
|
72
74
|
"vue-docgen-api": {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { create } from "storybook/theming";
|
|
2
|
+
|
|
3
|
+
export function getThemeDark(theme) {
|
|
4
|
+
return create({
|
|
5
|
+
base: "dark",
|
|
6
|
+
|
|
7
|
+
/* Fonts */
|
|
8
|
+
fontBase: theme.fontBase,
|
|
9
|
+
fontCode: theme.fontCode,
|
|
10
|
+
|
|
11
|
+
/* Brand block */
|
|
12
|
+
brandTitle: theme.brandTitle,
|
|
13
|
+
brandUrl: theme.brandUrl,
|
|
14
|
+
brandImage: theme.brandImageDark,
|
|
15
|
+
brandTarget: theme.brandTarget,
|
|
16
|
+
|
|
17
|
+
/* Main colors */
|
|
18
|
+
colorPrimary: theme.colors.gray[200],
|
|
19
|
+
colorSecondary: theme.colors.gray[700],
|
|
20
|
+
|
|
21
|
+
/* UI */
|
|
22
|
+
appBg: theme.colors.gray[900],
|
|
23
|
+
appPreviewBg: theme.colors.gray[900],
|
|
24
|
+
appBorderColor: theme.colors.gray[900],
|
|
25
|
+
appBorderRadius: 0,
|
|
26
|
+
|
|
27
|
+
/* Text colors */
|
|
28
|
+
textColor: theme.colors.gray[300],
|
|
29
|
+
textInverseColor: theme.colors.gray[800],
|
|
30
|
+
|
|
31
|
+
/* Toolbar default and active colors */
|
|
32
|
+
barTextColor: theme.colors.gray[500],
|
|
33
|
+
barHoverColor: theme.colors.gray[400],
|
|
34
|
+
barSelectedColor: theme.colors.gray[300],
|
|
35
|
+
barBg: theme.colors.gray[950],
|
|
36
|
+
|
|
37
|
+
/* Form colors */
|
|
38
|
+
inputBg: theme.colors.gray[950],
|
|
39
|
+
inputBorder: theme.colors.gray[600],
|
|
40
|
+
inputTextColor: theme.colors.gray[100],
|
|
41
|
+
inputBorderRadius: theme.rounded.sm,
|
|
42
|
+
buttonBg: theme.colors.gray[800],
|
|
43
|
+
buttonBorder: theme.colors.gray[800],
|
|
44
|
+
booleanBg: theme.colors.gray[900],
|
|
45
|
+
booleanSelectedBg: theme.colors.gray[800],
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { create } from "storybook/theming";
|
|
2
|
+
|
|
3
|
+
export function getThemeLight(theme) {
|
|
4
|
+
return create({
|
|
5
|
+
base: "light",
|
|
6
|
+
|
|
7
|
+
/* Fonts */
|
|
8
|
+
fontBase: theme.fontBase,
|
|
9
|
+
fontCode: theme.fontCode,
|
|
10
|
+
|
|
11
|
+
/* Brand block */
|
|
12
|
+
brandTitle: theme.brandTitle,
|
|
13
|
+
brandUrl: theme.brandUrl,
|
|
14
|
+
brandImage: theme.brandImageLight,
|
|
15
|
+
brandTarget: theme.brandTarget,
|
|
16
|
+
|
|
17
|
+
/* Main colors */
|
|
18
|
+
colorPrimary: theme.colors.gray[900],
|
|
19
|
+
colorSecondary: theme.colors.gray[500],
|
|
20
|
+
|
|
21
|
+
/* UI */
|
|
22
|
+
appBg: theme.colors.white,
|
|
23
|
+
appPreviewBg: theme.colors.gray[50],
|
|
24
|
+
appBorderColor: theme.colors.gray[300],
|
|
25
|
+
appBorderRadius: 0,
|
|
26
|
+
|
|
27
|
+
/* Text colors */
|
|
28
|
+
textColor: theme.colors.gray[900],
|
|
29
|
+
textInverseColor: theme.colors.gray[900],
|
|
30
|
+
|
|
31
|
+
/* Toolbar default and active colors */
|
|
32
|
+
barTextColor: theme.colors.gray[500],
|
|
33
|
+
barHoverColor: theme.colors.gray[600],
|
|
34
|
+
barSelectedColor: theme.colors.gray[700],
|
|
35
|
+
barBg: theme.colors.gray[50],
|
|
36
|
+
|
|
37
|
+
/* Form colors */
|
|
38
|
+
inputBg: theme.colors.white,
|
|
39
|
+
inputBorder: theme.colors.gray[300],
|
|
40
|
+
inputTextColor: theme.colors.gray[900],
|
|
41
|
+
inputBorderRadius: theme.rounded.sm,
|
|
42
|
+
buttonBg: theme.colors.gray[100],
|
|
43
|
+
buttonBorder: theme.colors.gray[200],
|
|
44
|
+
booleanBg: theme.colors.gray[50],
|
|
45
|
+
booleanSelectedBg: theme.colors.gray[200],
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { create } from "storybook/theming";
|
|
2
|
+
|
|
3
|
+
export function getThemeLightPreview(theme) {
|
|
4
|
+
return create({
|
|
5
|
+
base: "light",
|
|
6
|
+
|
|
7
|
+
/* Fonts */
|
|
8
|
+
fontBase: theme.fontBase,
|
|
9
|
+
fontCode: theme.fontCode,
|
|
10
|
+
|
|
11
|
+
/* Main colors */
|
|
12
|
+
colorPrimary: theme.colors.gray[900],
|
|
13
|
+
colorSecondary: theme.colors.gray[500],
|
|
14
|
+
|
|
15
|
+
/* UI */
|
|
16
|
+
appBg: theme.colors.gray[100],
|
|
17
|
+
appPreviewBg: theme.colors.gray[50],
|
|
18
|
+
appBorderColor: theme.colors.gray[200],
|
|
19
|
+
appContentBg: theme.colors.gray[50],
|
|
20
|
+
appBorderRadius: theme.rounded.lg,
|
|
21
|
+
|
|
22
|
+
/* Text colors */
|
|
23
|
+
textColor: theme.colors.gray[900],
|
|
24
|
+
textInverseColor: theme.colors.gray[50],
|
|
25
|
+
|
|
26
|
+
/* Toolbar default and active colors */
|
|
27
|
+
barTextColor: theme.colors.gray[500],
|
|
28
|
+
barHoverColor: theme.colors.gray[600],
|
|
29
|
+
barSelectedColor: theme.colors.gray[700],
|
|
30
|
+
barBg: theme.colors.white,
|
|
31
|
+
|
|
32
|
+
/* Form colors */
|
|
33
|
+
inputBg: theme.colors.white,
|
|
34
|
+
inputBorder: theme.colors.gray[300],
|
|
35
|
+
inputTextColor: theme.colors.gray[900],
|
|
36
|
+
inputBorderRadius: theme.rounded.sm,
|
|
37
|
+
buttonBg: theme.colors.gray[100],
|
|
38
|
+
buttonBorder: theme.colors.gray[200],
|
|
39
|
+
booleanBg: theme.colors.gray[50],
|
|
40
|
+
booleanSelectedBg: theme.colors.gray[200],
|
|
41
|
+
});
|
|
42
|
+
}
|