@sit-onyx/storybook-utils 1.0.0-beta.73 → 1.0.0-beta.75

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sit-onyx/storybook-utils",
3
3
  "description": "Storybook utilities for Vue",
4
- "version": "1.0.0-beta.73",
4
+ "version": "1.0.0-beta.75",
5
5
  "type": "module",
6
6
  "author": "Schwarz IT KG",
7
7
  "license": "Apache-2.0",
@@ -28,17 +28,17 @@
28
28
  "storybook": ">= 8.3.0",
29
29
  "storybook-dark-mode": ">= 4",
30
30
  "vue-component-type-helpers": ">= 2",
31
- "@sit-onyx/icons": "^1.0.0-beta.7",
31
+ "@sit-onyx/icons": "^1.0.0-beta.8",
32
32
  "@sit-onyx/shared": "^0.0.1-beta.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "deepmerge-ts": "^7.1.3"
36
36
  },
37
37
  "devDependencies": {
38
- "@storybook/addon-actions": "^8.4.5",
38
+ "@storybook/addon-actions": "^8.4.7",
39
39
  "vue": "3.5.13",
40
40
  "vue-component-type-helpers": "^2.1.10",
41
- "@sit-onyx/icons": "^1.0.0-beta.7",
41
+ "@sit-onyx/icons": "^1.0.0-beta.8",
42
42
  "@sit-onyx/shared": "^0.0.1-beta.0"
43
43
  },
44
44
  "scripts": {
package/src/preview.ts CHANGED
@@ -36,8 +36,8 @@ import { ONYX_BREAKPOINTS, createTheme, type BrandDetails } from "./theme";
36
36
  * ```
37
37
  */
38
38
  export const createPreview = <T extends Preview = Preview>(
39
- brandDetails: BrandDetails,
40
39
  overrides?: T,
40
+ brandDetails?: BrandDetails,
41
41
  ) => {
42
42
  const themes = {
43
43
  light: createTheme("light", brandDetails),
@@ -68,11 +68,9 @@ export const createPreview = <T extends Preview = Preview>(
68
68
  if (isDark) {
69
69
  document.body.classList.remove("light");
70
70
  document.body.classList.add("dark");
71
- document.documentElement.style.colorScheme = "dark";
72
71
  } else {
73
72
  document.body.classList.remove("dark");
74
73
  document.body.classList.add("light");
75
- document.documentElement.style.colorScheme = "light";
76
74
  }
77
75
 
78
76
  return isDark ? themes.dark : themes.light;
package/src/theme.ts CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "@sit-onyx/shared/breakpoints";
5
5
  import { create, type ThemeVars } from "storybook/internal/theming";
6
6
 
7
- export type BrandDetails = Required<Pick<ThemeVars, "brandTitle" | "brandImage" | "brandUrl">>;
7
+ export type BrandDetails = Pick<ThemeVars, "brandTitle" | "brandImage" | "brandUrl">;
8
8
 
9
9
  /**
10
10
  * Get the computed value for a CSS custom property.