@sit-onyx/storybook-utils 1.1.0-dev-20251118142506 → 1.1.1-dev-20260122090908

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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/src/types.ts +12 -8
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.1.0-dev-20251118142506",
4
+ "version": "1.1.1-dev-20260122090908",
5
5
  "type": "module",
6
6
  "author": "Schwarz IT KG",
7
7
  "license": "Apache-2.0",
@@ -32,16 +32,16 @@
32
32
  "storybook": ">= 9.0.0",
33
33
  "vue-component-type-helpers": ">= 2",
34
34
  "@sit-onyx/flags": "^1.0.0",
35
- "@sit-onyx/icons": "^1.2.0-dev-20251118142506"
35
+ "@sit-onyx/icons": "^1.4.0"
36
36
  },
37
37
  "dependencies": {
38
38
  "deepmerge-ts": "^7.1.5"
39
39
  },
40
40
  "devDependencies": {
41
- "storybook": "^10.0.8",
42
- "vue": "3.5.24",
43
- "vue-component-type-helpers": "^3.1.4",
44
- "@sit-onyx/icons": "^1.2.0-dev-20251118142506",
41
+ "storybook": "^10.2.0",
42
+ "vue": "3.5.27",
43
+ "vue-component-type-helpers": "^3.2.2",
44
+ "@sit-onyx/icons": "^1.4.0",
45
45
  "@sit-onyx/shared": "^0.1.0"
46
46
  },
47
47
  "scripts": {
package/src/types.ts CHANGED
@@ -1,11 +1,15 @@
1
- export type StorybookGlobalType<TValue> = {
2
- name: string;
3
- description: string;
1
+ import type { GlobalTypes } from "storybook/internal/csf";
2
+
3
+ type ToolbarArgType = GlobalTypes[number];
4
+ type ToolbarConfig = NonNullable<ToolbarArgType["toolbar"]>;
5
+ type ToolbarItem = Exclude<ToolbarConfig["items"][number], string>;
6
+
7
+ /**
8
+ * Same as Storybook's `ToolbarArgType` but with support for generically typed value.
9
+ */
10
+ export type StorybookGlobalType<TValue> = Omit<ToolbarArgType, "defaultValue" | "toolbar"> & {
4
11
  defaultValue?: TValue;
5
- toolbar: {
6
- icon: string;
7
- items: { value: TValue; right?: string; title: string }[];
8
- title?: string;
9
- dynamicTitle?: boolean;
12
+ toolbar: Omit<ToolbarConfig, "items"> & {
13
+ items: (Omit<ToolbarItem, "value"> & { value?: TValue })[];
10
14
  };
11
15
  };