@storybook/addon-controls 6.5.0-alpha.53 → 6.5.0-alpha.56

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.
@@ -64,6 +64,10 @@ var ControlsPanel = function ControlsPanel() {
64
64
  updateArgs = _useArgs2[1],
65
65
  resetArgs = _useArgs2[2];
66
66
 
67
+ var _useGlobals = (0, _api.useGlobals)(),
68
+ _useGlobals2 = _slicedToArray(_useGlobals, 1),
69
+ globals = _useGlobals2[0];
70
+
67
71
  var rows = (0, _api.useArgTypes)();
68
72
  var isArgsStory = (0, _api.useParameter)('__isArgsStory', false);
69
73
 
@@ -101,6 +105,7 @@ var ControlsPanel = function ControlsPanel() {
101
105
  compact: !expanded && hasControls,
102
106
  rows: withPresetColors,
103
107
  args: args,
108
+ globals: globals,
104
109
  updateArgs: updateArgs,
105
110
  resetArgs: resetArgs,
106
111
  inAddonPanel: true,
@@ -27,7 +27,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
27
27
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
28
 
29
29
  import React from 'react';
30
- import { useArgs, useArgTypes, useParameter, useStorybookState } from '@storybook/api';
30
+ import { useArgs, useGlobals, useArgTypes, useParameter, useStorybookState } from '@storybook/api';
31
31
  import { ArgsTable, NoControlsWarning } from '@storybook/components';
32
32
  import { PARAM_KEY } from './constants';
33
33
  export var ControlsPanel = function ControlsPanel() {
@@ -37,6 +37,10 @@ export var ControlsPanel = function ControlsPanel() {
37
37
  updateArgs = _useArgs2[1],
38
38
  resetArgs = _useArgs2[2];
39
39
 
40
+ var _useGlobals = useGlobals(),
41
+ _useGlobals2 = _slicedToArray(_useGlobals, 1),
42
+ globals = _useGlobals2[0];
43
+
40
44
  var rows = useArgTypes();
41
45
  var isArgsStory = useParameter('__isArgsStory', false);
42
46
 
@@ -74,6 +78,7 @@ export var ControlsPanel = function ControlsPanel() {
74
78
  compact: !expanded && hasControls,
75
79
  rows: withPresetColors,
76
80
  args: args,
81
+ globals: globals,
77
82
  updateArgs: updateArgs,
78
83
  resetArgs: resetArgs,
79
84
  inAddonPanel: true,
@@ -1,10 +1,11 @@
1
1
  import "core-js/modules/es.array.reduce.js";
2
2
  import React from 'react';
3
- import { useArgs, useArgTypes, useParameter, useStorybookState } from '@storybook/api';
3
+ import { useArgs, useGlobals, useArgTypes, useParameter, useStorybookState } from '@storybook/api';
4
4
  import { ArgsTable, NoControlsWarning } from '@storybook/components';
5
5
  import { PARAM_KEY } from './constants';
6
6
  export const ControlsPanel = () => {
7
7
  const [args, updateArgs, resetArgs] = useArgs();
8
+ const [globals] = useGlobals();
8
9
  const rows = useArgTypes();
9
10
  const isArgsStory = useParameter('__isArgsStory', false);
10
11
  const {
@@ -34,6 +35,7 @@ export const ControlsPanel = () => {
34
35
  compact: !expanded && hasControls,
35
36
  rows: withPresetColors,
36
37
  args,
38
+ globals,
37
39
  updateArgs,
38
40
  resetArgs,
39
41
  inAddonPanel: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-controls",
3
- "version": "6.5.0-alpha.53",
3
+ "version": "6.5.0-alpha.56",
4
4
  "description": "Interact with component inputs dynamically in the Storybook UI",
5
5
  "keywords": [
6
6
  "addon",
@@ -45,22 +45,22 @@
45
45
  "prepare": "node ../../scripts/prepare.js"
46
46
  },
47
47
  "dependencies": {
48
- "@storybook/addons": "6.5.0-alpha.53",
49
- "@storybook/api": "6.5.0-alpha.53",
50
- "@storybook/client-logger": "6.5.0-alpha.53",
51
- "@storybook/components": "6.5.0-alpha.53",
52
- "@storybook/core-common": "6.5.0-alpha.53",
53
- "@storybook/csf": "0.0.2--canary.507502b.0",
54
- "@storybook/node-logger": "6.5.0-alpha.53",
55
- "@storybook/store": "6.5.0-alpha.53",
56
- "@storybook/theming": "6.5.0-alpha.53",
48
+ "@storybook/addons": "6.5.0-alpha.56",
49
+ "@storybook/api": "6.5.0-alpha.56",
50
+ "@storybook/client-logger": "6.5.0-alpha.56",
51
+ "@storybook/components": "6.5.0-alpha.56",
52
+ "@storybook/core-common": "6.5.0-alpha.56",
53
+ "@storybook/csf": "0.0.2--canary.7c6c115.0",
54
+ "@storybook/node-logger": "6.5.0-alpha.56",
55
+ "@storybook/store": "6.5.0-alpha.56",
56
+ "@storybook/theming": "6.5.0-alpha.56",
57
57
  "core-js": "^3.8.2",
58
58
  "lodash": "^4.17.21",
59
59
  "ts-dedent": "^2.0.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "react": "^16.8.0 || ^17.0.0",
63
- "react-dom": "^16.8.0 || ^17.0.0"
62
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
63
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
64
64
  },
65
65
  "peerDependenciesMeta": {
66
66
  "react": {
@@ -73,7 +73,7 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "652768b3ff83a355651d5636ccc4d78bee2cdbf9",
76
+ "gitHead": "61e4093b46a23f03dfb67e46601e1297d5d55190",
77
77
  "sbmodern": "dist/modern/manager.js",
78
78
  "storybook": {
79
79
  "displayName": "Controls",