@dxos/react-ui 0.6.1 → 0.6.2-main.000b1cc

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.
@@ -1 +1 @@
1
- {"version":3,"file":"with-theme.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/with-theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAOlD,eAAO,MAAM,SAAS,EAAE,SAUvB,CAAC"}
1
+ {"version":3,"file":"with-theme.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/with-theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAmC,MAAM,kBAAkB,CAAC;AAOnF,eAAO,MAAM,SAAS,EAAE,SAUvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui",
3
- "version": "0.6.1",
3
+ "version": "0.6.2-main.000b1cc",
4
4
  "description": "Low-level React components for DXOS, applying a theme to a core group of primitives",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -39,11 +39,11 @@
39
39
  "i18next": "^21.10.0",
40
40
  "keyborg": "^2.5.0",
41
41
  "react-i18next": "^11.18.6",
42
- "@dxos/log": "0.6.1",
43
- "@dxos/react-hooks": "0.6.1",
44
- "@dxos/react-ui-types": "0.6.1",
45
- "@dxos/react-input": "0.6.1",
46
- "@dxos/react-list": "0.6.1"
42
+ "@dxos/react-hooks": "0.6.2-main.000b1cc",
43
+ "@dxos/react-input": "0.6.2-main.000b1cc",
44
+ "@dxos/log": "0.6.2-main.000b1cc",
45
+ "@dxos/react-list": "0.6.2-main.000b1cc",
46
+ "@dxos/react-ui-types": "0.6.2-main.000b1cc"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@dnd-kit/core": "^6.0.5",
@@ -55,9 +55,9 @@
55
55
  "react": "^18.2.0",
56
56
  "react-dom": "^18.2.0",
57
57
  "vite": "^5.2.9",
58
- "@dxos/random": "0.6.1",
59
- "@dxos/react-ui-theme": "0.6.1",
60
- "@dxos/util": "0.6.1"
58
+ "@dxos/random": "0.6.2-main.000b1cc",
59
+ "@dxos/react-ui-theme": "0.6.2-main.000b1cc",
60
+ "@dxos/util": "0.6.2-main.000b1cc"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@phosphor-icons/react": "^2.1.5",
@@ -2,21 +2,21 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Decorator } from '@storybook/react';
5
+ import { type Decorator, type StoryContext, type StoryFn } from '@storybook/react';
6
6
  import { useEffect, createElement } from 'react';
7
7
 
8
8
  import { defaultTx } from '@dxos/react-ui-theme';
9
9
 
10
10
  import { ThemeProvider } from '../../components';
11
11
 
12
- export const withTheme: Decorator = (StoryFn, context) => {
12
+ export const withTheme: Decorator = (Story: StoryFn, context: StoryContext) => {
13
13
  const theme = context?.parameters?.theme || context?.globals?.theme;
14
14
  useEffect(() => {
15
15
  document.documentElement.classList[theme === 'dark' ? 'add' : 'remove']('dark');
16
16
  }, [theme]);
17
17
 
18
18
  return createElement(ThemeProvider, {
19
- children: createElement(StoryFn),
19
+ children: createElement(Story),
20
20
  tx: defaultTx,
21
21
  });
22
22
  };