@sit-onyx/storybook-utils 1.1.3 → 1.1.4-dev-20260715124840

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/LICENSE.txt CHANGED
@@ -175,7 +175,7 @@
175
175
 
176
176
  END OF TERMS AND CONDITIONS
177
177
 
178
- Copyright 2023 Schwarz IT KG
178
+ Copyright 2023 Schwarz Digits IT KG
179
179
 
180
180
  Licensed under the Apache License, Version 2.0 (the "License");
181
181
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  <div align="center" style="text-align: center">
2
- <img alt="onyx logo" src="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/onyx-logo.svg" height="96px">
2
+ <img alt="Onyx logo" src="https://raw.githubusercontent.com/SchwarzIT/onyx/main/packages/assets/src/onyx-brand/signet.svg" height="96px">
3
3
  </div>
4
4
 
5
5
  <br>
6
6
 
7
7
  # onyx Storybook utils
8
8
 
9
- Storybook utilities for Vue created by [Schwarz IT](https://it.schwarz).
9
+ Storybook utilities for Vue created by [Schwarz Digits](https://schwarz-digits.de).
10
10
 
11
11
  <br />
12
12
 
package/package.json CHANGED
@@ -1,29 +1,37 @@
1
1
  {
2
2
  "name": "@sit-onyx/storybook-utils",
3
+ "version": "1.1.4-dev-20260715124840",
3
4
  "description": "Storybook utilities for Vue",
4
- "version": "1.1.3",
5
- "type": "module",
6
- "author": "Schwarz IT KG",
5
+ "homepage": "https://onyx.schwarz/development/packages/storybook-utils.html",
6
+ "bugs": {
7
+ "url": "https://github.com/SchwarzIT/onyx/issues"
8
+ },
7
9
  "license": "Apache-2.0",
8
- "engines": {
9
- "node": ">=20"
10
+ "author": "Schwarz Digits IT KG",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/SchwarzIT/onyx",
14
+ "directory": "packages/storybook-utils"
10
15
  },
11
16
  "files": [
12
17
  "src"
13
18
  ],
19
+ "type": "module",
14
20
  "types": "./src/index.ts",
15
21
  "exports": {
16
22
  ".": "./src/index.ts",
17
23
  "./style.css": "./src/style.css"
18
24
  },
19
- "homepage": "https://onyx.schwarz/development/packages/storybook-utils.html",
20
- "repository": {
21
- "type": "git",
22
- "url": "https://github.com/SchwarzIT/onyx",
23
- "directory": "packages/storybook-utils"
25
+ "dependencies": {
26
+ "deepmerge-ts": "^7.1.5"
24
27
  },
25
- "bugs": {
26
- "url": "https://github.com/SchwarzIT/onyx/issues"
28
+ "devDependencies": {
29
+ "prettier": "^3.9.5",
30
+ "storybook": "^10.5.0",
31
+ "vue": "3.5.39",
32
+ "vue-component-type-helpers": "^3.3.7",
33
+ "@sit-onyx/icons": "^1.10.1",
34
+ "@sit-onyx/shared": "^0.1.0"
27
35
  },
28
36
  "peerDependencies": {
29
37
  "@storybook/vue3-vite": ">= 9.0.0",
@@ -31,18 +39,11 @@
31
39
  "prettier": ">= 3.0.0",
32
40
  "storybook": ">= 9.0.0",
33
41
  "vue-component-type-helpers": ">= 2",
34
- "@sit-onyx/flags": "^1.2.0",
35
- "@sit-onyx/icons": "^1.9.0"
42
+ "@sit-onyx/flags": "^1.3.0",
43
+ "@sit-onyx/icons": "^1.10.1"
36
44
  },
37
- "dependencies": {
38
- "deepmerge-ts": "^7.1.5"
39
- },
40
- "devDependencies": {
41
- "storybook": "^10.3.6",
42
- "vue": "3.5.33",
43
- "vue-component-type-helpers": "^3.2.7",
44
- "@sit-onyx/icons": "^1.9.0",
45
- "@sit-onyx/shared": "^0.1.0"
45
+ "engines": {
46
+ "node": ">=20"
46
47
  },
47
48
  "scripts": {
48
49
  "build": "tsc --noEmit",
package/src/events.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Events } from "vue";
2
2
 
3
- // prettier-ignore
3
+ // oxfmt-ignore
4
4
  type EventName<T extends Event> =
5
5
  T extends ClipboardEvent ? "ClipboardEvent"
6
6
  : T extends WheelEvent ? "WheelEvent"
package/src/theme.ts CHANGED
@@ -2,7 +2,14 @@ import { create, type ThemeVars } from "storybook/theming";
2
2
  import type { Viewport } from "storybook/viewport";
3
3
  import { ONYX_BREAKPOINTS as RAW_ONYX_BREAKPOINTS, type OnyxBreakpoint } from "./breakpoints.js";
4
4
 
5
- export type BrandDetails = Pick<ThemeVars, "brandTitle" | "brandImage" | "brandUrl">;
5
+ export type BrandDetails = Pick<ThemeVars, "brandTitle" | "brandUrl"> & {
6
+ brandImage:
7
+ | string
8
+ | {
9
+ dark: string;
10
+ light: string;
11
+ };
12
+ };
6
13
 
7
14
  /**
8
15
  * Get the computed value for a CSS custom property.
@@ -21,7 +28,10 @@ export const createTheme = (base: "light" | "dark" = "light", brandDetails?: Bra
21
28
  return create({
22
29
  brandTitle: brandDetails?.brandTitle,
23
30
  brandUrl: brandDetails?.brandUrl,
24
- brandImage: brandDetails?.brandImage,
31
+ brandImage:
32
+ typeof brandDetails?.brandImage === "object"
33
+ ? brandDetails.brandImage[base]
34
+ : brandDetails?.brandImage,
25
35
  brandTarget: "_blank",
26
36
  base,
27
37